*
* @param dev
* Pointer to Ethernet device structure.
+ *
+ * @return
+ * 0 on success, negative error value otherwise.
*/
-static void
+static int
mrvl_promiscuous_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)
- return;
+ return 0;
ret = pp2_ppio_set_promisc(priv->ppio, 1);
- if (ret)
+ if (ret) {
MRVL_LOG(ERR, "Failed to enable promiscuous mode");
+ return -EAGAIN;
+ }
+
+ return 0;
}
/**
*
* @param dev
* Pointer to Ethernet device structure.
+ *
+ * @return
+ * 0 on success, negative error value otherwise.
*/
-static void
+static int
mrvl_promiscuous_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_promisc(priv->ppio, 0);
- if (ret)
+ if (ret) {
MRVL_LOG(ERR, "Failed to disable promiscuous mode");
+ return -EAGAIN;
+ }
+
+ return 0;
}
/**