On 21.5.2023. 22:41, Alexander Bluhm wrote:
> Hi,
> 
> When sending TCP packets with software TSO to the local address of
> a physical interface, the TCP checksum was miscalculated.
> 
> This bug was triggered on loopback interface, when sending to the
> local interface address of a physical interface.  Due to another
> bug, the smaller MTU of the physical interface was used.  Then the
> packet was sent without TSO chopping as it did fit the larger MTU
> of the loopback interface.  Although the loopback interface does
> not support hardware TSO, the modified TCP pseudo header checksum
> for hardware TSO checksum offloading was calculated.
> 
> Please test with and without hardware TSO.

Hi,

in lab i have:

ix0: flags=2008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LRO> mtu 1500
        inet 192.168.100.14 netmask 0xffffff00 broadcast 192.168.100.255
        inet6 fe80::225:90ff:fe5d:ca38%ix0 prefixlen 64 scopeid 0x1
        inet6 192:168:1000:1000::114 prefixlen 64

lo123: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 32768
        inet 10.156.156.1 netmask 0xffffff00
        inet6 fe80::1%lo123 prefixlen 64 scopeid 0xd
        inet6 192:168:1560:1560::114 prefixlen 64


iperf3 -s6 -B 192:168:1000:1000::114 <- server
iperf3 -6 -B 192:168:1560:1560::114 -c 192:168:1000:1000::114 <- client

iperf3 -s -B 192.168.100.14 -p 5202 <- server
iperf3 -B 10.156.156.1 -c 192.168.100.14 -p 5202 <- client


without this diff and with net.inet.tcp.tso=1 I'm getting few Kbps over
ip4 and ip6. with net.inet.tcp.tso=0 i'm getting cca 650Mbps

smc4# netstat -sp tcp | grep TSO
                0 output TSO packets software chopped
                0 output TSO packets hardware processed
                0 output TSO packets generated
                0 output TSO packets dropped



With this diff and with net.inet.tcp.tso=1 i'm getting 2Gbps over ip4
and 2Gbps over ip6. with net.inet.tcp.tso=0 650Mbps.

smc4# netstat -sp tcp | grep TSO
                157397 output TSO packets software chopped
                0 output TSO packets hardware processed
                4076665 output TSO packets generated
                0 output TSO packets dropped

Reply via email to