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

Function mlx4_mac_addr_remove

dpdk/drivers/net/mlx4/mlx4_ethdev.c:449–467  ·  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

447 * MAC address index.
448 */
449void
450mlx4_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
451{
452 struct mlx4_priv *priv = dev->data->dev_private;
453 struct rte_flow_error error;
454
455 if (index >= RTE_DIM(priv->mac) - priv->mac_mc) {
456 rte_errno = EINVAL;
457 return;
458 }
459 memset(&priv->mac[index], 0, sizeof(priv->mac[index]));
460 if (!mlx4_flow_sync(priv, &error))
461 return;
462 ERROR("failed to synchronize flow rules after removing MAC address"
463 " at index %d (code %d, \"%s\"),"
464 " flow error type %d, cause %p, message: %s",
465 index, rte_errno, strerror(rte_errno), error.type, error.cause,
466 error.message ? error.message : "(unspecified)");
467}
468
469/**
470 * DPDK callback to add a MAC address.

Callers

nothing calls this directly

Calls 2

memsetFunction · 0.85
mlx4_flow_syncFunction · 0.85

Tested by

no test coverage detected