ethernet/broadcom: Use napi_alloc_skb instead of netdev_alloc_skb_ip_align
authorAlexander Duyck <alexander.h.duyck@redhat.com>
Wed, 10 Dec 2014 03:41:17 +0000 (19:41 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Dec 2014 18:31:58 +0000 (13:31 -0500)
This patch replaces the calls to netdev_alloc_skb_ip_align in the
copybreak paths.

Cc: Gary Zambrano <zambrano@broadcom.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Ariel Elior <ariel.elior@qlogic.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/b44.c
drivers/net/ethernet/broadcom/bcm63xx_enet.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c

index ffeaf476a1202461f3cd239143f20e96f113faab..d86d6baf9681f2cb637591f3830440e602a35cd7 100644 (file)
@@ -836,7 +836,7 @@ static int b44_rx(struct b44 *bp, int budget)
                        struct sk_buff *copy_skb;
 
                        b44_recycle_rx(bp, cons, bp->rx_prod);
-                       copy_skb = netdev_alloc_skb_ip_align(bp->dev, len);
+                       copy_skb = napi_alloc_skb(&bp->napi, len);
                        if (copy_skb == NULL)
                                goto drop_it_no_recycle;
 
index 3e8d1a88ed3d7b597298100798e5286449ffafe8..21206d33b638cf3a76e67abeb0520d71a0310b29 100644 (file)
@@ -385,7 +385,7 @@ static int bcm_enet_receive_queue(struct net_device *dev, int budget)
                if (len < copybreak) {
                        struct sk_buff *nskb;
 
-                       nskb = netdev_alloc_skb_ip_align(dev, len);
+                       nskb = napi_alloc_skb(&priv->napi, len);
                        if (!nskb) {
                                /* forget packet, just rearm desc */
                                dev->stats.rx_dropped++;
index b4d71fd909ee4351492c9fdc0298eda66b9bd193..1d1147c93d5972147a9aa17650eeaadb0dda7066 100644 (file)
@@ -1015,7 +1015,7 @@ static int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
                 */
                if ((bp->dev->mtu > ETH_MAX_PACKET_SIZE) &&
                    (len <= RX_COPY_THRESH)) {
-                       skb = netdev_alloc_skb_ip_align(bp->dev, len);
+                       skb = napi_alloc_skb(&fp->napi, len);
                        if (skb == NULL) {
                                DP(NETIF_MSG_RX_ERR | NETIF_MSG_RX_STATUS,
                                   "ERROR  packet dropped because of alloc failure\n");