Re: [PATCH/RESEND] drivers/net/ethernet: dev_alloc_skb to netdev_alloc_skb
From: Pradeep A. Dalvi
Date: Mon Jan 23 2012 - 18:04:09 EST
On Tue, Jan 24, 2012 at 3:23 AM, David Miller <davem@xxxxxxxxxxxxx> wrote:
> From: "Pradeep A. Dalvi" <netdev@xxxxxxxxxxxxxxxx>
> Date: Tue, 24 Jan 2012 02:11:43 +0530
>
>> On Tue, Jan 24, 2012 at 1:26 AM, Joe Perches <joe@xxxxxxxxxxx> 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@xxxxxxxxxxx> 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.
Pardon my ignorance! Although this error occurred _exactly like_ the
typo in above statement. At the same time, I also called for help for
this special case.
> 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.
There are first 4 patches with trivial changes. And 5th patch
(including first 4) has been resubmitted reverting errors in this
file. I know I made a mistake, which I've accepted and corrected as
well. Although above statements are kind of discouraging &
unnecessary, especially when changes in 1 file are incorrect out of
118 files.
If I expected your assistance, it was for certain special cases. And
so far has received correct directions, and above typo/spell-mistake
doesn't really redefine you or reconstruct somebody else in our eyes.
I still would expect your help wherever possible. And needlessly, you
remain the same.
Cheers,
Pradeep A. Dalvi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/