Re: [PATCH 2/4] ozwpan: replace alloc_skb with dev_alloc_skb in ozproto.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 23, 2013 at 10:22:33PM +0300, Xenia Ragiadakou wrote:
> On 05/23/2013 09:29 PM, Dan Carpenter wrote:
> >On Thu, May 23, 2013 at 08:51:57PM +0300, Xenia Ragiadakou wrote:
> >>This patch replaces the calls to alloc_skb with calls
> >>to dev_alloc_skb.
> >>
> >>dev_alloc_skb has GFP_ATOMIC priority so the
> >>replacement does not change the code semantics.
> >>
> >I don't think this change is correct.  What problem are you trying
> >to solve?  Perhaps we can help you.  Also the reason for the change
> >should be described in the changelog.
> >
> >regards,
> >dan carpenter
> >
> 
> Well, i was reading a tutorial on linux networking where it
> was suggested to use dev_alloc_skb() instead of alloc_skb()
> in drivers.
> 
> As I told you, I am not at all experienced.

No worries.

> Where is appropriate to use dev_alloc_skb()?
> Can you give me an insight?

I don't know much about networking.  The problems with this patch
are:

1) No reason to apply it in the changelog.
2) The kfree_skb() wasn't updated to match.  After sending my email
   I saw that you fixed this in a later patch and I sent a grumpier
   than necessary email.  Sorry.  Splitting that up into two patches
   breaks git bisect so it's not allowed.  Anyways, it's a newbie
   mistake.  No worries again.
3) The comments on dev_alloc_skb() say it's obsolete and we should
   use netdev_alloc_skb() instead.

I don't actually know when it's appropriate to use one or the other
honestly...  It could be that you're right about this here.  I
honestly don't know, so that's why it has to be explained to me in
the changelog.

regards,
dan carpenter
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux