Hello Dave,
This patch series contains several small features to the bnx2x driver,
as well as small changes which are mostly semantic, but make the driver's
various flows more uniform.
Please consider applying it to 'net-next'.
Thanks,
Yuval
@@ -625,7 +619,7 @@ static inline void bnx2x_set_mac_in_nig(struct bnx2x *bp,u32reg_offset=BP_PORT(bp)?NIG_REG_LLH1_FUNC_MEM:NIG_REG_LLH0_FUNC_MEM;-if(!IS_MF_SI(bp)||index>LLH_CAM_MAX_PF_LINE)+if(!IS_MF_SI(bp)||index>BNX2X_LLH_CAM_MAX_PF_LINE)return;DP(BNX2X_MSG_SP,"Going to %s LLH configuration at entry %d\n",
@@ -731,9 +725,10 @@ static void bnx2x_set_one_mac_e2(struct bnx2x *bp,if(cmd!=BNX2X_VLAN_MAC_MOVE){if(test_bit(BNX2X_ISCSI_ETH_MAC,vlan_mac_flags))bnx2x_set_mac_in_nig(bp,add,mac,-LLH_CAM_ISCSI_ETH_LINE);+BNX2X_LLH_CAM_ISCSI_ETH_LINE);elseif(test_bit(BNX2X_ETH_MAC,vlan_mac_flags))-bnx2x_set_mac_in_nig(bp,add,mac,LLH_CAM_ETH_LINE);+bnx2x_set_mac_in_nig(bp,add,mac,+BNX2X_LLH_CAM_ETH_LINE);}/* Reset the ramrod data buffer for the first rule */
@@ -423,6 +423,13 @@ struct bnx2x_vlan_mac_obj {int(*wait)(structbnx2x*bp,structbnx2x_vlan_mac_obj*o);};+enum{+BNX2X_LLH_CAM_ISCSI_ETH_LINE=0,+BNX2X_LLH_CAM_ETH_LINE,+BNX2X_LLH_CAM_MAX_PF_LINE=NIG_REG_LLH1_FUNC_MEM_SIZE/2+};++/** RX_MODE verbs:DROP_ALL/ACCEPT_ALL/ACCEPT_ALL_MULTI/ACCEPT_ALL_VLAN/NORMAL *//* RX_MODE ramrod spesial flags: set in rx_mode_flags field in
Previously, we've used the object's function id instead of using the
input's value. This is remedied, as in other flows.
Signed-off-by: Yuval Mintz <redacted>
Signed-off-by: Eilon Greenstein <redacted>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 1 +
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c | 2 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h | 3 +++
3 files changed, 5 insertions(+), 1 deletions(-)
@@ -2800,6 +2800,7 @@ static void bnx2x_pf_rx_q_prep(struct bnx2x *bp,rxq_init->sge_buf_sz=sge_sz;rxq_init->max_sges_pkt=max_sge;rxq_init->rss_engine_id=BP_FUNC(bp);+rxq_init->mcast_engine_id=BP_FUNC(bp);/* Maximum number or simultaneous TPA aggregation for this Queue.*
Previously, we used a hard-coded value as paramater, instead of using the
input's value. This is now remedied, as in other flows.
Signed-off-by: Yuval Mintz <redacted>
Signed-off-by: Eilon Greenstein <redacted>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
This change enables the FW to make more accurate decisions regarding the
active functions.
Signed-off-by: Yuval Mintz <redacted>
Signed-off-by: Eilon Greenstein <redacted>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
@@ -2007,6 +2007,15 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)bnx2x_cnic_notify(bp,CNIC_CTL_START_CMD);#endif+/* mark driver is loaded in shmem2 */+if(SHMEM2_HAS(bp,drv_capabilities_flag)){+u32val;+val=SHMEM2_RD(bp,drv_capabilities_flag[BP_FW_MB_IDX(bp)]);+SHMEM2_WR(bp,drv_capabilities_flag[BP_FW_MB_IDX(bp)],+val|DRV_FLAGS_CAPABILITIES_LOADED_SUPPORTED|+DRV_FLAGS_CAPABILITIES_LOADED_L2);+}+/* Wait for all pending SP commands to complete */if(!bnx2x_wait_sp_comp(bp,~0x0UL)){BNX2X_ERR("Timeout waiting for SP elements to complete\n");
@@ -2060,6 +2069,14 @@ int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode)inti;boolglobal=false;+/* mark driver is unloaded in shmem2 */+if(SHMEM2_HAS(bp,drv_capabilities_flag)){+u32val;+val=SHMEM2_RD(bp,drv_capabilities_flag[BP_FW_MB_IDX(bp)]);+SHMEM2_WR(bp,drv_capabilities_flag[BP_FW_MB_IDX(bp)],+val&~DRV_FLAGS_CAPABILITIES_LOADED_L2);+}+if((bp->state==BNX2X_STATE_CLOSED)||(bp->state==BNX2X_STATE_ERROR)){/* We can get here if the driver has been unloaded
Previously, unless both interface and link were up, ethtool returned
the requested speed/duplex when asked for the interface's settings.
This change will now enable the driver to answer correctly (i.e.,
return unknown as its answer).
Signed-off-by: Yuval Mintz <redacted>
Signed-off-by: Eilon Greenstein <redacted>
---
.../net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 29 ++++++++++++-------
1 files changed, 18 insertions(+), 11 deletions(-)
@@ -309,6 +312,10 @@ static int bnx2x_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)speed=ethtool_cmd_speed(cmd);+/* If recieved a request for an unknown duplex, assume full*/+if(cmd->duplex==DUPLEX_UNKNOWN)+cmd->duplex=DUPLEX_FULL;+if(IS_MF_SI(bp)){u32part;u32line_speed=bp->link_vars.line_speed;
From: Dmitry Kravkov <redacted>
Previously, allocation used queue statistics directly in its calcualtion.
This change causes these calculations to be summed into the statistics,
without being affected by them.
Signed-off-by: Dmitry Kravkov <redacted>
Signed-off-by: Yuval Mintz <redacted>
Signed-off-by: Eilon Greenstein <redacted>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
@@ -1143,7 +1143,7 @@ static inline int bnx2x_alloc_rx_bds(struct bnx2x_fastpath *fp,{structbnx2x*bp=fp->bp;u16ring_prod,cqe_ring_prod;-inti;+inti,failure_cnt=0;fp->rx_comp_cons=0;cqe_ring_prod=ring_prod=0;
@@ -1153,18 +1153,17 @@ static inline int bnx2x_alloc_rx_bds(struct bnx2x_fastpath *fp,*/for(i=0;i<rx_ring_size;i++){if(bnx2x_alloc_rx_data(bp,fp,ring_prod)<0){-fp->eth_q_stats.rx_skb_alloc_failed++;+failure_cnt++;continue;}ring_prod=NEXT_RX_IDX(ring_prod);cqe_ring_prod=NEXT_RCQ_IDX(cqe_ring_prod);-WARN_ON(ring_prod<=(i-fp->eth_q_stats.rx_skb_alloc_failed));+WARN_ON(ring_prod<=(i-failure_cnt));}-if(fp->eth_q_stats.rx_skb_alloc_failed)-BNX2X_ERR("was only able to allocate "-"%d rx skbs on queue[%d]\n",-(i-fp->eth_q_stats.rx_skb_alloc_failed),fp->index);+if(failure_cnt)+BNX2X_ERR("was only able to allocate %d rx skbs on queue[%d]\n",+i-failure_cnt,fp->index);fp->rx_bd_prod=ring_prod;/* Limit the CQE producer by the CQE ring size */
@@ -1172,7 +1171,9 @@ static inline int bnx2x_alloc_rx_bds(struct bnx2x_fastpath *fp,cqe_ring_prod);fp->rx_pkt=fp->rx_calls=0;-returni-fp->eth_q_stats.rx_skb_alloc_failed;+fp->eth_q_stats.rx_skb_alloc_failed+=failure_cnt;++returni-failure_cnt;}/* Statistics ID are global per chip/path, while Client IDs for E1x are per
This patch series contains several small features to the bnx2x driver,
as well as small changes which are mostly semantic, but make the driver's
various flows more uniform.
Please consider applying it to 'net-next'.