1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright 2015 6WIND S.A.
3 * Copyright 2015 Mellanox.
11 /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */
13 #pragma GCC diagnostic ignored "-Wpedantic"
15 #include <infiniband/verbs.h>
17 #pragma GCC diagnostic error "-Wpedantic"
20 #include <rte_ethdev_driver.h>
23 #include "mlx5_rxtx.h"
24 #include "mlx5_utils.h"
27 * DPDK callback to enable promiscuous mode.
30 * Pointer to Ethernet device structure.
33 mlx5_promiscuous_enable(struct rte_eth_dev *dev)
35 dev->data->promiscuous = 1;
36 mlx5_traffic_restart(dev);
40 * DPDK callback to disable promiscuous mode.
43 * Pointer to Ethernet device structure.
46 mlx5_promiscuous_disable(struct rte_eth_dev *dev)
48 dev->data->promiscuous = 0;
49 mlx5_traffic_restart(dev);
53 * DPDK callback to enable allmulti mode.
56 * Pointer to Ethernet device structure.
59 mlx5_allmulticast_enable(struct rte_eth_dev *dev)
61 dev->data->all_multicast = 1;
62 mlx5_traffic_restart(dev);
66 * DPDK callback to disable allmulti mode.
69 * Pointer to Ethernet device structure.
72 mlx5_allmulticast_disable(struct rte_eth_dev *dev)
74 dev->data->all_multicast = 0;
75 mlx5_traffic_restart(dev);