提交 de5c3741 编写于 作者: Y Yuval Mintz 提交者: David S. Miller

bnx2x: FCoE statistics id fixed

FCoE statistics ids were distinguished from the L2's statistics ids.
However, not all of the change was committed. This causes a possible
collision of indices when FCoE is present.

This patch fixes the issue.
Signed-off-by: NYuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: NEilon Greenstein <eilong@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e695a2dd
...@@ -1179,10 +1179,16 @@ static inline int bnx2x_alloc_rx_bds(struct bnx2x_fastpath *fp, ...@@ -1179,10 +1179,16 @@ static inline int bnx2x_alloc_rx_bds(struct bnx2x_fastpath *fp,
*/ */
static inline u8 bnx2x_stats_id(struct bnx2x_fastpath *fp) static inline u8 bnx2x_stats_id(struct bnx2x_fastpath *fp)
{ {
if (!CHIP_IS_E1x(fp->bp)) struct bnx2x *bp = fp->bp;
if (!CHIP_IS_E1x(bp)) {
#ifdef BCM_CNIC
/* there are special statistics counters for FCoE 136..140 */
if (IS_FCOE_FP(fp))
return bp->cnic_base_cl_id + (bp->pf_num >> 1);
#endif
return fp->cl_id; return fp->cl_id;
else }
return fp->cl_id + BP_PORT(fp->bp) * FP_SB_MAX_E1x; return fp->cl_id + BP_PORT(bp) * FP_SB_MAX_E1x;
} }
static inline void bnx2x_init_vlan_mac_fp_objs(struct bnx2x_fastpath *fp, static inline void bnx2x_init_vlan_mac_fp_objs(struct bnx2x_fastpath *fp,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册