net/qede: fix promiscuous enable
authorBalazs Nemeth <bnemeth@redhat.com>
Wed, 23 Dec 2020 14:15:49 +0000 (15:15 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 19 Jan 2021 02:30:13 +0000 (03:30 +0100)
When calling rte_eth_promiscuous_enable(port_id) followed by
rte_eth_allmulticast_enable(port_id), the port is not in promisc mode
anymore. This patch ensures that promisc mode takes precedence over
allmulticast mode fixing the regression introduced by b10231aed1ed.

Fixes: b10231aed1ed ("net/qede: fix multicast drop in promiscuous mode")
Cc: stable@dpdk.org
Signed-off-by: Balazs Nemeth <bnemeth@redhat.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
drivers/net/qede/qede_ethdev.c

index 5490135..3bec62d 100644 (file)
@@ -1885,6 +1885,8 @@ static int qede_allmulticast_enable(struct rte_eth_dev *eth_dev)
            QED_FILTER_RX_MODE_TYPE_MULTI_PROMISC;
        enum _ecore_status_t ecore_status;
 
+       if (rte_eth_promiscuous_get(eth_dev->data->port_id) == 1)
+               type = QED_FILTER_RX_MODE_TYPE_PROMISC;
        ecore_status = qed_configure_filter_rx_mode(eth_dev, type);
 
        return ecore_status >= ECORE_SUCCESS ? 0 : -EAGAIN;