From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: netdev@pradeepdalvi.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, hch@lst.de
Subject: Re: [PATCH/RESEND net 5/5][NON-TRIVIAL] drivers/net/ethernet: dev_alloc_skb to netdev_alloc_skb
Date: Mon, 23 Jan 2012 16:55:30 -0500 (EST) [thread overview]
Message-ID: <20120123.165530.944969261195932179.davem@davemloft.net> (raw)
In-Reply-To: <1327352667.2587.4.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 23 Jan 2012 22:04:27 +0100
> Le mardi 24 janvier 2012 à 02:24 +0530, Pradeep A. Dalvi a écrit :
>> Replaced deprecating dev_alloc_skb with netdev_alloc_skb in drivers/net/ethernet
>> - Removed extra skb->dev = dev after netdev_alloc_skb
>>
>
>
>>
>> /* Initialize the LANCE Rx and Tx rings. */
>> static void
>> -lance_init_ring(struct net_device *dev, gfp_t gfp)
>> +lance_init_ring(struct net_device *dev)
>> {
>> struct lance_private *lp = dev->ml_priv;
>> int i;
>> @@ -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);
>> lp->rx_skbuff[i] = skb;
>> - if (skb) {
>> - skb->dev = dev;
>> + if (skb)
>> rx_buff = skb->data;
>> - } else
>> - rx_buff = kmalloc(PKT_BUF_SZ, GFP_DMA | gfp);
>> + else
>> + rx_buff = kmalloc(PKT_BUF_SZ, GFP_DMA | GFP_AUTOMIC);
>> if (rx_buff == NULL)
>> lp->rx_ring[i].base = 0;
>> else
>
> Thats really crap, please dont send us such patches, not even compiled.
>
> alloc_skb() has nothing to do with dev_alloc_skb(), and there is a
> reason GFP_DMA is used in this driver.
This is really terrible.
Pradeep please stop sending these changes until you have your house
in order. Your patches are buggy and ill conceived.
Please do not submit more patches in this area until you spend the
necessary time to truly understand these interfaces and how these code
snippets actually work.
next prev parent reply other threads:[~2012-01-23 21:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-23 20:54 Pradeep A. Dalvi
2012-01-23 21:04 ` Eric Dumazet
2012-01-23 21:30 ` Pradeep A. Dalvi
2012-01-23 21:55 ` David Miller [this message]
2012-01-23 22:22 ` 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.165530.944969261195932179.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--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®