Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH NEXT] netxen: fix merge 9b963e5d0e01461099a
From: David Miller @ 2009-11-30  5:55 UTC (permalink / raw)
  To: amit.salecha; +Cc: netdev, dhananjay.phadke
In-Reply-To: <1259553675-14546-1-git-send-email-amit.salecha@qlogic.com>

From: Amit Kumar Salecha <amit.salecha@qlogic.com>
Date: Sun, 29 Nov 2009 20:01:15 -0800

> Patch "fix memory initialization:5d521fd36de4e61" didn't got merge.
> 
> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>

Applied, thanks!

^ permalink raw reply

* Re: [RFC PATCH 1/4] net: Add support to netdev ops for changing hardware queue MAC and VLAN filters
From: Simon Horman @ 2009-11-30  6:03 UTC (permalink / raw)
  To: Williams, Mitch A
  Cc: Ben Hutchings, Kirsher, Jeffrey T, davem@davemloft.net,
	shemminger@vyatta.com, netdev@vger.kernel.org, gospo@redhat.com
In-Reply-To: <EA929A9653AAE14F841771FB1DE5A1365FA6A9617F@rrsmsx501.amr.corp.intel.com>

On Mon, Nov 23, 2009 at 12:52:48PM -0700, Williams, Mitch A wrote:
> >From: Ben Hutchings [mailto:bhutchings@solarflare.com]
> >Sent: Monday, November 23, 2009 5:23 AM
> [snip]
> 
> >
> >How does this interact with use of multiple queues within a single
> >function?  Are the specified queue numbers really interpreted as RX
> >queue indices or as function numbers?
> >
> >Ben.
> 
> Yeah, that is ambiguous.  Would it be better if we changed the name of the parameter to 'vf' instead of 'queue' to make it explicit?
> 
> This would give us:
> $ ip link set eth1 vf 1 mac <blah>
> 
> The issue of which VF goes with which PF device can be deduced in
> userspace via sysfs.

Does this mean that the configuration of filtering for a VF needs
to be done where the interface for the VF exists - e.g. in a KVM
guest/Xen domU?

In terms of dealing with interfaces and the way that tools such as ip work
that makes a lot of sense. But I wonder if it actually makes more sense
from an administrative point of view to have this configuration go through
the PF - e.g. the KVM host/Xen domO.


^ permalink raw reply

* Re: [-next Nov 25] eHEA driver failure during boot(bisected)
From: Sachin Sant @ 2009-11-30  6:41 UTC (permalink / raw)
  To: netdev
  Cc: Stephen Rothwell, linux-next, Jan-Bernd Themann, HERING2,
	David Miller, Eric Dumazet
In-Reply-To: <4B0E3E18.7020308@in.ibm.com>

eHEA driver fails to initialize on a power6 box while booting
latest next. Following are the messages which gets
logged during failure (this is with 20091125 next(f3645ca..))

Unable to handle kernel paging request for data at address 0x409d0148e8e40018
Faulting instruction address: 0xc00000000003c0cc
Oops: Kernel access of bad area, sig: 11 [#1]
SMP NR_CPUS=1024 NUMA pSeries
Modules linked in: fuse loop dm_mod sr_mod cdrom ehea sg sd_mod crc_t10dif ibmvscsic scsi_transport_srp scsi_tgt scsi_mod
NIP: c00000000003c0cc LR: c00000000003ce50 CTR: 0000000000091b94
REGS: c00000000cade820 TRAP: 0300   Not tainted  (2.6.32-rc8-autotest-next-20091125)
MSR: 8000000000001032 <ME,IR,DR>  CR: 28020424  XER: 00000020
DAR: 409d0148e8e40018, DSISR: 0000000040000000
TASK = c00000000c818d60[1683] 'ip' THREAD: c00000000cadc000 CPU: 1
GPR00: 0000000000000010 c00000000cadeaa0 c000000000b28340 409d0148e8e40008
GPR04: d00008008000f040 c00000000cadeb20 0000000000001000 0000000000000000
GPR08: 000000000000001c c0000000018c0398 0000000000000000 c000000000bc0000
GPR12: 8000000000009032 c000000000bc2880 00000000ffffffff ffffffffffffffff
GPR16: 00000000203c8fc0 c00000000cadf4a8 c00000000cadf450 c00000000e4c0000
GPR20: 0000000000000300 0000000000000201 c000000000c68590 c000000000bc0000
GPR24: 0000000000000000 0000000000e5f87e 0000000000000001 c000000009920000
GPR28: 0000000000000000 d00008008000f040 0000000000000000 c000000000a63328
NIP [c00000000003c0cc] .subpage_protection+0x48/0x8c
LR [c00000000003ce50] .hash_page+0x3e0/0x45c
Call Trace:
[c00000000cadeaa0] [00000000ffffffff] 0xffffffff (unreliable)
[c00000000cadeb90] [c0000000000055d0] .do_hash_page+0x50/0x6c
--- Exception: 301 at .ehea_create_cq+0x234/0x2bc [ehea]
   LR = .ehea_create_cq+0x1c0/0x2bc [ehea]
[c00000000cadef40] [d0000000015e46fc] .ehea_init_port_res+0xb4/0x47c [ehea]
[c00000000cadf000] [d0000000015e4bd8] .ehea_up+0x114/0x6bc [ehea]
[c00000000cadf110] [d0000000015e51e0] .ehea_open+0x60/0x114 [ehea]
[c00000000cadf1b0] [c000000000542e7c] .dev_open+0x11c/0x19c
[c00000000cadf240] [c000000000541e7c] .dev_change_flags+0x10c/0x214
[c00000000cadf2e0] [c00000000054e0f8] .do_setlink+0x304/0x41c
[c00000000cadf3c0] [c00000000054f324] .rtnl_newlink+0x388/0x600
[c00000000cadf5d0] [c00000000054ef50] .rtnetlink_rcv_msg+0x260/0x2ac
[c00000000cadf680] [c000000000568104] .netlink_rcv_skb+0x74/0x108
[c00000000cadf710] [c00000000054eccc] .rtnetlink_rcv+0x34/0x58
[c00000000cadf7a0] [c000000000567bfc] .netlink_unicast+0x32c/0x408
[c00000000cadf870] [c0000000005688d8] .netlink_sendmsg+0x2d0/0x310
[c00000000cadf950] [c000000000529c9c] .sock_sendmsg+0xe0/0x11c
[c00000000cadfb50] [c000000000529fc8] .SyS_sendmsg+0x1f4/0x288
[c00000000cadfd70] [c000000000527f88] .SyS_socketcall+0x214/0x280
[c00000000cadfe30] [c0000000000085b4] syscall_exit+0x0/0x40
Instruction dump:
78000020 7fa40040 409d0020 7889aae0 39290072 79291f24 7d2b4a14 e8690010
2fa30000 419e0048 788014e2 78001f24 <7c63002a> 2fa30000 419e0034 788084a2
---[ end trace cacb4bbddb53f7bd ]---

This problem was introduced between next-20091119 and next-20091120.
Bisection leads to the following patch :

commit 2939e275994977b6c9eb7fd082b7b0caa35b96b0
netsched: Allow var_sk_bound_if meta to work on all namespaces

If i revert this patch the eHEA interface is initialized properly.

Thanks
-Sachin


-- 

---------------------------------
Sachin Sant
IBM Linux Technology Center
India Systems and Technology Labs
Bangalore, India
---------------------------------

^ permalink raw reply

* Re: dmfe/tulip device id overlap
From: Brandon Philips @ 2009-11-30  6:55 UTC (permalink / raw)
  To: David Miller; +Cc: grundler, tobias, kyle, netdev, grundler
In-Reply-To: <20091129.003024.245104886.davem@davemloft.net>

Hello Dave-

On 00:30 Sun 29 Nov 2009, David Miller wrote:
> From: Grant Grundler <grundler@google.com>
> Date: Wed, 25 Nov 2009 09:24:54 -0800
> 
> > I'm ok with this patch except the mention of Ubuntu in the comment is
> > superfluous. All the distro's will share this problem. I trust davem
> > to rewrite the comment and plase add my:
> >     Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
> 
> Please remove the comment and the __sparc__ ifdef.

The comment and the __sparc__ ifdef is the entire patch... so you NACK
the whole patch?? ;)

> If tulip doesn't work on some sparc systems we simply need to fix
> it.

Tulip works on sparc as described in the linux-sparc[1] thread.  The
problem as I understand it:

tulip works for the 0x9100 and 0x9102 parts that were onboard a few
sparc motherboards.

But, those same device IDs are used by a set of Davicom PCI cards that
only work with the dmfe driver.

Thus, the patch only lets tulip handle 0x9100 and 0x9102 if __sparc__.

Perhaps someone knows if there is a way to tell the PCI card from the
sparc builtin machine?

Cheers,

	Brandon

[1] http://marc.info/?l=linux-sparc&m=123698696912216&w=2

^ permalink raw reply

* Re: dmfe/tulip device id overlap
From: David Miller @ 2009-11-30  7:07 UTC (permalink / raw)
  To: brandon; +Cc: grundler, tobias, kyle, netdev, grundler
In-Reply-To: <20091130065512.GA2792@jenkins.domain_not_set.invalid>

From: Brandon Philips <brandon@ifup.org>
Date: Sun, 29 Nov 2009 22:55:12 -0800

> Thus, the patch only lets tulip handle 0x9100 and 0x9102 if __sparc__.
> 
> Perhaps someone knows if there is a way to tell the PCI card from the
> sparc builtin machine?

We should get both cases working in one of the two drivers,
preferrably Tulip.

That's the outcome I'm trying to say is the only legitimate one.

^ permalink raw reply

* Re: [PATCH] r8169: restore mac addr in rtl8169_remove_one and rtl_shutdown
From: David Miller @ 2009-11-30  7:13 UTC (permalink / raw)
  To: ivecera; +Cc: netdev, romieu
In-Reply-To: <1259087166-14558-1-git-send-email-ivecera@redhat.com>

From: Ivan Vecera <ivecera@redhat.com>
Date: Tue, 24 Nov 2009 19:26:06 +0100

> The newer chipsets (all PCI-E) are known that they need full power cycle
> (AC or battery removal) to reset MAC address to a  hardwired one. Previous
> patch to address this problem loads the original MAC address from EEPROM.
> But it brought other problem for which it is necessary to introduce a new
> module parameter.
> However, it might suffice to restore the initial MAC address before
> shutdown/reboot/kexec and when removing the module.
> 
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH] r8169: restore mac addr in rtl8169_remove_one and rtl_shutdown
From: David Miller @ 2009-11-30  7:13 UTC (permalink / raw)
  To: romieu; +Cc: ivecera, netdev
In-Reply-To: <20091129143902.GA17831@zoreil.com>

From: Fran^[$(D+.^[(Bois romieu <romieu@zoreil.com>
Date: Sun, 29 Nov 2009 15:39:02 +0100

> The Sun, Nov 29, 2009 at 12:21:57AM -0800, David Miller wrote :
> [...]
>> Francois, any comments?
> 
> It is low risk and manageable. Go for it.

Ok, thanks for the review.

^ permalink raw reply

* Re: [PATCH] smsc9420: prevent BUG() if ethtool is called with interface down
From: David Miller @ 2009-11-30  7:15 UTC (permalink / raw)
  To: steve.glendinning; +Cc: netdev
In-Reply-To: <1259166116-5036-1-git-send-email-steve.glendinning@smsc.com>

From: Steve Glendinning <steve.glendinning@smsc.com>
Date: Wed, 25 Nov 2009 16:21:56 +0000

> This patch fixes a null pointer dereference BUG() if ethtool is used on
> an smsc9420 interface while it is down, because the phy_dev is only
> allocated while the interface is up.
> 
> Please also consider for -stable.
> 
> Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>

Applied and queued up for -stable, thanks.

^ permalink raw reply

* Re: [RFC PATCH 00/10] Remove skb_dma_map/unmap calls
From: David Miller @ 2009-11-30  7:40 UTC (permalink / raw)
  To: alexander.h.duyck; +Cc: mcarlson, mchan, sathyap, subbus, netdev
In-Reply-To: <20091125011111.32704.3009.stgit@gitlad.jf.intel.com>

From: Alexander Duyck <alexander.h.duyck@intel.com>
Date: Tue, 24 Nov 2009 17:20:12 -0800

> This patch series removes the skb_dma_map and skb_dma_unmap function calls.
> The reason for this change is because the use of skb_dma_map/unmap can lead
> to serious issues when HW IOMMU is enabled.  This is because each mapping
> of the skb with a HW IOMMU enabled results in a new set of DMA mappings.
> This in turn leads to issues when skbs are cloned for uses such as
> bridging or pktgen because each transmitting device will update the skb
> shared info structure resulting in some mappings being overwritten, and others
> being freed multiple times.
> 
> I am looking for input specifically on the tg3, be2net, and bnx2 driver
> patches as I am not very familiar with them and I am not certain if
> additional changes are required.
> 
> I have included the changes for the Intel wired Ethernet drivers as a
> reference.

These changes look good, but at least one of them does not apply
to current net-2.6

Can you respin this against current sources?

Thanks a lot for doing this work Alexander.

^ permalink raw reply

* Re: [PATCH 2/3] X25: Check for errors in x25_init
From: Simon Horman @ 2009-11-30  7:41 UTC (permalink / raw)
  To: andrew hendry; +Cc: netdev, linux-kernel, linux-x25
In-Reply-To: <d45a3acc0911241715k6882aa3el64a50b3d68d12167@mail.gmail.com>

On Wed, Nov 25, 2009 at 12:15:42PM +1100, andrew hendry wrote:
> Adds error checking to x25_init.
> 
> Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
> 
> diff -uprN -X a/Documentation/dontdiff a/net/x25/af_x25.c b/net/x25/af_x25.c
> --- a/net/x25/af_x25.c  2009-11-25 10:21:17.000000000 +1100
> +++ b/net/x25/af_x25.c  2009-11-25 10:22:06.000000000 +1100
> @@ -1659,18 +1659,31 @@ static int __init x25_init(void)
>  	if (rc != 0)
>  		goto out;
> 
> -	sock_register(&x25_family_ops);
> +	rc = sock_register(&x25_family_ops);
> +	if (rc != 0)
> +		goto out_proto;
> 
>  	dev_add_pack(&x25_packet_type);
> 
> -	register_netdevice_notifier(&x25_dev_notifier);
> +	rc = register_netdevice_notifier(&x25_dev_notifier);
> +	if (rc != 0)
> +		goto out_sock;
> 
>  	printk(KERN_INFO "X.25 for Linux Version 0.2\n");
> 
>  	x25_register_sysctl();
> -	x25_proc_init();
> +	rc = x25_proc_init();
> +	if (rc != 0)
> +		goto out_dev;
>  out:
>  	return rc;
> +out_dev:
> +	unregister_netdevice_notifier(&x25_dev_notifier);
> +out_sock:
> +	sock_unregister(AF_X25);
> +out_proto:
> +	proto_unregister(&x25_proto);
> +	goto out;
>  }
>  module_init(x25_init);

The following seems slightly cleaner to me:

...
	rc = x25_proc_init();
	if (rc != 0)
		goto out_dev;

	return 0;  <-- or goto out;
out_dev:
	unregister_netdevice_notifier(&x25_dev_notifier);
out_sock:
	sock_unregister(AF_X25);
out_proto:
	proto_unregister(&x25_proto);
out:
	return rc;
}


^ permalink raw reply

* Re: [PATCH] Frame Relay/DLCI coding style corrections.
From: David Miller @ 2009-11-30  7:42 UTC (permalink / raw)
  To: rudy.matela; +Cc: mike.mclagan, netdev, trivial, linux-kernel
In-Reply-To: <20091125140152.GA11436@vacuum.larces.uece.br>

From: Rudy Matela <rudy.matela@gmail.com>
Date: Wed, 25 Nov 2009 11:01:52 -0300

> Frame Relay/DLCI coding style corrections.
> 
> Added a space separating some keywords (if/while) from the following
> parenthesis to conform to the CodingStyle.
> 
> Signed-off-by: Rudy Matela <rudy.matela@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH] NET: smc91x: Fix irq flags
From: David Miller @ 2009-11-30  7:47 UTC (permalink / raw)
  To: eric.y.miao; +Cc: linux, nico, netdev
In-Reply-To: <f17812d70911280715v50f48298rd5a469e393235a95@mail.gmail.com>

From: Eric Miao <eric.y.miao@gmail.com>
Date: Sat, 28 Nov 2009 23:15:13 +0800

> On Sat, Nov 28, 2009 at 6:13 PM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
>> smc91x.h defines SMC_IRQ_FLAGS to be -1 when it wants the interrupt
>> flags to be taken from the resource structure. ^[,A ^[(BHowever, d280ead
>> changed this to checking for non-zero resource flags.
>>
>> Unfortunately, this means that on some platforms, we end up passing
>> '-1' to request_irq rather than the desired result. ^[,A ^[(BCombine the two
>> conditions into one so that the IRQ flags are taken from the resource
>> if either SMC_IRQ_FLAGS is -1 or the resource flags specify an
>> interrupt trigger.
>>
>> This restores network on at least the Versatile platform.
>>
>> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> 
> Acked-by: Eric Miao <eric.y.miao@gmail.com>

Applied and queued up for -stable, thanks.

^ permalink raw reply

* Re: [PATCH v2] ep93xx-eth: check for zero MAC address on probe, not on device open
From: David Miller @ 2009-11-30  7:50 UTC (permalink / raw)
  To: buytenh; +Cc: florian, netdev
In-Reply-To: <20091129121158.GV20214@mail.wantstofly.org>

From: Lennert Buytenhek <buytenh@wantstofly.org>
Date: Sun, 29 Nov 2009 13:11:58 +0100

> On Sun, Nov 29, 2009 at 12:57:00AM +0100, Florian Fainelli wrote:
> 
>> If we happen to have registered the driver without passing
>> a MAC address, we will print a zero MAC address and register
>> the interface with this invalid address, this is confusin. This
>> patch moves the checking of a valid ethernet address and the
>> generation of a random one down from the open function to
>> the probe function.
>> 
>> Signed-off-by: Florian Fainelli <florian@openwrt.org>
> 
> Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>

Applied, thanks.

^ permalink raw reply

* Re: [patch] drop chan->wsem on error path
From: Jan Kasprzak @ 2009-11-30  7:44 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: netdev
In-Reply-To: <20091129160255.GN10640@bicker>

Dan Carpenter wrote:
: The other paths all drop chan->wsem.  This was found by a static
: checker (smatch).

	You are right, thanks!

: 
: Signed-off-by: Dan Carpenter <error27@gmail.com>

Acked-by: Jan "Yenya" Kasprzak <kas@fi.muni.cz>

: --- orig/drivers/net/wan/cosa.c	2009-11-29 16:38:42.000000000 +0200
: +++ devel/drivers/net/wan/cosa.c	2009-11-29 16:43:39.000000000 +0200
: @@ -907,6 +907,7 @@ static ssize_t cosa_write(struct file *f
:  			current->state = TASK_RUNNING;
:  			chan->tx_status = 1;
:  			spin_unlock_irqrestore(&cosa->lock, flags);
: +			up(&chan->wsem);
:  			return -ERESTARTSYS;
:  		}
:  	}

-- 
| Jan "Yenya" Kasprzak  <kas at {fi.muni.cz - work | yenya.net - private}> |
| GPG: ID 1024/D3498839      Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| http://www.fi.muni.cz/~kas/    Journal: http://www.fi.muni.cz/~kas/blog/ |
Please don't top post and in particular don't attach entire digests to your
mail or we'll all soon be using bittorrent to read the list.     --Alan Cox

^ permalink raw reply

* Re: [patch] drop chan->wsem on error path
From: David Miller @ 2009-11-30  8:07 UTC (permalink / raw)
  To: kas; +Cc: error27, netdev
In-Reply-To: <20091130074418.GC25334@fi.muni.cz>

From: Jan Kasprzak <kas@fi.muni.cz>
Date: Mon, 30 Nov 2009 08:44:18 +0100

> Dan Carpenter wrote:
> : The other paths all drop chan->wsem.  This was found by a static
> : checker (smatch).
> 
> 	You are right, thanks!
> 
> : 
> : Signed-off-by: Dan Carpenter <error27@gmail.com>
> 
> Acked-by: Jan "Yenya" Kasprzak <kas@fi.muni.cz>

Patch applied, thanks everyone.

^ permalink raw reply

* Re: [PATCH 0/20] Batch network namespace cleanup
From: Eric Dumazet @ 2009-11-30  8:07 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: David Miller, netdev, jamal, Daniel Lezcano, Alexey Dobriyan,
	Patrick McHardy
In-Reply-To: <m1ljhodbtw.fsf@fess.ebiederm.org>

Eric W. Biederman a écrit :

> Eric W. Biederman (20):
>       net: NETDEV_UNREGISTER_PERNET -> NETDEV_UNREGISTER_BATCH
>       net: Implement for_each_netdev_reverse.
>       net: Batch network namespace destruction.
>       net: Automatically allocate per namespace data.
>       net: Simplify loopback and improve batching.
>       net: Simplfy default_device_exit and improve batching.
>       net: Simplify the bond drivers pernet operations.
>       net: Simplify vlan pernet operations.
>       net: Simplify af_key pernet operations.
>       net: Simplify conntrack_proto_dccp pernet operations.
>       net: Simplify conntrack_proto_gre pernet operations.
>       net: Simplify ppp_generic pernet operations.
>       net: Simplify pppoe pernet operations.
>       net: Simplify pppol2tp pernet operations.
>       net: Simplify phonet pernet operations.
>       net: Simplify ip_gre pernet operations.
>       net: Simplify ipip pernet operations.
>       net: Simplify ip6_tunnel pernet operations.
>       net: Simplify ipip6 aka sit pernet operations.
>       net: remove [un]register_pernet_gen_... and update the docs.
> 

It seems list received part of your patches Eric

01, 07-20 are OK,   02-06 are missing

Thanks

^ permalink raw reply

* Re: [PATCH 0/20] Batch network namespace cleanup
From: David Miller @ 2009-11-30  8:09 UTC (permalink / raw)
  To: eric.dumazet; +Cc: ebiederm, netdev, hadi, dlezcano, adobriyan, kaber
In-Reply-To: <4B137D4B.8050803@gmail.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 30 Nov 2009 09:07:39 +0100

> It seems list received part of your patches Eric
> 
> 01, 07-20 are OK,   02-06 are missing

Not just the list, I didn't get copies of the missing patches through
direct email even though I was on the CC: list.

^ permalink raw reply

* Re: [PATCH] b44.c box lockup fix (netconsole): ratelimit NAPI poll error message
From: David Miller @ 2009-11-30  8:15 UTC (permalink / raw)
  To: andi; +Cc: zambrano, dave, mb, netdev, linux-kernel
In-Reply-To: <20091125213546.GA6168@rhlx01.hs-esslingen.de>

From: Andreas Mohr <andi@lisas.de>
Date: Wed, 25 Nov 2009 22:35:46 +0100

> See
> http://bugzilla.kernel.org/show_bug.cgi?id=14691
> for background information.

The patch below is what I'll check in to fix this, thanks.

As for the r8169 side, that case is much more complicated
to fix.  That driver messes with the interrupt masking
before the NAPI schedule check, instead of after it's
sure that NAPI isn't already scheduled like b44 does.

Therefore we might need to undo that programming or move
it into the code block where __napi_schedule() is actually
invoked.

I'll queue this b44 patch up for -stable too.

b44: Fix wedge when using netconsole.

Fixes kernel bugzilla #14691

Due to the way netpoll works, it is perfectly legal to see
NAPI already scheduled when new device events are pending
in b44_interrupt().

So logging a message about it is wrong and in fact harmful.

Based upon a patch by Andreas Mohr.

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

diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index e046943..2a91323 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -912,9 +912,6 @@ static irqreturn_t b44_interrupt(int irq, void *dev_id)
 			bp->istat = istat;
 			__b44_disable_ints(bp);
 			__napi_schedule(&bp->napi);
-		} else {
-			printk(KERN_ERR PFX "%s: Error, poll already scheduled\n",
-			       dev->name);
 		}
 
 irq_ack:
-- 
1.6.5

^ permalink raw reply related

* Re: [PATCH] b44.c box lockup fix (netconsole): ratelimit NAPI poll error message
From: David Miller @ 2009-11-30  8:16 UTC (permalink / raw)
  To: andi; +Cc: zambrano, dave, mb, netdev, linux-kernel
In-Reply-To: <20091130.001541.134590904.davem@davemloft.net>


Could someone email andi@lisas.de privately and let him know
that he isn't seeing any of my emails:

<andi@lisas.de>: host rhlx01.hs-esslingen.de[129.143.116.10] said: 550 5.7.1
    <74-93-104-97-Washington.hfc.comcastbusiness.net[74.93.104.97]>: Client
    host rejected: connections from dialup hosts not accepted. use your ISPs
    mail relay. (in reply to RCPT TO command)

Thanks.

^ permalink raw reply

* Re: [PATCH 0/20] Batch network namespace cleanup
From: Eric W. Biederman @ 2009-11-30  8:17 UTC (permalink / raw)
  To: David Miller; +Cc: eric.dumazet, netdev, hadi, dlezcano, adobriyan, kaber
In-Reply-To: <20091130.000918.212899174.davem@davemloft.net>

David Miller <davem@davemloft.net> writes:

> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Mon, 30 Nov 2009 09:07:39 +0100
>
>> It seems list received part of your patches Eric
>> 
>> 01, 07-20 are OK,   02-06 are missing
>
> Not just the list, I didn't get copies of the missing patches through
> direct email even though I was on the CC: list.

Thanks.  Weird.  I will take a look and resend.

Eric


^ permalink raw reply

* [PATCH 02/20] net: Implement for_each_netdev_reverse.
From: Eric W. Biederman @ 2009-11-30  8:25 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, jamal, Daniel Lezcano, Alexey Dobriyan, Patrick McHardy,
	Eric W. Biederman
In-Reply-To: <m1ljhodbtw.fsf@fess.ebiederm.org>

From: Eric W. Biederman <ebiederm@xmission.com>

I will need this shortly to implement network namespace shutdown
batching.  For sanity sake network devices should be removed in
the reverse order they were created in.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 include/linux/netdevice.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 9428793..daf13d3 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1112,6 +1112,8 @@ extern rwlock_t				dev_base_lock;		/* Device list lock */
 
 #define for_each_netdev(net, d)		\
 		list_for_each_entry(d, &(net)->dev_base_head, dev_list)
+#define for_each_netdev_reverse(net, d)	\
+		list_for_each_entry_reverse(d, &(net)->dev_base_head, dev_list)
 #define for_each_netdev_rcu(net, d)		\
 		list_for_each_entry_rcu(d, &(net)->dev_base_head, dev_list)
 #define for_each_netdev_safe(net, d, n)	\
-- 
1.6.5.2.143.g8cc62


^ permalink raw reply related

* [PATCH 03/20] net: Batch network namespace destruction.
From: Eric W. Biederman @ 2009-11-30  8:25 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, jamal, Daniel Lezcano, Alexey Dobriyan, Patrick McHardy,
	Eric W. Biederman, Eric W. Biederman
In-Reply-To: <m1ljhodbtw.fsf@fess.ebiederm.org>

From: Eric W. Biederman <eric@conroxe.ebiederm.org>

It is fairly common to kill several network namespaces at once.  Either
because they are nested one inside the other or because they are cooperating
in multiple machine networking experiments.  As the network stack control logic
does not parallelize easily batch up multiple network namespaces existing
together.

To get the full benefit of batching the virtual network devices to be
removed must be all removed in one batch.  For that purpose I have added
a loop after the last network device operations have run that batches
up all remaining network devices and deletes them.

An extra benefit is that the reorganization slightly shrinks the size
of the per network namespace data structures replaceing a work_struct
with a list_head.

In a trivial test with 4K namespaces this change reduced the cost of
a destroying 4K namespaces from 7+ minutes (at 12% cpu) to 44 seconds
(at 60% cpu).  The bulk of that 44s was spent in inet_twsk_purge.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 include/net/net_namespace.h |    2 +-
 net/core/net_namespace.c    |   66 +++++++++++++++++++++++++++++++++++++-----
 2 files changed, 59 insertions(+), 9 deletions(-)

diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 0addd45..d69b479 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -42,7 +42,7 @@ struct net {
 						 */
 #endif
 	struct list_head	list;		/* list of network namespaces */
-	struct work_struct	work;		/* work struct for freeing */
+	struct list_head	cleanup_list;	/* namespaces on death row */
 
 	struct proc_dir_entry 	*proc_net;
 	struct proc_dir_entry 	*proc_net_stat;
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 86ed7f4..a42caa2 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -8,8 +8,10 @@
 #include <linux/idr.h>
 #include <linux/rculist.h>
 #include <linux/nsproxy.h>
+#include <linux/netdevice.h>
 #include <net/net_namespace.h>
 #include <net/netns/generic.h>
+#include <net/rtnetlink.h>
 
 /*
  *	Our network namespace constructor/destructor lists
@@ -27,6 +29,20 @@ EXPORT_SYMBOL(init_net);
 
 #define INITIAL_NET_GEN_PTRS	13 /* +1 for len +2 for rcu_head */
 
+static void unregister_netdevices(struct net *net, struct list_head *list)
+{
+	struct net_device *dev;
+	/* At exit all network devices most be removed from a network
+	 * namespace.  Do this in the reverse order of registeration.
+	 */
+	for_each_netdev_reverse(net, dev) {
+		if (dev->rtnl_link_ops)
+			dev->rtnl_link_ops->dellink(dev, list);
+		else
+			unregister_netdevice_queue(dev, list);
+	}
+}
+
 /*
  * setup_net runs the initializers for the network namespace object.
  */
@@ -59,6 +75,13 @@ out_undo:
 	list_for_each_entry_continue_reverse(ops, &pernet_list, list) {
 		if (ops->exit)
 			ops->exit(net);
+		if (&ops->list == first_device) {
+			LIST_HEAD(dev_kill_list);
+			rtnl_lock();
+			unregister_netdevices(net, &dev_kill_list);
+			unregister_netdevice_many(&dev_kill_list);
+			rtnl_unlock();
+		}
 	}
 
 	rcu_barrier();
@@ -147,18 +170,26 @@ struct net *copy_net_ns(unsigned long flags, struct net *old_net)
 	return net_create();
 }
 
+static DEFINE_SPINLOCK(cleanup_list_lock);
+static LIST_HEAD(cleanup_list);  /* Must hold cleanup_list_lock to touch */
+
 static void cleanup_net(struct work_struct *work)
 {
 	struct pernet_operations *ops;
-	struct net *net;
+	struct net *net, *tmp;
+	LIST_HEAD(net_kill_list);
 
-	net = container_of(work, struct net, work);
+	/* Atomically snapshot the list of namespaces to cleanup */
+	spin_lock_irq(&cleanup_list_lock);
+	list_replace_init(&cleanup_list, &net_kill_list);
+	spin_unlock_irq(&cleanup_list_lock);
 
 	mutex_lock(&net_mutex);
 
 	/* Don't let anyone else find us. */
 	rtnl_lock();
-	list_del_rcu(&net->list);
+	list_for_each_entry(net, &net_kill_list, cleanup_list)
+		list_del_rcu(&net->list);
 	rtnl_unlock();
 
 	/*
@@ -170,8 +201,18 @@ static void cleanup_net(struct work_struct *work)
 
 	/* Run all of the network namespace exit methods */
 	list_for_each_entry_reverse(ops, &pernet_list, list) {
-		if (ops->exit)
-			ops->exit(net);
+		if (ops->exit) {
+			list_for_each_entry(net, &net_kill_list, cleanup_list)
+				ops->exit(net);
+		}
+		if (&ops->list == first_device) {
+			LIST_HEAD(dev_kill_list);
+			rtnl_lock();
+			list_for_each_entry(net, &net_kill_list, cleanup_list)
+				unregister_netdevices(net, &dev_kill_list);
+			unregister_netdevice_many(&dev_kill_list);
+			rtnl_unlock();
+		}
 	}
 
 	mutex_unlock(&net_mutex);
@@ -182,14 +223,23 @@ static void cleanup_net(struct work_struct *work)
 	rcu_barrier();
 
 	/* Finally it is safe to free my network namespace structure */
-	net_free(net);
+	list_for_each_entry_safe(net, tmp, &net_kill_list, cleanup_list) {
+		list_del_init(&net->cleanup_list);
+		net_free(net);
+	}
 }
+static DECLARE_WORK(net_cleanup_work, cleanup_net);
 
 void __put_net(struct net *net)
 {
 	/* Cleanup the network namespace in process context */
-	INIT_WORK(&net->work, cleanup_net);
-	queue_work(netns_wq, &net->work);
+	unsigned long flags;
+
+	spin_lock_irqsave(&cleanup_list_lock, flags);
+	list_add(&net->cleanup_list, &cleanup_list);
+	spin_unlock_irqrestore(&cleanup_list_lock, flags);
+
+	queue_work(netns_wq, &net_cleanup_work);
 }
 EXPORT_SYMBOL_GPL(__put_net);
 
-- 
1.6.5.2.143.g8cc62


^ permalink raw reply related

* [PATCH 05/20] net: Simplify loopback and improve batching.
From: Eric W. Biederman @ 2009-11-30  8:25 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, jamal, Daniel Lezcano, Alexey Dobriyan, Patrick McHardy,
	Eric W. Biederman
In-Reply-To: <m1ljhodbtw.fsf@fess.ebiederm.org>

From: Eric W. Biederman <ebiederm@xmission.com>

Defer calling unregister_netdevice_queue to cleanup_net.  It's simpler
and it allows the loopback device to land in the same batch as other
network devices.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 drivers/net/loopback.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
index c9f6557..eae4ad7 100644
--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
@@ -212,15 +212,7 @@ out:
 	return err;
 }
 
-static __net_exit void loopback_net_exit(struct net *net)
-{
-	struct net_device *dev = net->loopback_dev;
-
-	unregister_netdev(dev);
-}
-
 /* Registered in net/core/dev.c */
 struct pernet_operations __net_initdata loopback_net_ops = {
        .init = loopback_net_init,
-       .exit = loopback_net_exit,
 };
-- 
1.6.5.2.143.g8cc62


^ permalink raw reply related

* [PATCH 06/20] net: Simplfy default_device_exit and improve batching.
From: Eric W. Biederman @ 2009-11-30  8:25 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, jamal, Daniel Lezcano, Alexey Dobriyan, Patrick McHardy,
	Eric W. Biederman
In-Reply-To: <m1ljhodbtw.fsf@fess.ebiederm.org>

From: Eric W. Biederman <ebiederm@xmission.com>

- Defer dellink to net_cleanup() allowing for batching.
- Fix comment.
- Use for_each_netdev_safe again as dev_change_net_namespace touches
  at most one network device (unlike veth dellink).

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 net/core/dev.c |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 124029e..c3e3400 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5735,14 +5735,13 @@ static struct pernet_operations __net_initdata netdev_net_ops = {
 
 static void __net_exit default_device_exit(struct net *net)
 {
-	struct net_device *dev;
+	struct net_device *dev, *aux;
 	/*
-	 * Push all migratable of the network devices back to the
+	 * Push all migratable network devices back to the
 	 * initial network namespace
 	 */
 	rtnl_lock();
-restart:
-	for_each_netdev(net, dev) {
+	for_each_netdev_safe(net, dev, aux) {
 		int err;
 		char fb_name[IFNAMSIZ];
 
@@ -5750,11 +5749,9 @@ restart:
 		if (dev->features & NETIF_F_NETNS_LOCAL)
 			continue;
 
-		/* Delete virtual devices */
-		if (dev->rtnl_link_ops && dev->rtnl_link_ops->dellink) {
-			dev->rtnl_link_ops->dellink(dev, NULL);
-			goto restart;
-		}
+		/* Leave virtual devices for the generic cleanup */
+		if (dev->rtnl_link_ops)
+			continue;
 
 		/* Push remaing network devices to init_net */
 		snprintf(fb_name, IFNAMSIZ, "dev%d", dev->ifindex);
@@ -5764,7 +5761,6 @@ restart:
 				__func__, dev->name, err);
 			BUG();
 		}
-		goto restart;
 	}
 	rtnl_unlock();
 }
-- 
1.6.5.2.143.g8cc62


^ permalink raw reply related

* [PATCH 04/20] net: Automatically allocate per namespace data.
From: Eric W. Biederman @ 2009-11-30  8:25 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, jamal, Daniel Lezcano, Alexey Dobriyan, Patrick McHardy,
	Eric W. Biederman
In-Reply-To: <m1ljhodbtw.fsf@fess.ebiederm.org>

From: Eric W. Biederman <ebiederm@xmission.com>

To get the full benefit of batched network namespace cleanup netowrk
device deletion needs to be performed by the generic code.  When
using register_pernet_gen_device and freeing the data in exit_net
it is impossible to delay allocation until after exit_net has called
as the device uninit methods are no longer safe.

To correct this, and to simplify working with per network namespace data
I have moved allocation and deletion of per network namespace data into
the network namespace core.  The core now frees the data only after
all of the network namespace exit routines have run.

Now it is only required to set the new fields .id and .size
in the pernet_operations structure if you want network namespace
data to be managed for you automatically.

This makes the current register_pernet_gen_device and
register_pernet_gen_subsys routines unnecessary.  For the moment
I have left them as compatibility wrappers in net_namespace.h
They will be removed once all of the users have been updated.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 include/net/net_namespace.h |   28 ++++++-
 net/core/net_namespace.c    |  188 +++++++++++++++++++++++--------------------
 2 files changed, 126 insertions(+), 90 deletions(-)

diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index d69b479..080774b 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -236,6 +236,8 @@ struct pernet_operations {
 	struct list_head list;
 	int (*init)(struct net *net);
 	void (*exit)(struct net *net);
+	int *id;
+	size_t size;
 };
 
 /*
@@ -259,12 +261,30 @@ struct pernet_operations {
  */
 extern int register_pernet_subsys(struct pernet_operations *);
 extern void unregister_pernet_subsys(struct pernet_operations *);
-extern int register_pernet_gen_subsys(int *id, struct pernet_operations *);
-extern void unregister_pernet_gen_subsys(int id, struct pernet_operations *);
 extern int register_pernet_device(struct pernet_operations *);
 extern void unregister_pernet_device(struct pernet_operations *);
-extern int register_pernet_gen_device(int *id, struct pernet_operations *);
-extern void unregister_pernet_gen_device(int id, struct pernet_operations *);
+
+static inline int register_pernet_gen_subsys(int *id, struct pernet_operations *ops)
+{
+	ops->id = id;
+	return register_pernet_subsys(ops);
+}
+
+static inline void unregister_pernet_gen_subsys(int id, struct pernet_operations *ops)
+{
+	return unregister_pernet_subsys(ops);
+}
+
+static inline int register_pernet_gen_device(int *id, struct pernet_operations *ops)
+{
+	ops->id = id;
+	return register_pernet_device(ops);
+}
+
+static inline void unregister_pernet_gen_device(int id, struct pernet_operations *ops)
+{
+	return unregister_pernet_device(ops);
+}
 
 struct ctl_path;
 struct ctl_table;
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index a42caa2..9679ad2 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -43,13 +43,40 @@ static void unregister_netdevices(struct net *net, struct list_head *list)
 	}
 }
 
+static int ops_init(const struct pernet_operations *ops, struct net *net)
+{
+	int err;
+	if (ops->id && ops->size) {
+		void *data = kzalloc(ops->size, GFP_KERNEL);
+		if (!data)
+			return -ENOMEM;
+
+		err = net_assign_generic(net, *ops->id, data);
+		if (err) {
+			kfree(data);
+			return err;
+		}
+	}
+	if (ops->init)
+		return ops->init(net);
+	return 0;
+}
+
+static void ops_free(const struct pernet_operations *ops, struct net *net)
+{
+	if (ops->id && ops->size) {
+		int id = *ops->id;
+		kfree(net_generic(net, id));
+	}
+}
+
 /*
  * setup_net runs the initializers for the network namespace object.
  */
 static __net_init int setup_net(struct net *net)
 {
 	/* Must be called with net_mutex held */
-	struct pernet_operations *ops;
+	const struct pernet_operations *ops, *saved_ops;
 	int error = 0;
 
 	atomic_set(&net->count, 1);
@@ -59,11 +86,9 @@ static __net_init int setup_net(struct net *net)
 #endif
 
 	list_for_each_entry(ops, &pernet_list, list) {
-		if (ops->init) {
-			error = ops->init(net);
-			if (error < 0)
-				goto out_undo;
-		}
+		error = ops_init(ops, net);
+		if (error < 0)
+			goto out_undo;
 	}
 out:
 	return error;
@@ -72,6 +97,7 @@ out_undo:
 	/* Walk through the list backwards calling the exit functions
 	 * for the pernet modules whose init functions did not fail.
 	 */
+	saved_ops = ops;
 	list_for_each_entry_continue_reverse(ops, &pernet_list, list) {
 		if (ops->exit)
 			ops->exit(net);
@@ -83,6 +109,9 @@ out_undo:
 			rtnl_unlock();
 		}
 	}
+	ops = saved_ops;
+	list_for_each_entry_continue_reverse(ops, &pernet_list, list)
+		ops_free(ops, net);
 
 	rcu_barrier();
 	goto out;
@@ -175,7 +204,7 @@ static LIST_HEAD(cleanup_list);  /* Must hold cleanup_list_lock to touch */
 
 static void cleanup_net(struct work_struct *work)
 {
-	struct pernet_operations *ops;
+	const struct pernet_operations *ops;
 	struct net *net, *tmp;
 	LIST_HEAD(net_kill_list);
 
@@ -214,6 +243,13 @@ static void cleanup_net(struct work_struct *work)
 			rtnl_unlock();
 		}
 	}
+	/* Free the net generic variables */
+	list_for_each_entry_reverse(ops, &pernet_list, list) {
+		if (ops->size && ops->id) {
+			list_for_each_entry(net, &net_kill_list, cleanup_list)
+				ops_free(ops, net);
+		}
+	}
 
 	mutex_unlock(&net_mutex);
 
@@ -309,16 +345,16 @@ static int __init net_ns_init(void)
 pure_initcall(net_ns_init);
 
 #ifdef CONFIG_NET_NS
-static int register_pernet_operations(struct list_head *list,
-				      struct pernet_operations *ops)
+static int __register_pernet_operations(struct list_head *list,
+					struct pernet_operations *ops)
 {
 	struct net *net, *undo_net;
 	int error;
 
 	list_add_tail(&ops->list, list);
-	if (ops->init) {
+	if (ops->init || (ops->id && ops->size)) {
 		for_each_net(net) {
-			error = ops->init(net);
+			error = ops_init(ops, net);
 			if (error)
 				goto out_undo;
 		}
@@ -336,10 +372,18 @@ out_undo:
 		}
 	}
 undone:
+	if (ops->size && ops->id) {
+		for_each_net(undo_net) {
+			if (net_eq(undo_net, net))
+				goto freed;
+			ops_free(ops, undo_net);
+		}
+	}
+freed:
 	return error;
 }
 
-static void unregister_pernet_operations(struct pernet_operations *ops)
+static void __unregister_pernet_operations(struct pernet_operations *ops)
 {
 	struct net *net;
 
@@ -347,27 +391,66 @@ static void unregister_pernet_operations(struct pernet_operations *ops)
 	if (ops->exit)
 		for_each_net(net)
 			ops->exit(net);
+	if (ops->id && ops->size)
+		for_each_net(net)
+			ops_free(ops, net);
 }
 
 #else
 
-static int register_pernet_operations(struct list_head *list,
-				      struct pernet_operations *ops)
+static int __register_pernet_operations(struct list_head *list,
+					struct pernet_operations *ops)
 {
-	if (ops->init == NULL)
-		return 0;
-	return ops->init(&init_net);
+	int err = 0;
+	err = ops_init(ops, &init_net);
+	if (err)
+		ops_free(ops, &init_net);
+	return err;
+	
 }
 
-static void unregister_pernet_operations(struct pernet_operations *ops)
+static void __unregister_pernet_operations(struct pernet_operations *ops)
 {
 	if (ops->exit)
 		ops->exit(&init_net);
+	ops_free(ops, &init_net);
 }
-#endif
+
+#endif /* CONFIG_NET_NS */
 
 static DEFINE_IDA(net_generic_ids);
 
+static int register_pernet_operations(struct list_head *list,
+				      struct pernet_operations *ops)
+{
+	int error;
+
+	if (ops->id) {
+again:
+		error = ida_get_new_above(&net_generic_ids, 1, ops->id);
+		if (error < 0) {
+			if (error == -EAGAIN) {
+				ida_pre_get(&net_generic_ids, GFP_KERNEL);
+				goto again;
+			}
+			return error;
+		}
+	}
+	error = __register_pernet_operations(list, ops);
+	if (error && ops->id)
+		ida_remove(&net_generic_ids, *ops->id);
+
+	return error;
+}
+
+static void unregister_pernet_operations(struct pernet_operations *ops)
+{
+	
+	__unregister_pernet_operations(ops);
+	if (ops->id)
+		ida_remove(&net_generic_ids, *ops->id);
+}
+
 /**
  *      register_pernet_subsys - register a network namespace subsystem
  *	@ops:  pernet operations structure for the subsystem
@@ -414,38 +497,6 @@ void unregister_pernet_subsys(struct pernet_operations *module)
 }
 EXPORT_SYMBOL_GPL(unregister_pernet_subsys);
 
-int register_pernet_gen_subsys(int *id, struct pernet_operations *ops)
-{
-	int rv;
-
-	mutex_lock(&net_mutex);
-again:
-	rv = ida_get_new_above(&net_generic_ids, 1, id);
-	if (rv < 0) {
-		if (rv == -EAGAIN) {
-			ida_pre_get(&net_generic_ids, GFP_KERNEL);
-			goto again;
-		}
-		goto out;
-	}
-	rv = register_pernet_operations(first_device, ops);
-	if (rv < 0)
-		ida_remove(&net_generic_ids, *id);
-out:
-	mutex_unlock(&net_mutex);
-	return rv;
-}
-EXPORT_SYMBOL_GPL(register_pernet_gen_subsys);
-
-void unregister_pernet_gen_subsys(int id, struct pernet_operations *ops)
-{
-	mutex_lock(&net_mutex);
-	unregister_pernet_operations(ops);
-	ida_remove(&net_generic_ids, id);
-	mutex_unlock(&net_mutex);
-}
-EXPORT_SYMBOL_GPL(unregister_pernet_gen_subsys);
-
 /**
  *      register_pernet_device - register a network namespace device
  *	@ops:  pernet operations structure for the subsystem
@@ -477,30 +528,6 @@ int register_pernet_device(struct pernet_operations *ops)
 }
 EXPORT_SYMBOL_GPL(register_pernet_device);
 
-int register_pernet_gen_device(int *id, struct pernet_operations *ops)
-{
-	int error;
-	mutex_lock(&net_mutex);
-again:
-	error = ida_get_new_above(&net_generic_ids, 1, id);
-	if (error) {
-		if (error == -EAGAIN) {
-			ida_pre_get(&net_generic_ids, GFP_KERNEL);
-			goto again;
-		}
-		goto out;
-	}
-	error = register_pernet_operations(&pernet_list, ops);
-	if (error)
-		ida_remove(&net_generic_ids, *id);
-	else if (first_device == &pernet_list)
-		first_device = &ops->list;
-out:
-	mutex_unlock(&net_mutex);
-	return error;
-}
-EXPORT_SYMBOL_GPL(register_pernet_gen_device);
-
 /**
  *      unregister_pernet_device - unregister a network namespace netdevice
  *	@ops: pernet operations structure to manipulate
@@ -520,17 +547,6 @@ void unregister_pernet_device(struct pernet_operations *ops)
 }
 EXPORT_SYMBOL_GPL(unregister_pernet_device);
 
-void unregister_pernet_gen_device(int id, struct pernet_operations *ops)
-{
-	mutex_lock(&net_mutex);
-	if (&ops->list == first_device)
-		first_device = first_device->next;
-	unregister_pernet_operations(ops);
-	ida_remove(&net_generic_ids, id);
-	mutex_unlock(&net_mutex);
-}
-EXPORT_SYMBOL_GPL(unregister_pernet_gen_device);
-
 static void net_generic_release(struct rcu_head *rcu)
 {
 	struct net_generic *ng;
-- 
1.6.5.2.143.g8cc62


^ permalink raw reply related


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