[PATCH 53/54] net/bnxt: add support for truflow promiscuous mode
Manish Kurup
manish.kurup at broadcom.com
Tue Sep 30 02:36:03 CEST 2025
From: Kishore Padmanabha <kishore.padmanabha at broadcom.com>
The truflow application support promiscuous mode to enable
or disable receiving the packets with unknown destination mac addresses.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha at broadcom.com>
Reviewed-by: Shuanglin Wang <shuanglin.wang at broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 854c8b7371..f37136c8f4 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2161,9 +2161,15 @@ static int bnxt_promiscuous_enable_op(struct rte_eth_dev *eth_dev)
old_flags = vnic->flags;
vnic->flags |= BNXT_VNIC_INFO_PROMISC;
rc = bnxt_hwrm_cfa_l2_set_rx_mask(bp, vnic, 0, NULL);
- if (rc != 0)
+ if (rc != 0) {
vnic->flags = old_flags;
-
+ return rc;
+ }
+ rc = bnxt_ulp_promisc_mode_set(bp, 1);
+ if (rc != 0) {
+ vnic->flags = old_flags;
+ rc = bnxt_hwrm_cfa_l2_set_rx_mask(bp, vnic, 0, NULL);
+ }
return rc;
}
@@ -2185,6 +2191,11 @@ static int bnxt_promiscuous_disable_op(struct rte_eth_dev *eth_dev)
if (bp->vnic_info == NULL)
return 0;
+ if (bnxt_ulp_promisc_mode_set(bp, 0)) {
+ PMD_DRV_LOG_LINE(ERR, "Unable to disable promiscuous mode");
+ return -EINVAL;
+ }
+
vnic = bnxt_get_default_vnic(bp);
old_flags = vnic->flags;
--
2.39.5 (Apple Git-154)
More information about the dev
mailing list