* Re: [v4 net-next PATCH 0/3] Energy Efficient Ethernet (eee) support
From: David Miller @ 2012-06-07 20:19 UTC (permalink / raw)
To: yuvalmin; +Cc: netdev, eilong, peppe.cavallaro, bhutchings
In-Reply-To: <1339038788-3447-1-git-send-email-yuvalmin@broadcom.com>
From: "Yuval Mintz" <yuvalmin@broadcom.com>
Date: Thu, 7 Jun 2012 06:13:05 +0300
> This patch series adds energy efficient ethernet support for the
> bnx2x driver (for new chips with appropriate phys).
> It also extends the ethtool API to enable control of the eee feature.
>
> Another patch series has been sent to Ben to allow the ethtool application
> to use this new API.
All applied to net-next, thanks.
^ permalink raw reply
* Re: [PATCH net-next] net: Update kernel-doc for __alloc_skb()
From: David Miller @ 2012-06-07 20:19 UTC (permalink / raw)
To: bhutchings; +Cc: netdev, grant.b.edwards
In-Reply-To: <1339032217.2836.61.camel@bwh-desktop.uk.solarflarecom.com>
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Thu, 7 Jun 2012 02:23:37 +0100
> __alloc_skb() now extends tailroom to allow the use of padding added
> by the heap allocator.
>
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next 0/3] qlcnic: Bug fixes
From: David Miller @ 2012-06-07 20:19 UTC (permalink / raw)
To: anirban.chakraborty; +Cc: netdev, Dept_NX_Linux_NIC_Driver
In-Reply-To: <1339004108-7356-1-git-send-email-anirban.chakraborty@qlogic.com>
From: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Date: Wed, 6 Jun 2012 13:35:05 -0400
> Please apply.
All applied to net-next, thanks.
^ permalink raw reply
* Re: [patch] net/ethernet: ks8851_mll unregister_netdev() before freeing
From: David Miller @ 2012-06-07 20:15 UTC (permalink / raw)
To: dan.carpenter; +Cc: raffaele.recalcati, netdev, kernel-janitors
In-Reply-To: <20120606063129.GA26829@elgon.mountain>
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Wed, 6 Jun 2012 09:31:29 +0300
> We added another error condition here, but if we were to hit it then
> we need to unregister_netdev() before doing the free_netdev().
> Otherwise we would hit the BUG_ON() in free_netdev():
>
> BUG_ON(dev->reg_state != NETREG_UNREGISTERED);
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied, but please be explicit that your patch is against one
tree or another. This one was for net-next only, but I tried
initially to apply it to net which failed.
^ permalink raw reply
* Re: [PATCH] net: stmmac: Fix clock en-/disable calls
From: David Miller @ 2012-06-07 20:13 UTC (permalink / raw)
To: sr; +Cc: netdev, viresh.linux, peppe.cavallaro
In-Reply-To: <1338965351-6286-1-git-send-email-sr@denx.de>
From: Stefan Roese <sr@denx.de>
Date: Wed, 6 Jun 2012 08:49:11 +0200
> Signed-off-by: Stefan Roese <sr@denx.de>
This means nothing to me.
What is fixed by using the prepare/unprepare variants vs. the
plain ones?
It is absolutely inappropriate to not describe your change
completely in your commit message.
This patch is being rejected.
^ permalink raw reply
* Re: Remove out of date message in appletalk printk
From: David Miller @ 2012-06-07 20:12 UTC (permalink / raw)
To: davej; +Cc: netdev, acme
In-Reply-To: <20120606184559.GA27763@redhat.com>
From: Dave Jones <davej@redhat.com>
Date: Wed, 6 Jun 2012 14:45:59 -0400
> I accidentally triggered this printk, which amused me for a few moments.
> Given we're post 2.2, we could just -EACCES, but does anyone even care about Appletalk now ?
> I figure it's better to leave sleeping dogs lie, and just update the message.
>
> Signed-off-by: Dave Jones <davej@redhat.com>
Applied, but I made a few refinements. I made it use pr_warn() and
also prefixed the message with "atalk_connect: " so if someone sees
this it's easier to figure out where it's coming from.
Thanks.
^ permalink raw reply
* Re: [PATCH] ieee802154: verify packet size before trying to allocate it
From: David Miller @ 2012-06-07 20:10 UTC (permalink / raw)
To: levinsasha928
Cc: dbaryshkov, slapin, linux-zigbee-devel, netdev, linux-kernel
In-Reply-To: <1339018322-19360-1-git-send-email-levinsasha928@gmail.com>
From: Sasha Levin <levinsasha928@gmail.com>
Date: Wed, 6 Jun 2012 23:32:02 +0200
> Currently when sending data over datagram, the send function will attempt to
> allocate any size passed on from the userspace.
>
> We should make sure that this size is checked and limited. The maximum size
> of an IP packet seemed like the safest limit here.
>
> Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
This limit is arbitrary, I'm not applying a patch like this.
Use the actual limit, which is either the protocol limit or something
like the device mtu.
^ permalink raw reply
* Re: [PATCH] sky2: fix checksum bit management on some chips
From: David Miller @ 2012-06-07 20:07 UTC (permalink / raw)
To: shemminger; +Cc: kirr, mlindner, netdev
In-Reply-To: <20120606130130.5a86f94a@nehalam.linuxnetplumber.net>
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Wed, 6 Jun 2012 13:01:30 -0700
> The newer flavors of Yukon II use a different method for receive
> checksum offload. This is indicated in the driver by the SKY2_HW_NEW_LE
> flag. On these newer chips, the BMU_ENA_RX_CHKSUM should not be set.
>
> The driver would get incorrectly toggle the bit, enabling the old
> checksum logic on these chips and cause a BUG_ON() assertion. If
> receive checksum was toggled via ethtool.
>
> Reported-by: Kirill Smelkov <kirr@mns.spb.ru>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Applied and queued up for -stable.
> Patch against net-next, please apply to net and stable kernels.
Stephen, please don't do this, generate your patches always
against the correct tree even if they are likely to still
apply when generated against the wrong tree.
^ permalink raw reply
* Re: [V2 RFC net-next PATCH 2/2] virtio_net: export more statistics through ethtool
From: David Miller @ 2012-06-07 20:05 UTC (permalink / raw)
To: bhutchings; +Cc: mst, netdev, linux-kernel, virtualization
In-Reply-To: <1339089306.2770.10.camel@bwh-desktop.uk.solarflarecom.com>
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Thu, 7 Jun 2012 18:15:06 +0100
> I would really like to see some sort of convention for presenting
> per-queue statistics through ethtool. At the moment we have a complete
> mess of different formats:
Indeed. Probably ${QUEUE_TYPE}-${INDEX}-${STATISTIC} is best.
With an agreed upon list of queue types such as "rx", "tx", "rxtx"
etc.
^ permalink raw reply
* Re: [PATCH] ipv6: fib: Restore NTF_ROUTER exception in fib6_age()
From: David Miller @ 2012-06-07 20:03 UTC (permalink / raw)
To: tgraf; +Cc: netdev
In-Reply-To: <6e43964ac82665f0257ac4f53c17b3b3403edcc3.1339087863.git.tgraf@suug.ch>
From: Thomas Graf <tgraf@suug.ch>
Date: Thu, 7 Jun 2012 18:51:04 +0200
> Commit 5339ab8b1dd82 (ipv6: fib: Convert fib6_age() to
> dst_neigh_lookup().) seems to have mistakenly inverted the
> exception for cached NTF_ROUTER routes.
>
> Signed-off-by: Thomas Graf <tgraf@suug.ch>
Thanks for fixing this, applied.
^ permalink raw reply
* Re: [PATCH] net: neighbour: fix neigh_dump_info()
From: David Miller @ 2012-06-07 20:03 UTC (permalink / raw)
To: eric.dumazet; +Cc: denys, netdev, shemminger
In-Reply-To: <1339081115.5083.21.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 07 Jun 2012 16:58:35 +0200
> From: Eric Dumazet <edumazet@google.com>
>
> Denys found out "ip neigh" output was truncated to
> about 54 neighbours.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
Applied.
^ permalink raw reply
* Re: [PATCH] net: l2tp_eth: fix kernel panic on rmmod l2tp_eth
From: David Miller @ 2012-06-07 20:02 UTC (permalink / raw)
To: eric.dumazet; +Cc: denys, netdev, jchapman
In-Reply-To: <1339063640.26966.113.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 07 Jun 2012 12:07:20 +0200
> From: Eric Dumazet <edumazet@google.com>
>
> We must prevent module unloading if some devices are still attached to
> l2tp_eth driver.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
> Tested-by: Denys Fedoryshchenko <denys@visp.net.lb>
Applied.
^ permalink raw reply
* Re: [PATCH] fix kernel crash in the macvlan driver
From: Eric W. Biederman @ 2012-06-07 19:49 UTC (permalink / raw)
To: Ani Sinha; +Cc: netdev, Francesco Ruggeri
In-Reply-To: <alpine.OSX.2.00.1206071137360.86561@animac.local>
Ani Sinha <ani@aristanetworks.com> writes:
> Hello folks :
>
> We noticed a consistently reproducable kernel crash in the macvlan driver
> when we were running our test script. I believe I have found the reason
> for the crash and a patch that fixes it. I am attaching the patch for your
> comments and opinions.
I don't completely follow the logic of your change. Crashing in
macvlan_addr_busy does seem to indicate you are using a corrupted data
structure.
My compiled version of macvlan_addr_busy is much smaller than yours so I
can't guess based on your disassembly what is wrong. But by reading the
code it must either be port->dev->dev_addr or the rcu
macvlan_hash_lookup.
Regardless all I see your patch doing is moving the decrement of
port->count earlier and possibly allowing newlink in
MACVLAN_MODE_PASSTHRU to succeed a smidge earlier.
I might just be dense today but I can't possibly see how moving that
decrement would solve the crash you have reported below.
Eric
> commit cd28ce3cb624ddaaf97935c1f34d44bb13ffb786
> Author: Anirban Sinha <ani@aristanetworks.com>
> Date: Thu Jun 7 11:21:02 2012 -0700
>
> macvlan : The patch d5cd92448fded12c91f7574e49747c5f7d975a8d introduced reference
> counting for macvlan_port. This patch fixes an issue where the reference
> counts were being decremented incorrectly from macvlan_uninit() and not from
> macvlan_dellink(). This was causing the kernel crash shown below :
>
> BUG: unable to handle kernel paging request at 0000000100000000
> IP: [<ffffffffa031f8e5>] macvlan_addr_busy+0x58/0x8d [macvlan]
> PGD 3a2aa067 PUD 0
> Oops: 0000 [#1] SMP
> last sysfs file: /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT1/energy_full
> CPU 0
> Modules linked in: macvlan rfcomm sco bnep l2cap sunrpc ipt_REJECT iptable_filter ip6t_REJECT xt_tcpudp
>
> Pid: 2490, comm: ip Not tainted 2.6.38.8-705892.2012aniArora.7.fc14.x86_64 #1
> RIP: 0010:[<ffffffffa031f8e5>] [<ffffffffa031f8e5>] macvlan_addr_busy+0x58/0x8d [macvlan]
> RSP: 0018:ffff880037d2b698 EFLAGS: 00010296
> RAX: 0000000100000000 RBX: ffff88003bf54000 RCX: 0000000000000000
> RDX: 0000111111111102 RSI: 0000000000000092 RDI: 0000000000000246
> RBP: ffff880037d2b6a8 R08: 0000000000000040 R09: ffffffff81a73f18
> R10: ffffffff81e03a20 R11: 0000000000000020 R12: ffff88003c8e33d0
> R13: ffff880037ecd000 R14: 00000000fffffff0 R15: 0000000000000001
> FS: 0000000000000000(0000) GS:ffff88003e200000(0063) knlGS:00000000f75d26c0
> CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033
> CR2: 0000000100000000 CR3: 00000000377e7000 CR4: 00000000000006f0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> Process ip (pid: 2490, threadinfo ffff880037d2a000, task ffff88003d1206c0)
> Stack:
> ffff88003d031000 ffff88003d031680 ffff880037d2b6d8 ffffffffa031fbcc
> ffff88003d031000 ffffffffa03211c0 ffff88003d031078 0000000000000000
> ffff880037d2b708 ffffffff81345cf7 ffff88003d031000 0000000000001003
> Call Trace:
> [<ffffffffa031fbcc>] macvlan_open+0x7e/0x116 [macvlan]
> [<ffffffff81345cf7>] __dev_open+0x90/0xc7
> [<ffffffff81345f26>] __dev_change_flags+0xa8/0x12c
> [<ffffffff81346021>] dev_change_flags+0x1c/0x52
> [<ffffffff8134fce1>] do_setlink+0x2b4/0x67d
> [<ffffffff813bc85f>] ? inet6_fill_link_af+0x1a/0x22
> [<ffffffff8134f6bf>] ? rtnl_fill_ifinfo+0x99f/0xa7d
> [<ffffffff81350d02>] rtnl_newlink+0x247/0x40d
> [<ffffffff81350b7a>] ? rtnl_newlink+0xbf/0x40d
> [<ffffffff81337ced>] ? sock_rmalloc+0x2e/0x90
> [<ffffffff810dc46c>] ? arch_local_irq_save+0x16/0x1c
> [<ffffffff810685fe>] ? arch_local_irq_save+0x18/0x1e
> [<ffffffff813508dc>] rtnetlink_rcv_msg+0x1e6/0x1fc
> [<ffffffff810af70a>] ? get_page_from_freelist+0x4dd/0x68d
> [<ffffffff813506f6>] ? rtnetlink_rcv_msg+0x0/0x1fc
> [<ffffffff81364239>] netlink_rcv_skb+0x40/0x8b
> [<ffffffff813502c7>] rtnetlink_rcv+0x21/0x28
> [<ffffffff81363d27>] netlink_unicast+0xec/0x155
> [<ffffffff81364041>] netlink_sendmsg+0x2b1/0x2cf
> [<ffffffff81332ec2>] ? __sock_recvmsg+0x75/0x84
> [<ffffffff81332d70>] __sock_sendmsg+0x66/0x72
> [<ffffffff81333521>] sock_sendmsg+0xa3/0xbc
> [<ffffffff810b25da>] ? lru_cache_add_lru+0x3c/0x3e
> [<ffffffff810cc1e3>] ? page_add_new_anon_rmap+0x5b/0x6d
> [<ffffffff810c17cb>] ? set_pte_at+0x9/0xd
> [<ffffffff810c2f31>] ? do_wp_page+0x496/0x541
> [<ffffffff81333ec0>] ? move_addr_to_kernel+0x44/0x49
> [<ffffffff813585a4>] ? verify_compat_iovec+0x6d/0xb9
> [<ffffffff81334cac>] sys_sendmsg+0x230/0x2ae
> [<ffffffff810c1965>] ? pmd_offset+0x14/0x3b
> [<ffffffff810c4c0a>] ? handle_mm_fault+0x13a/0x14f
> [<ffffffff81334756>] ? sys_sendto+0x13f/0x16c
> [<ffffffff81334d76>] ? sys_recvmsg+0x4c/0x5b
> [<ffffffff81358deb>] compat_sys_sendmsg+0xf/0x11
> [<ffffffff81359005>] compat_sys_socketcall+0x14f/0x186
> [<ffffffff8102c2b0>] sysenter_dispatch+0x7/0x2e
> Code: 0e e1 48 8b 03 4c 89 e2 48 c7 c7 6c 10 32 a0 48 8b b0 80 02 00 00 31 c0 e8 f1 17 0e e1 48 8b 03 49 8b 14 24 48 8b 80 80 02 00 00 <48> 33 10 b8 01 00 00 00 48 c1 e2 10 74 22 48 c7 c7 93 10 32 a0
>
> Signed-off-by: Anirban Sinha <ani@aristanetworks.com>
>
> diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
> index 66a9bfe..d880bc8 100644
> --- a/drivers/net/macvlan.c
> +++ b/drivers/net/macvlan.c
> @@ -481,7 +481,6 @@ static void macvlan_uninit(struct net_device *dev)
>
> free_percpu(vlan->pcpu_stats);
>
> - port->count -= 1;
> if (!port->count)
> macvlan_port_destroy(port->dev);
> }
> @@ -795,7 +794,9 @@ static int macvlan_newlink(struct net *src_net, struct net_device *dev,
> void macvlan_dellink(struct net_device *dev, struct list_head *head)
> {
> struct macvlan_dev *vlan = netdev_priv(dev);
> + struct macvlan_port *port = vlan->port;
>
> + port->count -= 1;
> list_del(&vlan->list);
> unregister_netdevice_queue(dev, head);
> }
^ permalink raw reply
* Re: pull request: can-next 2012-06-07
From: David Miller @ 2012-06-07 19:02 UTC (permalink / raw)
To: mkl; +Cc: netdev, linux-can
In-Reply-To: <4FD062D3.5010107@pengutronix.de>
From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Thu, 07 Jun 2012 10:14:11 +0200
> here two patches for net-next, by AnilKumar Ch, they add support for
> Bosch's d_can hardware to the existing c_can driver.
Pulled, thanks.
^ permalink raw reply
* [PATCH] fix kernel crash in the macvlan driver
From: Ani Sinha @ 2012-06-07 18:45 UTC (permalink / raw)
To: netdev; +Cc: Eric Biederman, Francesco Ruggeri
Hello folks :
We noticed a consistently reproducable kernel crash in the macvlan driver
when we were running our test script. I believe I have found the reason
for the crash and a patch that fixes it. I am attaching the patch for your
comments and opinions.
Cheers,
Ani
commit cd28ce3cb624ddaaf97935c1f34d44bb13ffb786
Author: Anirban Sinha <ani@aristanetworks.com>
Date: Thu Jun 7 11:21:02 2012 -0700
macvlan : The patch d5cd92448fded12c91f7574e49747c5f7d975a8d introduced reference
counting for macvlan_port. This patch fixes an issue where the reference
counts were being decremented incorrectly from macvlan_uninit() and not from
macvlan_dellink(). This was causing the kernel crash shown below :
BUG: unable to handle kernel paging request at 0000000100000000
IP: [<ffffffffa031f8e5>] macvlan_addr_busy+0x58/0x8d [macvlan]
PGD 3a2aa067 PUD 0
Oops: 0000 [#1] SMP
last sysfs file: /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT1/energy_full
CPU 0
Modules linked in: macvlan rfcomm sco bnep l2cap sunrpc ipt_REJECT iptable_filter ip6t_REJECT xt_tcpudp
Pid: 2490, comm: ip Not tainted 2.6.38.8-705892.2012aniArora.7.fc14.x86_64 #1
RIP: 0010:[<ffffffffa031f8e5>] [<ffffffffa031f8e5>] macvlan_addr_busy+0x58/0x8d [macvlan]
RSP: 0018:ffff880037d2b698 EFLAGS: 00010296
RAX: 0000000100000000 RBX: ffff88003bf54000 RCX: 0000000000000000
RDX: 0000111111111102 RSI: 0000000000000092 RDI: 0000000000000246
RBP: ffff880037d2b6a8 R08: 0000000000000040 R09: ffffffff81a73f18
R10: ffffffff81e03a20 R11: 0000000000000020 R12: ffff88003c8e33d0
R13: ffff880037ecd000 R14: 00000000fffffff0 R15: 0000000000000001
FS: 0000000000000000(0000) GS:ffff88003e200000(0063) knlGS:00000000f75d26c0
CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033
CR2: 0000000100000000 CR3: 00000000377e7000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process ip (pid: 2490, threadinfo ffff880037d2a000, task ffff88003d1206c0)
Stack:
ffff88003d031000 ffff88003d031680 ffff880037d2b6d8 ffffffffa031fbcc
ffff88003d031000 ffffffffa03211c0 ffff88003d031078 0000000000000000
ffff880037d2b708 ffffffff81345cf7 ffff88003d031000 0000000000001003
Call Trace:
[<ffffffffa031fbcc>] macvlan_open+0x7e/0x116 [macvlan]
[<ffffffff81345cf7>] __dev_open+0x90/0xc7
[<ffffffff81345f26>] __dev_change_flags+0xa8/0x12c
[<ffffffff81346021>] dev_change_flags+0x1c/0x52
[<ffffffff8134fce1>] do_setlink+0x2b4/0x67d
[<ffffffff813bc85f>] ? inet6_fill_link_af+0x1a/0x22
[<ffffffff8134f6bf>] ? rtnl_fill_ifinfo+0x99f/0xa7d
[<ffffffff81350d02>] rtnl_newlink+0x247/0x40d
[<ffffffff81350b7a>] ? rtnl_newlink+0xbf/0x40d
[<ffffffff81337ced>] ? sock_rmalloc+0x2e/0x90
[<ffffffff810dc46c>] ? arch_local_irq_save+0x16/0x1c
[<ffffffff810685fe>] ? arch_local_irq_save+0x18/0x1e
[<ffffffff813508dc>] rtnetlink_rcv_msg+0x1e6/0x1fc
[<ffffffff810af70a>] ? get_page_from_freelist+0x4dd/0x68d
[<ffffffff813506f6>] ? rtnetlink_rcv_msg+0x0/0x1fc
[<ffffffff81364239>] netlink_rcv_skb+0x40/0x8b
[<ffffffff813502c7>] rtnetlink_rcv+0x21/0x28
[<ffffffff81363d27>] netlink_unicast+0xec/0x155
[<ffffffff81364041>] netlink_sendmsg+0x2b1/0x2cf
[<ffffffff81332ec2>] ? __sock_recvmsg+0x75/0x84
[<ffffffff81332d70>] __sock_sendmsg+0x66/0x72
[<ffffffff81333521>] sock_sendmsg+0xa3/0xbc
[<ffffffff810b25da>] ? lru_cache_add_lru+0x3c/0x3e
[<ffffffff810cc1e3>] ? page_add_new_anon_rmap+0x5b/0x6d
[<ffffffff810c17cb>] ? set_pte_at+0x9/0xd
[<ffffffff810c2f31>] ? do_wp_page+0x496/0x541
[<ffffffff81333ec0>] ? move_addr_to_kernel+0x44/0x49
[<ffffffff813585a4>] ? verify_compat_iovec+0x6d/0xb9
[<ffffffff81334cac>] sys_sendmsg+0x230/0x2ae
[<ffffffff810c1965>] ? pmd_offset+0x14/0x3b
[<ffffffff810c4c0a>] ? handle_mm_fault+0x13a/0x14f
[<ffffffff81334756>] ? sys_sendto+0x13f/0x16c
[<ffffffff81334d76>] ? sys_recvmsg+0x4c/0x5b
[<ffffffff81358deb>] compat_sys_sendmsg+0xf/0x11
[<ffffffff81359005>] compat_sys_socketcall+0x14f/0x186
[<ffffffff8102c2b0>] sysenter_dispatch+0x7/0x2e
Code: 0e e1 48 8b 03 4c 89 e2 48 c7 c7 6c 10 32 a0 48 8b b0 80 02 00 00 31 c0 e8 f1 17 0e e1 48 8b 03 49 8b 14 24 48 8b 80 80 02 00 00 <48> 33 10 b8 01 00 00 00 48 c1 e2 10 74 22 48 c7 c7 93 10 32 a0
Signed-off-by: Anirban Sinha <ani@aristanetworks.com>
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 66a9bfe..d880bc8 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -481,7 +481,6 @@ static void macvlan_uninit(struct net_device *dev)
free_percpu(vlan->pcpu_stats);
- port->count -= 1;
if (!port->count)
macvlan_port_destroy(port->dev);
}
@@ -795,7 +794,9 @@ static int macvlan_newlink(struct net *src_net, struct net_device *dev,
void macvlan_dellink(struct net_device *dev, struct list_head *head)
{
struct macvlan_dev *vlan = netdev_priv(dev);
+ struct macvlan_port *port = vlan->port;
+ port->count -= 1;
list_del(&vlan->list);
unregister_netdevice_queue(dev, head);
}
^ permalink raw reply related
* Re: tcp wifi upload performance and lots of ACKs
From: David Miller @ 2012-06-07 18:10 UTC (permalink / raw)
To: rick.jones2; +Cc: David.Laight, greearb, dbaluta, netdev
In-Reply-To: <4FD0EA18.3090606@hp.com>
From: Rick Jones <rick.jones2@hp.com>
Date: Thu, 07 Jun 2012 10:51:20 -0700
> This may not work well when the sender has a congestion window growth
> heuristic different from what the ACK avoidance heuristic assumes. If
> I recall correctly, the heuristic in HP-UX assumes the sender grows
> cwnd by the number of bytes/segments ACKnowledged.
Linux violates this assumption.
^ permalink raw reply
* Re: [PATCH (net.git) V2] stmmac: fix driver built w/ w/o both pci and platf modules
From: David Miller @ 2012-06-07 18:01 UTC (permalink / raw)
To: peppe.cavallaro; +Cc: netdev, wfg
In-Reply-To: <1339073322-23093-1-git-send-email-peppe.cavallaro@st.com>
From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Date: Thu, 7 Jun 2012 14:48:42 +0200
> + pr_err("stmmac: do not register the PCI driver\n");
This is inappropriate, since this is called unconditionally.
^ permalink raw reply
* Socket send-buffer auto-sizing
From: Ben Greear @ 2012-06-07 17:59 UTC (permalink / raw)
To: netdev
I'm continuing to test one-way tcp streams in 3.5.0-rc1 on
a wifi network.
When I do not specify a send buffer size, and thus use the kernel
defaults, max speed is about 77Mbps.
When I specify 512KB send-buffer, I get speeds up to 185Mbps.
When set to 1MB, I get about 198Mbps (and setting higher does not
increase the throughput after this).
This is without any 'delack' patches applied.
My question is: Should the kernel auto-tuner work better?
I seem to recall a comments from some years ago that applications
should no longer attempt to tune send/recv buffers because the kernel
was smart enough to get it at least mostly right.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: tcp wifi upload performance and lots of ACKs
From: Rick Jones @ 2012-06-07 17:51 UTC (permalink / raw)
To: David Laight; +Cc: Ben Greear, Daniel Baluta, netdev
In-Reply-To: <AE90C24D6B3A694183C094C60CF0A2F6026B6F3C@saturn3.aculab.com>
> Does this delaying of acks have a detrimental effect on the
> sending end?
> I've seen very bad interactions between delayed acks and
> (I believe) the 'slow start' code on connections with
> one-directional data, Nagle disabled and very low RTT.
>
> What I saw was the sender sending 4 data packets, then
> sitting waiting for an ack - in spite of accumulating
> several kB of data to send.
>
> Delaying acks further will only make this worse.
At least two stacks have a reasonable ACK avoidance heuristic. Those
would be HP-UX and Solaris (Mac OS 9 had one as well, IIRC). The
heuristics are rather similar because the two TCP stacks share a common
ancestor. I used to interact with HP-UX's regularly, my statements will
be based on that, and an assumption Solaris is similar.
Both attempt to divine what the senders' congestion window happens to be
and be certain to send an ACK before that is exhausted. So, at the
start of a connection, there will be the usual, more rapid
ACKnowledgement. As things happen "normally" then the number of
segments per ACK increases until it hits a configurable limit. There
are conditions which will cut the limit in half on a given connection -
one is the sending of an ACK via the standalone ACK timer (this is from
memory, so may be a bit off). There are probably a few other conditions
that drop the limit by half. The heuristic attempts to learn in each
connection what the reasonable limit on ACK avoidance might be so there
isn't a per-connection control, just the global controls via ndd. As
conditions causing the limit to be cut in half arise, the connection
naturally and irrevocably falls back to the usual "ack-every-other"
behaviour.
When there is little to no packet loss, and a rather regular stream of
data, this works rather well indeed. For example in a LAN or Data
Center. You can run netperf TCP_STREAM with the limit at the default,
and with the limit set to two and see the considerable difference in
service demand on either side.
This may not work well when the sender has a congestion window growth
heuristic different from what the ACK avoidance heuristic assumes. If I
recall correctly, the heuristic in HP-UX assumes the sender grows cwnd
by the number of bytes/segments ACKnowledged. If the sender grows the
cwnd by only one segment per ACK rather than by the bytes ACKnowldeged
by the ACK the growth of the cwnd will be slowed. In a LAN that may be
papered-over a bit, but it will become quite noticable in a higher RTT
environment. Probably not as noticable for a sufficiently short
connection, or a long one, but will be for ones in the middle. The
short connection doesn't need much cwnd in the first place, and the
heuristic works its way up to avoiding ACKs, and the long one will be
long enough to have the ACK avoidance heuristic gravitate down to
ack-every-other.
rick jones
^ permalink raw reply
* Re: [V2 RFC net-next PATCH 2/2] virtio_net: export more statistics through ethtool
From: Ben Hutchings @ 2012-06-07 17:15 UTC (permalink / raw)
To: Jason Wang; +Cc: netdev, mst, linux-kernel, virtualization
In-Reply-To: <20120606075217.29081.30713.stgit@amd-6168-8-1.englab.nay.redhat.com>
On Wed, 2012-06-06 at 15:52 +0800, Jason Wang wrote:
> Satistics counters is useful for debugging and performance optimization, so this
> patch lets virtio_net driver collect following and export them to userspace
> through "ethtool -S":
>
> - number of packets sent/received
> - number of bytes sent/received
> - number of callbacks for tx/rx
> - number of kick for tx/rx
> - number of bytes/packets queued for tx
>
> As virtnet_stats were per-cpu, so both per-cpu and gloabl satistics were
> collected like:
[...]
I would really like to see some sort of convention for presenting
per-queue statistics through ethtool. At the moment we have a complete
mess of different formats:
bnx2x: "[${index}]: ${name}"
be2net: "${qtype}q${index}: ${name}"
ehea: "PR${index} ${name}"
mlx4_en: "${qtype}${index}_${name}"
myri10ge: dummy stat names as headings
niu: dummy stat names as headings
s2io: "ring_${index}_${name}"
vmxnet3: dummy stat names as headings
vxge: "${name}_${index}"; also dummy stat names as headings
And you're introducing yet another format!
(Additionally some of the drivers are playing games with spaces and tabs
to make ethtool indent the stats the way they like. Ethtool statistics
are inconsistent enough already without drivers pulling that sort of
crap.
I'm inclined to make ethtool start stripping whitespace from stat names,
and *if* people can agree on a common format for per-queue statistic
names then I'll indent them *consistently*. Also, I would make such
stats optional, so you don't get hundreds of lines of crap by default.)
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* [PATCH] ipv6: fib: Restore NTF_ROUTER exception in fib6_age()
From: Thomas Graf @ 2012-06-07 16:51 UTC (permalink / raw)
To: davem; +Cc: netdev
Commit 5339ab8b1dd82 (ipv6: fib: Convert fib6_age() to
dst_neigh_lookup().) seems to have mistakenly inverted the
exception for cached NTF_ROUTER routes.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
---
net/ipv6/ip6_fib.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 0c220a4..74c21b9 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -1561,7 +1561,7 @@ static int fib6_age(struct rt6_info *rt, void *arg)
neigh_flags = neigh->flags;
neigh_release(neigh);
}
- if (neigh_flags & NTF_ROUTER) {
+ if (!(neigh_flags & NTF_ROUTER)) {
RT6_TRACE("purging route %p via non-router but gateway\n",
rt);
return -1;
--
1.7.7.6
^ permalink raw reply related
* Re: [v4 net-next PATCH 1/3] Added kernel support in EEE Ethtool commands
From: Ben Hutchings @ 2012-06-07 16:28 UTC (permalink / raw)
To: Yuval Mintz; +Cc: davem, netdev, eilong, peppe.cavallaro
In-Reply-To: <1339038788-3447-2-git-send-email-yuvalmin@broadcom.com>
On Thu, 2012-06-07 at 06:13 +0300, Yuval Mintz wrote:
> This patch extends the kernel's ethtool interface by adding support
> for 2 new EEE commands - get_eee and set_eee.
>
> Thanks goes to Giuseppe Cavallaro for his original patch adding this support.
>
> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
> ---
> include/linux/ethtool.h | 35 +++++++++++++++++++++++++++++++++++
> net/core/ethtool.c | 40 ++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 75 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
> index e17fa71..a518361 100644
> --- a/include/linux/ethtool.h
> +++ b/include/linux/ethtool.h
> @@ -137,6 +137,35 @@ struct ethtool_eeprom {
> };
>
> /**
> + * struct ethtool_eee - Energy Efficient Ethernet information
> + * @cmd: ETHTOOL_{G,S}EEE
> + * @supported: Mask of %SUPPORTED_* flags for the speed/duplex combinations
> + * for which there is EEE support.
> + * @advertised: Mask of %ADVERTISED_* flags for the speed/duplex combinations
> + * advertised as eee capable.
> + * @lp_advertised: Mask of %ADVERTISED_* flags for the speed/duplex
> + * combinations advertised by the link partner as eee capable.
> + * @eee_active: Result of the eee auto negotiation.
> + * @eee_enabled: EEE configured mode (enabled/disabled).
> + * @tx_lpi_enabled: Whether the interface should assert its tx lpi, given
> + * that eee was negotiated.
> + * @tx_lpi_timer: Time in microseconds the interface delays prior to asserting
> + * its tx lpi (after reaching 'idle' state). Effective only when eee
> + * was negotiated and tx_lpi_enabled was set.
> + */
> +struct ethtool_eee {
> + __u32 cmd;
> + __u32 supported;
> + __u32 advertised;
> + __u32 lp_advertised;
> + __u32 eee_active;
> + __u32 eee_enabled;
> + __u32 tx_lpi_enabled;
> + __u32 tx_lpi_timer;
> + __u32 reserved[2];
> +};
> +
> +/**
> * struct ethtool_modinfo - plugin module eeprom information
> * @cmd: %ETHTOOL_GMODULEINFO
> * @type: Standard the module information conforms to %ETH_MODULE_SFF_xxxx
> @@ -945,6 +974,8 @@ static inline u32 ethtool_rxfh_indir_default(u32 index, u32 n_rx_rings)
> * @get_module_info: Get the size and type of the eeprom contained within
> * a plug-in module.
> * @get_module_eeprom: Get the eeprom information from the plug-in module
> + * @get_eee: Get Energy-Efficient (EEE) supported and status.
> + * @set_eee: Set EEE status (enable/disable) as well as LPI timers.
> *
> * All operations are optional (i.e. the function pointer may be set
> * to %NULL) and callers must take this into account. Callers must
> @@ -1011,6 +1042,8 @@ struct ethtool_ops {
> struct ethtool_modinfo *);
> int (*get_module_eeprom)(struct net_device *,
> struct ethtool_eeprom *, u8 *);
> + int (*get_eee)(struct net_device *, struct ethtool_eee *);
> + int (*set_eee)(struct net_device *, struct ethtool_eee *);
>
>
> };
> @@ -1089,6 +1122,8 @@ struct ethtool_ops {
> #define ETHTOOL_GET_TS_INFO 0x00000041 /* Get time stamping and PHC info */
> #define ETHTOOL_GMODULEINFO 0x00000042 /* Get plug-in module information */
> #define ETHTOOL_GMODULEEEPROM 0x00000043 /* Get plug-in module eeprom */
> +#define ETHTOOL_GEEE 0x00000044 /* Get EEE settings */
> +#define ETHTOOL_SEEE 0x00000045 /* Set EEE settings */
>
> /* compatibility with older code */
> #define SPARC_ETH_GSET ETHTOOL_GSET
> diff --git a/net/core/ethtool.c b/net/core/ethtool.c
> index 9c2afb4..5a582da 100644
> --- a/net/core/ethtool.c
> +++ b/net/core/ethtool.c
> @@ -729,6 +729,40 @@ static int ethtool_set_wol(struct net_device *dev, char __user *useraddr)
> return dev->ethtool_ops->set_wol(dev, &wol);
> }
>
> +static int ethtool_get_eee(struct net_device *dev, char __user *useraddr)
> +{
> + struct ethtool_eee edata;
> + int rc;
> +
> + if (!dev->ethtool_ops->get_eee)
> + return -EOPNOTSUPP;
> +
> + memset(&edata, 0, sizeof(struct ethtool_eee));
> + edata.cmd = ETHTOOL_GEEE;
> + rc = dev->ethtool_ops->get_eee(dev, &edata);
> +
> + if (rc)
> + return rc;
> +
> + if (copy_to_user(useraddr, &edata, sizeof(edata)))
> + return -EFAULT;
> +
> + return 0;
> +}
> +
> +static int ethtool_set_eee(struct net_device *dev, char __user *useraddr)
> +{
> + struct ethtool_eee edata;
> +
> + if (!dev->ethtool_ops->set_eee)
> + return -EOPNOTSUPP;
> +
> + if (copy_from_user(&edata, useraddr, sizeof(edata)))
> + return -EFAULT;
> +
> + return dev->ethtool_ops->set_eee(dev, &edata);
> +}
> +
> static int ethtool_nway_reset(struct net_device *dev)
> {
> if (!dev->ethtool_ops->nway_reset)
> @@ -1471,6 +1505,12 @@ int dev_ethtool(struct net *net, struct ifreq *ifr)
> rc = ethtool_set_value_void(dev, useraddr,
> dev->ethtool_ops->set_msglevel);
> break;
> + case ETHTOOL_GEEE:
> + rc = ethtool_get_eee(dev, useraddr);
> + break;
> + case ETHTOOL_SEEE:
> + rc = ethtool_set_eee(dev, useraddr);
> + break;
> case ETHTOOL_NWAY_RST:
> rc = ethtool_nway_reset(dev);
> break;
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* [PATCH] ARM: bpf_jit: BPF_S_ANC_ALU_XOR_X support
From: Mircea Gherzan @ 2012-06-07 15:40 UTC (permalink / raw)
To: linux; +Cc: mgherzan, netdev, linux-arm-kernel, davem
JIT support for the XOR operation introduced by the commit
ffe06c17afbb.
Signed-off-by: Mircea Gherzan <mgherzan@gmail.com>
---
arch/arm/net/bpf_jit_32.c | 5 +++++
arch/arm/net/bpf_jit_32.h | 4 ++++
2 files changed, 9 insertions(+)
diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c
index 62135849..c641fb6 100644
--- a/arch/arm/net/bpf_jit_32.c
+++ b/arch/arm/net/bpf_jit_32.c
@@ -762,6 +762,11 @@ b_epilogue:
update_on_xread(ctx);
emit(ARM_MOV_R(r_A, r_X), ctx);
break;
+ case BPF_S_ANC_ALU_XOR_X:
+ /* A ^= X */
+ update_on_xread(ctx);
+ emit(ARM_EOR_R(r_A, r_A, r_X), ctx);
+ break;
case BPF_S_ANC_PROTOCOL:
/* A = ntohs(skb->protocol) */
ctx->seen |= SEEN_SKB;
diff --git a/arch/arm/net/bpf_jit_32.h b/arch/arm/net/bpf_jit_32.h
index 99ae5e3..7fa2f7d 100644
--- a/arch/arm/net/bpf_jit_32.h
+++ b/arch/arm/net/bpf_jit_32.h
@@ -68,6 +68,8 @@
#define ARM_INST_CMP_R 0x01500000
#define ARM_INST_CMP_I 0x03500000
+#define ARM_INST_EOR_R 0x00200000
+
#define ARM_INST_LDRB_I 0x05d00000
#define ARM_INST_LDRB_R 0x07d00000
#define ARM_INST_LDRH_I 0x01d000b0
@@ -132,6 +134,8 @@
#define ARM_CMP_R(rn, rm) _AL3_R(ARM_INST_CMP, 0, rn, rm)
#define ARM_CMP_I(rn, imm) _AL3_I(ARM_INST_CMP, 0, rn, imm)
+#define ARM_EOR_R(rd, rn, rm) _AL3_R(ARM_INST_EOR, rd, rn, rm)
+
#define ARM_LDR_I(rt, rn, off) (ARM_INST_LDR_I | (rt) << 12 | (rn) << 16 \
| (off))
#define ARM_LDRB_I(rt, rn, off) (ARM_INST_LDRB_I | (rt) << 12 | (rn) << 16 \
--
1.7.10
^ permalink raw reply related
* [PATCH] net: neighbour: fix neigh_dump_info()
From: Eric Dumazet @ 2012-06-07 14:58 UTC (permalink / raw)
To: Denys Fedoryshchenko, David Miller; +Cc: netdev, Stephen Hemminger
In-Reply-To: <1339078935.5083.13.camel@edumazet-glaptop>
From: Eric Dumazet <edumazet@google.com>
Denys found out "ip neigh" output was truncated to
about 54 neighbours.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
---
net/core/neighbour.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index eb09f8b..d81d026 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2219,9 +2219,7 @@ static int neigh_dump_table(struct neigh_table *tbl, struct sk_buff *skb,
rcu_read_lock_bh();
nht = rcu_dereference_bh(tbl->nht);
- for (h = 0; h < (1 << nht->hash_shift); h++) {
- if (h < s_h)
- continue;
+ for (h = s_h; h < (1 << nht->hash_shift); h++) {
if (h > s_h)
s_idx = 0;
for (n = rcu_dereference_bh(nht->hash_buckets[h]), idx = 0;
@@ -2260,9 +2258,7 @@ static int pneigh_dump_table(struct neigh_table *tbl, struct sk_buff *skb,
read_lock_bh(&tbl->lock);
- for (h = 0; h <= PNEIGH_HASHMASK; h++) {
- if (h < s_h)
- continue;
+ for (h = s_h; h <= PNEIGH_HASHMASK; h++) {
if (h > s_h)
s_idx = 0;
for (n = tbl->phash_buckets[h], idx = 0; n; n = n->next) {
@@ -2297,7 +2293,7 @@ static int neigh_dump_info(struct sk_buff *skb, struct netlink_callback *cb)
struct neigh_table *tbl;
int t, family, s_t;
int proxy = 0;
- int err = 0;
+ int err;
read_lock(&neigh_tbl_lock);
family = ((struct rtgenmsg *) nlmsg_data(cb->nlh))->rtgen_family;
@@ -2311,7 +2307,7 @@ static int neigh_dump_info(struct sk_buff *skb, struct netlink_callback *cb)
s_t = cb->args[0];
- for (tbl = neigh_tables, t = 0; tbl && (err >= 0);
+ for (tbl = neigh_tables, t = 0; tbl;
tbl = tbl->next, t++) {
if (t < s_t || (family && tbl->family != family))
continue;
@@ -2322,6 +2318,8 @@ static int neigh_dump_info(struct sk_buff *skb, struct netlink_callback *cb)
err = pneigh_dump_table(tbl, skb, cb);
else
err = neigh_dump_table(tbl, skb, cb);
+ if (err < 0)
+ break;
}
read_unlock(&neigh_tbl_lock);
^ permalink raw reply related
* Re: tcp wifi upload performance and lots of ACKs
From: Ben Greear @ 2012-06-07 14:41 UTC (permalink / raw)
To: David Laight; +Cc: Daniel Baluta, netdev
In-Reply-To: <AE90C24D6B3A694183C094C60CF0A2F6026B6F3C@saturn3.aculab.com>
On 06/07/2012 05:20 AM, David Laight wrote:
>
>
>> -----Original Message-----
>> From: netdev-owner@vger.kernel.org
>> [mailto:netdev-owner@vger.kernel.org] On Behalf Of Ben Greear
>> Sent: 07 June 2012 05:16
>> To: Daniel Baluta
>> Cc: netdev
>> Subject: Re: tcp wifi upload performance and lots of ACKs
>>
>> On 06/04/2012 12:22 PM, Daniel Baluta wrote:
>>> On Mon, Jun 4, 2012 at 9:29 PM, Ben Greear<greearb@candelatech.com>
> wrote:
>>>> I'm going some TCP performance testing on wifi -> LAN interface
> connections.
>>>> With
>>>> UDP, we can get around 250Mbps of payload throughput. With TCP,
> max is
>>>> about 80Mbps.
>>>>
>>>> I think the problem is that there are way too many ACK packets, and
>>>> bi-directional
>>>> traffic on wifi interfaces really slows things down. (About 7000
> pkts per
>>>> second in
>>>> upload direction, 2000 pps download. And the vast majority of the
> download
>>>> pkts
>>>> are 66 byte ACK pkts from what I can tell.)
>>
>>> [1] http://marc.info/?l=linux-netdev&m=131983649130350&w=2
>>
>> After a bit more playing, I did notice a reliable 5% increase in
>> traffic (200Mbps -> 210Mbps) from changing the delack segments
>> to 20 from the default of 1. That is enough to be useful to me,
>> and there may be more significant gains to be found...
>> I haven't done a full matrix of testing yet.
>
> Does this delaying of acks have a detrimental effect on the
> sending end?
> I've seen very bad interactions between delayed acks and
> (I believe) the 'slow start' code on connections with
> one-directional data, Nagle disabled and very low RTT.
>
> What I saw was the sender sending 4 data packets, then
> sitting waiting for an ack - in spite of accumulating
> several kB of data to send.
>
> Delaying acks further will only make this worse.
I'm sure it's not for everyone in all cases. In my case, I'm
sending long-term bulk transfer, at high speeds, over wifi network
which has some latency. Tested one-way traffic so far.
With the patch and delayed acks, I get more sender throughput than
without (200Mbps -> 210Mbps).
Thanks,
Ben
>
> David
>
>
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ 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