Netdev List
 help / color / mirror / Atom feed
From: Dmitry Labutcky <avl@strace.net>
To: netdev@vger.kernel.org
Subject: ifb and gso problem
Date: Fri, 14 Aug 2009 12:50:11 +0300	[thread overview]
Message-ID: <200908141250.11876.avl@strace.net> (raw)

Hello,

I found the problem when redirect egress traffic from ethernet device to ifb when gso is enabled
on ethernet device.

Scenario like this:

eth0: 192.168.1.1/24

# modprobe ifb
# ifconfig ifb0 up
# tc qdisc del dev eth0 root 2>/dev/null
# tc qdisc add dev eth0 root handle 1: htb
# tc qdisc add dev ifb0 root handle 1: prio
# tc filter add dev eth0 parent 1: protocol ip u32 match ip src 192.168.1.1/32 action mirred egress redirect dev ifb0

# ethtool -k eth0
Offload parameters for eth0:
Cannot get device flags: Operation not supported
rx-checksumming: on
tx-checksumming: on
scatter-gather: on
tcp-segmentation-offload: off
udp-fragmentation-offload: off
generic-segmentation-offload: on
generic-receive-offload: off
large-receive-offload: off

When downloading from 192.168.1.1, speed not exceeds 256-300kbit/s on 100mbit link.
After disabling gso - speed becomes 100mbit/s.

Patch below fixed this problem.

# diff -u work/linux-source-2.6.30/net/core/skbuff.c linux-source-2.6.30/net/core/skbuff.c 
--- work/linux-source-2.6.30/net/core/skbuff.c  2009-06-10 06:05:27.000000000 +0300
+++ linux-source-2.6.30/net/core/skbuff.c       2009-08-14 08:54:21.000000000 +0300
@@ -518,6 +518,7 @@
 {
        new->tstamp             = old->tstamp;
        new->dev                = old->dev;
+       new->iif                = old->iif;
        new->transport_header   = old->transport_header;
        new->network_header     = old->network_header;
        new->mac_header         = old->mac_header;
@@ -569,7 +570,6 @@
        n->cloned = 1;
        n->nohdr = 0;
        n->destructor = NULL;
-       C(iif);
        C(tail);
        C(end);
        C(head);


             reply	other threads:[~2009-08-14  9:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-14  9:50 Dmitry Labutcky [this message]
2009-08-14 10:28 ` ifb and gso problem Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200908141250.11876.avl@strace.net \
    --to=avl@strace.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox