*
* @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)
- return;
+ return 0;
if (priv->isolated)
- return;
+ return 0;
ret = pp2_ppio_set_mc_promisc(priv->ppio, 1);
- if (ret)
+ if (ret) {
MRVL_LOG(ERR, "Failed enable all-multicast 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_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);
- if (ret)
+ if (ret) {
MRVL_LOG(ERR, "Failed to disable all-multicast 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_stats_reset(struct rte_eth_dev *dev)
{
struct mrvl_priv *priv = dev->data->dev_private;
int i;
if (!priv->ppio)
- return;
+ return 0;
for (i = 0; i < dev->data->nb_rx_queues; i++) {
struct mrvl_rxq *rxq = dev->data->rx_queues[i];
txq->bytes_sent = 0;
}
- pp2_ppio_get_statistics(priv->ppio, NULL, 1);
+ return pp2_ppio_get_statistics(priv->ppio, NULL, 1);
}
/**
*
* @param dev
* Pointer to Ethernet device structure.
+ *
+ * @return
+ * 0 on success, negative error value otherwise.
*/
-static void
+static int
mrvl_xstats_reset(struct rte_eth_dev *dev)
{
- mrvl_stats_reset(dev);
+ return mrvl_stats_reset(dev);
}
/**