Skip to content

Commit

Permalink
bnxt_en: Allocate rx_cpu_rmap only if Accelerated RFS is enabled.
Browse files Browse the repository at this point in the history
Also, no need to check for bp->rx_nr_rings as it is always >= 1.  If the
allocation fails, it is not a fatal error and we can still proceed.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Michael Chan authored and David S. Miller committed Dec 28, 2015
1 parent 665e350 commit 45019a1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/ethernet/broadcom/bnxt/bnxt.c
Original file line number Diff line number Diff line change
Expand Up @@ -4009,10 +4009,8 @@ static int bnxt_set_real_num_queues(struct bnxt *bp)
return rc;

#ifdef CONFIG_RFS_ACCEL
if (bp->rx_nr_rings)
if (bp->flags & BNXT_FLAG_RFS)
dev->rx_cpu_rmap = alloc_irq_cpu_rmap(bp->rx_nr_rings);
if (!dev->rx_cpu_rmap)
rc = -ENOMEM;
#endif

return rc;
Expand Down

0 comments on commit 45019a1

Please sign in to comment.