Re: [PATCH 5/5] Hide the net_ns kmem cache

2007-10-31 Thread David Miller
From: Pavel Emelyanov <[EMAIL PROTECTED]> Date: Wed, 31 Oct 2007 22:32:55 +0300 > This cache is only required to create new namespaces, > but we won't have them in CONFIG_NET_NS=n case. > > Hide it under the appropriate ifdef. > > Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> Applied. - To

Re: [PATCH 4/5] Mark the setup_net as __net_init

2007-10-31 Thread David Miller
From: Pavel Emelyanov <[EMAIL PROTECTED]> Date: Wed, 31 Oct 2007 22:31:46 +0300 > The setup_net is called for the init net namespace > only (int the CONFIG_NET_NS=n of course) from the __init > function, so mark it as __net_init to disappear with the > caller after the boot. > > Yet again, in the

Re: [PATCH 3/5] Hide the dead code in the net_namespace.c

2007-10-31 Thread David Miller
From: Pavel Emelyanov <[EMAIL PROTECTED]> Date: Wed, 31 Oct 2007 22:28:51 +0300 > The namespace creation/destruction code is never called > if the CONFIG_NET_NS is n, so it's OK to move it under > appropriate ifdef. > > The copy_net_ns() in the "n" case checks for flags and > returns -EINVAL when

Re: [PATCH 6/8] Make the sk_clone() lighter

2007-10-31 Thread Pavel Emelyanov
David Miller wrote: > From: Pavel Emelyanov <[EMAIL PROTECTED]> > Date: Wed, 31 Oct 2007 16:54:34 +0300 > >> The sk_prot_alloc() already performs all the stuff needed by the >> sk_clone(). Besides, the sk_prot_alloc() requires almost twice >> less arguments than the sk_alloc() does, so call the sk

Re: [PATCH 2/5] Relax the reference counting of init_net_ns

2007-10-31 Thread David Miller
From: Pavel Emelyanov <[EMAIL PROTECTED]> Date: Wed, 31 Oct 2007 22:25:18 +0300 > When the CONFIG_NET_NS is n there's no need in refcounting > the initial net namespace. So relax this code by making a > stupid stubs for the "n" case. > > Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> Applied

Re: [PATCH 1/5][NETNS] Make the init/exit hooks checks outside the loop

2007-10-31 Thread David Miller
From: Pavel Emelyanov <[EMAIL PROTECTED]> Date: Wed, 31 Oct 2007 22:23:35 +0300 > When the new pernet something (subsys, device or operations) is > being registered, the init callback is to be called for each > namespace, that currently exitst in the system. During the > unregister, the same is to

Re: [PATCH 8/8] Forget the zero_it argument of sk_alloc()

2007-10-31 Thread David Miller
From: Pavel Emelyanov <[EMAIL PROTECTED]> Date: Wed, 31 Oct 2007 16:59:16 +0300 > Finally, the zero_it argument can be completely removed from > the callers and from the function prototype. > > Besides, fix the checkpatch.pl warnings about using the > assignments inside if-s. > > This patch is r

Re: [PATCH 7/8] Remove bogus zero_it argument from sk_alloc

2007-10-31 Thread David Miller
From: Pavel Emelyanov <[EMAIL PROTECTED]> Date: Wed, 31 Oct 2007 16:56:10 +0300 > At this point nobody calls the sk_alloc(() with zero_it == 0, > so remove unneeded checks from it. > > Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> Applied. - To unsubscribe from this list: send the line "uns

Re: [PATCH 6/8] Make the sk_clone() lighter

2007-10-31 Thread David Miller
From: Pavel Emelyanov <[EMAIL PROTECTED]> Date: Wed, 31 Oct 2007 16:54:34 +0300 > The sk_prot_alloc() already performs all the stuff needed by the > sk_clone(). Besides, the sk_prot_alloc() requires almost twice > less arguments than the sk_alloc() does, so call the sk_prot_alloc() > saving the st

Re: [PATCH 5/8] Move some core sock setup into sk_prot_alloc

2007-10-31 Thread David Miller
From: Pavel Emelyanov <[EMAIL PROTECTED]> Date: Wed, 31 Oct 2007 16:51:51 +0300 > The security_sk_alloc() and the module_get is a part of the > object allocations - move it in the proper place. > > Note, that since we do not reset the newly allocated sock > in the sk_alloc() (memset() is removed

Re: [PATCH 4/8] Auto-zero the allocated sock object

2007-10-31 Thread David Miller
From: Pavel Emelyanov <[EMAIL PROTECTED]> Date: Wed, 31 Oct 2007 16:48:59 +0300 > We have a __GFP_ZERO flag that allocates a zeroed chunk of memory. > Use it in the sk_alloc() and avoid a hand-made memset(). > > This is a temporary patch that will help us in the nearest future :) > > Signed-off-

Re: [PATCH 3/8] Cleanup the allocation/freeing of the sock object

2007-10-31 Thread David Miller
From: Pavel Emelyanov <[EMAIL PROTECTED]> Date: Wed, 31 Oct 2007 16:47:00 +0300 > The sock object is allocated either from the generic cache with > the kmalloc, or from the proc->slab cache. > > Move this logic into an isolated set of helpers and make the > sk_alloc/sk_free look a bit nicer. > >

Re: [PATCH 2/8] Move the get_net() from sock_copy()

2007-10-31 Thread David Miller
From: Pavel Emelyanov <[EMAIL PROTECTED]> Date: Wed, 31 Oct 2007 16:44:40 +0300 > The sock_copy() is supposed to just clone the socket. In a perfect > world it has to be just memcpy, but we have to handle the security > mark correctly. All the extra setup must be performed in sk_clone() > call, s

Re: [PATCH 1/8] Move the sock_copy() from the header

2007-10-31 Thread David Miller
From: Pavel Emelyanov <[EMAIL PROTECTED]> Date: Wed, 31 Oct 2007 16:42:01 +0300 > The sock_copy() call is not used outside the sock.c file, > so just move it into a sock.c > > Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> Applied. - To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH 6/8] Make the sk_clone() lighter

2007-10-31 Thread David Miller
From: Pavel Emelyanov <[EMAIL PROTECTED]> Date: Wed, 31 Oct 2007 16:54:34 +0300 > The sk_prot_alloc() already performs all the stuff needed by the > sk_clone(). Besides, the sk_prot_alloc() requires almost twice > less arguments than the sk_alloc() does, so call the sk_prot_alloc() > saving the st

Re: [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code

2007-10-31 Thread David Miller
From: Eric Dumazet <[EMAIL PROTECTED]> Date: Thu, 01 Nov 2007 07:58:59 +0100 > I agree with you that with current state, this atomic_inc/atomic_dec_and_test > wont come in profiles unless a trivial bench is writen > > for(;;){close(socket());} Just add one packet send and one packet receive

Re: [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code

2007-10-31 Thread Eric Dumazet
Eric W. Biederman a écrit : Eric Dumazet <[EMAIL PROTECTED]> writes: Eric W. Biederman a écrit : Eric Dumazet <[EMAIL PROTECTED]> writes: Definitly wanted here. Thank you. One more refcounting on each socket creation/deletion was expensive. Really? Have you actually measured that? If the

Re: expected behavior of PF_PACKET on NETIF_F_HW_VLAN_RX device?

2007-10-31 Thread David Miller
From: Stephen Hemminger <[EMAIL PROTECTED]> Date: Wed, 31 Oct 2007 18:23:37 -0700 > The code in AF_PACKET should fix the skb before passing to user > space so that there is no difference between accel and non-accel > hardware. Internal choices shouldn't leak to user space. Ditto, > the receive c

[PATCH] - e1000e/ethtool.c - convert macros to functions

2007-10-31 Thread Joe Perches
Add functions for reg_pattern_test and reg_set_and check Changed macros to use these functions Compiled x86, untested Size decreased ~2K old: $ size drivers/net/e1000e/ethtool.o textdata bss dec hex filename 14461 0 0 14461387d drivers/net/e1000e/ethtool.o

RE: [PATCH] ucc_geth: add support for netpoll

2007-10-31 Thread Li Yang-r58472
> -Original Message- > From: Anton Vorontsov [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 01, 2007 5:59 AM > To: Li Yang-r58472 > Cc: netdev@vger.kernel.org; [EMAIL PROTECTED]; > [EMAIL PROTECTED] > Subject: Re: [PATCH] ucc_geth: add support for netpoll > > On Mon, Oct 29, 2007 a

Re: expected behavior of PF_PACKET on NETIF_F_HW_VLAN_RX device?

2007-10-31 Thread Ben Greear
Stephen Hemminger wrote: The code in AF_PACKET should fix the skb before passing to user space so that there is no difference between accel and non-accel hardware. Internal choices shouldn't leak to user space. Ditto, the receive checksum offload should be fixed up as well. Ok, I guess that

Re: expected behavior of PF_PACKET on NETIF_F_HW_VLAN_RX device?

2007-10-31 Thread Stephen Hemminger
Ben Greear wrote: Stephen Hemminger wrote: On Wed, 31 Oct 2007 14:43:51 -0400 Dave Johnson <[EMAIL PROTECTED]> wrote: Depending on the network driver, I'm seeing different behavior if a .1q packet is received to an PF_PACKET, SOCK_RAW, ETH_P_ALL socket. On devices what do not use NETIF_F_H

Re: expected behavior of PF_PACKET on NETIF_F_HW_VLAN_RX device?

2007-10-31 Thread David Miller
From: Ben Greear <[EMAIL PROTECTED]> Date: Wed, 31 Oct 2007 18:06:34 -0700 > DaveM did the HW Accel for VLANs if I remember correctly...perhaps he > has some input? Not really, I'm busy and also not motivated to work on this, someone else will need to. - To unsubscribe from this list: send the l

Re: expected behavior of PF_PACKET on NETIF_F_HW_VLAN_RX device?

2007-10-31 Thread Ben Greear
Stephen Hemminger wrote: On Wed, 31 Oct 2007 14:43:51 -0400 Dave Johnson <[EMAIL PROTECTED]> wrote: Depending on the network driver, I'm seeing different behavior if a .1q packet is received to an PF_PACKET, SOCK_RAW, ETH_P_ALL socket. On devices what do not use NETIF_F_HW_VLAN_RX, the pac

Re: [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code

2007-10-31 Thread Eric W. Biederman
David Miller <[EMAIL PROTECTED]> writes: > From: Eric Dumazet <[EMAIL PROTECTED]> > Date: Wed, 31 Oct 2007 23:40:59 +0100 > >> Eric W. Biederman a écrit : >> > Eric Dumazet <[EMAIL PROTECTED]> writes: >> > >> > >> >> Definitly wanted here. Thank you. >> >> One more refcounting on each socket cre

Re: [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code

2007-10-31 Thread Eric W. Biederman
Eric Dumazet <[EMAIL PROTECTED]> writes: > Eric W. Biederman a écrit : >> Eric Dumazet <[EMAIL PROTECTED]> writes: >> >> >>> Definitly wanted here. Thank you. >>> One more refcounting on each socket creation/deletion was expensive. >> >> Really? Have you actually measured that? If the overhead i

Re: [PATCH] - e1000_ethtool.c - convert macros to functions

2007-10-31 Thread Kok, Auke
Joe Perches wrote: > On Wed, 2007-10-31 at 14:30 -0700, Kok, Auke wrote: >> Joe Perches wrote: >> that's not a bad idea, however see below: >> can't we keep the macro here (and just make it call the function instead of >> expanding). the resulting code is much more lenghty and contains all these >

Re: [PATCH] - e1000_ethtool.c - convert macros to functions

2007-10-31 Thread Joe Perches
On Wed, 2007-10-31 at 14:30 -0700, Kok, Auke wrote: > Joe Perches wrote: > > Convert REG_PATTERN_TEST and REG_SET_AND_CHECK macros to functions > > Reduces x86 defconfig image by about 3k Convert REG_PATTERN_TEST and REG_SET_AND_CHECK macros to functions Reduces x86 defconfig image by about 3k co

Re: [Bugme-new] [Bug 9270] New: sunhme requires lower MTU to handle 802.1q frames

2007-10-31 Thread David Miller
From: Andrew Morton <[EMAIL PROTECTED]> Date: Wed, 31 Oct 2007 15:43:01 -0700 > > sunhme requires lower MTU to handle 802.1q frames - even though the PCI > > driver supported VLAN tagging, you cannot do full MTU @ 1500 because the > > driver doesn't set the card to transfer more the extra bytes fo

Re: [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code

2007-10-31 Thread David Miller
From: Eric Dumazet <[EMAIL PROTECTED]> Date: Wed, 31 Oct 2007 23:40:59 +0100 > Eric W. Biederman a écrit : > > Eric Dumazet <[EMAIL PROTECTED]> writes: > > > > > >> Definitly wanted here. Thank you. > >> One more refcounting on each socket creation/deletion was expensive. > > > > Really? Have

Re: [PATCH] - e1000_ethtool.c - convert macros to functions

2007-10-31 Thread Joe Perches
On Wed, 2007-10-31 at 14:30 -0700, Kok, Auke wrote: > Joe Perches wrote: > that's not a bad idea, however see below: > can't we keep the macro here (and just make it call the function instead of > expanding). the resulting code is much more lenghty and contains all these > logic > traps that the p

Re: af_packet.c flush_dcache_page

2007-10-31 Thread David Miller
From: Patrick McHardy <[EMAIL PROTECTED]> Date: Wed, 31 Oct 2007 15:08:02 +0100 > I'm currently adding mmap support to af_netlink based on the > af_packet implementation and I'm wondering about this code in > tpacket_rcv(): > > h->tp_status = status; > smp_mb(); > > {

Re: [PATCH]: Fix myri10ge NAPI oops & warnings

2007-10-31 Thread Andrew Gallatin
Stephen Hemminger wrote: On Wed, 31 Oct 2007 17:40:06 -0400 Andrew Gallatin <[EMAIL PROTECTED]> wrote: When testing the myri10ge driver with 2.6.24-rc1, I found that the machine crashed under heavy load: Unable to handle kernel paging request at 00100108 RIP: [] net_rx_action+0x11b/0

Re: [Bugme-new] [Bug 9270] New: sunhme requires lower MTU to handle 802.1q frames

2007-10-31 Thread Andrew Morton
On Wed, 31 Oct 2007 14:54:06 -0700 (PDT) [EMAIL PROTECTED] wrote: > http://bugzilla.kernel.org/show_bug.cgi?id=9270 > >Summary: sunhme requires lower MTU to handle 802.1q frames >Product: Drivers >Version: 2.5 > KernelVersion: 2.6.18-3 > Platform

Re: [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code

2007-10-31 Thread Eric Dumazet
Eric W. Biederman a écrit : Eric Dumazet <[EMAIL PROTECTED]> writes: Definitly wanted here. Thank you. One more refcounting on each socket creation/deletion was expensive. Really? Have you actually measured that? If the overhead is measurable and expensive we may want to look at per cpu co

Re: [Bugme-new] [Bug 9269] New: bonding module cannot enslave ethernet devices provided by sunhme

2007-10-31 Thread Andrew Morton
On Wed, 31 Oct 2007 14:35:56 -0700 (PDT) [EMAIL PROTECTED] wrote: > http://bugzilla.kernel.org/show_bug.cgi?id=9269 > >Summary: bonding module cannot enslave ethernet devices provided > by sunhme >Product: Drivers >Version: 2.5 > Kernel

Re: [PATCH] net: docbook fixes for netif_ functions

2007-10-31 Thread Randy Dunlap
On Wed, 31 Oct 2007 14:08:48 -0700 Stephen Hemminger wrote: > Documentation updates for network interfaces. > > 1. Add doc for netif_napi_add > 2. Remove doc for unused returns from netif_rx > 3. Add doc for netif_receive_skb > > Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]> > > --- a/n

[PATCH 4/4] ixgbe: Fix copper PHY initialization code

2007-10-31 Thread Auke Kok
While cleaning up the internal API focussing on Fiber and CX4 code we found that I had broken the copper PHY initialization code. This patch restores the PHY-specific code. This is mostly uninteresting since no copper PHY boards are yet available. The changes have been tested against Fiber only as

[PATCH 3/4] e1000/e1000e: Move PCI-Express device IDs over to e1000e

2007-10-31 Thread Auke Kok
e1000e will from now on support the PCI-Express adapters that previously were supported by e1000. This support means better performance and easier debugging from now on for both the old PCI-X/PCI hardware and PCI-Express adapters. This patch also moves 3 recently merged device IDs over to e1000e t

[PATCH 1/4] e1000e: alternate MAC address support

2007-10-31 Thread Auke Kok
From: Bill Hayes <[EMAIL PROTECTED]> Port alternate MAC address support from the sourceforge e1000 driver to the upstream e1000e driver. Signed-off-by: Bill Hayes <[EMAIL PROTECTED]> Signed-off-by: Auke Kok <[EMAIL PROTECTED]> --- drivers/net/e1000e/82571.c |4 drivers/net/e1000e/def

[PATCH 2/4] e1000e: Disable L1 ASPM power savings for 82573 mobile variants

2007-10-31 Thread Auke Kok
L1 ASPM link (pci-e link power savings) has significant benefits (~1W savings when link is active) but unfortunately does not work correctly on any of the chipsets that have 82573 on mobile platforms which causes various nuisances: - eeprom reads return garbage information leading to bad eeprom

Re: [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code

2007-10-31 Thread Eric W. Biederman
Eric Dumazet <[EMAIL PROTECTED]> writes: > Definitly wanted here. Thank you. > One more refcounting on each socket creation/deletion was expensive. Really? Have you actually measured that? If the overhead is measurable and expensive we may want to look at per cpu counters or something like tha

Re: [PATCH] ucc_geth: add support for netpoll

2007-10-31 Thread Anton Vorontsov
On Mon, Oct 29, 2007 at 03:17:44PM +0300, Anton Vorontsov wrote: [...] > > Oops. The original patch happened to hit the Junk mail box. :( > > That one as well? http://lkml.org/lkml/2007/10/11/128 > > > I think > > the patch is good to merge after the cosmetic change. I can do it in > > next pul

RE: [PATCH 10/14 v2] nes: eeprom and phy routines

2007-10-31 Thread Glenn Grundstrom
> > +/* > > +"Everything you wanted to know about CRC algorithms, but > were afraid to ask > > + for fear that errors in your understanding might be > detected." Version : 3. > > etc etc... can all this be replaced with what's in lib/crc32.c? (I > hope so) Replacing this code is already in

Re: [PATCH]: Fix myri10ge NAPI oops & warnings

2007-10-31 Thread Stephen Hemminger
On Wed, 31 Oct 2007 17:40:06 -0400 Andrew Gallatin <[EMAIL PROTECTED]> wrote: > > When testing the myri10ge driver with 2.6.24-rc1, I found > that the machine crashed under heavy load: > > Unable to handle kernel paging request at 00100108 RIP: > [] net_rx_action+0x11b/0x184 > > The a

[PATCH]: Fix myri10ge NAPI oops & warnings

2007-10-31 Thread Andrew Gallatin
When testing the myri10ge driver with 2.6.24-rc1, I found that the machine crashed under heavy load: Unable to handle kernel paging request at 00100108 RIP: [] net_rx_action+0x11b/0x184 The address corresponds to the list_move_tail() in netif_rx_complete(): if (unli

Re: [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code

2007-10-31 Thread Daniel Lezcano
Pavel Emelyanov wrote: Currently we have the NET_NS config option, but the only change it makes is just return ERR_PTR(-EINVAL) inside the cloning call thus introducing a bunch of a dead code and making the reference counting unneeded. This is not very good. So clean the net_namespace.c to fix

Re: [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code

2007-10-31 Thread Daniel Lezcano
Eric Dumazet wrote: On Wed, 31 Oct 2007 22:19:43 +0300 Pavel Emelyanov <[EMAIL PROTECTED]> wrote: Currently we have the NET_NS config option, but the only change it makes is just return ERR_PTR(-EINVAL) inside the cloning call thus introducing a bunch of a dead code and making the reference co

Re: [PATCH] - e1000_ethtool.c - convert macros to functions

2007-10-31 Thread Kok, Auke
Joe Perches wrote: > Convert REG_PATTERN_TEST and REG_SET_AND_CHECK macros to functions > Reduces x86 defconfig image by about 3k > > compiled, untested (no hardware) > > Signed-off-by: Joe Perches <[EMAIL PROTECTED]> > > New: > > $ size vmlinux >textdata bss dec hex filenam

[PATCH] - e1000_ethtool.c - convert macros to functions

2007-10-31 Thread Joe Perches
Convert REG_PATTERN_TEST and REG_SET_AND_CHECK macros to functions Reduces x86 defconfig image by about 3k compiled, untested (no hardware) Signed-off-by: Joe Perches <[EMAIL PROTECTED]> New: $ size vmlinux textdata bss dec hex filename 4792735 490626 606208 5889569 59de21

[PATCH] net: docbook fixes for netif_ functions

2007-10-31 Thread Stephen Hemminger
Documentation updates for network interfaces. 1. Add doc for netif_napi_add 2. Remove doc for unused returns from netif_rx 3. Add doc for netif_receive_skb Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]> --- a/include/linux/netdevice.h 2007-10-31 09:16:09.0 -0700 +++ b/include/linux

Re: [PATCH 11/14 v2] nes: OpenFabrics kernel verbs

2007-10-31 Thread Roland Dreier
> +/** > + * nes_post_send > + */ > +static int nes_post_send(struct ib_qp *ibqp, struct ib_send_wr *ib_wr, > +struct ib_send_wr **bad_wr) > ... > +switch (ib_wr->opcode) { > ... > +if (ib_wr->num_sge > > nesdev->nes

Re: [PATCH 10/14 v2] nes: eeprom and phy routines

2007-10-31 Thread Roland Dreier
> +/* TODO: deal with EEPROM endian issues */ This is pretty scary. Is the driver broken on big-endian systems now? > +/* > +"Everything you wanted to know about CRC algorithms, but were afraid to ask > + for fear that errors in your understanding might be detected." Version : > 3. e

Re: [PATCH]: Fix IP1000 config dependencies.

2007-10-31 Thread Francois Romieu
David Miller <[EMAIL PROTECTED]> : [...] > Noticed during some randconfig runs. > > [NET]: IP1000 driver needs MII. It is fixed as of bbd82f956e0db6190b16a8a00d3ed5d979f488e8. -- Ueimor - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTEC

Re: [PATCH] ehea: add kexec support

2007-10-31 Thread Christoph Raisch
Michael Ellerman <[EMAIL PROTECTED]> wrote on 30.10.2007 23:50:36: > > On Tue, 2007-10-30 at 09:39 +0100, Christoph Raisch wrote: > > > > Michael Ellerman <[EMAIL PROTECTED]> wrote on 28.10.2007 23:32:17: > > Hope I didn't miss anything here... > > Perhaps. When we kdump the kernel does not call t

Re: expected behavior of PF_PACKET on NETIF_F_HW_VLAN_RX device?

2007-10-31 Thread Stephen Hemminger
On Wed, 31 Oct 2007 14:43:51 -0400 Dave Johnson <[EMAIL PROTECTED]> wrote: > > Depending on the network driver, I'm seeing different behavior if > a .1q packet is received to an PF_PACKET, SOCK_RAW, ETH_P_ALL socket. > > > On devices what do not use NETIF_F_HW_VLAN_RX, the packet socket gets >

Re: [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code

2007-10-31 Thread Eric Dumazet
On Wed, 31 Oct 2007 22:19:43 +0300 Pavel Emelyanov <[EMAIL PROTECTED]> wrote: > Currently we have the NET_NS config option, but the only change it > makes is just return ERR_PTR(-EINVAL) inside the cloning call thus > introducing a bunch of a dead code and making the reference counting > unneeded

expected behavior of PF_PACKET on NETIF_F_HW_VLAN_RX device?

2007-10-31 Thread Dave Johnson
Depending on the network driver, I'm seeing different behavior if a .1q packet is received to an PF_PACKET, SOCK_RAW, ETH_P_ALL socket. On devices what do not use NETIF_F_HW_VLAN_RX, the packet socket gets the complete packet with vlan tag included as the driver simply calls netif_receive_skb()

[PATCH 5/5] Hide the net_ns kmem cache

2007-10-31 Thread Pavel Emelyanov
This cache is only required to create new namespaces, but we won't have them in CONFIG_NET_NS=n case. Hide it under the appropriate ifdef. Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> --- diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index a044e2d..e9f0964 100644 --- a/

[PATCH 4/5] Mark the setup_net as __net_init

2007-10-31 Thread Pavel Emelyanov
The setup_net is called for the init net namespace only (int the CONFIG_NET_NS=n of course) from the __init function, so mark it as __net_init to disappear with the caller after the boot. Yet again, in the perfect world this has to be under #ifdef CONFIG_NET_NS, but it isn't guaranteed that every

[PATCH 3/5] Hide the dead code in the net_namespace.c

2007-10-31 Thread Pavel Emelyanov
The namespace creation/destruction code is never called if the CONFIG_NET_NS is n, so it's OK to move it under appropriate ifdef. The copy_net_ns() in the "n" case checks for flags and returns -EINVAL when new net ns is requested. In a perfect world this stub must be in net_namespace.h, but this f

[PATCH 2/5] Relax the reference counting of init_net_ns

2007-10-31 Thread Pavel Emelyanov
When the CONFIG_NET_NS is n there's no need in refcounting the initial net namespace. So relax this code by making a stupid stubs for the "n" case. Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> --- diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 5279466..1fd449a

[PATCH 1/5][NETNS] Make the init/exit hooks checks outside the loop

2007-10-31 Thread Pavel Emelyanov
When the new pernet something (subsys, device or operations) is being registered, the init callback is to be called for each namespace, that currently exitst in the system. During the unregister, the same is to be done with the exit callback. However, not every pernet something has both calls, but

[PATCH 0/5] Make nicer CONFIG_NET_NS=n case code

2007-10-31 Thread Pavel Emelyanov
Currently we have the NET_NS config option, but the only change it makes is just return ERR_PTR(-EINVAL) inside the cloning call thus introducing a bunch of a dead code and making the reference counting unneeded. This is not very good. So clean the net_namespace.c to fix this. I have sent a set

[PATCH] tlan list is subscribers-only

2007-10-31 Thread Gabriel C
... Your mail to 'Tlan-devel' with the subject drivers/net/tlan question Is being held until the list moderator can review it for approval. The reason it is being held: Post by non-member to a members-only list ... Signed-off-by: Gabriel Craciunescu <[EMAIL PROTECTED]> --- MAINTAI

drivers/net/tlan question

2007-10-31 Thread Gabriel C
Hi, I noticed on current git the following warning with !CONFIG_PCI : ... drivers/net/tlan.c: In function 'TLan_probe1': drivers/net/tlan.c:682: warning: label 'err_out' defined but not used ... I thought a simply #ifdef is missing but looking at TLan_probe1() I got confused about err_out_reg

Re: [PATCH 00/33] Swap over NFS -v14

2007-10-31 Thread Evgeniy Polyakov
Hi. On Wed, Oct 31, 2007 at 10:54:02AM -0400, Mike Snitzer ([EMAIL PROTECTED]) wrote: > > Trouble with that part is that we don't have any sane network block > > devices atm, NBD is utter crap, and iSCSI is too complex to be called > > sane. > > > > Maybe Evgeniy's Distributed storage thingy woul

Re: [PATCH 2/2] NFS: handle IPv6 addresses in nfs ctl

2007-10-31 Thread J. Bruce Fields
On Wed, Oct 31, 2007 at 10:06:18AM +0100, Aurélien Charbon wrote: > Thank you Brian > Sorry, I did not see what you sent. > > I have tested it with an IPv4 configuration. It's OK. > So Neil, Bruce, you can take this one for review. Did you miss Neil's question about the nfsctl stuff? (Do we reall

Re: [PATCH][RFC] Add support for the RDC R6040 Fast Ethernet controller

2007-10-31 Thread Stephen Hemminger
On Mon, 29 Oct 2007 22:51:42 +0100 Florian Fainelli <[EMAIL PROTECTED]> wrote: > This patch adds support for the RDC R6040 MAC we can find in the RDC R-321x > System-on-chips. > This driver really needs improvements especially on the NAPI part which > probably does not > fully use the new NAPI s

Re: [PATCH 00/33] Swap over NFS -v14

2007-10-31 Thread Mike Snitzer
On 10/31/07, Peter Zijlstra <[EMAIL PROTECTED]> wrote: > On Wed, 2007-10-31 at 08:50 +, Christoph Hellwig wrote: > > On Tue, Oct 30, 2007 at 09:37:53PM -0700, David Miller wrote: > > > Don't be misled. Swapping over NFS is just a scarecrow for the > > > seemingly real impetus behind these chan

Re: [UDP6]: Restore sk_filter optimisation

2007-10-31 Thread Herbert Xu
On Wed, Oct 31, 2007 at 11:05:45PM +0900, Mitsuru Chinen wrote: > > > > 1. udp6InDatagrams is incremented instead of udpInErrors > > > 2. In userland, recvfrom() replies an error with EAGAIN. > > > recvfrom() wasn't aware of such a packet before. > > > > > > Are these changes intentional? >

Re: [PATCH 00/33] Swap over NFS -v14

2007-10-31 Thread Byron Stanoszek
On Wed, 31 Oct 2007, Nick Piggin wrote: On Wednesday 31 October 2007 15:37, David Miller wrote: From: Nick Piggin <[EMAIL PROTECTED]> Date: Wed, 31 Oct 2007 14:26:32 +1100 Is it really worth all the added complexity of making swap over NFS files work, given that you could use a network block

Re: [PATCH 0/8] Cleanup/fix the sk_alloc() call

2007-10-31 Thread Arnaldo Carvalho de Melo
Em Wed, Oct 31, 2007 at 05:32:20PM +0300, Pavel Emelyanov escreveu: > Arnaldo Carvalho de Melo wrote: > > Em Wed, Oct 31, 2007 at 04:40:01PM +0300, Pavel Emelyanov escreveu: > >> The sk_alloc() function suffers from two problems: > >> 1 (major). The error path is not clean in it - if the security >

af_packet.c flush_dcache_page

2007-10-31 Thread Patrick McHardy
I'm currently adding mmap support to af_netlink based on the af_packet implementation and I'm wondering about this code in tpacket_rcv(): h->tp_status = status; smp_mb(); { struct page *p_start, *p_end; u8 *h_end = (u8 *)h + macoff + snaple

Re: [UDP6]: Restore sk_filter optimisation

2007-10-31 Thread Mitsuru Chinen
On Mon, 29 Oct 2007 20:53:28 +0800 Herbert Xu <[EMAIL PROTECTED]> wrote: > On Mon, Oct 29, 2007 at 03:33:20PM +0900, Mitsuru Chinen wrote: > > Hello Herbert, > > > > Let me ask a question about this patch. > > After this patch was applied, 2 of the protocol stack behaviors were > > changed when i

Re: [PATCH]: Fix networking scatterlist regressions.

2007-10-31 Thread Jens Axboe
On Wed, Oct 31 2007, Herbert Xu wrote: > On Tue, Oct 30, 2007 at 08:40:02PM -0700, David Miller wrote: > > > > I just checked the following bug fix into net-2.6 > > Thanks for getting to the bottom of this Dave! I seem to have > mistaken the = for a |= in sg_mark_end :) I don't blame you, that f

Re: [PATCH 00/33] Swap over NFS -v14

2007-10-31 Thread Gregory Haskins
Peter Zijlstra wrote: > > But please, people who want this (I'm sure some of you are reading) do > speak up. I'm just the motivated corporate drone implementing the > feature :-) FWIW, I could have used a "swap to network technology X" like system at my last job. We were building a large networ

Re: [PATCH]: Fix networking scatterlist regressions.

2007-10-31 Thread Herbert Xu
On Tue, Oct 30, 2007 at 08:40:02PM -0700, David Miller wrote: > > I just checked the following bug fix into net-2.6 Thanks for getting to the bottom of this Dave! I seem to have mistaken the = for a |= in sg_mark_end :) Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{P

Re: [PATCH 0/8] Cleanup/fix the sk_alloc() call

2007-10-31 Thread Pavel Emelyanov
Arnaldo Carvalho de Melo wrote: > Em Wed, Oct 31, 2007 at 04:40:01PM +0300, Pavel Emelyanov escreveu: >> The sk_alloc() function suffers from two problems: >> 1 (major). The error path is not clean in it - if the security >>call fails, the net namespace is not put, if the try_module_get >>f

Re: [PATCH 00/33] Swap over NFS -v14

2007-10-31 Thread Arnaldo Carvalho de Melo
Em Wed, Oct 31, 2007 at 01:56:53PM +0100, Peter Zijlstra escreveu: > On Wed, 2007-10-31 at 08:16 -0400, Jeff Garzik wrote: > > Thoughts: > > > > 1) I absolutely agree that NFS is far more prominent and useful than any > > network block device, at the present time. > > > > > > 2) Nonetheless, sw

Re: [PATCH 0/8] Cleanup/fix the sk_alloc() call

2007-10-31 Thread Arnaldo Carvalho de Melo
Em Wed, Oct 31, 2007 at 04:40:01PM +0300, Pavel Emelyanov escreveu: > The sk_alloc() function suffers from two problems: > 1 (major). The error path is not clean in it - if the security >call fails, the net namespace is not put, if the try_module_get >fails additionally the security contex

Re: [PATCH 03/33] mm: slub: add knowledge of reserve pages

2007-10-31 Thread Peter Zijlstra
On Wed, 2007-10-31 at 13:54 +0100, Peter Zijlstra wrote: > On Wed, 2007-10-31 at 22:25 +1100, Nick Piggin wrote: > > What I'm saying is that the slab allocator slowpath should always > > just check watermarks against the current task. Instead of this > > ->reserve stuff. > > So what you say is to

Re: [PATCH 06/33] mm: allow PF_MEMALLOC from softirq context

2007-10-31 Thread Peter Zijlstra
On Wed, 2007-10-31 at 21:49 +1100, Nick Piggin wrote: > On Wednesday 31 October 2007 21:42, Peter Zijlstra wrote: > > On Wed, 2007-10-31 at 14:51 +1100, Nick Piggin wrote: > > > On Wednesday 31 October 2007 03:04, Peter Zijlstra wrote: > > > > Allow PF_MEMALLOC to be set in softirq context. When ru

[PATCH 8/8] Forget the zero_it argument of sk_alloc()

2007-10-31 Thread Pavel Emelyanov
Finally, the zero_it argument can be completely removed from the callers and from the function prototype. Besides, fix the checkpatch.pl warnings about using the assignments inside if-s. This patch is rather big, and it is a part of the previous one. I splitted it wishing to make the patches more

Re: [PATCH 00/33] Swap over NFS -v14

2007-10-31 Thread Peter Zijlstra
On Wed, 2007-10-31 at 08:16 -0400, Jeff Garzik wrote: > Thoughts: > > 1) I absolutely agree that NFS is far more prominent and useful than any > network block device, at the present time. > > > 2) Nonetheless, swap over NFS is a pretty rare case. I view this work > as interesting, but I reall

Re: [PATCH 03/33] mm: slub: add knowledge of reserve pages

2007-10-31 Thread Peter Zijlstra
On Wed, 2007-10-31 at 22:25 +1100, Nick Piggin wrote: > On Wednesday 31 October 2007 23:17, Peter Zijlstra wrote: > > On Wed, 2007-10-31 at 21:46 +1100, Nick Piggin wrote: > > > > And I'd prevent these ones from doing so. > > > > > > Without keeping track of "reserve" pages, which doesn't feel > >

[PATCH 7/8] Remove bogus zero_it argument from sk_alloc

2007-10-31 Thread Pavel Emelyanov
At this point nobody calls the sk_alloc(() with zero_it == 0, so remove unneeded checks from it. Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> --- diff --git a/net/core/sock.c b/net/core/sock.c index c032f48..77575c3 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -931,21 +931,16 @@ s

[PATCH 6/8] Make the sk_clone() lighter

2007-10-31 Thread Pavel Emelyanov
The sk_prot_alloc() already performs all the stuff needed by the sk_clone(). Besides, the sk_prot_alloc() requires almost twice less arguments than the sk_alloc() does, so call the sk_prot_alloc() saving the stack a bit. Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> --- diff --git a/net/cor

[PATCH 5/8] Move some core sock setup into sk_prot_alloc

2007-10-31 Thread Pavel Emelyanov
The security_sk_alloc() and the module_get is a part of the object allocations - move it in the proper place. Note, that since we do not reset the newly allocated sock in the sk_alloc() (memset() is removed with the previous patch) we can safely do this. Also fix the error path in sk_prot_alloc()

[PATCH 4/8] Auto-zero the allocated sock object

2007-10-31 Thread Pavel Emelyanov
We have a __GFP_ZERO flag that allocates a zeroed chunk of memory. Use it in the sk_alloc() and avoid a hand-made memset(). This is a temporary patch that will help us in the nearest future :) Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> --- diff --git a/net/core/sock.c b/net/core/sock.c

[PATCH 3/8] Cleanup the allocation/freeing of the sock object

2007-10-31 Thread Pavel Emelyanov
The sock object is allocated either from the generic cache with the kmalloc, or from the proc->slab cache. Move this logic into an isolated set of helpers and make the sk_alloc/sk_free look a bit nicer. Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> --- diff --git a/net/core/sock.c b/net/co

Re: [PATCH 03/33] mm: slub: add knowledge of reserve pages

2007-10-31 Thread Nick Piggin
On Wednesday 31 October 2007 23:17, Peter Zijlstra wrote: > On Wed, 2007-10-31 at 21:46 +1100, Nick Piggin wrote: > > And I'd prevent these ones from doing so. > > > > Without keeping track of "reserve" pages, which doesn't feel > > too clean. > > The problem with that is that once a slab was allo

[PATCH 2/8] Move the get_net() from sock_copy()

2007-10-31 Thread Pavel Emelyanov
The sock_copy() is supposed to just clone the socket. In a perfect world it has to be just memcpy, but we have to handle the security mark correctly. All the extra setup must be performed in sk_clone() call, so move the get_net() into more proper place. Signed-off-by: Pavel Emelyanov <[EMAIL PROT

[PATCH 1/8] Move the sock_copy() from the header

2007-10-31 Thread Pavel Emelyanov
The sock_copy() call is not used outside the sock.c file, so just move it into a sock.c Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> --- diff --git a/include/net/sock.h b/include/net/sock.h index 43fc3fa..ecad7b4 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -993,20 +993,6 @@

[PATCH 0/8] Cleanup/fix the sk_alloc() call

2007-10-31 Thread Pavel Emelyanov
The sk_alloc() function suffers from two problems: 1 (major). The error path is not clean in it - if the security call fails, the net namespace is not put, if the try_module_get fails additionally the security context is not released; 2 (minor). The zero_it argument is misleading, as it does

Re: [PATCH 03/33] mm: slub: add knowledge of reserve pages

2007-10-31 Thread Peter Zijlstra
On Wed, 2007-10-31 at 21:46 +1100, Nick Piggin wrote: > On Wednesday 31 October 2007 21:42, Peter Zijlstra wrote: > > On Wed, 2007-10-31 at 14:37 +1100, Nick Piggin wrote: > > > On Wednesday 31 October 2007 03:04, Peter Zijlstra wrote: > > > > Restrict objects from reserve slabs (ALLOC_NO_WATERMARK

Re: [PATCH 00/33] Swap over NFS -v14

2007-10-31 Thread Jeff Garzik
Thoughts: 1) I absolutely agree that NFS is far more prominent and useful than any network block device, at the present time. 2) Nonetheless, swap over NFS is a pretty rare case. I view this work as interesting, but I really don't see a huge need, for swapping over NBD or swapping over NFS

Re: [PATCH 06/33] mm: allow PF_MEMALLOC from softirq context

2007-10-31 Thread Nick Piggin
On Wednesday 31 October 2007 21:42, Peter Zijlstra wrote: > On Wed, 2007-10-31 at 14:51 +1100, Nick Piggin wrote: > > On Wednesday 31 October 2007 03:04, Peter Zijlstra wrote: > > > Allow PF_MEMALLOC to be set in softirq context. When running softirqs > > > from a borrowed context save current->fla

Re: [PATCH 1/7] o80211s: Export dev_seq_{start,stop,next} symbols.

2007-10-31 Thread Johannes Berg
> This patches are being sent just to linux-wireless mailing list. I'm just > sending this one patch also to netdev since it is not wireless specific. > +EXPORT_SYMBOL_GPL(dev_seq_start); A log message that explains why you need this would be good, rather than a generic introduction. johannes

Re: [PATCH 03/33] mm: slub: add knowledge of reserve pages

2007-10-31 Thread Nick Piggin
On Wednesday 31 October 2007 21:42, Peter Zijlstra wrote: > On Wed, 2007-10-31 at 14:37 +1100, Nick Piggin wrote: > > On Wednesday 31 October 2007 03:04, Peter Zijlstra wrote: > > > Restrict objects from reserve slabs (ALLOC_NO_WATERMARKS) to allocation > > > contexts that are entitled to it. > > >

  1   2   >