Eric Dumazet | 1 Oct 2009 01:03
Picon

[PATCH] pktgen: Avoid dirtying skb->users when txq is full

Stephen Hemminger a écrit :
> On Tue, 22 Sep 2009 22:49:02 -0700
> Stephen Hemminger <shemminger <at> vyatta.com> wrote:
> 
>> I thought others want to know how to get maximum speed of pktgen.
>>
>> 1. Run nothing else (even X11), just a command line
>> 2. Make sure ethernet flow control is disabled
>>    ethtool -A eth0 autoneg off rx off tx off
>> 3. Make sure clocksource is TSC.  On my old SMP Opteron's
>>    needed to get patch since in 2.6.30 or later, the clock guru's
>>    decided to remove it on all non Intel machines.  Look for patch
>>    than enables "tsc=reliable"
>> 4. Compile Ethernet drivers in, the overhead of the indirect
>>    function call required for modules (or cache footprint),
>>    slows things down.
>> 5. Increase transmit ring size to 1000
>>    ethtool -G eth0 tx 1000
>>

Thanks a lot Stephen.

I did some pktgen session tonight and found one contention on skb->users field
that following patch avoids.

Before patch :
------------------------------------------------------------------------------
   PerfTop:    5187 irqs/sec  kernel:100.0% [100000 cycles],  (all, cpu: 0)
------------------------------------------------------------------------------

(Continue reading)

Andrew Morton | 1 Oct 2009 01:19

Re: [PATCH,TRIVIAL] Fix csum_ipv6_magic asm memory clobber

On Thu, 1 Oct 2009 01:01:38 +0200
Samuel Thibault <samuel.thibault <at> ens-lyon.org> wrote:

> Actually it hit Hurd's pfinetv4 when we tried to compile it with
> gcc-4.3 (bogus checksums).

That's important information!  I updated the changelog and added the
Cc:stable, thanks.

Full patch for netdev benefit:

From: Samuel Thibault <samuel.thibault <at> ens-lyon.org>

Just like ip_fast_csum, the assembly snippet in csum_ipv6_magic needs a
memory clobber, as it is only passed the address of the buffer, not a
memory reference to the buffer itself.

This caused failures in Hurd's pfinetv4 when we tried to compile it with
gcc-4.3 (bogus checksums).

Signed-off-by: Samuel Thibault <samuel.thibault <at> ens-lyon.org>
Cc: Ingo Molnar <mingo <at> elte.hu>
Cc: Thomas Gleixner <tglx <at> linutronix.de>
Cc: "H. Peter Anvin" <hpa <at> zytor.com>
Cc: "David S. Miller" <davem <at> davemloft.net>
Cc: Andi Kleen <andi <at> firstfloor.org>
Cc: <stable <at> kernel.org>
Signed-off-by: Andrew Morton <akpm <at> linux-foundation.org>
---

(Continue reading)

David Miller | 1 Oct 2009 01:23
Favicon

Re: [PATCH] net: Fix sock_wfree() race

From: Eric Dumazet <eric.dumazet <at> gmail.com>
Date: Thu, 24 Sep 2009 22:49:24 +0200

> [PATCH] net: Fix sock_wfree() race
> 
> Commit 2b85a34e911bf483c27cfdd124aeb1605145dc80
> (net: No more expensive sock_hold()/sock_put() on each tx)
> opens a window in sock_wfree() where another cpu
> might free the socket we are working on.
> 
> A fix is to call sk->sk_write_space(sk) while still
> holding a reference on sk.
> 
> 
> Reported-by: Jike Song <albcamus <at> gmail.com>
> Signed-off-by: Eric Dumazet <eric.dumazet <at> gmail.com>

Applied to net-2.6 and I'll queue this up for -stable.

Thanks!
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

David Miller | 1 Oct 2009 01:37
Favicon

Re: [PATCH net-next-2.6] be2net: Workaround to fix a bug in Rx Completion processing.

From: Ajit Khaparde <ajitk <at> serverengines.com>
Date: Wed, 30 Sep 2009 14:37:06 +0530

> vtp bit in RX completion descriptor could be wrongly set in
> some skews of BladEngine.  Ignore this  bit if vtm is not set.
> This patch is against the net-next-2.6 tree.
> 
> Signed-off-by: Ajit Khaparde <ajitk <at> serverengines.com>

This doesn't apply.

Until I start taking new feature patches, net-next-2.6 is just
going to be a stale GIT tree based upon Linus's tree at some
point in time long ago.

net-2.6 is far in front of that, and actually since this is a bug
fix you really should be sending me this patch against that.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

David Miller | 1 Oct 2009 01:40
Favicon

Re: [PATCH] sit: fix off-by-one in ipip6_tunnel_get_prl

From: Sascha Hlusiak <contact <at> saschahlusiak.de>
Date: Tue, 29 Sep 2009 23:27:05 +0200

> When requesting all prl entries (kprl.addr == INADDR_ANY) and there are
> more prl entries than there is space passed from userspace, the existing
> code would always copy cmax+1 entries, which is more than can be handled.
> 
> This patch makes the kernel copy only exactly cmax entries.
> 
> Signed-off-by: Sascha Hlusiak <contact <at> saschahlusiak.de>
> Acked-By: Fred L. Templin <Fred.L.Templin <at> boeing.com>

Applied and queued up for -stable, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

David Miller | 1 Oct 2009 01:41
Favicon

Re: [PATCH] Phonet: fix mutex imbalance

From: Rémi Denis-Courmont <remi <at> remlab.net>
Date: Tue, 29 Sep 2009 10:16:39 +0300

> From: Rémi Denis-Courmont <remi.denis-courmont <at> nokia.com>
> 
> port_mutex was unlocked twice.
> 
> Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont <at> nokia.com>

Applied, thanks!
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

David Miller | 1 Oct 2009 01:43
Favicon

Re: [PATCH] net: restore tx timestamping for accelerated vlans

From: Eric Dumazet <eric.dumazet <at> gmail.com>
Date: Tue, 29 Sep 2009 14:57:37 +0200

> Since commit 9b22ea560957de1484e6b3e8538f7eef202e3596
> ( net: fix packet socket delivery in rx irq handler )
> 
> We lost rx timestamping of packets received on accelerated vlans.
> 
> Effect is that tcpdump on real dev can show strange timings, since it gets rx timestamps
> too late (ie at skb dequeueing time, not at skb queueing time)
 ...
> Signed-off-by: Eric Dumazet <eric.dumazet <at> gmail.com>

Applied, and queued up for -stable, thanks!
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

David Miller | 1 Oct 2009 02:01
Favicon

[GIT]: Networking


1) Make optlen in setsockopt unsigned, providing type level
   protection against several "< 0" issues that tend to
   be (wrongly) addressed at the implementation level.

2) sock_wfree() can race with a cpu freeing up a socket,
   fix from Eric Dumazet.  Lots of people are hitting this
   lately.

3) Off-by-one in ipv6 SIT tunnel driver, fix from Sascha Hlusiak

4) phonet does double mutex unlock, fix from Rémi Denis-Courmont.

5) ax25 sets up destructor callback pointer before state is ready,
   fix from Jarek Poplawski

6) TX timestamping stopped working on hw accelerated VLANs a few
   releases ago, oops, fix from Eric Dumazet.

Please pull, thanks a lot!

The following changes since commit 9c1fe834c1bd7725b411055c66886b64c928083d:
  Linus Torvalds (1):
        Merge branch 'pm-fixes' of git://git.kernel.org/.../rafael/suspend-2.6

are available in the git repository at:

  master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git master

David S. Miller (1):
(Continue reading)

Stephen Hemminger | 1 Oct 2009 02:25
Favicon

Re: [PATCH] pktgen: Avoid dirtying skb->users when txq is full

On Thu, 01 Oct 2009 01:03:33 +0200
Eric Dumazet <eric.dumazet <at> gmail.com> wrote:

> Stephen Hemminger a écrit :
> > On Tue, 22 Sep 2009 22:49:02 -0700
> > Stephen Hemminger <shemminger <at> vyatta.com> wrote:
> > 
> >> I thought others want to know how to get maximum speed of pktgen.
> >>
> >> 1. Run nothing else (even X11), just a command line
> >> 2. Make sure ethernet flow control is disabled
> >>    ethtool -A eth0 autoneg off rx off tx off
> >> 3. Make sure clocksource is TSC.  On my old SMP Opteron's
> >>    needed to get patch since in 2.6.30 or later, the clock guru's
> >>    decided to remove it on all non Intel machines.  Look for patch
> >>    than enables "tsc=reliable"
> >> 4. Compile Ethernet drivers in, the overhead of the indirect
> >>    function call required for modules (or cache footprint),
> >>    slows things down.
> >> 5. Increase transmit ring size to 1000
> >>    ethtool -G eth0 tx 1000
> >>
> 
> Thanks a lot Stephen.
> 
> I did some pktgen session tonight and found one contention on skb->users field
> that following patch avoids.
> 
> 
> Before patch :
(Continue reading)

Stephen Hemminger | 1 Oct 2009 02:28
Favicon

Re: [PATCH] skge: Make sure both ports initialize correctly

On Wed, 23 Sep 2009 22:50:36 +0900
Mike McCormack <mikem <at> ring3k.org> wrote:

> If allocation of the second ports fails, make sure that hw->ports
>  is not 2 otherwise we'll crash trying to access the second port.
> 
> This fix is copied from a similar fix in the sky2 driver (ca519274...),
> but is untested, as I don't have a skge card.
> 
> Signed-off-by: Mike McCormack <mikem <at> ring3k.org>
> ---
>  drivers/net/skge.c |    9 ++++++---
>  1 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/skge.c b/drivers/net/skge.c
> index 62e852e..21b816f 100644
> --- a/drivers/net/skge.c
> +++ b/drivers/net/skge.c
>  <at>  <at>  -3982,14 +3982,17  <at>  <at>  static int __devinit skge_probe(struct pci_dev *pdev,
>  	}
>  	skge_show_addr(dev);
>  
> -	if (hw->ports > 1 && (dev1 = skge_devinit(hw, 1, using_dac))) {
> -		if (register_netdev(dev1) == 0)
> +	if (hw->ports > 1) {
> +		dev1 = skge_devinit(hw, 1, using_dac);
> +		if (dev1 && register_netdev(dev1) == 0)
>  			skge_show_addr(dev1);
>  		else {
>  			/* Failure to register second port need not be fatal */
(Continue reading)


Gmane