Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 45abfb10 authored by Alexander Duyck's avatar Alexander Duyck Committed by David S. Miller
Browse files

ethernet/broadcom: Use napi_alloc_skb instead of netdev_alloc_skb_ip_align



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: default avatarAlexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e2338f86
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;

+1 −1
Original line number Diff line number Diff line
@@ -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++;
+1 −1
Original line number Diff line number Diff line
@@ -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");