]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bnxt_en: Allocate rx_cpu_rmap only if Accelerated RFS is enabled.
authorMichael Chan <mchan@broadcom.com>
Sun, 27 Dec 2015 23:19:22 +0000 (18:19 -0500)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 7 Jul 2016 00:36:40 +0000 (17:36 -0700)
Orabug: 23221795

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>
(cherry picked from commit 45019a180358c3cf290c3f3dc953c44f978d5527)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index 0eecd21a6793ec72effc53b98a20714bf08b8e55..29d63dfa302788a296bbc616168a210968692aa0 100644 (file)
@@ -4026,10 +4026,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;