Commit 030f3356 authored by Dmitry Kravkov's avatar Dmitry Kravkov Committed by David S. Miller

bnx2x: remove unnecessary FUNC_FLG_RSS flag and related

As suggested by: Joe Perches <joe@perches.com>

Although RSS is meaningless when there is a single HW queue we
still need it enabled in order to have HW Rx hash generated.
Signed-off-by: default avatarDmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: default avatarVladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c8e4f48a
...@@ -1180,15 +1180,10 @@ struct bnx2x { ...@@ -1180,15 +1180,10 @@ struct bnx2x {
TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV6_TCP_CAPABILITY TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV6_TCP_CAPABILITY
/* func init flags */ /* func init flags */
#define FUNC_FLG_RSS 0x0001 #define FUNC_FLG_STATS 0x0001
#define FUNC_FLG_STATS 0x0002 #define FUNC_FLG_TPA 0x0002
/* removed FUNC_FLG_UNMATCHED 0x0004 */ #define FUNC_FLG_SPQ 0x0004
#define FUNC_FLG_TPA 0x0008 #define FUNC_FLG_LEADING 0x0008 /* PF only */
#define FUNC_FLG_SPQ 0x0010
#define FUNC_FLG_LEADING 0x0020 /* PF only */
#define FUNC_CONFIG(flgs) ((flgs) & (FUNC_FLG_RSS | FUNC_FLG_TPA | \
FUNC_FLG_LEADING))
struct rxq_pause_params { struct rxq_pause_params {
u16 bd_th_lo; u16 bd_th_lo;
......
...@@ -2284,8 +2284,8 @@ void bnx2x_rxq_set_mac_filters(struct bnx2x *bp, u16 cl_id, u32 filters) ...@@ -2284,8 +2284,8 @@ void bnx2x_rxq_set_mac_filters(struct bnx2x *bp, u16 cl_id, u32 filters)
void bnx2x_func_init(struct bnx2x *bp, struct bnx2x_func_init_params *p) void bnx2x_func_init(struct bnx2x *bp, struct bnx2x_func_init_params *p)
{ {
if (FUNC_CONFIG(p->func_flgs)) {
struct tstorm_eth_function_common_config tcfg = {0}; struct tstorm_eth_function_common_config tcfg = {0};
u16 rss_flgs;
/* tpa */ /* tpa */
if (p->func_flgs & FUNC_FLG_TPA) if (p->func_flgs & FUNC_FLG_TPA)
...@@ -2293,8 +2293,7 @@ void bnx2x_func_init(struct bnx2x *bp, struct bnx2x_func_init_params *p) ...@@ -2293,8 +2293,7 @@ void bnx2x_func_init(struct bnx2x *bp, struct bnx2x_func_init_params *p)
TSTORM_ETH_FUNCTION_COMMON_CONFIG_ENABLE_TPA; TSTORM_ETH_FUNCTION_COMMON_CONFIG_ENABLE_TPA;
/* set rss flags */ /* set rss flags */
if (p->func_flgs & FUNC_FLG_RSS) { rss_flgs = (p->rss->mode <<
u16 rss_flgs = (p->rss->mode <<
TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_MODE_SHIFT); TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_MODE_SHIFT);
if (p->rss->cap & RSS_IPV4_CAP) if (p->rss->cap & RSS_IPV4_CAP)
...@@ -2309,10 +2308,7 @@ void bnx2x_func_init(struct bnx2x *bp, struct bnx2x_func_init_params *p) ...@@ -2309,10 +2308,7 @@ void bnx2x_func_init(struct bnx2x *bp, struct bnx2x_func_init_params *p)
tcfg.config_flags |= rss_flgs; tcfg.config_flags |= rss_flgs;
tcfg.rss_result_mask = p->rss->result_mask; tcfg.rss_result_mask = p->rss->result_mask;
}
storm_memset_func_cfg(bp, &tcfg, p->func_id); storm_memset_func_cfg(bp, &tcfg, p->func_id);
}
/* Enable the function in the FW */ /* Enable the function in the FW */
storm_memset_vf_to_pf(bp, p->func_id, p->pf_id); storm_memset_vf_to_pf(bp, p->func_id, p->pf_id);
...@@ -2479,23 +2475,17 @@ void bnx2x_pf_init(struct bnx2x *bp) ...@@ -2479,23 +2475,17 @@ void bnx2x_pf_init(struct bnx2x *bp)
else else
flags |= FUNC_FLG_TPA; flags |= FUNC_FLG_TPA;
/* function setup */
/** /**
* Although RSS is meaningless when there is a single HW queue we * Although RSS is meaningless when there is a single HW queue we
* still need it enabled in order to have HW Rx hash generated. * still need it enabled in order to have HW Rx hash generated.
*
* if (is_eth_multi(bp))
* flags |= FUNC_FLG_RSS;
*/ */
flags |= FUNC_FLG_RSS;
/* function setup */
if (flags & FUNC_FLG_RSS) {
rss.cap = (RSS_IPV4_CAP | RSS_IPV4_TCP_CAP | rss.cap = (RSS_IPV4_CAP | RSS_IPV4_TCP_CAP |
RSS_IPV6_CAP | RSS_IPV6_TCP_CAP); RSS_IPV6_CAP | RSS_IPV6_TCP_CAP);
rss.mode = bp->multi_mode; rss.mode = bp->multi_mode;
rss.result_mask = MULTI_MASK; rss.result_mask = MULTI_MASK;
func_init.rss = &rss; func_init.rss = &rss;
}
func_init.func_flgs = flags; func_init.func_flgs = flags;
func_init.pf_id = BP_FUNC(bp); func_init.pf_id = BP_FUNC(bp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment