Skip to content

Commit

Permalink
bnx2x: Clean before update RSS arrives
Browse files Browse the repository at this point in the history
When a PF receives a VF message indicating a change in RSS properties
it should clean the flags' bit-fields; Otherwise, it's possible that
some random values will be considered as flags by the lower layers configuring
the RSS in FW.

Signed-off-by: Michal Kalderon <michals@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Michal Kalderon authored and David S. Miller committed Jan 6, 2014
1 parent 89e18ae commit 5b62291
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
Original file line number Diff line number Diff line change
Expand Up @@ -4382,8 +4382,11 @@ int bnx2x_config_rss(struct bnx2x *bp,
struct bnx2x_raw_obj *r = &o->raw;

/* Do nothing if only driver cleanup was requested */
if (test_bit(RAMROD_DRV_CLR_ONLY, &p->ramrod_flags))
if (test_bit(RAMROD_DRV_CLR_ONLY, &p->ramrod_flags)) {
DP(BNX2X_MSG_SP, "Not configuring RSS ramrod_flags=%lx\n",
p->ramrod_flags);
return 0;
}

r->set_pending(r);

Expand Down
3 changes: 3 additions & 0 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1805,6 +1805,9 @@ static void bnx2x_vf_mbx_update_rss(struct bnx2x *bp, struct bnx2x_virtf *vf,
vf_op_params->rss_result_mask = rss_tlv->rss_result_mask;

/* flags handled individually for backward/forward compatability */
vf_op_params->rss_flags = 0;
vf_op_params->ramrod_flags = 0;

if (rss_tlv->rss_flags & VFPF_RSS_MODE_DISABLED)
__set_bit(BNX2X_RSS_MODE_DISABLED, &vf_op_params->rss_flags);
if (rss_tlv->rss_flags & VFPF_RSS_MODE_REGULAR)
Expand Down

0 comments on commit 5b62291

Please sign in to comment.