Netdev List
 help / color / mirror / Atom feed
* linux-next: build warning after merge of the  tree
From: Stephen Rothwell @ 2010-03-28 23:31 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Kyle McMartin

[-- Attachment #1: Type: text/plain, Size: 676 bytes --]

Hi Dave,

After merging the  tree, today's linux-next build (x86_64 allmodconfig)
produced this warning:

drivers/net/tulip/uli526x.c: In function 'uli526x_rx_packet':
drivers/net/tulip/uli526x.c:861: warning: assignment makes pointer from integer without a cast

Introduced by commit ac90a149361a331f697d5aa500bedcff22054669 ("tulip:
Fix null dereference in uli526x_rx_packet()") from the net-current tree.
There is a missing set of parentheses around an assignment in an "if"
condition ...

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

P.S. this commit is missing a SOB from its purported author

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply

* Re: linux-next: build warning after merge of the  tree
From: Stephen Rothwell @ 2010-03-29  0:15 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Kyle McMartin
In-Reply-To: <20100329103139.1a735227.sfr@canb.auug.org.au>

[-- Attachment #1: Type: text/plain, Size: 253 bytes --]

On Mon, 29 Mar 2010 10:31:39 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi Dave,

Of course I meant the net-current tree ...

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply

* Re: [ANNOUNCEMENT] NET: usb: sierra_net.c driver
From: Ben Hutchings @ 2010-03-29  0:44 UTC (permalink / raw)
  To: sclark46
  Cc: Marcel Holtmann, Elina Pasheva, David Brownell, Rory Filer,
	netdev, linux-usb
In-Reply-To: <4BAFAA2C.8060604@earthlink.net>

On Sun, 2010-03-28 at 15:12 -0400, Stephen Clark wrote:
> On 03/28/2010 11:57 AM, Marcel Holtmann wrote:
> > Hi Elina,
> >
> >> +static const struct driver_info sierra_net_info_68A3 = {
> >> +	.description = "Sierra Wireless USB-Ethernet Modem",
> >> +	.flags = FLAG_ETHER | FLAG_SEND_ZLP,
> >> +	.bind = sierra_net_bind,
> >> +	.unbind = sierra_net_unbind,
> >> +	.status = sierra_net_status,
> >> +	.rx_fixup = sierra_net_rx_fixup,
> >> +	.tx_fixup = sierra_net_tx_fixup,
> >> +	.data = (unsigned long)&sierra_net_info_data_68A3,
> >> +};
> >
> > the FLAG_ETHER is wrong here. Please use FLAG_WWAN to clearly mark these
> > interfaces.
> >
> > Otherwise we have wrong DEVTYPE uevent assignments and userspace will
> > treat them as real Ethernet cards. And that should not happen. As a nice
> Why shouldn't that happen if they look like NIC cards?
[...]

This information is important for management interfaces.  The user
doesn't care what your device looks like at the kernel level - they know
it's a wireless broadband device and they expect to see a device
labelled as such in Network Manager or whatever they use.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


^ permalink raw reply

* Lists, lists and more lists we have lots of good ones at fair prices
From: fetish @ 2010-03-29  0:47 UTC (permalink / raw)
  To: news, news, nelson5903, newdoc

I have alot of good quality American Databases at decent prices. Contact me here:  Jerome.Moore@discountdatamarket.tk for a complete catalog of what we have.

 
  


to terminate please send a blank message to rembox@discountdatamarket.tk

^ permalink raw reply

* Re: CVE-2009-4537
From: Neil Horman @ 2010-03-29  0:50 UTC (permalink / raw)
  To: David Miller; +Cc: michael.s.gilbert, linux-kernel, netdev
In-Reply-To: <20100327.103600.246539458.davem@davemloft.net>

On Sat, Mar 27, 2010 at 10:36:00AM -0700, David Miller wrote:
> From: David Miller <davem@davemloft.net>
> Date: Sat, 27 Mar 2010 10:34:07 -0700 (PDT)
> 
> > From: Michael Gilbert <michael.s.gilbert@gmail.com>
> > Date: Sat, 27 Mar 2010 14:21:00 -0400
> > 
> >> Hi,
> >> 
> >> CVE-2009-4537 has been disclosed without any upstream activity for a
> >> while now. Discussion about the issue dried up in January [0], and a
> >> patch had been proposed [1], but no arguments were seen either for or
> >> against it. Note that redhat has already shipped that in their various
> >> kernel security updates.  Would it make sense to merge those changes
> >> officially?
> > 
> > A different version of the fix went into the tree.
> 
> Ignore me, that was a fix for a different problem.
> 
> I was waiting for Francois to come up with a cleaner fix
> but he stopped working on it, so yes I should put in
> the fix you mention or something similar.
> 
> Neil, can you formally submit a version of the r8169
> CVE for upstream?
> 
> Thanks.
> 
Absolutley, I'll review the CVE text and my origional patch tomorrow morning,
and submit the official patch tomorrow afternoon.

Thanks!
Neil


^ permalink raw reply

* Re: [PATCH] r8169: fix broken register writes
From: Al Viro @ 2010-03-29  1:03 UTC (permalink / raw)
  To: Fran?ois Romieu; +Cc: Ben Hutchings, David Miller, timo.teras, ivecera, netdev
In-Reply-To: <20100328221924.GG30031@ZenIV.linux.org.uk>

On Sun, Mar 28, 2010 at 11:19:24PM +0100, Al Viro wrote:

> > > Thanks Fran?ois.  Which hardware have you tested this on so far ?
> > 
> > 10ec:8169 (rev 10) / RTL8169sb/8110sb / XID 10000000
> > 
> > Timo's is a 10ec:8167 / RTL8169sc/8110sc / XID 18000000. He only tested
> > the MAC[04] part.
> 
> FWIW, XID18000000 here (J7F4) loses MAC4 on shutdown; hadn't tested the patch
> yet.  2.6.26 (on that box) and 2.6.31 (on identical mb) work, 2.6.33 doesn't.
> I suspect that bisect would lead to commit cc098dc70 (i.e. the place where we
> started to set address on shutdown).  One more data point: ifconfig hw ether
> done under 2.6.26 did restore the address.  And that's the same function,
> isn't it?

As the matter of fact, ifconfig eth0 hw ether .... ends up zeroing upper
32 bits on old kernels once in a while.

What orders accesses as seen by PCI bus in
        RTL_W8(Cfg9346, Cfg9346_Unlock);
        RTL_W32(MAC0, low);
        RTL_W32(MAC4, high);
        RTL_W8(Cfg9346, Cfg9346_Lock);
anyway, and don't we need mmiowb() or two in there?

^ permalink raw reply

* Re: CVE-2009-4537
From: Ben Hoyt @ 2010-03-29  1:27 UTC (permalink / raw)
  To: netdev
In-Reply-To: <20100329005046.GA2157@localhost.localdomain>

Hi netdev,

We're working on some TCP networking stuff where the key is low
latency -- in other words, we don't really care about data throughput,
but rather getting the end-to-end TCP packet transfer time down.

I know there's quite a few networking folks and kernel hackers on this
list, so I thought I'd see if anyone was interested (or knows someone
who might be interested) in doing a few hours of consultancy work to
give us some pointers on this. I'm a competent programmer, but
kernel-level network programming is not my area of expertise.

I'm happy to receive some pointers via this list -- and others might
benefit from that too -- but I'm also keen on some dedicated
consultancy hours if anyone's interested.

Thanks,
Ben.

^ permalink raw reply

* Minimizing TCP latency
From: Ben Hoyt @ 2010-03-29  1:29 UTC (permalink / raw)
  To: netdev

Oops, very sorry, I replied to an existing message but forgot to edit
the subject line to start a new thread. Try again:

Hi netdev,

We're working on some TCP networking stuff where the key is low
latency -- in other words, we don't really care about data throughput,
but rather getting the end-to-end TCP packet transfer time down.

I know there's quite a few networking folks and kernel hackers on this
list, so I thought I'd see if anyone was interested (or knows someone
who might be interested) in doing a few hours of consultancy work to
give us some pointers on this. I'm a competent programmer, but
kernel-level network programming is not my area of expertise.

I'm happy to receive some pointers via this list -- and others might
benefit from that too -- but I'm also keen on some dedicated
consultancy hours if anyone's interested.

Thanks,
Ben.

^ permalink raw reply

* Re: CVE-2009-4537
From: David Miller @ 2010-03-29  1:54 UTC (permalink / raw)
  To: benhoyt; +Cc: netdev
In-Reply-To: <7c93bf1e1003281827x7565b0bds1c18d23d1607540e@mail.gmail.com>


First, please don't hijack an unrelated thread to start talking about
something different.

Second, the mailing lists at vger.kernel.org are not for making
employment of consultancy offers.

Thanks.

^ permalink raw reply

* Re: linux-next: build warning after merge of the tree
From: David Miller @ 2010-03-29  1:57 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linux-next, linux-kernel, kyle
In-Reply-To: <20100329103139.1a735227.sfr@canb.auug.org.au>

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 29 Mar 2010 10:31:39 +1100

> Hi Dave,
> 
> After merging the  tree, today's linux-next build (x86_64 allmodconfig)
> produced this warning:
> 
> drivers/net/tulip/uli526x.c: In function 'uli526x_rx_packet':
> drivers/net/tulip/uli526x.c:861: warning: assignment makes pointer from integer without a cast
> 
> Introduced by commit ac90a149361a331f697d5aa500bedcff22054669 ("tulip:
> Fix null dereference in uli526x_rx_packet()") from the net-current tree.
> There is a missing set of parentheses around an assignment in an "if"
> condition ...

Strange, it didn't warn here.

I just committed the following, let me know if it fixes
this.

Thanks!

tulip: Add missing parens.

As reported by Stephen Rothwell.

drivers/net/tulip/uli526x.c: In function 'uli526x_rx_packet':
drivers/net/tulip/uli526x.c:861: warning: assignment makes pointer from integer without a cast

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 drivers/net/tulip/uli526x.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/tulip/uli526x.c b/drivers/net/tulip/uli526x.c
index 90be57b..a4f09d4 100644
--- a/drivers/net/tulip/uli526x.c
+++ b/drivers/net/tulip/uli526x.c
@@ -858,7 +858,7 @@ static void uli526x_rx_packet(struct net_device *dev, struct uli526x_board_info
 				/* Good packet, send to upper layer */
 				/* Shorst packet used new SKB */
 				if ((rxlen < RX_COPY_SIZE) &&
-				    ((new_skb = dev_alloc_skb(rxlen + 2) != NULL))) {
+				    (((new_skb = dev_alloc_skb(rxlen + 2)) != NULL))) {
 					skb = new_skb;
 					/* size less than COPY_SIZE, allocate a rxlen SKB */
 					skb_reserve(skb, 2); /* 16byte align */
-- 
1.7.0.3

^ permalink raw reply related

* Re: [patch] iwlwifi: range checking issue
From: Zhu Yi @ 2010-03-29  2:01 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Chatre, Reinette, Intel Linux Wireless, John W. Linville,
	Kolekar, Abhijeet, Berg, Johannes, Guy, Wey-Yi W,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
In-Reply-To: <20100328115500.GX5069@bicker>

On Sun, 2010-03-28 at 19:55 +0800, Dan Carpenter wrote:
> IWL_RATE_COUNT is 13 and IWL_RATE_COUNT_LEGACY is 12.
> 
> IWL_RATE_COUNT_LEGACY is the right one here because iwl3945_rates
> doesn't support 60M and also that's how "rates" is defined in
> iwlcore_init_geos() from drivers/net/wireless/iwlwifi/iwl-core.c.
> 
>         rates = kzalloc((sizeof(struct ieee80211_rate) * IWL_RATE_COUNT_LEGACY),
>                         GFP_KERNEL);
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Acked-by: Zhu Yi <yi.zhu@intel.com>

Thanks,
-yi


^ permalink raw reply

* Re: linux-next: build warning after merge of the tree
From: Joe Perches @ 2010-03-29  2:15 UTC (permalink / raw)
  To: David Miller; +Cc: sfr, netdev, linux-next, linux-kernel, kyle
In-Reply-To: <20100328.185707.161194820.davem@davemloft.net>

On Sun, 2010-03-28 at 18:57 -0700, David Miller wrote:
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> > After merging the  tree, today's linux-next build (x86_64 allmodconfig)
> > produced this warning:
> > drivers/net/tulip/uli526x.c: In function 'uli526x_rx_packet':
> > drivers/net/tulip/uli526x.c:861: warning: assignment makes pointer from integer without a cast
> I just committed the following, let me know if it fixes
> this.
> -				    ((new_skb = dev_alloc_skb(rxlen + 2) != NULL))) {
> +				    (((new_skb = dev_alloc_skb(rxlen + 2)) != NULL))) {

You've an extra () there.

A close paren could have been moved from after
the NULL to after the "+ 2"

I think it's more readable as:
				      (new_skb = dev_alloc_skb(rxlen + 2))) {

cheers, Joe

^ permalink raw reply

* Re: [PATCH] r8169: fix broken register writes
From: Al Viro @ 2010-03-29  2:17 UTC (permalink / raw)
  To: Fran?ois Romieu; +Cc: Ben Hutchings, David Miller, timo.teras, ivecera, netdev
In-Reply-To: <20100329010346.GH30031@ZenIV.linux.org.uk>

On Mon, Mar 29, 2010 at 02:03:46AM +0100, Al Viro wrote:
> On Sun, Mar 28, 2010 at 11:19:24PM +0100, Al Viro wrote:
> 
> > > > Thanks Fran?ois.  Which hardware have you tested this on so far ?
> > > 
> > > 10ec:8169 (rev 10) / RTL8169sb/8110sb / XID 10000000
> > > 
> > > Timo's is a 10ec:8167 / RTL8169sc/8110sc / XID 18000000. He only tested
> > > the MAC[04] part.
> > 
> > FWIW, XID18000000 here (J7F4) loses MAC4 on shutdown; hadn't tested the patch
> > yet.  2.6.26 (on that box) and 2.6.31 (on identical mb) work, 2.6.33 doesn't.
> > I suspect that bisect would lead to commit cc098dc70 (i.e. the place where we
> > started to set address on shutdown).  One more data point: ifconfig hw ether
> > done under 2.6.26 did restore the address.  And that's the same function,
> > isn't it?
> 
> As the matter of fact, ifconfig eth0 hw ether .... ends up zeroing upper
> 32 bits on old kernels once in a while.

BTW, patch from upthread doesn't help on that box, and neither does
simple reordering of MAC0 and MAC4 writes.  Adding reads of MAC0 and
MAC4 after corresponding writes seems to work.

^ permalink raw reply

* Re: [PATCH net-2.6] ipv6: Don't drop cache route entry unless timer actually expired.
From: David Miller @ 2010-03-29  2:34 UTC (permalink / raw)
  To: yoshfuji; +Cc: netdev, guenter.roeck
In-Reply-To: <201003281715.o2SHFjai004362@94.43.138.210.xn.2iij.net>

From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Date: Mon, 29 Mar 2010 02:15:45 +0900

> This is ipv6 variant of the commit 5e016cbf6.. ("ipv4: Don't drop
> redirected route cache entry unless PTMU actually expired")
> by Guenter Roeck <guenter.roeck@ericsson.com>.
> 
> Remove cache route entry in ipv6_negative_advice() only if
> the timer is expired.
> 
> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

Applied, thanks a lot!

^ permalink raw reply

* Re: Minimizing TCP latency
From: Ben Hoyt @ 2010-03-29  2:43 UTC (permalink / raw)
  To: netdev
In-Reply-To: <7c93bf1e1003281829h3ddba989w198df86ac9f2d27c@mail.gmail.com>

[In reply to David Miller:]
> First, please don't hijack an unrelated thread to start talking about
> something different.

I'm sorry, my mistake -- I apologized in the new thread.

> Second, the mailing lists at vger.kernel.org are not for making
> employment of consultancy offers.

Fair enough. Though another netdev reader advised me that this would
be a good place to ask.

I know brevity is the soul of wit, but it's not the most encouraging
for a list newbie to be told, "You're doing it wrong, and you're in
the wrong place." You never know, I may have something to contribute
after all is said and done. :-)

So, if this isn't the place to ask, do you have any pointers in the
right direction?

-Ben

^ permalink raw reply

* Re: Minimizing TCP latency
From: Ben Hoyt @ 2010-03-29  3:24 UTC (permalink / raw)
  To: netdev
In-Reply-To: <7c93bf1e1003281829h3ddba989w198df86ac9f2d27c@mail.gmail.com>

> I'm happy to receive some pointers via this list [...]

Sorry, I should also have posted more about what I've done in terms of
reducing latency so far:

* We've already got TCP_NODELAY activated.

* We've also turned off interrupt coalescing on the network card (for
example, see http://www.29west.com/docs/THPM/latency-interrupt-coalescing.html).

* We've modified our process's CPU affinity so it runs on a core by
itself, reducing interrupt-handling latency slightly further.

* Our code is written in C, and we've tried to keep it as close to the
kernel's socket calls as possible.

So we're currently looking further into ways to reduce latency, which
currently looks like it'll mean digging deeper into the kernel's
networking options and innards.

FYI, we're using RHE release 4 and kernel version 2.6.9 on x86_64 machines.

-Ben

^ permalink raw reply

* [PATCH net-next-2.6] net: __netif_receive_skb should be static
From: Eric Dumazet @ 2010-03-29  5:24 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
diff --git a/net/core/dev.c b/net/core/dev.c
index bcb3ed2..887aa84 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2621,7 +2621,7 @@ void netif_nit_deliver(struct sk_buff *skb)
 	rcu_read_unlock();
 }
 
-int __netif_receive_skb(struct sk_buff *skb)
+static int __netif_receive_skb(struct sk_buff *skb)
 {
 	struct packet_type *ptype, *pt_prev;
 	struct net_device *orig_dev;



^ permalink raw reply related

* Re: Minimizing TCP latency
From: Eric Dumazet @ 2010-03-29  5:34 UTC (permalink / raw)
  To: Ben Hoyt; +Cc: netdev
In-Reply-To: <7c93bf1e1003282024p75e70011j31577b42f29cc153@mail.gmail.com>

Le lundi 29 mars 2010 à 16:24 +1300, Ben Hoyt a écrit :
> > I'm happy to receive some pointers via this list [...]
> 
> Sorry, I should also have posted more about what I've done in terms of
> reducing latency so far:
> 
> * We've already got TCP_NODELAY activated.

One machine sends messages, and messages are not aknowledged by other
part ? Is it one way communication ?

> 
> * We've also turned off interrupt coalescing on the network card (for
> example, see http://www.29west.com/docs/THPM/latency-interrupt-coalescing.html).
> 
> * We've modified our process's CPU affinity so it runs on a core by
> itself, reducing interrupt-handling latency slightly further.
> 
> * Our code is written in C, and we've tried to keep it as close to the
> kernel's socket calls as possible.
> 



So we're currently looking further into ways to reduce latency, which
> currently looks like it'll mean digging deeper into the kernel's
> networking options and innards.
> 
> FYI, we're using RHE release 4 and kernel version 2.6.9 on x86_64 machines.

What are the targets ?  (time constraints)

Mono threaded application handling one tcp flow ?

Are you handling a very light load on few flows, or many flows ? 

Are machines all in the same LAN ?



^ permalink raw reply

* Re: [PATCH net-next-2.6] net: __netif_receive_skb should be static
From: David Miller @ 2010-03-29  6:07 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev
In-Reply-To: <1269840292.2256.22.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 29 Mar 2010 07:24:52 +0200

> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied, thanks Eric.

^ permalink raw reply

* linux-next: build failure after merge of the final tree (net tree related)
From: Stephen Rothwell @ 2010-03-29  6:43 UTC (permalink / raw)
  To: David Miller, netdev; +Cc: linux-next, linux-kernel, Tom Herbert, Eric Dumazet

Hi Dave,

After merging the final tree, today's linux-next build (powerpc
ppc44x_defconfig) failed like this:

net/core/net-sysfs.c:476: warning: 'struct netdev_rx_queue' declared inside parameter list
net/core/net-sysfs.c:476: warning: its scope is only this definition or declaration, which is probably not what you want
net/core/net-sysfs.c:478: warning: 'struct netdev_rx_queue' declared inside parameter list
net/core/net-sysfs.c: In function 'rx_queue_attr_show':
net/core/net-sysfs.c:489: error: dereferencing pointer to incomplete type
net/core/net-sysfs.c:489: warning: type defaults to 'int' in declaration of '__mptr'
net/core/net-sysfs.c:489: warning: initialization from incompatible pointer type
net/core/net-sysfs.c:489: error: invalid use of undefined type 'struct netdev_rx_queue'
net/core/net-sysfs.c:494: warning: passing argument 1 of 'attribute->show' from incompatible pointer type
net/core/net-sysfs.c:494: note: expected 'struct netdev_rx_queue *' but argument is of type 'struct netdev_rx_queue *'

(and many more)

Caused by commit 0a9627f2649a02bea165cfd529d7bcb625c2fcad ("rps: Receive
Packet Steering") from the net tree.  struct netdev_rx_queue is protected by
CONFIG_RPS in netdevice.h, but uses are not so protected in net-sysfs.c.

I applied the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 29 Mar 2010 17:27:55 +1100
Subject: [PATCH] rps: fix net-sysfs build for !CONFIG_RPS

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 net/core/net-sysfs.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index c810042..95af841 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -467,6 +467,7 @@ static struct attribute_group wireless_group = {
 };
 #endif
 
+#ifdef CONFIG_RPS
 /*
  * RX queue sysfs structures and functions.
  */
@@ -677,6 +678,12 @@ static void rx_queue_remove_kobjects(struct net_device *net)
 	kset_unregister(net->queues_kset);
 }
 
+#else /* CONFIG_RPS */
+
+static int rx_queue_register_kobjects(struct net_device *net) { return 0; }
+static void rx_queue_remove_kobjects(struct net_device *net) { }
+
+#endif /* CONFIG_RPS */
 #endif /* CONFIG_SYSFS */
 
 #ifdef CONFIG_HOTPLUG
-- 
1.7.0.3

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

^ permalink raw reply related

* Re: linux-next: build failure after merge of the final tree (net tree related)
From: Eric Dumazet @ 2010-03-29  6:52 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: David Miller, netdev, linux-next, linux-kernel, Tom Herbert
In-Reply-To: <20100329174300.512d83a8.sfr@canb.auug.org.au>

Le lundi 29 mars 2010 à 17:43 +1100, Stephen Rothwell a écrit :
> Hi Dave,
> 
> After merging the final tree, today's linux-next build (powerpc
> ppc44x_defconfig) failed like this:
> 
> net/core/net-sysfs.c:476: warning: 'struct netdev_rx_queue' declared inside parameter list
> net/core/net-sysfs.c:476: warning: its scope is only this definition or declaration, which is probably not what you want
> net/core/net-sysfs.c:478: warning: 'struct netdev_rx_queue' declared inside parameter list
> net/core/net-sysfs.c: In function 'rx_queue_attr_show':
> net/core/net-sysfs.c:489: error: dereferencing pointer to incomplete type
> net/core/net-sysfs.c:489: warning: type defaults to 'int' in declaration of '__mptr'
> net/core/net-sysfs.c:489: warning: initialization from incompatible pointer type
> net/core/net-sysfs.c:489: error: invalid use of undefined type 'struct netdev_rx_queue'
> net/core/net-sysfs.c:494: warning: passing argument 1 of 'attribute->show' from incompatible pointer type
> net/core/net-sysfs.c:494: note: expected 'struct netdev_rx_queue *' but argument is of type 'struct netdev_rx_queue *'
> 
> (and many more)
> 
> Caused by commit 0a9627f2649a02bea165cfd529d7bcb625c2fcad ("rps: Receive
> Packet Steering") from the net tree.  struct netdev_rx_queue is protected by
> CONFIG_RPS in netdevice.h, but uses are not so protected in net-sysfs.c.
> 
> I applied the following patch for today:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 29 Mar 2010 17:27:55 +1100
> Subject: [PATCH] rps: fix net-sysfs build for !CONFIG_RPS
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  net/core/net-sysfs.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
> index c810042..95af841 100644
> --- a/net/core/net-sysfs.c
> +++ b/net/core/net-sysfs.c
> @@ -467,6 +467,7 @@ static struct attribute_group wireless_group = {
>  };
>  #endif
>  
> +#ifdef CONFIG_RPS
>  /*
>   * RX queue sysfs structures and functions.
>   */
> @@ -677,6 +678,12 @@ static void rx_queue_remove_kobjects(struct net_device *net)
>  	kset_unregister(net->queues_kset);
>  }
>  
> +#else /* CONFIG_RPS */
> +
> +static int rx_queue_register_kobjects(struct net_device *net) { return 0; }
> +static void rx_queue_remove_kobjects(struct net_device *net) { }
> +
> +#endif /* CONFIG_RPS */
>  #endif /* CONFIG_SYSFS */
>  
>  #ifdef CONFIG_HOTPLUG
> -- 
> 1.7.0.3


Thats right, this was on my first submission, but I forgot to add
net/core/net-sysfs.c in my second commit, sorry.

Acked-by: Eric Dumazet <eric.dumazet@gmail.com>

^ permalink raw reply

* Re: linux-next: build failure after merge of the final tree (net tree related)
From: Eric Dumazet @ 2010-03-29  6:59 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: David Miller, netdev, linux-next, linux-kernel, Tom Herbert
In-Reply-To: <1269845561.2164.1.camel@edumazet-laptop>

From: Stephen Rothwell <sfr@canb.auug.org.au>

Le lundi 29 mars 2010 à 08:52 +0200, Eric Dumazet a écrit :
> Le lundi 29 mars 2010 à 17:43 +1100, Stephen Rothwell a écrit :
> > Hi Dave,
> > 
> > After merging the final tree, today's linux-next build (powerpc
> > ppc44x_defconfig) failed like this:
> > 
> > net/core/net-sysfs.c:476: warning: 'struct netdev_rx_queue' declared inside parameter list
> > net/core/net-sysfs.c:476: warning: its scope is only this definition or declaration, which is probably not what you want
> > net/core/net-sysfs.c:478: warning: 'struct netdev_rx_queue' declared inside parameter list
> > net/core/net-sysfs.c: In function 'rx_queue_attr_show':
> > net/core/net-sysfs.c:489: error: dereferencing pointer to incomplete type
> > net/core/net-sysfs.c:489: warning: type defaults to 'int' in declaration of '__mptr'
> > net/core/net-sysfs.c:489: warning: initialization from incompatible pointer type
> > net/core/net-sysfs.c:489: error: invalid use of undefined type 'struct netdev_rx_queue'
> > net/core/net-sysfs.c:494: warning: passing argument 1 of 'attribute->show' from incompatible pointer type
> > net/core/net-sysfs.c:494: note: expected 'struct netdev_rx_queue *' but argument is of type 'struct netdev_rx_queue *'
> > 
> > (and many more)
> > 
> > Caused by commit 0a9627f2649a02bea165cfd529d7bcb625c2fcad ("rps: Receive
> > Packet Steering") from the net tree.  struct netdev_rx_queue is protected by
> > CONFIG_RPS in netdevice.h, but uses are not so protected in net-sysfs.c.
> > 
> > I applied the following patch for today:
> > 
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Mon, 29 Mar 2010 17:27:55 +1100
> > Subject: [PATCH] rps: fix net-sysfs build for !CONFIG_RPS
> > 
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Oops, a cleaner patch would be :

[PATCH] rps: fix net-sysfs build for !CONFIG_RPS

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index f6b6bfe..2144a7f 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -466,6 +466,7 @@ static struct attribute_group wireless_group = {
 };
 #endif
 
+#ifdef CONFIG_RPS
 /*
  * RX queue sysfs structures and functions.
  */
@@ -675,7 +676,7 @@ static void rx_queue_remove_kobjects(struct net_device *net)
 		kobject_put(&net->_rx[i].kobj);
 	kset_unregister(net->queues_kset);
 }
-
+#endif /* CONFIG_RPS */
 #endif /* CONFIG_SYSFS */
 
 #ifdef CONFIG_HOTPLUG
@@ -739,7 +740,7 @@ void netdev_unregister_kobject(struct net_device * net)
 	if (!net_eq(dev_net(net), &init_net))
 		return;
 
-#ifdef CONFIG_SYSFS
+#ifdef CONFIG_RPS
 	rx_queue_remove_kobjects(net);
 #endif
 
@@ -782,7 +783,7 @@ int netdev_register_kobject(struct net_device *net)
 	if (error)
 		return error;
 
-#ifdef CONFIG_SYSFS
+#ifdef CONFIG_RPS
 	error = rx_queue_register_kobjects(net);
 	if (error) {
 		device_del(dev);

^ permalink raw reply related

* Re: linux-next: build failure after merge of the final tree (net tree related)
From: Stephen Rothwell @ 2010-03-29  7:01 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David Miller, netdev, linux-next, linux-kernel, Tom Herbert
In-Reply-To: <1269845561.2164.1.camel@edumazet-laptop>

[-- Attachment #1: Type: text/plain, Size: 413 bytes --]

Hi Eric,

On Mon, 29 Mar 2010 08:52:41 +0200 Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
> Thats right, this was on my first submission, but I forgot to add
> net/core/net-sysfs.c in my second commit, sorry.
> 
> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>

Thanks for the confirmation.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply

* Re: linux-next: build failure after merge of the final tree (net tree related)
From: David Miller @ 2010-03-29  8:01 UTC (permalink / raw)
  To: eric.dumazet; +Cc: sfr, netdev, linux-next, linux-kernel, therbert
In-Reply-To: <1269845970.2164.4.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 29 Mar 2010 08:59:30 +0200

> From: Stephen Rothwell <sfr@canb.auug.org.au>
 ...
> Oops, a cleaner patch would be :
> 
> [PATCH] rps: fix net-sysfs build for !CONFIG_RPS
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied, thanks guys!

^ permalink raw reply

* Re: linux-next: build failure after merge of the final tree (net tree related)
From: Stephen Rothwell @ 2010-03-29  8:04 UTC (permalink / raw)
  To: David Miller; +Cc: eric.dumazet, netdev, linux-next, linux-kernel, therbert
In-Reply-To: <20100329.010104.214233589.davem@davemloft.net>

[-- Attachment #1: Type: text/plain, Size: 619 bytes --]

Hi Dave,

On Mon, 29 Mar 2010 01:01:04 -0700 (PDT) David Miller <davem@davemloft.net> wrote:
>
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Mon, 29 Mar 2010 08:59:30 +0200
> 
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
>  ...
> > Oops, a cleaner patch would be :
> > 
> > [PATCH] rps: fix net-sysfs build for !CONFIG_RPS
> > 
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> 
> Applied, thanks guys!

Thanks.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox