static int iavf_dev_stats_get(struct rte_eth_dev *dev,
struct rte_eth_stats *stats);
static void iavf_dev_stats_reset(struct rte_eth_dev *dev);
-static void iavf_dev_promiscuous_enable(struct rte_eth_dev *dev);
-static void iavf_dev_promiscuous_disable(struct rte_eth_dev *dev);
+static int iavf_dev_promiscuous_enable(struct rte_eth_dev *dev);
+static int iavf_dev_promiscuous_disable(struct rte_eth_dev *dev);
static void iavf_dev_allmulticast_enable(struct rte_eth_dev *dev);
static void iavf_dev_allmulticast_disable(struct rte_eth_dev *dev);
static int iavf_dev_add_mac_addr(struct rte_eth_dev *dev,
return 0;
}
-static void
+static int
iavf_dev_promiscuous_enable(struct rte_eth_dev *dev)
{
struct iavf_adapter *adapter =
int ret;
if (vf->promisc_unicast_enabled)
- return;
+ return 0;
ret = iavf_config_promisc(adapter, TRUE, vf->promisc_multicast_enabled);
if (!ret)
vf->promisc_unicast_enabled = TRUE;
+ else
+ ret = -EAGAIN;
+
+ return ret;
}
-static void
+static int
iavf_dev_promiscuous_disable(struct rte_eth_dev *dev)
{
struct iavf_adapter *adapter =
int ret;
if (!vf->promisc_unicast_enabled)
- return;
+ return 0;
ret = iavf_config_promisc(adapter, FALSE, vf->promisc_multicast_enabled);
if (!ret)
vf->promisc_unicast_enabled = FALSE;
+ else
+ ret = -EAGAIN;
+
+ return ret;
}
static void