Hi All

I am running some tests on ixgbe driver.

I have found that IP level verify the vlan packets checksum.
But the packets checksum have been verified by HW (ixgbe cards) .
So I think IP need not verify them again.

It will cause performance regression on vlan interface.

Does all the vlan packets from the ixgbe (hw checksum offload enabled) need verify the checksum again by stack?

The test results:

Test machines, springwater.prc, witnercrop.prc

Springwater:
ifconfig -a
[r...@springwater]~# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
       inet 127.0.0.1 netmask ff000000
ixgbe1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
       inet 11.0.0.1 netmask ffffff00 broadcast 11.0.0.255
       ether 0:1b:21:3c:a2:dd
ixgbe2001: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 4
       inet 111.1.1.1 netmask ffffff00 broadcast 111.1.1.255
       ether 0:1b:21:3c:a2:dd

wintercrop:

[r...@wintercrop]ncs.nic# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
       inet 127.0.0.1 netmask ff000000
ixgbe0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
       inet 11.0.0.2 netmask ffffff00 broadcast 11.0.0.255
       ether 0:1b:21:1a:53:43
ixgbe2000: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 4
       inet 111.1.1.2 netmask ffffff00 broadcast 111.1.1.255
       ether 0:1b:21:1a:53:43


Run uperftest on wintercrop

[r...@wintercrop]ncs.nic# ./runuperf.sh -c  11.0.0.1  -t tcptx
Setting up client 11.0.0.1
Waiting for the clients to be set up
Running PCS test tcptx
Running test    1

Since ixgbe1 on springwater has enabled HW Checksum offload, ip stack will no re-check the chksum.

kstat ip  1 | grep ip_in_sw_cksum

The ip_in_sw_cksum will no increase during the tests for packets from ixgbe1 interface.


Then I run the tests on vlan interface

[r...@wintercrop]ncs.nic# ./runuperf.sh -c  111.1.1.1  -t tcptx
Setting up client 111.1.1.1
Waiting for the clients to be set up
Running PCS test tcptx
Running test    1

kstat ip  1 | grep ip_in_sw_cksum

I found IP using ip_input_sw_cksum_v4 to verify the vlan packets checksum.

The ip_in_sw_chksum increased during the tests.

[r...@springwater]~# kstat ip  1 | grep ip_in_sw_cksum

       ip_in_sw_cksum                  1231
       ip_in_sw_cksum                  1231
       ip_in_sw_cksum                  1240
       ip_in_sw_cksum                  1240
       ip_in_sw_cksum                  1240
       ip_in_sw_cksum                  1253
       ip_in_sw_cksum                  1318
       ip_in_sw_cksum                  25788
       ip_in_sw_cksum                  97959
       ip_in_sw_cksum                  169680
       ip_in_sw_cksum                  239426
       ip_in_sw_cksum                  308676
       ip_in_sw_cksum                  377048

Since the vlan interface based on ixgbe1 with HW checksum enabled.

[r...@springwater] dladm create-vlan -l ixgbe1 -v 2 ixgbe2001

I think the vlan interface also have the capability.

And IP level need not verfiy it again.

The code in ip_input.c

   if ((iraflags & IRAF_NO_HW_CKSUM) || !ILL_HCKSUM_CAPABLE(ill) ||
       !dohwcksum) {
       return (ip_input_sw_cksum_v4(mp, ipha, ira));
   }

ILL_HCKSUM_CAPABLE(ill) for the vlan interface packets should have the HW checksum capability too.


Thanks,
Winson








_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to