netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Yinghai Lu <Yinghai.Lu@Sun.COM>
Cc: Andi Kleen <ak@suse.de>, Greg KH <greg@kroah.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	netdev@vger.kernel.org
Subject: Re: [PATCH 2/2] net: make net and forcedeth to use kmalloc_node
Date: Tue, 3 Jul 2007 11:58:40 -0700	[thread overview]
Message-ID: <20070703115840.e05a0f47.akpm@linux-foundation.org> (raw)
In-Reply-To: <200706291330.37070.yinghai.lu@sun.com>

On Fri, 29 Jun 2007 13:30:36 -0700
Yinghai Lu <Yinghai.Lu@Sun.COM> wrote:

> [PATCH 2/2] net: make net and forcedeth to use kmalloc_node

Please copy netdev@vger.kernel.org on net patches.

This patch modifies a net driver as well as the networking core.  These
subsytems have different maintainers who run different development trees. 
Consequently I must split your patch into two and change their titles and
changelogs appropriately.

Please do this for us in future, thanks.


> diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
> index 42ba1c0..6d53b52 100644
> --- a/drivers/net/forcedeth.c
> +++ b/drivers/net/forcedeth.c
> @@ -1383,7 +1383,7 @@ static int nv_alloc_rx(struct net_device *dev)
>  		less_rx = np->last_rx.orig;
>  
>  	while (np->put_rx.orig != less_rx) {
> -		struct sk_buff *skb = dev_alloc_skb(np->rx_buf_sz + NV_RX_ALLOC_PAD);
> +		struct sk_buff *skb = dev_alloc_skb_node(np->rx_buf_sz + NV_RX_ALLOC_PAD, dev_to_node(&dev->dev));

If we're going to do this then it would probably make sense to change
dev_alloc_skb_node() so that it takes a `struct net_device *' rather than a
bare node-id.  That's a call which the net guys will need to make, which is
why we cc them on our emails.

>  		if (skb) {
>  			np->put_rx_ctx->skb = skb;
>  			np->put_rx_ctx->dma = pci_map_single(np->pci_dev,
> @@ -1415,7 +1415,7 @@ static int nv_alloc_rx_optimized(struct net_device *dev)
>  		less_rx = np->last_rx.ex;
>  
>  	while (np->put_rx.ex != less_rx) {
> -		struct sk_buff *skb = dev_alloc_skb(np->rx_buf_sz + NV_RX_ALLOC_PAD);
> +		struct sk_buff *skb = dev_alloc_skb_node(np->rx_buf_sz + NV_RX_ALLOC_PAD, dev_to_node(&dev->dev));

It might help to edit code in an 80-col xterm.

Please run scritps/checkpatch.pl across all your diffs.  Its suggestions
are by no means compulsory, but they do provide things for you to check up
and and have a think about, thanks.

I won't apply this (these) patches because I expect API changes.



       reply	other threads:[~2007-07-03 18:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200706291330.37070.yinghai.lu@sun.com>
2007-07-03 18:58 ` Andrew Morton [this message]
2007-07-03 19:04   ` [PATCH 2/2] net: make net and forcedeth to use kmalloc_node Stephen Hemminger
2007-07-03 21:28     ` Yinghai Lu
2007-07-03 21:34       ` Stephen Hemminger
2007-07-04  0:30         ` [PATCH 2/4] net: use numa_node in net_devcice->dev instead of parent Yinghai Lu
2007-07-04  8:51           ` Christoph Hellwig
2007-07-04 10:35             ` David Miller
2007-07-04 11:04               ` Stefan Richter
2007-07-04 16:54               ` Yinghai Lu
2007-07-04  0:34         ` [PATCH 3/4] net: make forcedeth to use kmalloc_node and __netdev_alloc_skb for skb allocation Yinghai Lu
2007-07-03 21:36   ` [PATCH 2/2] net: make net and forcedeth to use kmalloc_node Yinghai Lu
2007-07-04  8:49   ` Christoph Hellwig
2007-07-04 17:00     ` Yinghai Lu

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=20070703115840.e05a0f47.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=Yinghai.Lu@Sun.COM \
    --cc=ak@suse.de \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --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).