Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Apr 2022 13:16:23 GMT
From:      Tom Jones <thj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: e54505277c39 - stable/13 - if_bnxt: Allow bnxt interfaces to use vlans
Message-ID:  <202204271316.23RDGNkm044160@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by thj:

URL: https://cgit.FreeBSD.org/src/commit/?id=e54505277c39cad32f999fd72033f6fa9594b130

commit e54505277c39cad32f999fd72033f6fa9594b130
Author:     Misho <misho@elwix.org>
AuthorDate: 2022-04-21 08:24:04 +0000
Commit:     Tom Jones <thj@FreeBSD.org>
CommitDate: 2022-04-27 13:14:40 +0000

    if_bnxt: Allow bnxt interfaces to use vlans
    
    When VLAN HW filter is disabled, the NIC does not pass any vlan tagged
    traffic. Setting these flags on the device allows vlan tagged traffic to
    pass.
    
    PR:             236983
    Tested by:      pi
    Sponsored by:   Klara, Inc.
    Differential Revision:  https://reviews.freebsd.org/D34824
    
    (cherry picked from commit 0c6a2fa33e36ac0b5d51cbae39a9c5564ad61788)
---
 sys/dev/bnxt/if_bnxt.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/dev/bnxt/if_bnxt.c b/sys/dev/bnxt/if_bnxt.c
index 52d989a88392..1805a1f24f93 100644
--- a/sys/dev/bnxt/if_bnxt.c
+++ b/sys/dev/bnxt/if_bnxt.c
@@ -586,7 +586,8 @@ bnxt_rx_queues_alloc(if_ctx_t ctx, caddr_t *vaddrs,
 	softc->vnic_info.def_ring_grp = (uint16_t)HWRM_NA_SIGNATURE;
 	softc->vnic_info.cos_rule = (uint16_t)HWRM_NA_SIGNATURE;
 	softc->vnic_info.lb_rule = (uint16_t)HWRM_NA_SIGNATURE;
-	softc->vnic_info.rx_mask = HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_BCAST;
+	softc->vnic_info.rx_mask = HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_BCAST |
+		HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ANYVLAN_NONVLAN;
 	softc->vnic_info.mc_list_count = 0;
 	softc->vnic_info.flags = BNXT_VNIC_FLAG_DEFAULT;
 	rc = iflib_dma_alloc(ctx, BNXT_MAX_MC_ADDRS * ETHER_ADDR_LEN,
@@ -1391,8 +1392,7 @@ bnxt_promisc_set(if_ctx_t ctx, int flags)
 		    HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ANYVLAN_NONVLAN;
 	else
 		softc->vnic_info.rx_mask &=
-		    ~(HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_PROMISCUOUS |
-		    HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ANYVLAN_NONVLAN);
+		    ~(HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_PROMISCUOUS);
 
 	rc = bnxt_hwrm_cfa_l2_set_rx_mask(softc, &softc->vnic_info);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202204271316.23RDGNkm044160>