mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 22:51:42 +00:00
bnx2x: Duplication in promisc mode
Prevent packets duplication for frames targeting FCoE L2 ring: packets were arriving to stack from both L2 RSS and from FCoE L2 in a promiscuous mode. Configure FCoE L2 ring to DROP_ALL rx mode, when interface is configured to PROMISC, and to accept only unicast frames, when interface is configured to ALL_MULTI. Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
bf1f9ae050
commit
711c914688
@ -4276,9 +4276,12 @@ void bnx2x_set_storm_rx_mode(struct bnx2x *bp)
|
|||||||
def_q_filters |= BNX2X_ACCEPT_UNICAST | BNX2X_ACCEPT_BROADCAST |
|
def_q_filters |= BNX2X_ACCEPT_UNICAST | BNX2X_ACCEPT_BROADCAST |
|
||||||
BNX2X_ACCEPT_MULTICAST;
|
BNX2X_ACCEPT_MULTICAST;
|
||||||
#ifdef BCM_CNIC
|
#ifdef BCM_CNIC
|
||||||
cl_id = bnx2x_fcoe(bp, cl_id);
|
if (!NO_FCOE(bp)) {
|
||||||
bnx2x_rxq_set_mac_filters(bp, cl_id, BNX2X_ACCEPT_UNICAST |
|
cl_id = bnx2x_fcoe(bp, cl_id);
|
||||||
BNX2X_ACCEPT_MULTICAST);
|
bnx2x_rxq_set_mac_filters(bp, cl_id,
|
||||||
|
BNX2X_ACCEPT_UNICAST |
|
||||||
|
BNX2X_ACCEPT_MULTICAST);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -4286,18 +4289,29 @@ void bnx2x_set_storm_rx_mode(struct bnx2x *bp)
|
|||||||
def_q_filters |= BNX2X_ACCEPT_UNICAST | BNX2X_ACCEPT_BROADCAST |
|
def_q_filters |= BNX2X_ACCEPT_UNICAST | BNX2X_ACCEPT_BROADCAST |
|
||||||
BNX2X_ACCEPT_ALL_MULTICAST;
|
BNX2X_ACCEPT_ALL_MULTICAST;
|
||||||
#ifdef BCM_CNIC
|
#ifdef BCM_CNIC
|
||||||
cl_id = bnx2x_fcoe(bp, cl_id);
|
/*
|
||||||
bnx2x_rxq_set_mac_filters(bp, cl_id, BNX2X_ACCEPT_UNICAST |
|
* Prevent duplication of multicast packets by configuring FCoE
|
||||||
BNX2X_ACCEPT_MULTICAST);
|
* L2 Client to receive only matched unicast frames.
|
||||||
|
*/
|
||||||
|
if (!NO_FCOE(bp)) {
|
||||||
|
cl_id = bnx2x_fcoe(bp, cl_id);
|
||||||
|
bnx2x_rxq_set_mac_filters(bp, cl_id,
|
||||||
|
BNX2X_ACCEPT_UNICAST);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BNX2X_RX_MODE_PROMISC:
|
case BNX2X_RX_MODE_PROMISC:
|
||||||
def_q_filters |= BNX2X_PROMISCUOUS_MODE;
|
def_q_filters |= BNX2X_PROMISCUOUS_MODE;
|
||||||
#ifdef BCM_CNIC
|
#ifdef BCM_CNIC
|
||||||
cl_id = bnx2x_fcoe(bp, cl_id);
|
/*
|
||||||
bnx2x_rxq_set_mac_filters(bp, cl_id, BNX2X_ACCEPT_UNICAST |
|
* Prevent packets duplication by configuring DROP_ALL for FCoE
|
||||||
BNX2X_ACCEPT_MULTICAST);
|
* L2 Client.
|
||||||
|
*/
|
||||||
|
if (!NO_FCOE(bp)) {
|
||||||
|
cl_id = bnx2x_fcoe(bp, cl_id);
|
||||||
|
bnx2x_rxq_set_mac_filters(bp, cl_id, BNX2X_ACCEPT_NONE);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
/* pass management unicast packets as well */
|
/* pass management unicast packets as well */
|
||||||
llh_mask |= NIG_LLH0_BRB1_DRV_MASK_REG_LLH0_BRB1_DRV_MASK_UNCST;
|
llh_mask |= NIG_LLH0_BRB1_DRV_MASK_REG_LLH0_BRB1_DRV_MASK_UNCST;
|
||||||
|
Loading…
Reference in New Issue
Block a user