From: Sunil Kumar Kori <skori@marvell.com>
L2 multicast packets can be allowed or blocked. Patch implements
corresponding ethops.
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
---
doc/guides/nics/features/cnxk.ini | 1 +
doc/guides/nics/features/cnxk_vec.ini | 1 +
drivers/net/cnxk/cnxk_ethdev.c | 2 ++
drivers/net/cnxk/cnxk_ethdev.h | 2 ++
drivers/net/cnxk/cnxk_ethdev_ops.c | 17 +++++++++++++++++
5 files changed, 23 insertions(+)
@@ -18,6 +18,7 @@ Queue start/stop = Y
MTU update = Y
TSO = Y
Promiscuous mode = Y
+Allmulticast mode = Y
Unicast MAC filter = Y
RSS hash = Y
Inner RSS = Y
@@ -17,6 +17,7 @@ Free Tx mbuf on demand = Y
Queue start/stop = Y
MTU update = Y
Promiscuous mode = Y
+Allmulticast mode = Y
Unicast MAC filter = Y
RSS hash = Y
Inner RSS = Y
@@ -1111,6 +1111,8 @@ struct eth_dev_ops cnxk_eth_dev_ops = {
.dev_supported_ptypes_get = cnxk_nix_supported_ptypes_get,
.promiscuous_enable = cnxk_nix_promisc_enable,
.promiscuous_disable = cnxk_nix_promisc_disable,
+ .allmulticast_enable = cnxk_nix_allmulticast_enable,
+ .allmulticast_disable = cnxk_nix_allmulticast_disable,
};
static int
@@ -230,6 +230,8 @@ int cnxk_nix_mac_addr_set(struct rte_eth_dev *eth_dev,
struct rte_ether_addr *addr);
int cnxk_nix_promisc_enable(struct rte_eth_dev *eth_dev);
int cnxk_nix_promisc_disable(struct rte_eth_dev *eth_dev);
+int cnxk_nix_allmulticast_enable(struct rte_eth_dev *eth_dev);
+int cnxk_nix_allmulticast_disable(struct rte_eth_dev *eth_dev);
int cnxk_nix_info_get(struct rte_eth_dev *eth_dev,
struct rte_eth_dev_info *dev_info);
int cnxk_nix_configure(struct rte_eth_dev *eth_dev);
@@ -267,3 +267,20 @@ cnxk_nix_promisc_disable(struct rte_eth_dev *eth_dev)
dev->dmac_filter_enable = false;
return 0;
}
+
+int
+cnxk_nix_allmulticast_enable(struct rte_eth_dev *eth_dev)
+{
+ struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
+
+ return roc_nix_npc_mcast_config(&dev->nix, true, false);
+}
+
+int
+cnxk_nix_allmulticast_disable(struct rte_eth_dev *eth_dev)
+{
+ struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
+
+ return roc_nix_npc_mcast_config(&dev->nix, false,
+ eth_dev->data->promiscuous);
+}