Skip to content

Commit 45abfb1

Browse files
Alexander Duyckdavem330
authored andcommitted
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: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent e2338f8 commit 45abfb1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

drivers/net/ethernet/broadcom/b44.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ static int b44_rx(struct b44 *bp, int budget)
836836
struct sk_buff *copy_skb;
837837

838838
b44_recycle_rx(bp, cons, bp->rx_prod);
839-
copy_skb = netdev_alloc_skb_ip_align(bp->dev, len);
839+
copy_skb = napi_alloc_skb(&bp->napi, len);
840840
if (copy_skb == NULL)
841841
goto drop_it_no_recycle;
842842

drivers/net/ethernet/broadcom/bcm63xx_enet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ static int bcm_enet_receive_queue(struct net_device *dev, int budget)
385385
if (len < copybreak) {
386386
struct sk_buff *nskb;
387387

388-
nskb = netdev_alloc_skb_ip_align(dev, len);
388+
nskb = napi_alloc_skb(&priv->napi, len);
389389
if (!nskb) {
390390
/* forget packet, just rearm desc */
391391
dev->stats.rx_dropped++;

drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ static int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
10151015
*/
10161016
if ((bp->dev->mtu > ETH_MAX_PACKET_SIZE) &&
10171017
(len <= RX_COPY_THRESH)) {
1018-
skb = netdev_alloc_skb_ip_align(bp->dev, len);
1018+
skb = napi_alloc_skb(&fp->napi, len);
10191019
if (skb == NULL) {
10201020
DP(NETIF_MSG_RX_ERR | NETIF_MSG_RX_STATUS,
10211021
"ERROR packet dropped because of alloc failure\n");

0 commit comments

Comments
 (0)