net/sfc: fix promiscuous and allmulticast toggles errors
Returned errors of ethdev callbacks are negative. Internal sfc functions return positive errors, so convert them to negative value. Fixes: 9039c8125730 ("ethdev: change promiscuous callbacks to return status") Cc: stable@dpdk.org Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
This commit is contained in:
parent
897358cc1e
commit
7329b56f11
@ -405,25 +405,37 @@ sfc_dev_filter_set(struct rte_eth_dev *dev, enum sfc_dev_filter_mode mode,
|
||||
static int
|
||||
sfc_dev_promisc_enable(struct rte_eth_dev *dev)
|
||||
{
|
||||
return sfc_dev_filter_set(dev, SFC_DEV_FILTER_MODE_PROMISC, B_TRUE);
|
||||
int rc = sfc_dev_filter_set(dev, SFC_DEV_FILTER_MODE_PROMISC, B_TRUE);
|
||||
|
||||
SFC_ASSERT(rc >= 0);
|
||||
return -rc;
|
||||
}
|
||||
|
||||
static int
|
||||
sfc_dev_promisc_disable(struct rte_eth_dev *dev)
|
||||
{
|
||||
return sfc_dev_filter_set(dev, SFC_DEV_FILTER_MODE_PROMISC, B_FALSE);
|
||||
int rc = sfc_dev_filter_set(dev, SFC_DEV_FILTER_MODE_PROMISC, B_FALSE);
|
||||
|
||||
SFC_ASSERT(rc >= 0);
|
||||
return -rc;
|
||||
}
|
||||
|
||||
static int
|
||||
sfc_dev_allmulti_enable(struct rte_eth_dev *dev)
|
||||
{
|
||||
return sfc_dev_filter_set(dev, SFC_DEV_FILTER_MODE_ALLMULTI, B_TRUE);
|
||||
int rc = sfc_dev_filter_set(dev, SFC_DEV_FILTER_MODE_ALLMULTI, B_TRUE);
|
||||
|
||||
SFC_ASSERT(rc >= 0);
|
||||
return -rc;
|
||||
}
|
||||
|
||||
static int
|
||||
sfc_dev_allmulti_disable(struct rte_eth_dev *dev)
|
||||
{
|
||||
return sfc_dev_filter_set(dev, SFC_DEV_FILTER_MODE_ALLMULTI, B_FALSE);
|
||||
int rc = sfc_dev_filter_set(dev, SFC_DEV_FILTER_MODE_ALLMULTI, B_FALSE);
|
||||
|
||||
SFC_ASSERT(rc >= 0);
|
||||
return -rc;
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
x
Reference in New Issue
Block a user