bnx2x: enhancements
cover bnx2x: enhancements
From: Shahed Shaikh <[email protected]>
Hi Dave,
This series adds below changes -
- support for VF spoof-check configuration through .ndo_set_vf_spoofchk.
- workaround for MFW bug regarding unexpected bandwidth notifcation in single function mode.
- supply VF link status as part of get VF config handling.
Please apply this to net-next tree.
Thanks,
Shahed
Shahed Shaikh (3):
bnx2x: Add VF spoof-checking configuration
bnx2x: Ignore bandwidth attention in single function mode
bnx2x: Provide VF link status in ndo_get_vf_config
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 1 + drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 11 +++ drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 81 ++++++++++++++++++++++- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h | 2 + 4 files changed, 93 insertions(+), 2 deletions(-)
Signature · 1 line
1.8.3.1
PATCH 1/3 bnx2x: Add VF spoof-checking configuration
Add support for `ndo_set_vf_spoofchk' to allow PF control over its VF spoof-checking configuration.
--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 1 + drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 1 + drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 80 ++++++++++++++++++++++- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h | 2 + 4 files changed, 82 insertions(+), 2 deletions(-)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h +1 -0
@@ -494,6 +494,7 @@ int bnx2x_get_vf_config(struct net_device *dev, int vf,int bnx2x_set_vf_mac (struct net_device *dev,int queue,u8 *mac);int bnx2x_set_vf_vlan (struct net_device *netdev,int vf,u16 vlan,u8 qos,__be16 vlan_proto); +int bnx2x_set_vf_spoofchk (struct net_device *dev,int idx,bool val);/* select_queue callback */ u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb,
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +1 -0
@@ -13121,6 +13121,7 @@ static int bnx2x_vlan_rx_kill_vid(struct net_device *dev, __be16 proto, u16 vid) .ndo_set_vf_mac = bnx2x_set_vf_mac, .ndo_set_vf_vlan = bnx2x_set_vf_vlan, .ndo_get_vf_config = bnx2x_get_vf_config, + .ndo_set_vf_spoofchk = bnx2x_set_vf_spoofchk,#endif #ifdef NETDEV_FCOE_WWNN .ndo_fcoe_get_wwn = bnx2x_fcoe_get_wwn,
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +78 -2
104 lines not on this page · raw message
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h +2 -0
@@ -142,6 +142,8 @@ struct bnx2x_virtf {bool flr_clnup_stage;/* true during flr cleanup */ bool malicious;/* true if FW indicated so, until FLR */ +/* 1(true) if spoof check is enabled */ +u8 spoofchk;/* dma */ dma_addr_t fw_stat_map;
Signature · 1 line
1.8.3.1
PATCH 2/3 bnx2x: Ignore bandwidth attention in single function mode
In reply to Shahed ShaikhFrom: Shahed Shaikh <[email protected]>
This is a workaround for FW bug -
MFW generates bandwidth attention in single function mode, which is only expected to be generated in multi function mode. This undesired attention in SF mode results in incorrect HW configuration and resulting into Tx timeout.
--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +10 -0
@@ -3536,6 +3536,16 @@ static void bnx2x_drv_info_iscsi_stat(struct bnx2x *bp)*/ static void bnx2x_config_mf_bw (struct bnx2x *bp) { +/* Workaround for MFW bug. +* MFW is not supposed to generate BW attention in +* single function mode. +*/ +if (!IS_MF (bp)) { +DP (BNX2X_MSG_MCP , +"Ignoring MF BW config in single function mode\n" ); +return ; + } +if (bp->link_vars.link_up) {bnx2x_cmng_fns_init (bp, true,CMNG_FNS_MINMAX );bnx2x_link_sync_notify (bp);
Signature · 1 line
1.8.3.1
PATCH 3/3 bnx2x: Provide VF link status in ndo_get_vf_config
In reply to Shahed ShaikhFrom: Shahed Shaikh <[email protected]>
Provide current link status of VF in ndo_get_vf_config handler.
--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +1 -0
@@ -2638,6 +2638,7 @@ int bnx2x_get_vf_config(struct net_device *dev, int vfidx, ivi->max_tx_rate =10000 ;/* always 10G. TBA take from link struct */ ivi->min_tx_rate =0 ; ivi->spoofchk = vf->spoofchk ?1 :0 ; + ivi->linkstate = vf->link_cfg;if (vf->state ==VF_ENABLED ) {/* mac and vlan are in vlan_mac objects */ if (bnx2x_validate_vf_sp_objs (bp, vf, false)) {
Signature · 1 line
1.8.3.1