* DPDK callback to enable promiscuous mode. * * @param dev * Pointer to Ethernet device structure. * * @return * 0 on success, negative error value otherwise. */
| 1245 | * 0 on success, negative error value otherwise. |
| 1246 | */ |
| 1247 | static int |
| 1248 | mrvl_promiscuous_enable(struct rte_eth_dev *dev) |
| 1249 | { |
| 1250 | struct mrvl_priv *priv = dev->data->dev_private; |
| 1251 | int ret; |
| 1252 | |
| 1253 | if (priv->isolated) |
| 1254 | return -ENOTSUP; |
| 1255 | |
| 1256 | if (!priv->ppio) |
| 1257 | return 0; |
| 1258 | |
| 1259 | ret = pp2_ppio_set_promisc(priv->ppio, 1); |
| 1260 | if (ret) { |
| 1261 | MRVL_LOG(ERR, "Failed to enable promiscuous mode"); |
| 1262 | return -EAGAIN; |
| 1263 | } |
| 1264 | |
| 1265 | return 0; |
| 1266 | } |
| 1267 | |
| 1268 | /** |
| 1269 | * DPDK callback to enable allmulti mode. |