* [PATCH 1/3] NET: am79c961: ensure asm() statements are marked volatile
From: Russell King - ARM Linux @ 2011-06-10 10:51 UTC (permalink / raw)
To: netdev
In-Reply-To: <20110610105122.GA27087@flint.arm.linux.org.uk>
Without this the compiler can (and does) optimize register reads away
from within loops, and other such optimizations.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
drivers/net/arm/am79c961a.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/arm/am79c961a.c b/drivers/net/arm/am79c961a.c
index 0c9217f..084b67f 100644
--- a/drivers/net/arm/am79c961a.c
+++ b/drivers/net/arm/am79c961a.c
@@ -50,7 +50,7 @@ static const char version[] =
#ifdef __arm__
static void write_rreg(u_long base, u_int reg, u_int val)
{
- __asm__(
+ asm volatile(
"str%?h %1, [%2] @ NET_RAP\n\t"
"str%?h %0, [%2, #-4] @ NET_RDP"
:
@@ -60,7 +60,7 @@ static void write_rreg(u_long base, u_int reg, u_int val)
static inline unsigned short read_rreg(u_long base_addr, u_int reg)
{
unsigned short v;
- __asm__(
+ asm volatile(
"str%?h %1, [%2] @ NET_RAP\n\t"
"ldr%?h %0, [%2, #-4] @ NET_RDP"
: "=r" (v)
@@ -70,7 +70,7 @@ static inline unsigned short read_rreg(u_long base_addr, u_int reg)
static inline void write_ireg(u_long base, u_int reg, u_int val)
{
- __asm__(
+ asm volatile(
"str%?h %1, [%2] @ NET_RAP\n\t"
"str%?h %0, [%2, #8] @ NET_IDP"
:
@@ -80,7 +80,7 @@ static inline void write_ireg(u_long base, u_int reg, u_int val)
static inline unsigned short read_ireg(u_long base_addr, u_int reg)
{
u_short v;
- __asm__(
+ asm volatile(
"str%?h %1, [%2] @ NAT_RAP\n\t"
"ldr%?h %0, [%2, #8] @ NET_IDP\n\t"
: "=r" (v)
@@ -131,7 +131,7 @@ am_readbuffer(struct net_device *dev, u_int offset, unsigned char *buf, unsigned
length = (length + 1) & ~1;
if ((int)buf & 2) {
unsigned int tmp;
- __asm__ __volatile__(
+ asm volatile(
"ldr%?h %2, [%0], #4\n\t"
"str%?b %2, [%1], #1\n\t"
"mov%? %2, %2, lsr #8\n\t"
@@ -141,7 +141,7 @@ am_readbuffer(struct net_device *dev, u_int offset, unsigned char *buf, unsigned
}
while (length > 8) {
unsigned int tmp, tmp2, tmp3;
- __asm__ __volatile__(
+ asm volatile(
"ldr%?h %2, [%0], #4\n\t"
"ldr%?h %3, [%0], #4\n\t"
"orr%? %2, %2, %3, lsl #16\n\t"
@@ -155,7 +155,7 @@ am_readbuffer(struct net_device *dev, u_int offset, unsigned char *buf, unsigned
}
while (length > 0) {
unsigned int tmp;
- __asm__ __volatile__(
+ asm volatile(
"ldr%?h %2, [%0], #4\n\t"
"str%?b %2, [%1], #1\n\t"
"mov%? %2, %2, lsr #8\n\t"
--
1.7.4.4
^ permalink raw reply related
* [PATCH 0/3] Fixes for ARM/ebsa110 am79c961 driver
From: Russell King @ 2011-06-10 10:51 UTC (permalink / raw)
To: netdev
This series of patches fix some of the more serious issues discovered
with GCC 4 and the ARM EBSA110 am79c961 ethernet driver last weekend
while upgrading my firewall to 2.6.39.
--
Russell King
^ permalink raw reply
* [PATCH] net: DM9000: Add support for byte EEPROM access
From: Mark Brown @ 2011-06-10 10:50 UTC (permalink / raw)
Cc: netdev, Ben Dooks, Mark Brown
From: Ben Dooks <ben-linux@fluff.org>
Given many versions of ethtool's reluctance to do anything other than
byte accesses to the EEPROM interface, it is easier to update the driver
to support byte accesses so that all the ethtool versions that have been
observed in Debian can write the EEPROM.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/net/dm9000.c | 26 ++++++++++++++++++++------
1 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index 863e9c4..8ef31dc 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -535,21 +535,35 @@ static int dm9000_set_eeprom(struct net_device *dev,
board_info_t *dm = to_dm9000_board(dev);
int offset = ee->offset;
int len = ee->len;
- int i;
+ int done;
/* EEPROM access is aligned to two bytes */
- if ((len & 1) != 0 || (offset & 1) != 0)
- return -EINVAL;
-
if (dm->flags & DM9000_PLATF_NO_EEPROM)
return -ENOENT;
if (ee->magic != DM_EEPROM_MAGIC)
return -EINVAL;
- for (i = 0; i < len; i += 2)
- dm9000_write_eeprom(dm, (offset + i) / 2, data + i);
+ while (len > 0) {
+ if (len & 1 || offset & 1) {
+ int which = offset & 1;
+ u8 tmp[2];
+
+ dm9000_read_eeprom(dm, offset / 2, tmp);
+ tmp[which] = *data;
+ dm9000_write_eeprom(dm, offset / 2, tmp);
+
+ done = 1;
+ } else {
+ dm9000_write_eeprom(dm, offset / 2, data);
+ done = 2;
+ }
+
+ data += done;
+ offset += done;
+ len -= done;
+ }
return 0;
}
--
1.7.5.3
^ permalink raw reply related
* Re: [PATCH v3] vlan: Fix the ingress VLAN_FLAG_REORDER_HDR check
From: Jiri Pirko @ 2011-06-10 10:35 UTC (permalink / raw)
To: Changli Gao
Cc: David Miller, pratnakarlx, ebiederm, shemminger, greearb,
nicolas.2p.debian, netdev, kaber, fubar, eric.dumazet, andy,
jesse
In-Reply-To: <BANLkTimHi7V3YwbPepLyW7=pTS7hQVxEBQ@mail.gmail.com>
Fri, Jun 10, 2011 at 11:49:27AM CEST, xiaosuo@gmail.com wrote:
>On Fri, Jun 10, 2011 at 5:34 PM, Jiri Pirko <jpirko@redhat.com> wrote:
>> Fri, Jun 10, 2011 at 11:26:06AM CEST, xiaosuo@gmail.com wrote:
>>>On Fri, Jun 10, 2011 at 4:35 PM, Jiri Pirko <jpirko@redhat.com> wrote:
>>>> +
>>>> +/* Should be used only to revert vlan_reorder_header action */
>>>> +static struct sk_buff *vlan_unreorder_header(struct sk_buff *skb)
>>>> +{
>>>> + unsigned char *mac_header;
>>>> + struct vlan_ethhdr *veth;
>>>> +
>>>> + if (skb_cow(skb, skb_headroom(skb)) < 0)
>>>> + return NULL;
>>>
>>>I think we need to make sure if there is enough headroom for this
>>>header expansion.
>>
>> Well the header expansion was previously there so there should be place
>> there in all cases, or am I wrong?
>
>For hw-accel-vlan-rx, is the headroom for this header expansion
>reserved? I don't think so. Thanks.
But this wasn't done for hw-accel-vlan-rx previously right? So why don't
check for hw-accel-vlan-rx and don do unreorder in that case?
>
>--
>Regards,
>Changli Gao(xiaosuo@gmail.com)
^ permalink raw reply
* Re: [PATCH v3] vlan: Fix the ingress VLAN_FLAG_REORDER_HDR check
From: Changli Gao @ 2011-06-10 9:49 UTC (permalink / raw)
To: Jiri Pirko
Cc: David Miller, pratnakarlx, ebiederm, shemminger, greearb,
nicolas.2p.debian, netdev, kaber, fubar, eric.dumazet, andy,
jesse
In-Reply-To: <20110610093413.GC17568@minipsycho.redhat.com>
On Fri, Jun 10, 2011 at 5:34 PM, Jiri Pirko <jpirko@redhat.com> wrote:
> Fri, Jun 10, 2011 at 11:26:06AM CEST, xiaosuo@gmail.com wrote:
>>On Fri, Jun 10, 2011 at 4:35 PM, Jiri Pirko <jpirko@redhat.com> wrote:
>>> +
>>> +/* Should be used only to revert vlan_reorder_header action */
>>> +static struct sk_buff *vlan_unreorder_header(struct sk_buff *skb)
>>> +{
>>> + unsigned char *mac_header;
>>> + struct vlan_ethhdr *veth;
>>> +
>>> + if (skb_cow(skb, skb_headroom(skb)) < 0)
>>> + return NULL;
>>
>>I think we need to make sure if there is enough headroom for this
>>header expansion.
>
> Well the header expansion was previously there so there should be place
> there in all cases, or am I wrong?
For hw-accel-vlan-rx, is the headroom for this header expansion
reserved? I don't think so. Thanks.
--
Regards,
Changli Gao(xiaosuo@gmail.com)
^ permalink raw reply
* Re: [PATCH] ep93xx-eth: convert to phylib
From: Florian Fainelli @ 2011-06-10 9:46 UTC (permalink / raw)
To: Petr Štetiar
Cc: netdev, Herbert Valerio Riedel, Mika Westerberg, davem, hsweeten,
ryan, Lennert Buytenhek, linux-arm-kernel
In-Reply-To: <20110609203059.GZ16318@ibawizard.net>
Hello Petr,
On Thursday 09 June 2011 22:30:59 Petr Štetiar wrote:
> Florian Fainelli <f.fainelli@gmail.com> [2011-06-05 20:29:24]:
> > On Sunday 05 June 2011 19:57:36 Florian Fainelli wrote:
> > > ep93xx-eth lacked support for monitoring link status changes, with this
> > > patch, link changes are now watched and reported correctly.
> > >
> > > Signed-off-by: Florian Fainelli <florian@openwrt.org>
> > > ---
> >
> > I just stumbled upon: http://www.mail-
> > archive.com/netdev@vger.kernel.org/msg62549.html
> > which does not seem to have been merged.
> >
> > I will respin my patch with Herbert's changes
>
> Hi,
>
> just FYI, I wanted to test recent Mika's DMA/ep93xx_eth fixes, so I've
> added this patch also and it oopsed. If I revert this patch, it seems to
> work so far. You can find the whole patchset I've been testing on the
> GitHub[1]. I've tested it on ts-7250 and ts-7300, the oops is same. Here's
> the oops:
Allright, I need to respin the patch anyway, thanks for testing.
>
> ep93xx-eth version 0.1 loading
> ep93xx_eth_mii: probed
> ep93xx_eth:ep93xx_mii_probe: no PHY found
> ep93xx-eth ep93xx-eth: failed to probe MII bus
> ------------[ cut here ]------------
> WARNING: at net/core/dev.c:5133 rollback_registered_many+0x90/0x2d4()
> Modules linked in:
> Backtrace:
> [<c0027e78>] (dump_backtrace+0x0/0x10c) from [<c0263764>]
> (dump_stack+0x18/0x1c) r6:0000140d r5:c01cd558 r4:00000000 r3:00000000
> [<c026374c>] (dump_stack+0x0/0x1c) from [<c0037a48>]
> (warn_slowpath_common+0x50/0x68) [<c00379f8>]
> (warn_slowpath_common+0x0/0x68) from [<c0037a84>]
> (warn_slowpath_null+0x24/0x2c) r8:00100100 r7:00200200 r6:cf01bda0
> r5:cf01bdf8 r4:cf0b6800
> r3:00000009
> [<c0037a60>] (warn_slowpath_null+0x0/0x2c) from [<c01cd558>]
> (rollback_registered_many+0x90/0x2d4) [<c01cd4c8>]
> (rollback_registered_many+0x0/0x2d4) from [<c01cd834>]
> (rollback_registered+0x30/0x48) r8:00000027 r7:cf0b6800 r6:cf0b6b40
> r5:00000000 r4:cf0b6800
> r3:cf0b6858
> [<c01cd804>] (rollback_registered+0x0/0x48) from [<c01cd8a8>]
> (unregister_netdevice_queue+0x5c/0xa8) [<c01cd84c>]
> (unregister_netdevice_queue+0x0/0xa8) from [<c01cd914>]
> (unregister_netdev+0x20/0x28) r5:c030f638 r4:cf0b6800
> [<c01cd8f4>] (unregister_netdev+0x0/0x28) from [<c01b03a0>]
> (ep93xx_eth_remove+0x34/0x90) r4:cf0b6800 r3:cf039180
> [<c01b036c>] (ep93xx_eth_remove+0x0/0x90) from [<c01b1348>]
> (ep93xx_eth_probe+0x218/0x43c) r5:c030f630 r4:ffffffed
> [<c01b1130>] (ep93xx_eth_probe+0x0/0x43c) from [<c018b7b8>]
> (platform_drv_probe+0x1c/0x20) [<c018b79c>] (platform_drv_probe+0x0/0x20)
> from [<c018a5d0>] (driver_probe_device+0x8c/0x198) [<c018a544>]
> (driver_probe_device+0x0/0x198) from [<c018a770>]
> (__driver_attach+0x94/0x98) r8:c0017d40 r7:00000000 r6:c030f66c
> r5:c032080c r4:c030f638
> r3:00000000
> [<c018a6dc>] (__driver_attach+0x0/0x98) from [<c018974c>]
> (bus_for_each_dev+0x60/0x88) r6:00000000 r5:c018a6dc r4:c032080c
> r3:c018a6dc
> [<c01896ec>] (bus_for_each_dev+0x0/0x88) from [<c018a2a8>]
> (driver_attach+0x20/0x28) r6:cf0ae860 r5:c031d4e0 r4:c032080c
> [<c018a288>] (driver_attach+0x0/0x28) from [<c0189e94>]
> (bus_add_driver+0xa4/0x240) [<c0189df0>] (bus_add_driver+0x0/0x240) from
> [<c018aae0>] (driver_register+0x80/0x144) [<c018aa60>]
> (driver_register+0x0/0x144) from [<c018baf0>]
> (platform_driver_register+0x4c/0x60) r8:c0017d40 r7:00000000 r6:cf01a000
> r5:c0325960 r4:c001ee3c
> r3:00000000
> [<c018baa4>] (platform_driver_register+0x0/0x60) from [<c0017d5c>]
> (ep93xx_eth_init_module+0x1c/0x28) [<c0017d40>]
> (ep93xx_eth_init_module+0x0/0x28) from [<c00244f0>]
> (do_one_initcall+0x3c/0x17c) [<c00244b4>] (do_one_initcall+0x0/0x17c) from
> [<c0008a04>] (kernel_init+0x9c/0x140) [<c0008968>] (kernel_init+0x0/0x140)
> from [<c003b158>] (do_exit+0x0/0x710) r5:c0008968 r4:00000000
> ---[ end trace edc3043606fef430 ]---
> network todo 'eth%d' but state 0
> Backtrace:
> [<c0027e78>] (dump_backtrace+0x0/0x10c) from [<c0263764>]
> (dump_stack+0x18/0x1c) r6:cf0b6b40 r5:c0312560 r4:cf0b6800 r3:00000000
> [<c026374c>] (dump_stack+0x0/0x1c) from [<c01d10e4>]
> (netdev_run_todo+0x2dc/0x33c) [<c01d0e08>] (netdev_run_todo+0x0/0x33c)
> from [<c01dd824>] (rtnl_unlock+0x10/0x14) [<c01dd814>]
> (rtnl_unlock+0x0/0x14) from [<c01cd918>] (unregister_netdev+0x24/0x28)
> [<c01cd8f4>] (unregister_netdev+0x0/0x28) from [<c01b03a0>]
> (ep93xx_eth_remove+0x34/0x90) r4:cf0b6800 r3:cf039180
> [<c01b036c>] (ep93xx_eth_remove+0x0/0x90) from [<c01b1348>]
> (ep93xx_eth_probe+0x218/0x43c) r5:c030f630 r4:ffffffed
> [<c01b1130>] (ep93xx_eth_probe+0x0/0x43c) from [<c018b7b8>]
> (platform_drv_probe+0x1c/0x20) [<c018b79c>] (platform_drv_probe+0x0/0x20)
> from [<c018a5d0>] (driver_probe_device+0x8c/0x198) [<c018a544>]
> (driver_probe_device+0x0/0x198) from [<c018a770>]
> (__driver_attach+0x94/0x98) r8:c0017d40 r7:00000000 r6:c030f66c
> r5:c032080c r4:c030f638
> r3:00000000
> [<c018a6dc>] (__driver_attach+0x0/0x98) from [<c018974c>]
> (bus_for_each_dev+0x60/0x88) r6:00000000 r5:c018a6dc r4:c032080c
> r3:c018a6dc
> [<c01896ec>] (bus_for_each_dev+0x0/0x88) from [<c018a2a8>]
> (driver_attach+0x20/0x28) r6:cf0ae860 r5:c031d4e0 r4:c032080c
> [<c018a288>] (driver_attach+0x0/0x28) from [<c0189e94>]
> (bus_add_driver+0xa4/0x240) [<c0189df0>] (bus_add_driver+0x0/0x240) from
> [<c018aae0>] (driver_register+0x80/0x144) [<c018aa60>]
> (driver_register+0x0/0x144) from [<c018baf0>]
> (platform_driver_register+0x4c/0x60) r8:c0017d40 r7:00000000 r6:cf01a000
> r5:c0325960 r4:c001ee3c
> r3:00000000
> [<c018baa4>] (platform_driver_register+0x0/0x60) from [<c0017d5c>]
> (ep93xx_eth_init_module+0x1c/0x28) [<c0017d40>]
> (ep93xx_eth_init_module+0x0/0x28) from [<c00244f0>]
> (do_one_initcall+0x3c/0x17c) [<c00244b4>] (do_one_initcall+0x0/0x17c) from
> [<c0008a04>] (kernel_init+0x9c/0x140) [<c0008968>] (kernel_init+0x0/0x140)
> from [<c003b158>] (do_exit+0x0/0x710) r5:c0008968 r4:00000000
> Unable to handle kernel NULL pointer dereference at virtual address
> 00000000 pgd = c0004000
> [00000000] *pgd=00000000
> Internal error: Oops: 5 [#1] PREEMPT
> Modules linked in:
> CPU: 0 Tainted: G W (3.0.0-rc2+ #35)
> PC is at ep93xx_free_buffers+0x24/0xd4
> LR is at ep93xx_eth_remove+0x5c/0x90
> pc : [<c01b02bc>] lr : [<c01b03c8>] psr: 80000013
> sp : cf01be20 ip : cf01be40 fp : cf01be3c
> r10: 00000080 r9 : c0325bc8 r8 : 00000027
> r7 : c030f638 r6 : cf0b6b40 r5 : cf0b6b54 r4 : 00000000
> r3 : 00000000 r2 : 00000014 r1 : 00000800 r0 : cf0b6b40
> Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
> Control: c000717f Table: 00004000 DAC: 00000017
> Process swapper (pid: 1, stack limit = 0xcf01a270)
> Stack: (0xcf01be20 to 0xcf01c000)
> be20: cf0b6800 cf0b6b40 cf0b6b40 cf0b6800 cf01be54 cf01be40 c01b03c8
> c01b02a8 be40: ffffffed c030f630 cf01be94 cf01be58 c01b1348 c01b037c
> 00000000 c032080c be60: c0017d40 c030f638 cf01be84 c030f638 c0340bd0
> c030f638 c032080c c0017d40 be80: 00000000 00000000 cf01bea4 cf01be98
> c018b7b8 c01b1140 cf01becc cf01bea8 bea0: c018a5d0 c018b7ac 00000000
> c030f638 c032080c c030f66c 00000000 c0017d40 bec0: cf01beec cf01bed0
> c018a770 c018a554 c018a6dc c032080c c018a6dc 00000000 bee0: cf01bf14
> cf01bef0 c018974c c018a6ec cf02ebf8 cf0391b0 c01576c4 c032080c bf00:
> c031d4e0 cf0ae860 cf01bf24 cf01bf18 c018a2a8 c01896fc cf01bf54 cf01bf28
> bf20: c0189e94 c018a298 c02ce24c cf01bf38 c032080c c0325960 cf01a000
> 00000000 bf40: c0017d40 00000000 cf01bf7c cf01bf58 c018aae0cf01bfe0
> c0008a04 c00244c4 bfe0: 00000000 c0008968 00000000 cf01bff8 c003b158
> c0008978 e3a0105e e3a02030 Backtrace:
> [<c01b0298>] (ep93xx_free_buffers+0x0/0xd4) from [<c01b03c8>]
> (ep93xx_eth_remove+0x5c/0x90) r7:cf0b6800 r6:cf0b6b40 r5:cf0b6b40
> r4:cf0b6800
> [<c01b036c>] (ep93xx_eth_remove+0x0/0x90) from [<c01b1348>]
> (ep93xx_eth_probe+0x218/0x43c) r5:c030f630 r4:ffffffed
> [<c01b1130>] (ep93xx_eth_probe+0x0/0x43c) from [<c018b7b8>]
> (platform_drv_probe+0x1c/0x20) [<c018b79c>] (platform_drv_probe+0x0/0x20)
> from [<c018a5d0>] (driver_probe_device+0x8c/0x198) [<c018a544>]
> (driver_probe_device+0x0/0x198) from [<c018a770>]
> (__driver_attach+0x94/0x98) r8:c0017d40 r7:00000000 r6:c030f66c
> r5:c032080c r4:c030f638
> r3:00000000
> [<c018a6dc>] (__driver_attach+0x0/0x98) from [<c018974c>]
> (bus_for_each_dev+0x60/0x88) r6:00000000 r5:c018a6dc r4:c032080c
> r3:c018a6dc
> [<c01896ec>] (bus_for_each_dev+0x0/0x88) from [<c018a2a8>]
> (driver_attach+0x20/0x28) r6:cf0ae860 r5:c031d4e0 r4:c032080c
> [<c018a288>] (driver_attach+0x0/0x28) from [<c0189e94>]
> (bus_add_driver+0xa4/0x240) [<c0189df0>] (bus_add_driver+0x0/0x240) from
> [<c018aae0>] (driver_register+0x80/0x144) [<c018aa60>]
> (driver_register+0x0/0x144) from [<c018baf0>]
> (platform_driver_register+0x4c/0x60) r8:c0017d40 r7:00000000 r6:cf01a000
> r5:c0325960 r4:c001ee3c
> r3:00000000
> [<c018baa4>] (platform_driver_register+0x0/0x60) from [<c0017d5c>]
> (ep93xx_eth_init_module+0x1c/0x28) [<c0017d40>]
> (ep93xx_eth_init_module+0x0/0x28) from [<c00244f0>]
> (do_one_initcall+0x3c/0x17c) [<c00244b4>] (do_one_initcall+0x0/0x17c) from
> [<c0008a04>] (kernel_init+0x9c/0x140) [<c0008968>] (kernel_init+0x0/0x140)
> from [<c003b158>] (do_exit+0x0/0x710) r5:c0008968 r4:00000000
> Code: e2805014 e3a04000 e5963010 e3a01b02 (e7933184)
> ---[ end trace edc3043606fef431 ]---
> Kernel panic - not syncing: Attempted to kill init!
> Backtrace:
> [<c0027e78>] (dump_backtrace+0x0/0x10c) from [<c0263764>]
> (dump_stack+0x18/0x1c) r6:00000000 r5:c0312c40 r4:c0325cc0 r3:00000002
> [<c026374c>] (dump_stack+0x0/0x1c) from [<c02637d0>] (panic+0x68/0x198)
> [<c0263768>] (panic+0x0/0x198) from [<c003b7cc>] (do_exit+0x674/0x710)
> r3:c0312c40 r2:c003b754 r1:cf01a000 r0:c02cf148
> r7:cf019be0
> [<c003b158>] (do_exit+0x0/0x710) from [<c00284e4>] (die+ cf0b6b40
> 00000800 bde0: 00000014 00000000 00000000 cf0b6b54 cf0b6b40 c030f638
> 00000027 c0325bc8 be00: 00000080 cf01be3c cf01be40 cf01be20 c01b03c8
> c01b02bc 80000013 ffffffff r8:00000027 r7:c030f638 r6:cf0b6b40 r5:cf01be0c
> r4:ffffffff
> [<c01b0298>] (ep93xx_free_buffers+0x0/0xd4) from [<c01b03c8>]
> (ep93xx_eth_remove+0x5c/0x90) r7:cf0b6800 r6:cf0b6b40 r5:cf0b6b40
> r4:cf0b6800
> [<c01b036c>] (ep93xx_eth_remove+0x0/0x90) from [<c01b1348>]
> (ep93xx_eth_probe+0x218/0x43c) r5:c030f630 r4:ffffffed
> [<c01b1130>] (ep93xx_eth_probe+0x0/0x43c) from [<c018b7b8>]
> (platform_drv_probe+0x1c/0x20) [<c018b79c>] (platform_drv_probe+0x0/0x20)
> from [<c018a5d0>] (driver_probe_device+0x8c/0x198) [<c018a544>]
> (driver_probe_device+0x0/0x198) from [<c018a770>]
> (__driver_attach+0x94/0x98) r8:c0017d40 r7:00000000 r6:c030f66c
> r5:c032080c r4:c030f638
> r3:00000000
> [<c018a6dc>] (__driver_attach+0x0/0x98) from [<c018974c>]
> (bus_for_each_dev+0x60/0x88) r6:00000000 r5:c018a6dc r4:c032080c
> r3:c018a6dc
> [<c01896ec>] (bus_for_each_dev+0x0/0x88) from [<c018a2a8>]
> (driver_attach+0x20/0x28) r6:cf0ae860 r5:c031d4e0 r4:c032080c
> [<c018a288>] (driver_attach+0x0/0x28) from [<c0189e94>]
> (bus_add_driver+0xa4/0x240) [<c0189df0>] (bus_add_driver+0x0/0x240) from
> [<c018aae0>] (driver_register+0x80/0x144) [<c018aa60>]
> (driver_register+0x0/0x144) from [<c018baf0>]
> (platform_driver_register+0x4c/0x60) r8:c0017d40 r7:00000000 r6:cf01a000
> r5:c0325960 r4:c001ee3c
> r3:00000000
> [<c018baa4>] (platform_driver_register+0x0/0x60) from [<c0017d5c>]
> (ep93xx_eth_init_module+0x1c/0x28) [<c0017d40>]
> (ep93xx_eth_init_module+0x0/0x28) from [<c00244f0>]
> (do_one_initcall+0x3c/0x17c) [<c00244b4>] (do_one_initcall+0x0/0x17c) from
> [<c0008a04>] (kernel_init+0x9c/0x140) [<c0008968>] (kernel_init+0x0/0x140)
> from [<c003b158>] (do_exit+0x0/0x710) r5:c0008968 r4:00000000
>
> 1. https://github.com/ynezz/linux-2.6/commits/ts72xx-wip
>
> -- ynezz
^ permalink raw reply
* Re: [PATCH v3] vlan: Fix the ingress VLAN_FLAG_REORDER_HDR check
From: Jiri Pirko @ 2011-06-10 9:34 UTC (permalink / raw)
To: Changli Gao
Cc: David Miller, pratnakarlx, ebiederm, shemminger, greearb,
nicolas.2p.debian, netdev, kaber, fubar, eric.dumazet, andy,
jesse
In-Reply-To: <BANLkTinqikKoeW6mbjMV9nPii0Nzp4vSdQ@mail.gmail.com>
Fri, Jun 10, 2011 at 11:26:06AM CEST, xiaosuo@gmail.com wrote:
>On Fri, Jun 10, 2011 at 4:35 PM, Jiri Pirko <jpirko@redhat.com> wrote:
>> +
>> +/* Should be used only to revert vlan_reorder_header action */
>> +static struct sk_buff *vlan_unreorder_header(struct sk_buff *skb)
>> +{
>> + unsigned char *mac_header;
>> + struct vlan_ethhdr *veth;
>> +
>> + if (skb_cow(skb, skb_headroom(skb)) < 0)
>> + return NULL;
>
>I think we need to make sure if there is enough headroom for this
>header expansion.
Well the header expansion was previously there so there should be place
there in all cases, or am I wrong?
>
>> + skb->mac_header -= VLAN_HLEN;
>
>skb->mac_len isn't adjusted. You forgot to move the headers resetting
>after vlan_untag().
that is correct, I'll move that. I'll also add reset after unreorder.
Thanks Changli.
Jirka
>
>
>
>--
>Regards,
>Changli Gao(xiaosuo@gmail.com)
^ permalink raw reply
* Re: [PATCH v3] vlan: Fix the ingress VLAN_FLAG_REORDER_HDR check
From: Changli Gao @ 2011-06-10 9:26 UTC (permalink / raw)
To: Jiri Pirko
Cc: David Miller, pratnakarlx, ebiederm, shemminger, greearb,
nicolas.2p.debian, netdev, kaber, fubar, eric.dumazet, andy,
jesse
In-Reply-To: <20110610083539.GB17568@minipsycho.redhat.com>
On Fri, Jun 10, 2011 at 4:35 PM, Jiri Pirko <jpirko@redhat.com> wrote:
> +
> +/* Should be used only to revert vlan_reorder_header action */
> +static struct sk_buff *vlan_unreorder_header(struct sk_buff *skb)
> +{
> + unsigned char *mac_header;
> + struct vlan_ethhdr *veth;
> +
> + if (skb_cow(skb, skb_headroom(skb)) < 0)
> + return NULL;
I think we need to make sure if there is enough headroom for this
header expansion.
> + skb->mac_header -= VLAN_HLEN;
skb->mac_len isn't adjusted. You forgot to move the headers resetting
after vlan_untag().
--
Regards,
Changli Gao(xiaosuo@gmail.com)
^ permalink raw reply
* From The UN Foundation
From: Kalogeropoulos Aspasia @ 2011-06-10 9:09 UTC (permalink / raw)
To: info
UNDP SCHEME 2011.
08/06/2011.
This is to notify you that you have been appointed as one of the recipients of a Cash Grant/Donation for your personal and community development. You were selected among the beneficiaries to receive the sum of US$500,000.00 as developmental aid from the UN Foundation. Please contact.UNDP Mr. Gilbert Alvin on this email: undg.grant@yahoo.com.hk <mailto:undg.grant@yahoo.com.hk> ,
Regards Aspasia Kalogeropoulos,
Chairman Grant Programme
^ permalink raw reply
* [PATCH v1] sctp: kzalloc() error handling on deleting last address
From: Michio Honda @ 2011-06-10 9:06 UTC (permalink / raw)
To: David Miller; +Cc: Wei Yongjun, netdev
>From be2da529aa45061e77ad96313175e141aaadc16a Mon Sep 17 00:00:00 2001
From: Michio Honda <micchie@sfc.wide.ad.jp>
Date: Fri, 10 Jun 2011 16:42:14 +0900
Subject: [PATCH v1] sctp: kzalloc() error handling on deleting last address
Signed-off-by: Michio Honda <micchie@sfc.wide.ad.jp>
---
net/sctp/socket.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index e7e1b14..60038fe 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -786,6 +786,10 @@ static int sctp_send_asconf_del_ip(struct sock *sk,
continue;
asoc->asconf_addr_del_pending =
kzalloc(sizeof(union sctp_addr), GFP_ATOMIC);
+ if (asoc->asconf_addr_del_pending == NULL) {
+ retval = -ENOMEM;
+ goto out;
+ }
asoc->asconf_addr_del_pending->sa.sa_family =
addrs->sa_family;
asoc->asconf_addr_del_pending->v4.sin_port =
--
1.7.3.2
^ permalink raw reply related
* [PATCH v3] vlan: Fix the ingress VLAN_FLAG_REORDER_HDR check
From: Jiri Pirko @ 2011-06-10 8:35 UTC (permalink / raw)
To: David Miller
Cc: xiaosuo, pratnakarlx, ebiederm, shemminger, greearb,
nicolas.2p.debian, netdev, kaber, fubar, eric.dumazet, andy,
jesse
In-Reply-To: <20110605.141446.1838641439880246155.davem@davemloft.net>
Please review. I'm not sure if there wouldn't be necessary to control
for rx accelerated skbs. Smoke tested.
Subject: [patch net-2.6 v3] vlan: Fix the ingress VLAN_FLAG_REORDER_HDR check
Testing of VLAN_FLAG_REORDER_HDR does not belong in vlan_untag
but rather in vlan_do_receive. Otherwise the vlan header
will not be properly put on the packet in the case of
vlan header accelleration.
As we remove the check from vlan_check_reorder_header
rename it vlan_reorder_header to keep the naming clean.
Use a simple if statement instead of a complicated switch
statement to decided that we need to increment rx_stats
for a multicast packet.
Hopefully at somepoint we will just declare the case where
VLAN_FLAG_REORDER_HDR is cleared as unsupported and remove
the code. Until then this keeps it working correctly.
Use vlan_unreorder_header to revert actions previously done by
vlan_untag->vlan_reorder_header in case VLAN_FLAG_REORDER_HDR is not set
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
net/8021q/vlan_core.c | 75 ++++++++++++++++++++++++++++--------------------
1 files changed, 44 insertions(+), 31 deletions(-)
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c
index 41495dc..d71cc81 100644
--- a/net/8021q/vlan_core.c
+++ b/net/8021q/vlan_core.c
@@ -4,6 +4,33 @@
#include <linux/netpoll.h>
#include "vlan.h"
+static struct sk_buff *vlan_reorder_header(struct sk_buff *skb)
+{
+ if (skb_cow(skb, skb_headroom(skb)) < 0)
+ return NULL;
+ /* Lifted from Gleb's VLAN code... */
+ memmove(skb->data - ETH_HLEN, skb->data - VLAN_ETH_HLEN, 12);
+ skb->mac_header += VLAN_HLEN;
+ return skb;
+}
+
+/* Should be used only to revert vlan_reorder_header action */
+static struct sk_buff *vlan_unreorder_header(struct sk_buff *skb)
+{
+ unsigned char *mac_header;
+ struct vlan_ethhdr *veth;
+
+ if (skb_cow(skb, skb_headroom(skb)) < 0)
+ return NULL;
+ skb->mac_header -= VLAN_HLEN;
+ mac_header = skb_mac_header(skb);
+ memmove(mac_header, mac_header + VLAN_HLEN, 12);
+ veth = (struct vlan_ethhdr *) mac_header;
+ veth->h_vlan_proto = htons(ETH_P_8021Q);
+ veth->h_vlan_TCI = htons(skb->vlan_tci);
+ return skb;
+}
+
bool vlan_do_receive(struct sk_buff **skbp)
{
struct sk_buff *skb = *skbp;
@@ -23,6 +50,21 @@ bool vlan_do_receive(struct sk_buff **skbp)
return false;
skb->dev = vlan_dev;
+ if (skb->pkt_type == PACKET_OTHERHOST) {
+ /* Our lower layer thinks this is not local, let's make sure.
+ * This allows the VLAN to have a different MAC than the
+ * underlying device, and still route correctly. */
+ if (!compare_ether_addr(eth_hdr(skb)->h_dest,
+ vlan_dev->dev_addr))
+ skb->pkt_type = PACKET_HOST;
+ }
+
+ if (!(vlan_dev_info(vlan_dev)->flags & VLAN_FLAG_REORDER_HDR)) {
+ skb = *skbp = vlan_unreorder_header(skb);
+ if (!skb)
+ return false;
+ }
+
skb->priority = vlan_get_ingress_priority(vlan_dev, skb->vlan_tci);
skb->vlan_tci = 0;
@@ -31,22 +73,8 @@ bool vlan_do_receive(struct sk_buff **skbp)
u64_stats_update_begin(&rx_stats->syncp);
rx_stats->rx_packets++;
rx_stats->rx_bytes += skb->len;
-
- switch (skb->pkt_type) {
- case PACKET_BROADCAST:
- break;
- case PACKET_MULTICAST:
+ if (skb->pkt_type == PACKET_MULTICAST)
rx_stats->rx_multicast++;
- break;
- case PACKET_OTHERHOST:
- /* Our lower layer thinks this is not local, let's make sure.
- * This allows the VLAN to have a different MAC than the
- * underlying device, and still route correctly. */
- if (!compare_ether_addr(eth_hdr(skb)->h_dest,
- vlan_dev->dev_addr))
- skb->pkt_type = PACKET_HOST;
- break;
- }
u64_stats_update_end(&rx_stats->syncp);
return true;
@@ -89,21 +117,6 @@ gro_result_t vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp,
}
EXPORT_SYMBOL(vlan_gro_frags);
-static struct sk_buff *vlan_check_reorder_header(struct sk_buff *skb)
-{
- if (vlan_dev_info(skb->dev)->flags & VLAN_FLAG_REORDER_HDR) {
- if (skb_cow(skb, skb_headroom(skb)) < 0)
- skb = NULL;
- if (skb) {
- /* Lifted from Gleb's VLAN code... */
- memmove(skb->data - ETH_HLEN,
- skb->data - VLAN_ETH_HLEN, 12);
- skb->mac_header += VLAN_HLEN;
- }
- }
- return skb;
-}
-
static void vlan_set_encap_proto(struct sk_buff *skb, struct vlan_hdr *vhdr)
{
__be16 proto;
@@ -161,7 +174,7 @@ struct sk_buff *vlan_untag(struct sk_buff *skb)
skb_pull_rcsum(skb, VLAN_HLEN);
vlan_set_encap_proto(skb, vhdr);
- skb = vlan_check_reorder_header(skb);
+ skb = vlan_reorder_header(skb);
if (unlikely(!skb))
goto err_free;
--
1.7.5.2
^ permalink raw reply related
* Re: [PATCH] sctp: kzalloc() error handling on deleting last address
From: Wei Yongjun @ 2011-06-10 8:21 UTC (permalink / raw)
To: Michio Honda; +Cc: David Miller, netdev
In-Reply-To: <F8A1B797-89A2-4AAA-AFB1-9B187AC08456@sfc.wide.ad.jp>
> From 49a66ecad72af8c367b125c695a113d3f3870320 Mon Sep 17 00:00:00 2001
> From: Michio Honda <micchie@sfc.wide.ad.jp>
> Date: Fri, 10 Jun 2011 16:42:14 +0900
> Subject: [PATCH] sctp: kzalloc() error handling on deleting last address
>
> Signed-off-by: Michio Honda <micchie@sfc.wide.ad.jp>
> ---
> net/sctp/socket.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/net/sctp/socket.c b/net/sctp/socket.c
> index e7e1b14..a23d898 100644
> --- a/net/sctp/socket.c
> +++ b/net/sctp/socket.c
> @@ -786,6 +786,8 @@ static int sctp_send_asconf_del_ip(struct sock *sk,
> continue;
> asoc->asconf_addr_del_pending =
> kzalloc(sizeof(union sctp_addr), GFP_ATOMIC);
> + if (asoc->asconf_addr_del_pending == NULL)
> + continue;
better to return with ENOMEM.
if (asoc->asconf_addr_del_pending == NULL) {
retval = -ENOMEM;
goto out;
}
> asoc->asconf_addr_del_pending->sa.sa_family =
> addrs->sa_family;
> asoc->asconf_addr_del_pending->v4.sin_port =
^ permalink raw reply
* Re: [PATCH v2 00/12][pull request] Intel Wired LAN Driver Update
From: David Miller @ 2011-06-10 8:20 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo
In-Reply-To: <1307677676-26690-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 9 Jun 2011 20:47:44 -0700
> The following series is a (smaller) subset of the previous 40 patch
> submission. This subset only contains updates to e1000e, igb, igbvf
> and rtnetlink.
>
> e1000e: several cleanups and fixes, as well as bump the version
> igb/igbvf/ixgbevf: bump driver version
> rtnetlink: Compute and store minimum ifinfo dump size
>
> -v2: fixed infiniband compile issue with the rtnetlink patch
>
> The following are changes since commit e357964ee66723d0ced63ac1dbd1db4a6a1d417e:
> bonding: delete unused arp_mon_pt
> and are available in the git repository at:
> master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net-next-2.6 master
Pulled, thanks Jeff.
^ permalink raw reply
* [PATCH 1/1] IPVS remove unused var from migration to netns
From: Hans Schillstrom @ 2011-06-10 8:19 UTC (permalink / raw)
To: horms, ja, wensong, lvs-devel, netdev, netfilter-devel
Cc: hans, Hans Schillstrom
Remove variable ctl_key from struct netns_ipvs,
it's a leftover from early netns work.
Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com>
---
include/net/ip_vs.h | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 481f856..34a6fa8 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -836,8 +836,6 @@ struct netns_ipvs {
int num_services; /* no of virtual services */
rwlock_t rs_lock; /* real services table */
- /* semaphore for IPVS sockopts. And, [gs]etsockopt may sleep. */
- struct lock_class_key ctl_key; /* ctl_mutex debuging */
/* Trash for destinations */
struct list_head dest_trash;
/* Service counters */
--
1.6.0.2
^ permalink raw reply related
* [PATCH] sctp: kzalloc() error handling on deleting last address
From: Michio Honda @ 2011-06-10 8:07 UTC (permalink / raw)
To: David Miller; +Cc: Wei Yongjun, netdev
>From 49a66ecad72af8c367b125c695a113d3f3870320 Mon Sep 17 00:00:00 2001
From: Michio Honda <micchie@sfc.wide.ad.jp>
Date: Fri, 10 Jun 2011 16:42:14 +0900
Subject: [PATCH] sctp: kzalloc() error handling on deleting last address
Signed-off-by: Michio Honda <micchie@sfc.wide.ad.jp>
---
net/sctp/socket.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index e7e1b14..a23d898 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -786,6 +786,8 @@ static int sctp_send_asconf_del_ip(struct sock *sk,
continue;
asoc->asconf_addr_del_pending =
kzalloc(sizeof(union sctp_addr), GFP_ATOMIC);
+ if (asoc->asconf_addr_del_pending == NULL)
+ continue;
asoc->asconf_addr_del_pending->sa.sa_family =
addrs->sa_family;
asoc->asconf_addr_del_pending->v4.sin_port =
--
1.7.3.2
^ permalink raw reply related
* Re: [PATCH net-2.6.23] Per-datagram TTL and TOS via sendmsg()
From: Rémi Denis-Courmont @ 2011-06-10 7:24 UTC (permalink / raw)
To: Miljanovic, Nebojsa (Neb), netdev
In-Reply-To: <180685543D224348869F70A5870DB9408A5EE7D2@USNAVSXCHMBSB2.ndc.alcatel-lucent.com>
On Thu, 9 Jun 2011 08:20:46 -0500, "Miljanovic, Nebojsa (Neb)"
<neb.miljanovic@alcatel-lucent.com> wrote:
> is there any way to get this old PATCH accepted. I am finding it very
> useful since the only other way to control TOS/DSCP is via socket
option.
> However, socket wide TOS/DSCP is not always practical. Having ability
for
> applications to control TOS/DSCP on per-datagram basis is so much more
> powerful.
I have not tried, but with 17 kernel passed, it is safe to assume that
this patch cannot be applied as is.
--
Rémi Denis-Courmont
http://www.remlab.net/
^ permalink raw reply
* [PATCH] netfilter: fix looped (broad|multi)cast's MAC handling.
From: Nicolas Cavallari @ 2011-06-10 7:20 UTC (permalink / raw)
To: kaber, fw, netfilter-devel, netdev; +Cc: Nicolas Cavallari
In-Reply-To: <4DF0EFE6.4010206@trash.net>
By default, when broadcast or multicast packet are sent from a local
application, they are sent to the interface then looped by the kernel
to other local applications, going throught netfilter hooks in the process.
These looped packet have their MAC header removed from the skb by the kernel
looping code.
This confuse various netfilter's netlink queue, netlink log and the
legacy ip_queue, because they try to extract a hardware
address from these packets, but extracts a part of the IP header instead.
This patch prevent NFQUEUE, NFLOG and ip_QUEUE to include a MAC header
if there is none in the packet.
Signed-off-by: Nicolas Cavallari <cavallar@lri.fr>
---
net/ipv4/netfilter/ip_queue.c | 3 ++-
net/ipv6/netfilter/ip6_queue.c | 3 ++-
net/netfilter/nfnetlink_log.c | 3 ++-
net/netfilter/nfnetlink_queue.c | 3 ++-
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c
index f7f9bd7..5c9b9d9 100644
--- a/net/ipv4/netfilter/ip_queue.c
+++ b/net/ipv4/netfilter/ip_queue.c
@@ -203,7 +203,8 @@ ipq_build_packet_message(struct nf_queue_entry *entry, int *errp)
else
pmsg->outdev_name[0] = '\0';
- if (entry->indev && entry->skb->dev) {
+ if (entry->indev && entry->skb->dev &&
+ entry->skb->mac_header != entry->skb->network_header) {
pmsg->hw_type = entry->skb->dev->type;
pmsg->hw_addrlen = dev_parse_header(entry->skb,
pmsg->hw_addr);
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c
index 065fe40..2493948 100644
--- a/net/ipv6/netfilter/ip6_queue.c
+++ b/net/ipv6/netfilter/ip6_queue.c
@@ -204,7 +204,8 @@ ipq_build_packet_message(struct nf_queue_entry *entry, int *errp)
else
pmsg->outdev_name[0] = '\0';
- if (entry->indev && entry->skb->dev) {
+ if (entry->indev && entry->skb->dev &&
+ entry->skb->mac_header != entry->skb->network_header) {
pmsg->hw_type = entry->skb->dev->type;
pmsg->hw_addrlen = dev_parse_header(entry->skb, pmsg->hw_addr);
}
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index e0ee010..2e7ccbb 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -456,7 +456,8 @@ __build_packet_message(struct nfulnl_instance *inst,
if (skb->mark)
NLA_PUT_BE32(inst->skb, NFULA_MARK, htonl(skb->mark));
- if (indev && skb->dev) {
+ if (indev && skb->dev &&
+ skb->mac_header != skb->network_header) {
struct nfulnl_msg_packet_hw phw;
int len = dev_parse_header(skb, phw.hw_addr);
if (len > 0) {
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
index b83123f..fdd2faf 100644
--- a/net/netfilter/nfnetlink_queue.c
+++ b/net/netfilter/nfnetlink_queue.c
@@ -335,7 +335,8 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue,
if (entskb->mark)
NLA_PUT_BE32(skb, NFQA_MARK, htonl(entskb->mark));
- if (indev && entskb->dev) {
+ if (indev && entskb->dev &&
+ entskb->mac_header != entskb->network_header) {
struct nfqnl_msg_packet_hw phw;
int len = dev_parse_header(entskb, phw.hw_addr);
if (len) {
--
1.7.5.3
^ permalink raw reply related
* [PATCH] net: netfilter: ipvs: clean up the dead code
From: Changli Gao @ 2011-06-10 7:11 UTC (permalink / raw)
To: Simon Horman
Cc: Wensong Zhang, Julian Anastasov, Patrick McHardy, David S. Miller,
netdev, lvs-devel, netfilter-devel, Changli Gao
This dead code has been commented out since 2005, and too many things
have happened. Currently, even vs_timeout_table_dos doesn't exist.
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
---
net/netfilter/ipvs/ip_vs_ctl.c | 86 -----------------------------------------
1 file changed, 86 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index 699c79a..f6670da 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -1756,92 +1756,6 @@ static struct ctl_table vs_vars[] = {
.proc_handler = proc_dointvec,
},
#endif
-#if 0
- {
- .procname = "timeout_established",
- .data = &vs_timeout_table_dos.timeout[IP_VS_S_ESTABLISHED],
- .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec_jiffies,
- },
- {
- .procname = "timeout_synsent",
- .data = &vs_timeout_table_dos.timeout[IP_VS_S_SYN_SENT],
- .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec_jiffies,
- },
- {
- .procname = "timeout_synrecv",
- .data = &vs_timeout_table_dos.timeout[IP_VS_S_SYN_RECV],
- .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec_jiffies,
- },
- {
- .procname = "timeout_finwait",
- .data = &vs_timeout_table_dos.timeout[IP_VS_S_FIN_WAIT],
- .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec_jiffies,
- },
- {
- .procname = "timeout_timewait",
- .data = &vs_timeout_table_dos.timeout[IP_VS_S_TIME_WAIT],
- .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec_jiffies,
- },
- {
- .procname = "timeout_close",
- .data = &vs_timeout_table_dos.timeout[IP_VS_S_CLOSE],
- .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec_jiffies,
- },
- {
- .procname = "timeout_closewait",
- .data = &vs_timeout_table_dos.timeout[IP_VS_S_CLOSE_WAIT],
- .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec_jiffies,
- },
- {
- .procname = "timeout_lastack",
- .data = &vs_timeout_table_dos.timeout[IP_VS_S_LAST_ACK],
- .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec_jiffies,
- },
- {
- .procname = "timeout_listen",
- .data = &vs_timeout_table_dos.timeout[IP_VS_S_LISTEN],
- .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec_jiffies,
- },
- {
- .procname = "timeout_synack",
- .data = &vs_timeout_table_dos.timeout[IP_VS_S_SYNACK],
- .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec_jiffies,
- },
- {
- .procname = "timeout_udp",
- .data = &vs_timeout_table_dos.timeout[IP_VS_S_UDP],
- .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec_jiffies,
- },
- {
- .procname = "timeout_icmp",
- .data = &vs_timeout_table_dos.timeout[IP_VS_S_ICMP],
- .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec_jiffies,
- },
-#endif
{ }
};
^ permalink raw reply related
* Re: [RFC] inetpeer not namespace ready
From: David Miller @ 2011-06-10 7:07 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
In-Reply-To: <1307681090.3210.7.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 10 Jun 2011 06:44:50 +0200
> Shouldnt we make inetpeer cache namespace aware ?
>
> Same destination IP can be used differently in two different namespaces.
Maybe. Although it would be a shame not to be able to share metrics
between namespaces.
^ permalink raw reply
* Re: [PATCH 3/5 net-next] cnic: Randomize initial TCP port for iSCSI connections
From: Michael Chan @ 2011-06-10 6:25 UTC (permalink / raw)
To: 'Stephen Hemminger'
Cc: 'davem@davemloft.net', 'netdev@vger.kernel.org',
Eddie Wai
In-Reply-To: <20110609210157.6a1f016b@nehalam.ftrdhcpuser.net>
Stephen Hemminger wrote:
> On Thu, 9 Jun 2011 18:08:00 -0700
> "Michael Chan" <mchan@broadcom.com> wrote:
> > random32() is pseudo random so we can get the same number after reboot,
> > right? One scenario is that we may be booting from an iSCSI target, but
> > due to some failure, the user may be rebooting multiple times rapidly.
> > We want to use a different port during each boot.
>
> random32 is seeded off get_random_bytes at boot.
Thanks. We'll change it to random32() in our next patchset then.
^ permalink raw reply
* Re: [PATCH net-next-2.6] inetpeer: lower false sharing effect
From: Eric Dumazet @ 2011-06-10 4:47 UTC (permalink / raw)
To: David Miller; +Cc: tim.c.chen, netdev, andi
In-Reply-To: <20110609.204330.2090335955971650557.davem@davemloft.net>
Le jeudi 09 juin 2011 à 20:43 -0700, David Miller a écrit :
> From: Tim Chen <tim.c.chen@linux.intel.com>
> Date: Thu, 09 Jun 2011 17:03:55 -0700
>
> > When I retest with original 3.0-rc2 kernel, inet_putpeer no longer shows
> > up, wonder if dst->peer was not set for some reason.
>
> The overhead will only show up if an inetpeer entry exists for
> the destination IP address.
>
> You can force one to be created, for example, by making a TCP
> connection to that destination.
Or sending big frames, to force ip fragmentation (we store the id
generator in inetpeer cache)
^ permalink raw reply
* [RFC] inetpeer not namespace ready
From: Eric Dumazet @ 2011-06-10 4:44 UTC (permalink / raw)
To: David Miller; +Cc: netdev
David,
Shouldnt we make inetpeer cache namespace aware ?
Same destination IP can be used differently in two different namespaces.
Thanks
^ permalink raw reply
* Re: [PATCH 3/5 net-next] cnic: Randomize initial TCP port for iSCSI connections
From: Eric Dumazet @ 2011-06-10 4:39 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Michael Chan, davem@davemloft.net, netdev@vger.kernel.org,
Eddie Wai
In-Reply-To: <20110609210157.6a1f016b@nehalam.ftrdhcpuser.net>
Le jeudi 09 juin 2011 à 21:01 -0700, Stephen Hemminger a écrit :
> On Thu, 9 Jun 2011 18:08:00 -0700
> "Michael Chan" <mchan@broadcom.com> wrote:
>
> >
> > On Thu, 2011-06-09 at 08:27 -0700, Stephen Hemminger wrote:
> > > On Wed, 8 Jun 2011 22:29:34 -0700
> > > "Michael Chan" <mchan@broadcom.com> wrote:
> > >
> > > > static int cnic_cm_alloc_mem(struct cnic_dev *dev)
> > > > {
> > > > struct cnic_local *cp = dev->cnic_priv;
> > > > + u32 port_id;
> > > >
> > > > cp->csk_tbl = kzalloc(sizeof(struct cnic_sock) * MAX_CM_SK_TBL_SZ,
> > > > GFP_KERNEL);
> > > > if (!cp->csk_tbl)
> > > > return -ENOMEM;
> > > >
> > > > + get_random_bytes(&port_id, sizeof(port_id));
> > >
> > > I think random32() or it's alias net_random() would be sufficient
> > > for your needs here.
> > >
> >
> > random32() is pseudo random so we can get the same number after reboot,
> > right? One scenario is that we may be booting from an iSCSI target, but
> > due to some failure, the user may be rebooting multiple times rapidly.
> > We want to use a different port during each boot.
>
> random32 is seeded off get_random_bytes at boot.
cnic_cm_alloc_mem() is apparently called one time per boot, it seems OK
to call get_random_bytes() in this case ?
^ permalink raw reply
* Re: [PATCH net-next-2.6] inetpeer: lower false sharing effect
From: Eric Dumazet @ 2011-06-10 4:31 UTC (permalink / raw)
To: Tim Chen; +Cc: David Miller, netdev, Andi Kleen
In-Reply-To: <1307664235.17300.44.camel@schen9-DESK>
Le jeudi 09 juin 2011 à 17:03 -0700, Tim Chen a écrit :
> On Thu, 2011-06-09 at 08:26 +0200, Eric Dumazet wrote:
> > Profiles show false sharing in addr_compare() because refcnt/dtime
> > changes dirty the first inet_peer cache line, where are lying the keys
> > used at lookup time. If many cpus are calling inet_getpeer() and
> > inet_putpeer(), or need frag ids, addr_compare() is in 2nd position in
> > "perf top".
> >
>
> I've applied both inetpeer patches. I also no longer have inet_getpeer
> and inet_putpeer and addr_compare in my profile. Instead, neighbor
> lookup is now dominant. See profile below.
>
> When I retest with original 3.0-rc2 kernel, inet_putpeer no longer shows
> up, wonder if dst->peer was not set for some reason.
>
> Tim
>
> - 27.06% memcached [kernel.kallsyms] [k] atomic_add_unless.clone.34
> - atomic_add_unless.clone.34
> - 99.97% neigh_lookup
> __neigh_lookup_errno.clone.17
> arp_bind_neighbour
> rt_intern_hash
> __ip_route_output_key
> ip_route_output_flow
> udp_sendmsg
> inet_sendmsg
> __sock_sendmsg
> sock_sendmsg
> __sys_sendmsg
> sys_sendmsg
> system_call_fastpath
> __sendmsg
> - 13.33% memcached [kernel.kallsyms] [k] atomic_dec_and_test
> - atomic_dec_and_test
> - 99.89% dst_destroy
> - dst_release
> - 98.12% skb_dst_drop.clone.55
> dev_hard_start_xmit
> + sch_direct_xmit
> + 1.88% skb_release_head_state
> - 3.26% memcached [kernel.kallsyms] [k] do_raw_spin_lock
> - do_raw_spin_lock
> - 92.24% _raw_spin_lock
> + 41.39% sch_direct_xmit
>
>
Thanks Tim
I have some questions for further optimizations.
1) How many different destinations are used in your stress load ?
2) Could you provide a distribution of the size of packet lengthes ?
Or maybe the average length would be OK
^ permalink raw reply
* Re: [PATCH 3/5 net-next] cnic: Randomize initial TCP port for iSCSI connections
From: Stephen Hemminger @ 2011-06-10 4:01 UTC (permalink / raw)
To: Michael Chan; +Cc: davem@davemloft.net, netdev@vger.kernel.org, Eddie Wai
In-Reply-To: <1307668080.14980.13.camel@HP1>
On Thu, 9 Jun 2011 18:08:00 -0700
"Michael Chan" <mchan@broadcom.com> wrote:
>
> On Thu, 2011-06-09 at 08:27 -0700, Stephen Hemminger wrote:
> > On Wed, 8 Jun 2011 22:29:34 -0700
> > "Michael Chan" <mchan@broadcom.com> wrote:
> >
> > > static int cnic_cm_alloc_mem(struct cnic_dev *dev)
> > > {
> > > struct cnic_local *cp = dev->cnic_priv;
> > > + u32 port_id;
> > >
> > > cp->csk_tbl = kzalloc(sizeof(struct cnic_sock) * MAX_CM_SK_TBL_SZ,
> > > GFP_KERNEL);
> > > if (!cp->csk_tbl)
> > > return -ENOMEM;
> > >
> > > + get_random_bytes(&port_id, sizeof(port_id));
> >
> > I think random32() or it's alias net_random() would be sufficient
> > for your needs here.
> >
>
> random32() is pseudo random so we can get the same number after reboot,
> right? One scenario is that we may be booting from an iSCSI target, but
> due to some failure, the user may be rebooting multiple times rapidly.
> We want to use a different port during each boot.
random32 is seeded off get_random_bytes at boot.
^ 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