From: Eric Dumazet <eric.dumazet@gmail.com>
To: "Pradeep A. Dalvi" <netdev@pradeepdalvi.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Christoph Hellwig <hch@lst.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] netdev/ethernet: dev_alloc_skb to netdev_alloc_skb
Date: Mon, 23 Jan 2012 10:45:25 +0100 [thread overview]
Message-ID: <1327311925.2525.7.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> (raw)
In-Reply-To: <1327179463-13980-1-git-send-email-netdev@pradeepdalvi.com>
Le dimanche 22 janvier 2012 à 02:27 +0530, Pradeep A. Dalvi a écrit :
> Replaced deprecating dev_alloc_skb with netdev_alloc_skb in drivers/net/ethernet
>
...
> diff --git a/drivers/net/ethernet/3com/3c515.c b/drivers/net/ethernet/3com/3c515.c
> index f67a5d3..68fd765 100644
> --- a/drivers/net/ethernet/3com/3c515.c
> +++ b/drivers/net/ethernet/3com/3c515.c
> @@ -826,7 +826,7 @@ static int corkscrew_open(struct net_device *dev)
> vp->rx_ring[i].next = 0;
> vp->rx_ring[i].status = 0; /* Clear complete bit. */
> vp->rx_ring[i].length = PKT_BUF_SZ | 0x80000000;
> - skb = dev_alloc_skb(PKT_BUF_SZ);
> + skb = netdev_alloc_skb(dev, PKT_BUF_SZ);
> vp->rx_skbuff[i] = skb;
> if (skb == NULL)
> break; /* Bad news! */
One of the difference between netdev_alloc_skb() and dev_alloc_skb() is
the former initializes skb->dev.
So you should remove the extra "skb->dev = dev;" lines that sometimes
are after the dev_alloc_skb() calls.
[ They were redundant anyway because eth_type_trans() also sets skb->dev
]
next prev parent reply other threads:[~2012-01-23 9:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-21 20:57 Pradeep A. Dalvi
2012-01-23 8:40 ` Viral Mehta
2012-01-23 9:43 ` Eric Dumazet
2012-01-23 10:29 ` Pradeep A. Dalvi
2012-01-23 9:45 ` Eric Dumazet [this message]
2012-01-23 10:37 ` Pradeep A. Dalvi
2012-01-23 13:15 ` Pradeep A. Dalvi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1327311925.2525.7.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@pradeepdalvi.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®