* DPDK callback to remove a MAC address. * * @param dev * Pointer to Ethernet device structure. * @param index * MAC address index. */
| 447 | * MAC address index. |
| 448 | */ |
| 449 | void |
| 450 | mlx4_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. |
nothing calls this directly
no test coverage detected