lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200908141250.11876.avl@strace.net>
Date:	Fri, 14 Aug 2009 12:50:11 +0300
From:	Dmitry Labutcky <avl@...ace.net>
To:	netdev@...r.kernel.org
Subject: ifb and gso problem

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);

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ