git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ethdev: change allmulticast callbacks to return status
[dpdk.git]
/
drivers
/
net
/
mvpp2
/
mrvl_ethdev.c
diff --git
a/drivers/net/mvpp2/mrvl_ethdev.c
b/drivers/net/mvpp2/mrvl_ethdev.c
index
0af5635
..
b98b1fd
100644
(file)
--- a/
drivers/net/mvpp2/mrvl_ethdev.c
+++ b/
drivers/net/mvpp2/mrvl_ethdev.c
@@
-1024,22
+1024,29
@@
mrvl_promiscuous_enable(struct rte_eth_dev *dev)
*
* @param dev
* Pointer to Ethernet device structure.
*
* @param dev
* Pointer to Ethernet device structure.
+ *
+ * @return
+ * 0 on success, negative error value otherwise.
*/
*/
-static
void
+static
int
mrvl_allmulticast_enable(struct rte_eth_dev *dev)
{
struct mrvl_priv *priv = dev->data->dev_private;
int ret;
if (!priv->ppio)
mrvl_allmulticast_enable(struct rte_eth_dev *dev)
{
struct mrvl_priv *priv = dev->data->dev_private;
int ret;
if (!priv->ppio)
- return;
+ return
0
;
if (priv->isolated)
if (priv->isolated)
- return;
+ return
0
;
ret = pp2_ppio_set_mc_promisc(priv->ppio, 1);
ret = pp2_ppio_set_mc_promisc(priv->ppio, 1);
- if (ret)
+ if (ret)
{
MRVL_LOG(ERR, "Failed enable all-multicast mode");
MRVL_LOG(ERR, "Failed enable all-multicast mode");
+ return -EAGAIN;
+ }
+
+ return 0;
}
/**
}
/**
@@
-1074,19
+1081,26
@@
mrvl_promiscuous_disable(struct rte_eth_dev *dev)
*
* @param dev
* Pointer to Ethernet device structure.
*
* @param dev
* Pointer to Ethernet device structure.
+ *
+ * @return
+ * 0 on success, negative error value otherwise.
*/
*/
-static
void
+static
int
mrvl_allmulticast_disable(struct rte_eth_dev *dev)
{
struct mrvl_priv *priv = dev->data->dev_private;
int ret;
if (!priv->ppio)
mrvl_allmulticast_disable(struct rte_eth_dev *dev)
{
struct mrvl_priv *priv = dev->data->dev_private;
int ret;
if (!priv->ppio)
- return;
+ return
0
;
ret = pp2_ppio_set_mc_promisc(priv->ppio, 0);
ret = pp2_ppio_set_mc_promisc(priv->ppio, 0);
- if (ret)
+ if (ret)
{
MRVL_LOG(ERR, "Failed to disable all-multicast mode");
MRVL_LOG(ERR, "Failed to disable all-multicast mode");
+ return -EAGAIN;
+ }
+
+ return 0;
}
/**
}
/**