net/cnxk: support all multicast
authorSunil Kumar Kori <skori@marvell.com>
Wed, 23 Jun 2021 04:46:36 +0000 (10:16 +0530)
committerJerin Jacob <jerinj@marvell.com>
Tue, 29 Jun 2021 22:31:11 +0000 (00:31 +0200)
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
doc/guides/nics/features/cnxk_vec.ini
drivers/net/cnxk/cnxk_ethdev.c
drivers/net/cnxk/cnxk_ethdev.h
drivers/net/cnxk/cnxk_ethdev_ops.c

index 20d4d12..b41af2d 100644 (file)
@@ -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
index e1de8ab..7fe8018 100644 (file)
@@ -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
index 7b9e37b..516788c 100644 (file)
@@ -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
index ab94b99..70bc374 100644 (file)
@@ -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);
index fc60576..61ecbab 100644 (file)
@@ -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);
+}