MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mrvl_mac_addr_remove

Function mrvl_mac_addr_remove

dpdk/drivers/net/mvpp2/mrvl_ethdev.c:1366–1386  ·  view source on GitHub ↗

* DPDK callback to remove a MAC address. * * @param dev * Pointer to Ethernet device structure. * @param index * MAC address index. */

Source from the content-addressed store, hash-verified

1364 * MAC address index.
1365 */
1366static void
1367mrvl_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
1368{
1369 struct mrvl_priv *priv = dev->data->dev_private;
1370 char buf[RTE_ETHER_ADDR_FMT_SIZE];
1371 int ret;
1372
1373 if (priv->isolated)
1374 return;
1375
1376 if (!priv->ppio)
1377 return;
1378
1379 ret = pp2_ppio_remove_mac_addr(priv->ppio,
1380 dev->data->mac_addrs[index].addr_bytes);
1381 if (ret) {
1382 rte_ether_format_addr(buf, sizeof(buf),
1383 &dev->data->mac_addrs[index]);
1384 MRVL_LOG(ERR, "Failed to remove mac %s", buf);
1385 }
1386}
1387
1388/**
1389 * DPDK callback to add a MAC address.

Callers

nothing calls this directly

Calls 1

rte_ether_format_addrFunction · 0.85

Tested by

no test coverage detected