* [PATCH] net/usb: mark LG VL600 LTE modem ethernet interface as WWAN
From: Dan Williams @ 2011-05-09 17:43 UTC (permalink / raw)
To: netdev; +Cc: Andrzej Zaborowski, Oliver Neukum
Like other mobile broadband device ethernet interfaces, mark the LG
VL600 with the 'wwan' devtype so userspace knows it needs additional
configuration via the AT port before the interface can be used.
Signed-off-by: Dan Williams <dcbw@redhat.com>
---
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index a301479..c924ea2 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -567,7 +567,7 @@ static const struct usb_device_id products [] = {
{
USB_DEVICE_AND_INTERFACE_INFO(0x1004, 0x61aa, USB_CLASS_COMM,
USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
- .driver_info = 0,
+ .driver_info = (unsigned long)&wwan_info,
},
/*
^ permalink raw reply related
* Multicast issue on 2.6.39-rc6
From: Rolando Martins @ 2011-05-09 18:10 UTC (permalink / raw)
To: netdev
Hi,
is anyone experiencing problems with the receiving of multicast
packets in 2.6.39-rc6?
Thanks,
Rolando
^ permalink raw reply
* Re: [PATCH net-next-2.6] garp: remove one synchronize_rcu() call
From: Patrick McHardy @ 2011-05-09 18:25 UTC (permalink / raw)
To: Eric Dumazet; +Cc: David Miller, Ben Greear, netdev, Paul E. McKenney
In-Reply-To: <1304948155.3342.32.camel@edumazet-laptop>
Am 09.05.2011 15:35, schrieb Eric Dumazet:
> Speedup vlan dismantling in CONFIG_VLAN_8021Q_GVRP=y cases,
> by using a call_rcu() to free the memory instead of waiting with
> expensive synchronize_rcu() [ while RTNL is held ]
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> Cc: Ben Greear <greearb@candelatech.com>
> Cc: Patrick McHardy <kaber@trash.net>
> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> ---
> Note: I'll take care of using kfree_rcu() when available in net-next-2.6
>
Looks good to me.
^ permalink raw reply
* Re: [PATCH net-next-2.6] vlan: remove one synchronize_net() call
From: Patrick McHardy @ 2011-05-09 18:26 UTC (permalink / raw)
To: Eric Dumazet
Cc: David Miller, Ben Greear, netdev, Paul E. McKenney, Jesse Gross,
Michał Mirosław
In-Reply-To: <1304952044.3342.42.camel@edumazet-laptop>
Am 09.05.2011 16:40, schrieb Eric Dumazet:
> At VLAN dismantle phase, unregister_vlan_dev() makes one
> synchronize_net() call after vlan_group_set_device(grp, vlan_id, NULL).
>
> This call can be safely removed because we are calling
> unregister_netdevice_queue() to queue device for deletion, and this
> process needs at least one rcu grace period to complete.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> Cc: Ben Greear <greearb@candelatech.com>
> Cc: Patrick McHardy <kaber@trash.net>
> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> Cc: Jesse Gross <jesse@nicira.com>
> Cc: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> ---
> include/linux/if_vlan.h | 1 -
> net/8021q/vlan.c | 10 ++++------
> 2 files changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
> index 546d9d3..290bd8a 100644
> --- a/include/linux/if_vlan.h
> +++ b/include/linux/if_vlan.h
> @@ -86,7 +86,6 @@ struct vlan_group {
> * the vlan is attached to.
> */
> unsigned int nr_vlans;
> - int killall;
Looks good, thanks Eric.
^ permalink raw reply
* Testing interface removal speedup patches from Eric Dumazet.
From: Ben Greear @ 2011-05-09 18:37 UTC (permalink / raw)
To: netdev; +Cc: Eric Dumazet
[-- Attachment #1: Type: text/plain, Size: 1879 bytes --]
These two patches look good to me. My benchmark has lots of extraneous
overhead (process launch per action, primarily), so the numbers bounce around
quite a bit on different runs, but it seems consistent that removing vlans
is slightly faster, and removing VETH is much faster.
NOTE: for VETH, it's creating and dealing with pairs..so 500 veth
means 1000 interfaces in the results below.
The script to generate these results is attached.
System is Atom N270, running Fedora 14. Kernel has HZ 1000,
pre-empt, SMP, compiled for Pentium II.
With patches:
Created 500 veth in 17.874695 seconds (0.03574939 per interface).
Added IP addresses in 23.306214 seconds (0.046612428 per addr).
Deleted 500 veth in 17.023607 seconds. (0.034047214 per interface)
Created 1000 macvlan in 20.005472 seconds (0.020005472 per interface).
Added IP addresses in 24.870693 seconds (0.024870693 per addr).
Deleted 1000 macvlan in 44.899769 seconds. (0.044899769 per interface)
Created 1000 vlan in 21.343862 seconds (0.021343862 per interface).
Added IP addresses in 24.088452 seconds (0.024088452 per addr).
Deleted 1000 vlan in 42.623666 seconds. (0.042623666 per interface)
Without:
Created 500 veth in 22.507598 seconds (0.045015196 per interface).
Added IP addresses in 28.637194 seconds (0.057274388 per addr).
Deleted 500 veth in 34.998733 seconds. (0.069997466 per interface)
Created 1000 macvlan in 27.903848 seconds (0.027903848 per interface).
Added IP addresses in 29.725436 seconds (0.029725436 per addr).
Deleted 1000 macvlan in 58.552433 seconds. (0.058552433 per interface)
Created 1000 vlan in 33.733169 seconds (0.033733169 per interface).
Added IP addresses in 29.755363 seconds (0.029755363 per addr).
Deleted 1000 vlan in 54.858484 seconds. (0.054858484 per interface)
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
[-- Attachment #2: test_macvlans.pl --]
[-- Type: application/x-perl, Size: 2070 bytes --]
^ permalink raw reply
* Re: [PATCH net-next-2.6] net: use batched device unregister in veth and macvlan
From: David Miller @ 2011-05-09 18:42 UTC (permalink / raw)
To: eric.dumazet; +Cc: mirqus, alex, netdev, jesse, paulmck, greearb
In-Reply-To: <1304932677.3342.17.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 09 May 2011 11:17:57 +0200
> veth devices dont use the batched device unregisters yet.
>
> Since veth are a pair of devices, it makes sense to use a batch of two
> unregisters, this roughly divides dismantle time by two.
>
> Fix this by changing dellink() callers to always provide a non NULL
> head. (Idea from Michał Mirosław)
>
> This patch also handles macvlan case : We now dismantle all macvlans on
> top of a lower dev at once.
>
> Reported-by: Alex Bligh <alex@alex.org.uk>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next-2.6] garp: remove one synchronize_rcu() call
From: David Miller @ 2011-05-09 18:42 UTC (permalink / raw)
To: eric.dumazet; +Cc: greearb, kaber, netdev, paulmck
In-Reply-To: <1304948155.3342.32.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 09 May 2011 15:35:55 +0200
> Speedup vlan dismantling in CONFIG_VLAN_8021Q_GVRP=y cases,
> by using a call_rcu() to free the memory instead of waiting with
> expensive synchronize_rcu() [ while RTNL is held ]
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next-2.6] vlan: remove one synchronize_net() call
From: David Miller @ 2011-05-09 18:42 UTC (permalink / raw)
To: eric.dumazet; +Cc: greearb, kaber, netdev, paulmck, jesse, mirq-linux
In-Reply-To: <1304952044.3342.42.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 09 May 2011 16:40:44 +0200
> At VLAN dismantle phase, unregister_vlan_dev() makes one
> synchronize_net() call after vlan_group_set_device(grp, vlan_id, NULL).
>
> This call can be safely removed because we are calling
> unregister_netdevice_queue() to queue device for deletion, and this
> process needs at least one rcu grace period to complete.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next 0/4] tulip: logging cleanups
From: David Miller @ 2011-05-09 18:47 UTC (permalink / raw)
To: joe; +Cc: netdev, linux-kernel
In-Reply-To: <cover.1304733889.git.joe@perches.com>
From: Joe Perches <joe@perches.com>
Date: Fri, 6 May 2011 19:08:41 -0700
> Joe Perches (4):
> tulip: xircom_cb: Convert #ifdef DEBUG blocks and enter/leave uses
> tulip: Convert printks to netdev_<level>
> tulip: Convert uses of KERN_DEBUG
> tulip: Use pr_<level> where appropriate
With the advent of the function tracer, those silly function entry/exit
logging things are entirely superfluous.
They make the code look ugly too.
So you have my approval to just kill those things off entirely.
Please do that and respin this patch set, thanks Joe!
^ permalink raw reply
* Re: [PATCH] ehea: fix wrongly reported speed and port
From: David Miller @ 2011-05-09 18:49 UTC (permalink / raw)
To: leitao; +Cc: klebers, netdev
In-Reply-To: <4DC44487.4070207@linux.vnet.ibm.com>
From: Breno Leitao <leitao@linux.vnet.ibm.com>
Date: Fri, 06 May 2011 15:57:11 -0300
> On 05/04/2011 08:05 PM, Kleber Sacilotto de Souza wrote:
>> Currently EHEA reports to ethtool as supporting 10M, 100M, 1G and
>> 10G and connected to FIBRE independent of the hardware configuration.
>> However, when connected to FIBRE the only supported speed is 10G
>> full-duplex, and the other speeds and modes are only supported
>> when connected to twisted pair.
>>
>> Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
> Acked-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] be2net: Fixed bugs related to PVID.
From: David Miller @ 2011-05-09 18:51 UTC (permalink / raw)
To: somnath.kotur; +Cc: netdev
In-Reply-To: <fe5f0791-266c-4fd7-9bfb-302b144c8a66@exht1.ad.emulex.com>
From: Somnath Kotur <somnath.kotur@emulex.com>
Date: Thu, 5 May 2011 14:10:46 +0530
> Fixed bug to make sure 'pvid' retrieval will work on big endian hosts.
> Fixed incorrect comparison between the Rx Completion's 16-bit VLAN TCI
> and the PVID. Now comparing only the relevant 12 bits corresponding to
> the VID.
> Renamed 'vid' field under Rx Completion to 'vlan_tag' to reflect
> accurate description.
>
> Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] NET: slip, fix ldisc->open retval
From: David Miller @ 2011-05-09 18:53 UTC (permalink / raw)
To: matvejchikov; +Cc: netdev
In-Reply-To: <BANLkTinWqaoMNHbOb5PbZzewQafWhBfY4Q@mail.gmail.com>
From: Matvejchikov Ilya <matvejchikov@gmail.com>
Date: Fri, 6 May 2011 20:23:09 +0400
> TTY layer expects 0 if the ldisc->open operation succeeded.
>
> Signed-off-by : Matvejchikov Ilya <matvejchikov@gmail.com>
Applied, thank you.
^ permalink raw reply
* Re: [PATCH 1/2] PCH_GbE : Fixed the issue of collision detection
From: David Miller @ 2011-05-09 18:55 UTC (permalink / raw)
To: toshiharu-linux
Cc: netdev, tomoya-linux, linux-kernel, qi.wang, yong.y.wang,
andrew.chih.howe.khor, joel.clark, kok.howg.ewe
In-Reply-To: <4DC3EF5F.1030306@dsn.okisemi.com>
From: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
Date: Fri, 06 May 2011 21:53:51 +0900
> The collision detection setting was invalid.
> When collision occurred, because data was not resenr,
> there was an issue to which a transmitting throughput falls.
>
> This patch enables the collision detection.
>
> Signed-off-by: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
Applied.
^ permalink raw reply
* Re: [PATCH 2/2] PCH_GbE : Fixed the issue of checksum judgment
From: David Miller @ 2011-05-09 18:55 UTC (permalink / raw)
To: toshiharu-linux
Cc: netdev, tomoya-linux, linux-kernel, qi.wang, yong.y.wang,
andrew.chih.howe.khor, joel.clark, kok.howg.ewe
In-Reply-To: <4DC3EF64.9050305@dsn.okisemi.com>
From: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
Date: Fri, 06 May 2011 21:53:56 +0900
> The checksum judgment was mistaken.
> Judgment result
> 0:Correct 1:Wrong
>
> This patch fixes the issue.
>
> Signed-off-by: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
Applied.
^ permalink raw reply
* Re: Testing interface removal speedup patches from Eric Dumazet.
From: Alex Bligh @ 2011-05-09 18:56 UTC (permalink / raw)
To: Ben Greear, netdev; +Cc: Eric Dumazet, Alex Bligh
In-Reply-To: <4DC83471.7030701@candelatech.com>
--On 9 May 2011 11:37:37 -0700 Ben Greear <greearb@candelatech.com> wrote:
With:
> Created 500 veth in 17.874695 seconds (0.03574939 per interface).
> Deleted 500 veth in 17.023607 seconds. (0.034047214 per interface)
Without:
> Created 500 veth in 22.507598 seconds (0.045015196 per interface).
> Deleted 500 veth in 34.998733 seconds. (0.069997466 per interface)
Interesting. On my tests (albeit with CONFIG_HZ=100) I got:
100 pairs 500 pairs
Interface creation 14ms 110ms
Interface deletion 160ms 148ms
So Eric's patches help in the interface create case, even though
there is no synchronize_net, sychronize_sched() or rcu_barrier() there.
I had assumed the slow create (which varies by number of pairs) was
down to sysfs scalability only (see difference between 14ms and 110ms
there).
Out of interest, if you still happen to have the scripts around, how
fast is veth creation if you just do 100 pairs?
--
Alex Bligh
^ permalink raw reply
* Re: Testing interface removal speedup patches from Eric Dumazet.
From: Ben Greear @ 2011-05-09 19:02 UTC (permalink / raw)
To: Alex Bligh; +Cc: netdev, Eric Dumazet
In-Reply-To: <06627C760FB049F1A9321BC6@Ximines.local>
On 05/09/2011 11:56 AM, Alex Bligh wrote:
>
>
> --On 9 May 2011 11:37:37 -0700 Ben Greear <greearb@candelatech.com> wrote:
>
> With:
>> Created 500 veth in 17.874695 seconds (0.03574939 per interface).
>> Deleted 500 veth in 17.023607 seconds. (0.034047214 per interface)
> Without:
>> Created 500 veth in 22.507598 seconds (0.045015196 per interface).
>> Deleted 500 veth in 34.998733 seconds. (0.069997466 per interface)
>
> Interesting. On my tests (albeit with CONFIG_HZ=100) I got:
>
> 100 pairs 500 pairs
> Interface creation 14ms 110ms
> Interface deletion 160ms 148ms
>
> So Eric's patches help in the interface create case, even though
> there is no synchronize_net, sychronize_sched() or rcu_barrier() there.
>
> I had assumed the slow create (which varies by number of pairs) was
> down to sysfs scalability only (see difference between 14ms and 110ms
> there).
I'm not certain the create case is actually faster. Other runs on the
patched kernel showed create to be much closer to the un-patched kernel.
The ratios to create/delete are more consistent it seems.
> Out of interest, if you still happen to have the scripts around, how
> fast is veth creation if you just do 100 pairs?
Created 100 veth in 2.779905 seconds (0.02779905 per interface).
Added IP addresses in 2.280084 seconds (0.02280084 per addr).
Deleted 100 veth in 3.988818 seconds. (0.03988818 per interface)
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: [PATCH 0/7] Network namespace manipulation with file descriptors
From: David Miller @ 2011-05-09 19:04 UTC (permalink / raw)
To: ebiederm
Cc: linux-arch, linux-kernel, netdev, linux-fsdevel, hadi,
daniel.lezcano, containers, renatowestphal
In-Reply-To: <m1tyd7p7tq.fsf@fess.ebiederm.org>
The networking bits look OK to me:
Acked-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply
* Re: [PATCH net-next-2.6] net: use batched device unregister in veth and macvlan
From: Eric Dumazet @ 2011-05-09 19:05 UTC (permalink / raw)
To: David Miller
Cc: mirqus, alex, netdev, jesse, paulmck, greearb, Patrick McHardy
In-Reply-To: <20110509.114200.226765786.davem@davemloft.net>
Le lundi 09 mai 2011 à 11:42 -0700, David Miller a écrit :
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Mon, 09 May 2011 11:17:57 +0200
>
> > veth devices dont use the batched device unregisters yet.
> >
> > Since veth are a pair of devices, it makes sense to use a batch of two
> > unregisters, this roughly divides dismantle time by two.
> >
> > Fix this by changing dellink() callers to always provide a non NULL
> > head. (Idea from Michał Mirosław)
> >
> > This patch also handles macvlan case : We now dismantle all macvlans on
> > top of a lower dev at once.
> >
> > Reported-by: Alex Bligh <alex@alex.org.uk>
> > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
>
> Applied.
Thanks !
I believe there is one problem with this patch and
unregister_vlan_dev(), I'll have to find a solution fast ;)
ip link add link eth2 eth2.103 type vlan id 103 gvrp on
ip link add link eth2 eth2.104 type vlan id 104 gvrp on
ip link set eth2.103 up
ip link set eth2.104 up
ip link del eth2.103
ip link del eth2.104 <<<BUG>>>
[ 372.573591] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 372.573738] IP: [<ffffffffa014ecde>] garp_request_leave+0x2e/0x88 [garp]
[ 372.573835] PGD 7a7d0067 PUD 7c9b1067 PMD 0
[ 372.573995] Oops: 0000 [#1] SMP
[ 372.574119] last sysfs file: /sys/devices/virtual/net/eth2.104/ifindex
[ 372.574180] CPU 3
[ 372.574221] Modules linked in: 8021q garp stp llc nfsd lockd sunrpc tg3 libphy sg [last unloaded: x_tables]
[ 372.574765]
[ 372.574817] Pid: 5656, comm: ip Tainted: G W 2.6.39-rc2-01916-g0e21eae-dirty #696 HP ProLiant BL460c G6
[ 372.574967] RIP: 0010:[<ffffffffa014ecde>] [<ffffffffa014ecde>] garp_request_leave+0x2e/0x88 [garp]
[ 372.575083] RSP: 0018:ffff8801168697c8 EFLAGS: 00010282
[ 372.577084] RAX: 0000000000000000 RBX: ffff880116869816 RCX: 0000000000000002
[ 372.577146] RDX: 0000000000000000 RSI: ffffffffa01594c0 RDI: ffff880117bc0000
[ 372.577208] RBP: ffff8801168697f8 R08: 0000000000000001 R09: ffff88007a190800
[ 372.577269] R10: ffff88007a17da00 R11: 0000000000000000 R12: ffff880117bc0000
[ 372.577331] R13: ffff8801168699d8 R14: 0000000000000001 R15: 0000000000000002
[ 372.577393] FS: 0000000000000000(0000) GS:ffff88007fc40000(0063) knlGS:00000000f779f6c0
[ 372.577494] CS: 0010 DS: 002b ES: 002b CR0: 000000008005003b
[ 372.577553] CR2: 0000000000000000 CR3: 000000007af08000 CR4: 00000000000006e0
[ 372.577615] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 372.577677] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 372.577739] Process ip (pid: 5656, threadinfo ffff880116868000, task ffff88011a388000)
[ 372.577816] Stack:
[ 372.577868] ffff8801168697e8 ffff88007a74c800 ffff880117bc0000 ffff8801168699d8
[ 372.578083] ffff880116869868 0000000000000000 ffff880116869818 ffffffffa0158226
[ 372.578297] 0000000316869818 6800880116869938 ffff880116869838 ffffffffa0157467
[ 372.578511] Call Trace:
[ 372.578579] [<ffffffffa0158226>] vlan_gvrp_request_leave+0x46/0x50 [8021q]
[ 372.578642] [<ffffffffa0157467>] vlan_dev_stop+0xb7/0xc0 [8021q]
[ 372.578703] [<ffffffff81398b87>] __dev_close_many+0x87/0xe0
[ 372.578763] [<ffffffff81398c67>] dev_close_many+0x87/0x110
[ 372.578823] [<ffffffff81398d90>] rollback_registered_many+0xa0/0x240
[ 372.578884] [<ffffffff81398f49>] unregister_netdevice_many+0x19/0x60
[ 372.578946] [<ffffffff813a7e62>] rtnl_dellink+0xc2/0xf0
[ 372.579005] [<ffffffff813a5ae7>] rtnetlink_rcv_msg+0x247/0x250
[ 372.579066] [<ffffffff813a58a0>] ? rtnetlink_net_init+0x40/0x40
[ 372.579126] [<ffffffff813cb529>] netlink_rcv_skb+0x99/0xc0
[ 372.579185] [<ffffffff813a7690>] rtnetlink_rcv+0x20/0x30
[ 372.579244] [<ffffffff813cb296>] netlink_unicast+0x296/0x2a0
[ 372.579304] [<ffffffff8139052f>] ? memcpy_fromiovec+0x5f/0x80
[ 372.579364] [<ffffffff813cc1c7>] netlink_sendmsg+0x227/0x370
unregister_vlan_dev() does :
vlan_group_set_device(grp, vlan_id, NULL);
unregister_netdevice_queue(dev, head);
/* If the group is now empty, kill off the group. */
if (grp->nr_vlans == 0) {
vlan_gvrp_uninit_applicant(real_dev);
Now 'head' is not anymore NULL, we no longer immediately release the
dev in unregister_netdevice_queue() but queue it.
So vlan_gvrp_uninit_applicant() is now freeing garp structure, _before_
vlan_gvrp_request_leave() is called from vlan_dev_stop()
So we dereference NULL pointer in garp_request_leave
I suspect we should move the 'group freeing' out from unregister_vlan_dev() to
vlan_dev_stop() ?
Patrick, David any idea before I cook a patch ?
BTW, bug must be present in net-2.6, if we unload vlan module (since in this
case we also had a non NULL head )
Thanks
^ permalink raw reply
* Re: [PATCH] net: bonding: factor out rlock(bond->lock) in xmit path
From: David Miller @ 2011-05-09 19:06 UTC (permalink / raw)
To: mirq-linux; +Cc: netdev, fubar, andy
In-Reply-To: <20110507114802.9CE7513A6A@rere.qmqm.pl>
From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Date: Sat, 7 May 2011 13:48:02 +0200 (CEST)
> Pull read_lock(&bond->lock) and BOND_IS_OK() to bond_start_xmit() from
> mode-dependent xmit functions.
>
> netif_running() is always true in hard_start_xmit.
>
> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Applied, thanks.
^ permalink raw reply
* [PATCH net-next 5/4] tulip: xircom_cb: Remove useless func_enter and func_exit
From: Joe Perches @ 2011-05-09 19:08 UTC (permalink / raw)
To: David Miller; +Cc: netdev, LKML
In-Reply-To: <20110509.114706.189685729.davem@davemloft.net>
On Mon, 2011-05-09 at 11:47 -0700, David Miller wrote:
> With the advent of the function tracer, those silly function entry/exit
> logging things are entirely superfluous.
> They make the code look ugly too.
I don't much like a lot of debugging messages
throughout drivers/net, but that's a whole 'nother
set of patches.
> Please do that and respin this patch set, thanks Joe!
How 'bout I just add another patch to delete them.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/tulip/xircom_cb.c | 119 ++---------------------------------------
1 files changed, 5 insertions(+), 114 deletions(-)
diff --git a/drivers/net/tulip/xircom_cb.c b/drivers/net/tulip/xircom_cb.c
index 71d4304..2f77daa 100644
--- a/drivers/net/tulip/xircom_cb.c
+++ b/drivers/net/tulip/xircom_cb.c
@@ -37,15 +37,6 @@
#include <asm/irq.h>
#endif
-#if defined DEBUG && DEBUG > 1
-#define func_enter(x) pr_debug("Enter: %s\n", __func__)
-#define func_exit(x) pr_debug("Exit: %s\n", __func__)
-#else
-#define func_enter(x) no_printk(KERN_DEBUG "Enter: %s\n", __func__)
-#define func_exit(x) no_printk(KERN_DEBUG "Exit: %s\n", __func__)
-#endif
-
-
MODULE_DESCRIPTION("Xircom Cardbus ethernet driver");
MODULE_AUTHOR("Arjan van de Ven <arjanv@redhat.com>");
MODULE_LICENSE("GPL");
@@ -205,7 +196,6 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_
struct xircom_private *private;
unsigned long flags;
unsigned short tmp16;
- func_enter();
/* First do the PCI initialisation */
@@ -285,7 +275,6 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_
trigger_receive(private);
- func_exit();
return 0;
reg_fail:
@@ -310,7 +299,6 @@ static void __devexit xircom_remove(struct pci_dev *pdev)
struct net_device *dev = pci_get_drvdata(pdev);
struct xircom_private *card = netdev_priv(dev);
- func_enter();
pci_free_consistent(pdev,8192,card->rx_buffer,card->rx_dma_handle);
pci_free_consistent(pdev,8192,card->tx_buffer,card->tx_dma_handle);
@@ -318,7 +306,6 @@ static void __devexit xircom_remove(struct pci_dev *pdev)
unregister_netdev(dev);
free_netdev(dev);
pci_set_drvdata(pdev, NULL);
- func_exit();
}
static irqreturn_t xircom_interrupt(int irq, void *dev_instance)
@@ -328,8 +315,6 @@ static irqreturn_t xircom_interrupt(int irq, void *dev_instance)
unsigned int status;
int i;
- func_enter();
-
spin_lock(&card->lock);
status = inl(card->io_port+CSR5);
@@ -369,9 +354,7 @@ static irqreturn_t xircom_interrupt(int irq, void *dev_instance)
for (i=0;i<NUMDESCRIPTORS;i++)
investigate_read_descriptor(dev,card,i,bufferoffsets[i]);
-
spin_unlock(&card->lock);
- func_exit();
return IRQ_HANDLED;
}
@@ -382,7 +365,6 @@ static netdev_tx_t xircom_start_xmit(struct sk_buff *skb,
unsigned long flags;
int nextdescriptor;
int desc;
- func_enter();
card = netdev_priv(dev);
spin_lock_irqsave(&card->lock,flags);
@@ -424,13 +406,10 @@ static netdev_tx_t xircom_start_xmit(struct sk_buff *skb,
netif_stop_queue(dev);
}
card->transmit_used = nextdescriptor;
- func_exit();
spin_unlock_irqrestore(&card->lock,flags);
return NETDEV_TX_OK;
}
-
-
/* Uh oh... no free descriptor... drop the packet */
netif_stop_queue(dev);
spin_unlock_irqrestore(&card->lock,flags);
@@ -446,18 +425,15 @@ static int xircom_open(struct net_device *dev)
{
struct xircom_private *xp = netdev_priv(dev);
int retval;
- func_enter();
+
netdev_info(dev, "xircom cardbus adaptor found, using irq %i\n",
dev->irq);
retval = request_irq(dev->irq, xircom_interrupt, IRQF_SHARED, dev->name, dev);
- if (retval) {
- func_exit();
+ if (retval)
return retval;
- }
xircom_up(xp);
xp->open = 1;
- func_exit();
return 0;
}
@@ -466,7 +442,6 @@ static int xircom_close(struct net_device *dev)
struct xircom_private *card;
unsigned long flags;
- func_enter();
card = netdev_priv(dev);
netif_stop_queue(dev); /* we don't want new packets */
@@ -486,8 +461,6 @@ static int xircom_close(struct net_device *dev)
card->open = 0;
free_irq(dev->irq,dev);
- func_exit();
-
return 0;
}
@@ -507,8 +480,6 @@ static void initialize_card(struct xircom_private *card)
{
unsigned int val;
unsigned long flags;
- func_enter();
-
spin_lock_irqsave(&card->lock, flags);
@@ -534,8 +505,6 @@ static void initialize_card(struct xircom_private *card)
deactivate_transmitter(card);
spin_unlock_irqrestore(&card->lock, flags);
-
- func_exit();
}
/*
@@ -547,12 +516,9 @@ ignored; I chose zero.
static void trigger_transmit(struct xircom_private *card)
{
unsigned int val;
- func_enter();
val = 0;
outl(val, card->io_port + CSR1);
-
- func_exit();
}
/*
@@ -565,12 +531,9 @@ ignored; I chose zero.
static void trigger_receive(struct xircom_private *card)
{
unsigned int val;
- func_enter();
val = 0;
outl(val, card->io_port + CSR2);
-
- func_exit();
}
/*
@@ -581,8 +544,6 @@ static void setup_descriptors(struct xircom_private *card)
{
u32 address;
int i;
- func_enter();
-
BUG_ON(card->rx_buffer == NULL);
BUG_ON(card->tx_buffer == NULL);
@@ -636,8 +597,6 @@ static void setup_descriptors(struct xircom_private *card)
/* wite the transmit descriptor ring to the card */
address = card->tx_dma_handle;
outl(address, card->io_port + CSR4); /* xmit descr list address */
-
- func_exit();
}
/*
@@ -647,13 +606,10 @@ valid by setting the address in the card to 0x00.
static void remove_descriptors(struct xircom_private *card)
{
unsigned int val;
- func_enter();
val = 0;
outl(val, card->io_port + CSR3); /* Receive descriptor address */
outl(val, card->io_port + CSR4); /* Send descriptor address */
-
- func_exit();
}
/*
@@ -665,21 +621,17 @@ This function also clears the status-bit.
static int link_status_changed(struct xircom_private *card)
{
unsigned int val;
- func_enter();
val = inl(card->io_port + CSR5); /* Status register */
- if ((val & (1 << 27)) == 0) { /* no change */
- func_exit();
+ if ((val & (1 << 27)) == 0) /* no change */
return 0;
- }
/* clear the event by writing a 1 to the bit in the
status register. */
val = (1 << 27);
outl(val, card->io_port + CSR5);
- func_exit();
return 1;
}
@@ -691,16 +643,12 @@ in a non-stopped state.
static int transmit_active(struct xircom_private *card)
{
unsigned int val;
- func_enter();
val = inl(card->io_port + CSR5); /* Status register */
- if ((val & (7 << 20)) == 0) { /* transmitter disabled */
- func_exit();
+ if ((val & (7 << 20)) == 0) /* transmitter disabled */
return 0;
- }
- func_exit();
return 1;
}
@@ -711,17 +659,12 @@ in a non-stopped state.
static int receive_active(struct xircom_private *card)
{
unsigned int val;
- func_enter();
-
val = inl(card->io_port + CSR5); /* Status register */
- if ((val & (7 << 17)) == 0) { /* receiver disabled */
- func_exit();
+ if ((val & (7 << 17)) == 0) /* receiver disabled */
return 0;
- }
- func_exit();
return 1;
}
@@ -739,8 +682,6 @@ static void activate_receiver(struct xircom_private *card)
{
unsigned int val;
int counter;
- func_enter();
-
val = inl(card->io_port + CSR6); /* Operation mode */
@@ -781,8 +722,6 @@ static void activate_receiver(struct xircom_private *card)
netdev_err(card->dev,
"Receiver failed to re-activate\n");
}
-
- func_exit();
}
/*
@@ -796,7 +735,6 @@ static void deactivate_receiver(struct xircom_private *card)
{
unsigned int val;
int counter;
- func_enter();
val = inl(card->io_port + CSR6); /* Operation mode */
val = val & ~2; /* disable the receiver */
@@ -812,9 +750,6 @@ static void deactivate_receiver(struct xircom_private *card)
if (counter <= 0)
netdev_err(card->dev, "Receiver failed to deactivate\n");
}
-
-
- func_exit();
}
@@ -832,8 +767,6 @@ static void activate_transmitter(struct xircom_private *card)
{
unsigned int val;
int counter;
- func_enter();
-
val = inl(card->io_port + CSR6); /* Operation mode */
@@ -874,8 +807,6 @@ static void activate_transmitter(struct xircom_private *card)
netdev_err(card->dev,
"Transmitter failed to re-activate\n");
}
-
- func_exit();
}
/*
@@ -889,7 +820,6 @@ static void deactivate_transmitter(struct xircom_private *card)
{
unsigned int val;
int counter;
- func_enter();
val = inl(card->io_port + CSR6); /* Operation mode */
val = val & ~2; /* disable the transmitter */
@@ -906,9 +836,6 @@ static void deactivate_transmitter(struct xircom_private *card)
netdev_err(card->dev,
"Transmitter failed to deactivate\n");
}
-
-
- func_exit();
}
@@ -920,13 +847,10 @@ must be called with the lock held and interrupts disabled.
static void enable_transmit_interrupt(struct xircom_private *card)
{
unsigned int val;
- func_enter();
val = inl(card->io_port + CSR7); /* Interrupt enable register */
val |= 1; /* enable the transmit interrupt */
outl(val, card->io_port + CSR7);
-
- func_exit();
}
@@ -938,13 +862,10 @@ must be called with the lock held and interrupts disabled.
static void enable_receive_interrupt(struct xircom_private *card)
{
unsigned int val;
- func_enter();
val = inl(card->io_port + CSR7); /* Interrupt enable register */
val = val | (1 << 6); /* enable the receive interrupt */
outl(val, card->io_port + CSR7);
-
- func_exit();
}
/*
@@ -955,13 +876,10 @@ must be called with the lock held and interrupts disabled.
static void enable_link_interrupt(struct xircom_private *card)
{
unsigned int val;
- func_enter();
val = inl(card->io_port + CSR7); /* Interrupt enable register */
val = val | (1 << 27); /* enable the link status chage interrupt */
outl(val, card->io_port + CSR7);
-
- func_exit();
}
@@ -974,12 +892,9 @@ must be called with the lock held and interrupts disabled.
static void disable_all_interrupts(struct xircom_private *card)
{
unsigned int val;
- func_enter();
val = 0; /* disable all interrupts */
outl(val, card->io_port + CSR7);
-
- func_exit();
}
/*
@@ -990,7 +905,6 @@ must be called with the lock held and interrupts disabled.
static void enable_common_interrupts(struct xircom_private *card)
{
unsigned int val;
- func_enter();
val = inl(card->io_port + CSR7); /* Interrupt enable register */
val |= (1<<16); /* Normal Interrupt Summary */
@@ -1002,8 +916,6 @@ static void enable_common_interrupts(struct xircom_private *card)
val |= (1<<2); /* Transmit Buffer Unavailable */
val |= (1<<1); /* Transmit Process Stopped */
outl(val, card->io_port + CSR7);
-
- func_exit();
}
/*
@@ -1014,13 +926,11 @@ must be called with the lock held and interrupts disabled.
static int enable_promisc(struct xircom_private *card)
{
unsigned int val;
- func_enter();
val = inl(card->io_port + CSR6);
val = val | (1 << 6);
outl(val, card->io_port + CSR6);
- func_exit();
return 1;
}
@@ -1035,7 +945,6 @@ Must be called in locked state with interrupts disabled
static int link_status(struct xircom_private *card)
{
unsigned int val;
- func_enter();
val = inb(card->io_port + CSR12);
@@ -1046,7 +955,6 @@ static int link_status(struct xircom_private *card)
/* If we get here -> no link at all */
- func_exit();
return 0;
}
@@ -1065,8 +973,6 @@ static void read_mac_address(struct xircom_private *card)
unsigned long flags;
int i;
- func_enter();
-
spin_lock_irqsave(&card->lock, flags);
outl(1 << 12, card->io_port + CSR9); /* enable boot rom access */
@@ -1094,7 +1000,6 @@ static void read_mac_address(struct xircom_private *card)
}
spin_unlock_irqrestore(&card->lock, flags);
pr_debug(" %pM\n", card->dev->dev_addr);
- func_exit();
}
@@ -1107,8 +1012,6 @@ static void transceiver_voodoo(struct xircom_private *card)
{
unsigned long flags;
- func_enter();
-
/* disable all powermanagement */
pci_write_config_dword(card->pdev, PCI_POWERMGMT, 0x0000);
@@ -1126,7 +1029,6 @@ static void transceiver_voodoo(struct xircom_private *card)
spin_unlock_irqrestore(&card->lock, flags);
netif_start_queue(card->dev);
- func_exit();
}
@@ -1135,8 +1037,6 @@ static void xircom_up(struct xircom_private *card)
unsigned long flags;
int i;
- func_enter();
-
/* disable all powermanagement */
pci_write_config_dword(card->pdev, PCI_POWERMGMT, 0x0000);
@@ -1160,7 +1060,6 @@ static void xircom_up(struct xircom_private *card)
trigger_receive(card);
trigger_transmit(card);
netif_start_queue(card->dev);
- func_exit();
}
/* Bufferoffset is in BYTES */
@@ -1170,8 +1069,6 @@ investigate_read_descriptor(struct net_device *dev, struct xircom_private *card,
{
int status;
- func_enter();
-
status = le32_to_cpu(card->rx_buffer[4*descnr]);
if (status > 0) { /* packet received */
@@ -1206,8 +1103,6 @@ out:
card->rx_buffer[4*descnr] = cpu_to_le32(0x80000000);
trigger_receive(card);
}
-
- func_exit();
}
@@ -1219,8 +1114,6 @@ investigate_write_descriptor(struct net_device *dev,
{
int status;
- func_enter();
-
status = le32_to_cpu(card->tx_buffer[4*descnr]);
#if 0
if (status & 0x8000) { /* Major error */
@@ -1242,8 +1135,6 @@ investigate_write_descriptor(struct net_device *dev,
netif_wake_queue(dev);
dev->stats.tx_packets++;
}
-
- func_exit();
}
^ permalink raw reply related
* Re: [RFC PATCH] net: fold dev_disable_lro() into netdev_fix_features()
From: David Miller @ 2011-05-09 19:08 UTC (permalink / raw)
To: mirq-linux
Cc: netdev, shemminger, kuznet, pekkas, jmorris, yoshfuji, kaber,
eric.dumazet, therbert, bhutchings, bridge
In-Reply-To: <20110507114803.0D80A13A6B@rere.qmqm.pl>
From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Date: Sat, 7 May 2011 13:48:02 +0200 (CEST)
> This moves checks that device is forwarding from bridge, IPv4 and IPv6
> code into netdev_fix_features(). As a side effect, after device is no longer
> forwarding it gets LRO back. This also means that user is not allowed to
> enable LRO after device is put to forwarding mode.
>
> This patch depends on removal of discrete offload setting ethtool ops.
>
> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
We need to keep the check in the protocols because we don't want to
be testing protocol specific device state in generic code like
net/core/dev.c
^ permalink raw reply
* [PATCH] net: group FCoE related feature flags
From: Yi Zou @ 2011-05-09 19:24 UTC (permalink / raw)
To: netdev; +Cc: mirq-linux, jeffrey.t.kirsher, devel
Michał Mirosław's patch (http://patchwork.ozlabs.org/patch/94421/) fixes the
issue (http://patchwork.ozlabs.org/patch/94188/) about not populating FCoE related
flags correctly on vlan devices. However, only NETIF_F_FCOE_CRC is part of the
NETIF_F_ALL_TX_OFFLOADS right now, where weed NETIF_F_FCOE_MTU and NETIF_F_FSO
as well.
Therefore, add NETIF_F_ALL_FCOE to indicate feature flags used by FCoE TX offloads.
These include NETIF_F_FCOE_CRC, NETIF_F_FCOE_MTU, and NETIF_F_FSO. They are not part
of the NETIF_F_ALL_TX_OFFLOADS. This would eventually make sure all FCoE needed
flags are populated properly to vlan devices.
Signed-off-by: Yi Zou <yi.zou@intel.com>
---
include/linux/netdevice.h | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index e7244ed..40b3df8 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1097,10 +1097,14 @@ struct net_device {
#define NETIF_F_ALL_TSO (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_TSO_ECN)
+#define NETIF_F_ALL_FCOE (NETIF_F_FCOE_CRC | NETIF_F_FCOE_MTU | \
+ NETIF_F_UFO)
+
#define NETIF_F_ALL_TX_OFFLOADS (NETIF_F_ALL_CSUM | NETIF_F_SG | \
NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | \
NETIF_F_HIGHDMA | \
- NETIF_F_SCTP_CSUM | NETIF_F_FCOE_CRC)
+ NETIF_F_SCTP_CSUM | \
+ NETIF_F_ALL_FCOE)
/*
* If one device supports one of these features, then enable them
^ permalink raw reply related
* Re: [PATCH net-next 5/4] tulip: xircom_cb: Remove useless func_enter and func_exit
From: David Miller @ 2011-05-09 19:10 UTC (permalink / raw)
To: joe; +Cc: netdev, linux-kernel
In-Reply-To: <1304968081.19586.66.camel@Joe-Laptop>
From: Joe Perches <joe@perches.com>
Date: Mon, 09 May 2011 12:08:01 -0700
> On Mon, 2011-05-09 at 11:47 -0700, David Miller wrote:
>> With the advent of the function tracer, those silly function entry/exit
>> logging things are entirely superfluous.
>> They make the code look ugly too.
>
> I don't much like a lot of debugging messages
> throughout drivers/net, but that's a whole 'nother
> set of patches.
>
>> Please do that and respin this patch set, thanks Joe!
>
> How 'bout I just add another patch to delete them.
>
> Signed-off-by: Joe Perches <joe@perches.com>
How about you just respin the patch set as I asked you to?
It makes no sense to "fix" something you're just going to
delete in the very next commit.
^ permalink raw reply
* Re: [PATCH] netconsole: switch to kstrto*() functions
From: David Miller @ 2011-05-09 19:10 UTC (permalink / raw)
To: adobriyan; +Cc: netdev
In-Reply-To: <20110508063313.GA6352@p183>
From: Alexey Dobriyan <adobriyan@gmail.com>
Date: Sun, 8 May 2011 09:33:13 +0300
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH v2] net: add mac_pton() for parsing MAC address
From: David Miller @ 2011-05-09 19:11 UTC (permalink / raw)
To: adobriyan; +Cc: netdev, shemminger
In-Reply-To: <20110508090007.GA5094@p183>
From: Alexey Dobriyan <adobriyan@gmail.com>
Date: Sun, 8 May 2011 12:00:07 +0300
> mac_pton() parses MAC address in form XX:XX:XX:XX:XX:XX and only in that form.
>
> mac_pton() doesn't dirty result until it's sure string representation is valid.
>
> mac_pton() doesn't care about characters _after_ last octet,
> it's up to caller to deal with it.
>
> mac_pton() diverges from 0/-E return value convention.
> Target usage:
>
> if (!mac_pton(str, whatever->mac))
> return -EINVAL;
> /* ->mac being u8 [ETH_ALEN] is filled at this point. */
> /* optionally check str[3 * ETH_ALEN - 1] for termination */
>
> Use mac_pton() in pktgen and netconsole for start.
>
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Applied.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox