[dpdk-dev] [PATCH v2 04/13] ethdev: change promiscuous callbacks to return status
Ferruh Yigit
ferruh.yigit at intel.com
Fri Sep 13 18:43:15 CEST 2019
On 9/9/2019 12:58 PM, Andrew Rybchenko wrote:
> Enabling/disabling of promiscuous mode is not always successful and
> it should be taken into account to be able to handle it properly.
>
> When correct return status is unclear from driver code, -EAGAIN is used.
>
> Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
<...>
> @@ -376,8 +384,11 @@ mlx4_rxmode_toggle(struct rte_eth_dev *dev, enum rxmode_toggle toggle)
> *
> * @param dev
> * Pointer to Ethernet device structure.
> + *
> + * @return
> + * 0 on success, a negative errno value otherwise and rte_errno is set.
> */
> -void
> +int
> mlx4_promiscuous_enable(struct rte_eth_dev *dev)
> {
> mlx4_rxmode_toggle(dev, RXMODE_TOGGLE_PROMISC_ON);
> @@ -388,8 +399,11 @@ mlx4_promiscuous_enable(struct rte_eth_dev *dev)
> *
> * @param dev
> * Pointer to Ethernet device structure.
> + *
> + * @return
> + * 0 on success, a negative errno value otherwise and rte_errno is set.
> */
> -void
> +int
> mlx4_promiscuous_disable(struct rte_eth_dev *dev)
> {
> mlx4_rxmode_toggle(dev, RXMODE_TOGGLE_PROMISC_OFF);
error: control reaches end of non-void function [-Werror=return-type]
More information about the dev
mailing list