netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: netdev@pradeepdalvi.com
Cc: joe@perches.com, netdev@vger.kernel.org, hch@lst.de,
	linux-kernel@vger.kernel.org, eric.dumazet@gmail.com
Subject: Re: [PATCH/RESEND] drivers/net/ethernet: dev_alloc_skb to netdev_alloc_skb
Date: Mon, 23 Jan 2012 16:53:29 -0500 (EST)	[thread overview]
Message-ID: <20120123.165329.738852681807240808.davem@davemloft.net> (raw)
In-Reply-To: <CA+Dx6HbxEFLTMMGJ-ASY=4zNthRtWps6KnFiPNLAz6o+HVmS9g@mail.gmail.com>

From: "Pradeep A. Dalvi" <netdev@pradeepdalvi.com>
Date: Tue, 24 Jan 2012 02:11:43 +0530

> On Tue, Jan 24, 2012 at 1:26 AM, Joe Perches <joe@perches.com> wrote:
>> On Tue, 2012-01-24 at 00:49 +0530, Pradeep A. Dalvi wrote:
>>> On Tue, Jan 24, 2012 at 12:10 AM, Joe Perches <joe@perches.com> wrote:
>>> > On Mon, 2012-01-23 at 23:58 +0530, Pradeep A. Dalvi wrote:
>>> >> Replaced deprecating dev_alloc_skb with netdev_alloc_skb in drivers/net/ethernet
>>> >>   - Removed extra skb->dev = dev after netdev_alloc_skb
>>> > []
>>> >> diff --git a/drivers/net/ethernet/amd/lance.c b/drivers/net/ethernet/amd/lance.c
>>> > []
>>> >> @@ -871,13 +871,12 @@ lance_init_ring(struct net_device *dev, gfp_t gfp)
>>> >>               struct sk_buff *skb;
>>> >>               void *rx_buff;
>>> >>
>>> >> -             skb = alloc_skb(PKT_BUF_SZ, GFP_DMA | gfp);
>>> >> +             skb = netdev_alloc_skb(dev, PKT_BUF_SZ);
>>> >
>>> > This change seems suspect.
>>> Not really sure what made you suspect something in here. If you could
>>> help me understand possibly broken scenarios, would essentially be
>>> helpful. Thanks in advance!
>>
>> Where did the GFP_DMA go?
> 
> Aah! Is that really needed? Cause from my understanding, priority GFP
> flag __GFP_DMA is anyway negated in __alloc_skb, in a way from all
> sources i.e. netdev_alloc_skb or dev_alloc_skb or even alloc_skb. Am I
> missing something here?

GFP_DATA is negated for the SKB metadata allocation, but preserved for
the actual packet data allocation.

Could you please back off a bit and take your time on these changes?

Your transformations are adding bugs, and you make it clear that you
don't even understand how the allocation functions work semantically.

I don't really think you are knowledgable enough to make these
transformations safely at this time, and this is needlessly wasting
patch reviewer resources.

  parent reply	other threads:[~2012-01-23 21:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-23 18:28 [PATCH/RESEND] drivers/net/ethernet: dev_alloc_skb to netdev_alloc_skb Pradeep A. Dalvi
2012-01-23 18:40 ` Joe Perches
2012-01-23 18:53   ` David Miller
2012-01-23 19:13     ` Pradeep A. Dalvi
2012-01-23 19:23       ` David Miller
2012-01-23 19:37         ` Pradeep A. Dalvi
2012-01-23 19:19   ` Pradeep A. Dalvi
2012-01-23 19:56     ` Joe Perches
2012-01-23 20:41       ` Pradeep A. Dalvi
2012-01-23 20:46         ` Joe Perches
2012-01-23 21:15         ` Eric Dumazet
2012-01-23 21:53         ` David Miller [this message]
2012-01-23 23:04           ` 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=20120123.165329.738852681807240808.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=hch@lst.de \
    --cc=joe@perches.com \
    --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;
as well as URLs for NNTP newsgroup(s).