netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.h.duyck-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Cong Wang <cwang-xCSkyg8dI+0RB7SZvlqPiA@public.gmane.org>
Cc: netdev <netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	leedom-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org,
	hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org,
	donald.c.skidmore-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org,
	balbi-l0cyMroinI0@public.gmane.org,
	matthew.vick-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	mgorman-l3A5Bk7waGM@public.gmane.org,
	David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
	jeffrey.t.kirsher-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Subject: Re: [net-next PATCH 1/5] net: Add netdev Rx page allocation function
Date: Mon, 10 Nov 2014 18:02:27 -0800	[thread overview]
Message-ID: <54616E33.1030207@redhat.com> (raw)
In-Reply-To: <CAHA+R7PigH6ZZBP0DzAPwLMwsK85aadj4hH3iahhOH2ehfYJvg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>


On 11/10/2014 04:26 PM, Cong Wang wrote:
> On Mon, Nov 10, 2014 at 11:51 AM, Alexander Duyck
> <alexander.h.duyck-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
>> This patch implements __netdev_alloc_pages and __netdev_alloc_page.  These
>> are meant to replace the __skb_alloc_pages and __skb_alloc_page functions.
>> The reason for doing this is that it occurred to me that __skb_alloc_page is
>> supposed to be passed an sk_buff pointer, but it is NULL in all cases where
>> it is used.  Worse is that in the case of ixgbe it is passed NULL via the
>> sk_buff pointer in the rx_buffer info structure which means the compiler is
>> not correctly stripping it out.
> These netdev_*() have nothing related with struct net_device, please
> find a better prefix. Also, they are in skbuff.h, you perhaps want to move them
> to netdevice.h.

The netdev_ prefix is really meant indicate where they are supposed to 
be used, not so much the arguments being passed, and the fact that 
historically this is what we had back in the kernel a couple years ago.  
I suppose I could rename them to __dev_alloc_page(s) and 
dev_alloc_page(s) since that seems to be the precedent for how this is 
handled for skb's.  I'll submit something tomorrow if there aren't any 
other name requests.

I would prefer to keep them in skbuff.h since this is buffer allocation 
that will later be handed off via either build_skb or skb_add_rx_frag to 
an sk_buff.

Thanks,

Alex


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-11-11  2:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-10 19:51 [net-next PATCH 0/5] Replace __skb_alloc_pages with much simpler function Alexander Duyck
2014-11-10 19:51 ` [net-next PATCH 1/5] net: Add netdev Rx page allocation function Alexander Duyck
2014-11-11  0:26   ` Cong Wang
     [not found]     ` <CAHA+R7PigH6ZZBP0DzAPwLMwsK85aadj4hH3iahhOH2ehfYJvg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-11  2:02       ` Alexander Duyck [this message]
2014-11-10 19:52 ` [net-next PATCH 2/5] cxgb4/cxgb4vf: Replace __skb_alloc_page with __netdev_alloc_page Alexander Duyck
2014-11-10 19:52 ` [net-next PATCH 3/5] phonet: Replace calls to " Alexander Duyck
2014-11-10 19:52 ` [net-next PATCH 4/5] fm10k/igb/ixgbe: Replace __skb_alloc_page with netdev_alloc_page Alexander Duyck
2014-11-11  8:32   ` Jeff Kirsher
2014-11-10 19:52 ` [net-next PATCH 5/5] net: Remove __skb_alloc_page and __skb_alloc_pages Alexander Duyck

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=54616E33.1030207@redhat.com \
    --to=alexander.h.duyck-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=balbi-l0cyMroinI0@public.gmane.org \
    --cc=cwang-xCSkyg8dI+0RB7SZvlqPiA@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=donald.c.skidmore-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org \
    --cc=jeffrey.t.kirsher-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=leedom-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matthew.vick-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=mgorman-l3A5Bk7waGM@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.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).