/* SPDX-License-Identifier: BSD-3-Clause * Copyright 2015 6WIND S.A. * Copyright 2015 Mellanox. */ #include #include #include /* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ #ifdef PEDANTIC #pragma GCC diagnostic ignored "-Wpedantic" #endif #include #ifdef PEDANTIC #pragma GCC diagnostic error "-Wpedantic" #endif #include #include "mlx5.h" #include "mlx5_rxtx.h" #include "mlx5_utils.h" /** * DPDK callback to enable promiscuous mode. * * @param dev * Pointer to Ethernet device structure. */ void mlx5_promiscuous_enable(struct rte_eth_dev *dev) { dev->data->promiscuous = 1; mlx5_traffic_restart(dev); } /** * DPDK callback to disable promiscuous mode. * * @param dev * Pointer to Ethernet device structure. */ void mlx5_promiscuous_disable(struct rte_eth_dev *dev) { dev->data->promiscuous = 0; mlx5_traffic_restart(dev); } /** * DPDK callback to enable allmulti mode. * * @param dev * Pointer to Ethernet device structure. */ void mlx5_allmulticast_enable(struct rte_eth_dev *dev) { dev->data->all_multicast = 1; mlx5_traffic_restart(dev); } /** * DPDK callback to disable allmulti mode. * * @param dev * Pointer to Ethernet device structure. */ void mlx5_allmulticast_disable(struct rte_eth_dev *dev) { dev->data->all_multicast = 0; mlx5_traffic_restart(dev); }