DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] RX checksum offloading
@ 2013-11-07  0:00 Benson, Bryan
  2013-11-07  3:09 ` Benson, Bryan
  0 siblings, 1 reply; 8+ messages in thread
From: Benson, Bryan @ 2013-11-07  0:00 UTC (permalink / raw)
  To: dev

All,
Has anyone had any experience with hardware checksum offloads not working?  It appears that the combination of settings we are using in our application may be the crux of the issue, as offloading test-pmd application in csum mode correctly identifies bad packets via the ol_flags.  I am a bit stumped in tracking it down, any help is greatly appreciated!

We are using the 82599 NIC & DPDK 1.3 (with RSC disabled).

Settings:


/* Ethernet Configuration */
static struct rte_eth_conf port_conf = {
    .rxmode = {
        .split_hdr_size = 0,
        .header_split   = 0, /**< Header Split disabled */
        .hw_ip_checksum = 1, /**< IP/UDP/TCP checksum offload enabled. */
        .hw_vlan_filter = 0, /**< VLAN filtering disabled */
        .jumbo_frame    = 0, /**< Jumbo Frame Support disabled */
        .hw_strip_crc   = 1, /**< CRC stripped by hardware */
    },
    .rx_adv_conf = {
        .rss_conf = {
            .rss_key = NULL,
            .rss_hf  = 0x00,
        },
    },
    .txmode = {
    },
};

Thank you,
Bryan Benson
Amazon Web Services

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] RX checksum offloading
  2013-11-07  0:00 [dpdk-dev] RX checksum offloading Benson, Bryan
@ 2013-11-07  3:09 ` Benson, Bryan
  2013-11-07  3:44   ` Benson, Bryan
  0 siblings, 1 reply; 8+ messages in thread
From: Benson, Bryan @ 2013-11-07  3:09 UTC (permalink / raw)
  To: dev

All,
The receive checksum issue seems to be caused by using a RX_FREE_THRESH value that is 32 or larger, as validated by the test-pmd application.
I used 2 different packet types - bad IP checksum sent to port 0 and bad tcp checksum to port 1.  The way I was sending the packets did not vary between the various tests.

Below is a brief summary of the testing - additional gory text is attached.

0, 8, 16, 24, 28, 30, 31 are okay.

Values above 32 are not, as tested with 32, 64 and 128.

I will continue researching this - The version I used to test this is the vanilla version of DPDK 1.3, but with the RSC disable patch applied (helps when there are many ACKs).

Thanks,
Bryan Benson

 [bmbenson]~/1.3.1.1/DPDK% sudo ./x86_64-default-linuxapp-gcc/app/testpmd -c 0xFF00FF00 -n 4 -b 0000:06:00.0 -- --portmask=0x3 --nb-cores=2 --enable-rx-cksum --disable-hw-vlan --disable-rss --crc-strip --rxd=1024 --txd=1024 -i             
... <text removed>
testpmd> set fwd csum
Set csum packet forwarding mode
testpmd> start
  csum packet forwarding - CRC stripping enabled - packets/burst=16
  nb forwarding cores=2 - nb forwarding ports=2
  RX queues=1 - RX desc=1024 - RX free threshold=0
  RX threshold registers: pthresh=8 hthresh=8 wthresh=4
  TX queues=1 - TX desc=1024 - TX free threshold=0
  TX threshold registers: pthresh=36 hthresh=0 wthresh=0
  TX RS bit threshold=0 - TXQ flags=0x0
testpmd> stop

Telling cores to stop...
Waiting for lcores to finish...

  ---------------------- Forward statistics for port 0  ----------------------
  RX-packets: 490511         RX-dropped: 0             RX-total: 490511
  Bad-ipcsum: 490496         Bad-l4csum: 0              
  TX-packets: 488720         TX-dropped: 0             TX-total: 488720
  ----------------------------------------------------------------------------

  ---------------------- Forward statistics for port 1  ----------------------
  RX-packets: 488804         RX-dropped: 0             RX-total: 488804
  Bad-ipcsum: 0              Bad-l4csum: 488704         
  TX-packets: 490511         TX-dropped: 0             TX-total: 490511
  ----------------------------------------------------------------------------

  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
  RX-packets: 979315         RX-dropped: 0             RX-total: 979315
  TX-packets: 979231         TX-dropped: 0             TX-total: 979231
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Done.

[bmbenson]~/1.3.1.1/DPDK% sudo ./x86_64-default-linuxapp-gcc/app/testpmd -c 0xFF00FF00 -n 4 -b 0000:06:00.0 -- --portmask=0x3 --nb-cores=2 --enable-rx-cksum --disable-hw-vlan --disable-rss --crc-strip --rxd=1024 --txd=1024 --rxfreet=32 -i
... <text removed>
testpmd> set fwd csum
Set csum packet forwarding mode
testpmd> start
  csum packet forwarding - CRC stripping enabled - packets/burst=16
  nb forwarding cores=2 - nb forwarding ports=2
  RX queues=1 - RX desc=1024 - RX free threshold=32
  RX threshold registers: pthresh=8 hthresh=8 wthresh=4
  TX queues=1 - TX desc=1024 - TX free threshold=0
  TX threshold registers: pthresh=36 hthresh=0 wthresh=0
  TX RS bit threshold=0 - TXQ flags=0x0
testpmd> stop

Telling cores to stop...
Waiting for lcores to finish...

  ---------------------- Forward statistics for port 0  ----------------------
  RX-packets: 378894         RX-dropped: 0             RX-total: 378894
  Bad-ipcsum: 0              Bad-l4csum: 0              
  TX-packets: 381197         TX-dropped: 0             TX-total: 381197
  ----------------------------------------------------------------------------

  ---------------------- Forward statistics for port 1  ----------------------
  RX-packets: 381197         RX-dropped: 0             RX-total: 381197
  Bad-ipcsum: 0              Bad-l4csum: 0              
  TX-packets: 378894         TX-dropped: 0             TX-total: 378894
  ----------------------------------------------------------------------------

  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
  RX-packets: 760091         RX-dropped: 0             RX-total: 760091
  TX-packets: 760091         TX-dropped: 0             TX-total: 760091
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] RX checksum offloading
  2013-11-07  3:09 ` Benson, Bryan
@ 2013-11-07  3:44   ` Benson, Bryan
  2013-11-07  9:06     ` Thomas Monjalon
  0 siblings, 1 reply; 8+ messages in thread
From: Benson, Bryan @ 2013-11-07  3:44 UTC (permalink / raw)
  To: dev

Didn't realize attachments were stripped - here is the full text - sorry for the SPAM!

== Full text of the rx checksum issues testing & validation ==

0, 8, 16, 24, 28, 30, 31 are okay.

Values above 32 are not (tested with 32, 64 and 128)

 [bmbenson]~/1.3.1.1/DPDK% sudo ./x86_64-default-linuxapp-gcc/app/testpmd -c 0xFF00FF00 -n 4 -b 0000:06:00.0 -- --portmask=0x3 --nb-cores=2 --enable-rx-cksum --disable-hw-vlan --disable-rss --crc-strip --rxd=1024 --txd=1024 -i             
EAL: coremask set to ff00ff00
EAL: Detected lcore 8 as core 0 on socket 0
EAL: Detected lcore 9 as core 1 on socket 0
EAL: Detected lcore 10 as core 2 on socket 0
EAL: Detected lcore 11 as core 3 on socket 0
EAL: Detected lcore 12 as core 4 on socket 0
EAL: Detected lcore 13 as core 5 on socket 0
EAL: Detected lcore 14 as core 6 on socket 0
EAL: Detected lcore 15 as core 7 on socket 0
EAL: Detected lcore 24 as core 0 on socket 0
EAL: Detected lcore 25 as core 1 on socket 0
EAL: Detected lcore 26 as core 2 on socket 0
EAL: Detected lcore 27 as core 3 on socket 0
EAL: Detected lcore 28 as core 4 on socket 0
EAL: Detected lcore 29 as core 5 on socket 0
EAL: Detected lcore 30 as core 6 on socket 0
EAL: Detected lcore 31 as core 7 on socket 0
EAL: Setting up hugepage memory...
EAL: Ask a virtual area of 0x400000000 bytes
EAL: Virtual area found at 0x7f17c0000000 (size = 0x400000000)
EAL: Requesting 16 pages of size 1024MB from socket 0
EAL: WARNING: Cannot mmap /dev/hpet! The TSC will be used instead.
EAL: Master core 8 is ready (tid=dbe54800)
EAL: Core 10 is ready (tid=da68f700)
EAL: Core 12 is ready (tid=d968d700)
EAL: Core 13 is ready (tid=d8e8c700)
EAL: Core 24 is ready (tid=d2ffd700)
EAL: Core 14 is ready (tid=d3fff700)
EAL: Core 25 is ready (tid=d27fc700)
EAL: Core 9 is ready (tid=dae90700)
EAL: Core 15 is ready (tid=d37fe700)
EAL: Core 27 is ready (tid=d17fa700)
EAL: Core 28 is ready (tid=d0ff9700)
EAL: Core 30 is ready (tid=bf7fe700)
EAL: Core 26 is ready (tid=d1ffb700)
EAL: Core 29 is ready (tid=bffff700)
EAL: Core 11 is ready (tid=d9e8e700)
EAL: Core 31 is ready (tid=beffd700)
EAL: probe driver: 8086:10d3 rte_em_pmd
EAL: probe driver: 8086:10fb rte_ixgbe_pmd
EAL: unbind kernel driver /sys/bus/pci/devices/0000:84:00.0/driver/unbind
EAL: bind PCI device 0000:84:00.0
EAL: Device bound
EAL: map PCI resource for device 0000:84:00.0
EAL: PCI memory mapped at 0x7f1bdbdf0000
EAL: probe driver: 8086:10fb rte_ixgbe_pmd
EAL: unbind kernel driver /sys/bus/pci/devices/0000:84:00.1/driver/unbind
EAL: bind PCI device 0000:84:00.1
EAL: Device bound
EAL: map PCI resource for device 0000:84:00.1
EAL: PCI memory mapped at 0x7f1bdbdd0000
Interactive-mode selected
Configuring Port 0
PMD: Disable RSC
PMD: Saved register RXCSUM:3000
Configuring Port 1
PMD: Disable RSC
PMD: Saved register RXCSUM:3000
Checking link statuses...
Port 0 Link Up - speed 10000 Mbps - full-duplex
Port 1 Link Up - speed 10000 Mbps - full-duplex
Done
testpmd> set fwd csum
Set csum packet forwarding mode
testpmd> start
  csum packet forwarding - CRC stripping enabled - packets/burst=16
  nb forwarding cores=2 - nb forwarding ports=2
  RX queues=1 - RX desc=1024 - RX free threshold=0
  RX threshold registers: pthresh=8 hthresh=8 wthresh=4
  TX queues=1 - TX desc=1024 - TX free threshold=0
  TX threshold registers: pthresh=36 hthresh=0 wthresh=0
  TX RS bit threshold=0 - TXQ flags=0x0
testpmd> stop

Telling cores to stop...
Waiting for lcores to finish...

  ---------------------- Forward statistics for port 0  ----------------------
  RX-packets: 490511         RX-dropped: 0             RX-total: 490511
  Bad-ipcsum: 490496         Bad-l4csum: 0              
  TX-packets: 488720         TX-dropped: 0             TX-total: 488720
  ----------------------------------------------------------------------------

  ---------------------- Forward statistics for port 1  ----------------------
  RX-packets: 488804         RX-dropped: 0             RX-total: 488804
  Bad-ipcsum: 0              Bad-l4csum: 488704         
  TX-packets: 490511         TX-dropped: 0             TX-total: 490511
  ----------------------------------------------------------------------------

  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
  RX-packets: 979315         RX-dropped: 0             RX-total: 979315
  TX-packets: 979231         TX-dropped: 0             TX-total: 979231
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Done.

[bmbenson]~/1.3.1.1/DPDK% sudo ./x86_64-default-linuxapp-gcc/app/testpmd -c 0xFF00FF00 -n 4 -b 0000:06:00.0 -- --portmask=0x3 --nb-cores=2 --enable-rx-cksum --disable-hw-vlan --disable-rss --crc-strip --rxd=1024 --txd=1024 --rxfreet=16 -i
EAL: coremask set to ff00ff00
EAL: Detected lcore 8 as core 0 on socket 0
EAL: Detected lcore 9 as core 1 on socket 0
EAL: Detected lcore 10 as core 2 on socket 0
EAL: Detected lcore 11 as core 3 on socket 0
EAL: Detected lcore 12 as core 4 on socket 0
EAL: Detected lcore 13 as core 5 on socket 0
EAL: Detected lcore 14 as core 6 on socket 0
EAL: Detected lcore 15 as core 7 on socket 0
EAL: Detected lcore 24 as core 0 on socket 0
EAL: Detected lcore 25 as core 1 on socket 0
EAL: Detected lcore 26 as core 2 on socket 0
EAL: Detected lcore 27 as core 3 on socket 0
EAL: Detected lcore 28 as core 4 on socket 0
EAL: Detected lcore 29 as core 5 on socket 0
EAL: Detected lcore 30 as core 6 on socket 0
EAL: Detected lcore 31 as core 7 on socket 0
EAL: Setting up hugepage memory...
EAL: Ask a virtual area of 0x400000000 bytes
EAL: Virtual area found at 0x7fdc40000000 (size = 0x400000000)
EAL: Requesting 16 pages of size 1024MB from socket 0
EAL: WARNING: Cannot mmap /dev/hpet! The TSC will be used instead.
EAL: Master core 8 is ready (tid=7476d800)
EAL: Core 9 is ready (tid=737a9700)
EAL: Core 12 is ready (tid=6bfff700)
EAL: Core 15 is ready (tid=70fa4700)
EAL: Core 10 is ready (tid=72fa8700)
EAL: Core 14 is ready (tid=717a5700)
EAL: Core 11 is ready (tid=727a7700)
EAL: Core 13 is ready (tid=71fa6700)
EAL: Core 27 is ready (tid=69ffb700)
EAL: Core 28 is ready (tid=697fa700)
EAL: Core 25 is ready (tid=6affd700)
EAL: Core 31 is ready (tid=5b7fe700)
EAL: Core 24 is ready (tid=6b7fe700)
EAL: Core 30 is ready (tid=5bfff700)
EAL: Core 29 is ready (tid=68ff9700)
EAL: Core 26 is ready (tid=6a7fc700)
EAL: probe driver: 8086:10d3 rte_em_pmd
EAL: probe driver: 8086:10fb rte_ixgbe_pmd
EAL: unbind kernel driver /sys/bus/pci/devices/0000:84:00.0/driver/unbind
EAL: bind PCI device 0000:84:00.0
EAL: Device bound
EAL: map PCI resource for device 0000:84:00.0
EAL: PCI memory mapped at 0x7fe074709000
EAL: probe driver: 8086:10fb rte_ixgbe_pmd
EAL: unbind kernel driver /sys/bus/pci/devices/0000:84:00.1/driver/unbind
EAL: bind PCI device 0000:84:00.1
EAL: Device bound
EAL: map PCI resource for device 0000:84:00.1
EAL: PCI memory mapped at 0x7fe0746e9000
Interactive-mode selected
Configuring Port 0
PMD: Disable RSC
PMD: Saved register RXCSUM:3000Configuring Port 1
PMD: Disable RSC
PMD: Saved register RXCSUM:3000Checking link statuses...
Port 0 Link Up - speed 10000 Mbps - full-duplex
Port 1 Link Up - speed 10000 Mbps - full-duplex
Done
testpmd> set fwd csum
Set csum packet forwarding mode
testpmd> start
  csum packet forwarding - CRC stripping enabled - packets/burst=16
  nb forwarding cores=2 - nb forwarding ports=2
  RX queues=1 - RX desc=1024 - RX free threshold=16
  RX threshold registers: pthresh=8 hthresh=8 wthresh=4
  TX queues=1 - TX desc=1024 - TX free threshold=0
  TX threshold registers: pthresh=36 hthresh=0 wthresh=0
  TX RS bit threshold=0 - TXQ flags=0x0
testpmd> stop

Telling cores to stop...
Waiting for lcores to finish...

  ---------------------- Forward statistics for port 0  ----------------------
  RX-packets: 543761         RX-dropped: 0             RX-total: 543761
  Bad-ipcsum: 543558         Bad-l4csum: 0              
  TX-packets: 542023         TX-dropped: 0             TX-total: 542023
  ----------------------------------------------------------------------------

  ---------------------- Forward statistics for port 1  ----------------------
  RX-packets: 542226         RX-dropped: 0             RX-total: 542226
  Bad-ipcsum: 0              Bad-l4csum: 542005         
  TX-packets: 543575         TX-dropped: 0             TX-total: 543575
  ----------------------------------------------------------------------------

  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
  RX-packets: 1085987        RX-dropped: 0             RX-total: 1085987
  TX-packets: 1085598        TX-dropped: 0             TX-total: 1085598
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Done.
testpmd> quit
Stopping port 0...done
Stopping port 1...done
bye...

== 32 or more testing ==

[bmbenson]~/1.3.1.1/DPDK% sudo ./x86_64-default-linuxapp-gcc/app/testpmd -c 0xFF00FF00 -n 4 -b 0000:06:00.0 -- --portmask=0x3 --nb-cores=2 --enable-rx-cksum --disable-hw-vlan --disable-rss --crc-strip --rxd=1024 --txd=1024 --rxfreet=32 -i
EAL: coremask set to ff00ff00
EAL: Detected lcore 8 as core 0 on socket 0
EAL: Detected lcore 9 as core 1 on socket 0
EAL: Detected lcore 10 as core 2 on socket 0
EAL: Detected lcore 11 as core 3 on socket 0
EAL: Detected lcore 12 as core 4 on socket 0
EAL: Detected lcore 13 as core 5 on socket 0
EAL: Detected lcore 14 as core 6 on socket 0
EAL: Detected lcore 15 as core 7 on socket 0
EAL: Detected lcore 24 as core 0 on socket 0
EAL: Detected lcore 25 as core 1 on socket 0
EAL: Detected lcore 26 as core 2 on socket 0
EAL: Detected lcore 27 as core 3 on socket 0
EAL: Detected lcore 28 as core 4 on socket 0
EAL: Detected lcore 29 as core 5 on socket 0
EAL: Detected lcore 30 as core 6 on socket 0
EAL: Detected lcore 31 as core 7 on socket 0
EAL: Setting up hugepage memory...
EAL: Ask a virtual area of 0x400000000 bytes
EAL: Virtual area found at 0x7f6d00000000 (size = 0x400000000)
EAL: Requesting 16 pages of size 1024MB from socket 0
EAL: WARNING: Cannot mmap /dev/hpet! The TSC will be used instead.
EAL: Master core 8 is ready (tid=581d800)
EAL: Core 9 is ready (tid=4859700)
EAL: Core 10 is ready (tid=4058700)
EAL: Core 12 is ready (tid=3056700)
EAL: Core 27 is ready (tid=1052700)
EAL: Core 29 is ready (tid=fe7fc700)
EAL: Core 24 is ready (tid=2855700)
EAL: Core 25 is ready (tid=2054700)
EAL: Core 11 is ready (tid=3857700)
EAL: Core 30 is ready (tid=fdffb700)
EAL: Core 15 is ready (tid=feffd700)
EAL: Core 13 is ready (tid=fffff700)
EAL: Core 28 is ready (tid=851700)
EAL: Core 31 is ready (tid=fd7fa700)
EAL: Core 14 is ready (tid=ff7fe700)
EAL: Core 26 is ready (tid=1853700)
EAL: probe driver: 8086:10d3 rte_em_pmd
EAL: probe driver: 8086:10fb rte_ixgbe_pmd
EAL: unbind kernel driver /sys/bus/pci/devices/0000:84:00.0/driver/unbind
EAL: bind PCI device 0000:84:00.0
EAL: Device bound
EAL: map PCI resource for device 0000:84:00.0
EAL: PCI memory mapped at 0x7f71057b9000
EAL: probe driver: 8086:10fb rte_ixgbe_pmd
EAL: unbind kernel driver /sys/bus/pci/devices/0000:84:00.1/driver/unbind
EAL: bind PCI device 0000:84:00.1
EAL: Device bound
EAL: map PCI resource for device 0000:84:00.1
EAL: PCI memory mapped at 0x7f7105799000
Interactive-mode selected
Configuring Port 0
PMD: Disable RSC
PMD: Saved register RXCSUM:3000Configuring Port 1
PMD: Disable RSC
PMD: Saved register RXCSUM:3000Checking link statuses...
Port 0 Link Up - speed 10000 Mbps - full-duplex
Port 1 Link Up - speed 10000 Mbps - full-duplex
Done
testpmd> set fwd csum
Set csum packet forwarding mode
testpmd> start
  csum packet forwarding - CRC stripping enabled - packets/burst=16
  nb forwarding cores=2 - nb forwarding ports=2
  RX queues=1 - RX desc=1024 - RX free threshold=32
  RX threshold registers: pthresh=8 hthresh=8 wthresh=4
  TX queues=1 - TX desc=1024 - TX free threshold=0
  TX threshold registers: pthresh=36 hthresh=0 wthresh=0
  TX RS bit threshold=0 - TXQ flags=0x0
testpmd> stop

Telling cores to stop...
Waiting for lcores to finish...

  ---------------------- Forward statistics for port 0  ----------------------
  RX-packets: 378894         RX-dropped: 0             RX-total: 378894
  Bad-ipcsum: 0              Bad-l4csum: 0              
  TX-packets: 381197         TX-dropped: 0             TX-total: 381197
  ----------------------------------------------------------------------------

  ---------------------- Forward statistics for port 1  ----------------------
  RX-packets: 381197         RX-dropped: 0             RX-total: 381197
  Bad-ipcsum: 0              Bad-l4csum: 0              
  TX-packets: 378894         TX-dropped: 0             TX-total: 378894
  ----------------------------------------------------------------------------

  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
  RX-packets: 760091         RX-dropped: 0             RX-total: 760091
  TX-packets: 760091         TX-dropped: 0             TX-total: 760091
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


[bmbenson]~/1.3.1.1/DPDK% sudo ./x86_64-default-linuxapp-gcc/app/testpmd -c 0xFF00FF00 -n 4 -b 0000:06:00.0 -- --portmask=0x3 --nb-cores=2 --enable-rx-cksum --disable-hw-vlan --disable-rss --crc-strip --rxd=1024 --txd=1024 --rxfreet=64 -i
EAL: coremask set to ff00ff00
EAL: Detected lcore 8 as core 0 on socket 0
EAL: Detected lcore 9 as core 1 on socket 0
EAL: Detected lcore 10 as core 2 on socket 0
EAL: Detected lcore 11 as core 3 on socket 0
EAL: Detected lcore 12 as core 4 on socket 0
EAL: Detected lcore 13 as core 5 on socket 0
EAL: Detected lcore 14 as core 6 on socket 0
EAL: Detected lcore 15 as core 7 on socket 0
EAL: Detected lcore 24 as core 0 on socket 0
EAL: Detected lcore 25 as core 1 on socket 0
EAL: Detected lcore 26 as core 2 on socket 0
EAL: Detected lcore 27 as core 3 on socket 0
EAL: Detected lcore 28 as core 4 on socket 0
EAL: Detected lcore 29 as core 5 on socket 0
EAL: Detected lcore 30 as core 6 on socket 0
EAL: Detected lcore 31 as core 7 on socket 0
EAL: Setting up hugepage memory...
EAL: Ask a virtual area of 0x400000000 bytes
EAL: Virtual area found at 0x7f4740000000 (size = 0x400000000)
EAL: Requesting 16 pages of size 1024MB from socket 0
EAL: WARNING: Cannot mmap /dev/hpet! The TSC will be used instead.
EAL: Master core 8 is ready (tid=75cd2800)
EAL: Core 9 is ready (tid=74d0e700)
EAL: Core 12 is ready (tid=6bfff700)
EAL: Core 11 is ready (tid=73d0c700)
EAL: Core 27 is ready (tid=6b7fe700)
EAL: Core 29 is ready (tid=6a7fc700)
EAL: Core 24 is ready (tid=71d08700)
EAL: Core 25 is ready (tid=71507700)
EAL: Core 13 is ready (tid=7350b700)
EAL: Core 28 is ready (tid=6affd700)
EAL: Core 30 is ready (tid=69ffb700)
EAL: Core 31 is ready (tid=697fa700)
EAL: Core 26 is ready (tid=70d06700)
EAL: Core 15 is ready (tid=72509700)
EAL: Core 14 is ready (tid=72d0a700)
EAL: Core 10 is ready (tid=7450d700)
EAL: probe driver: 8086:10d3 rte_em_pmd
EAL: probe driver: 8086:10fb rte_ixgbe_pmd
EAL: unbind kernel driver /sys/bus/pci/devices/0000:84:00.0/driver/unbind
EAL: bind PCI device 0000:84:00.0
EAL: Device bound
EAL: map PCI resource for device 0000:84:00.0
EAL: PCI memory mapped at 0x7f4b75c6e000
EAL: probe driver: 8086:10fb rte_ixgbe_pmd
EAL: unbind kernel driver /sys/bus/pci/devices/0000:84:00.1/driver/unbind
EAL: bind PCI device 0000:84:00.1
EAL: Device bound
EAL: map PCI resource for device 0000:84:00.1
EAL: PCI memory mapped at 0x7f4b75c4e000
Interactive-mode selected
Configuring Port 0
PMD: Disable RSC
PMD: Saved register RXCSUM:3000
Configuring Port 1
PMD: Disable RSC
PMD: Saved register RXCSUM:3000
Checking link statuses...
Port 0 Link Up - speed 10000 Mbps - full-duplex
Port 1 Link Up - speed 10000 Mbps - full-duplex
Done
testpmd> set fwd csum
Set csum packet forwarding mode
testpmd> 
testpmd> start
  csum packet forwarding - CRC stripping enabled - packets/burst=16
  nb forwarding cores=2 - nb forwarding ports=2
  RX queues=1 - RX desc=1024 - RX free threshold=64
  RX threshold registers: pthresh=8 hthresh=8 wthresh=4
  TX queues=1 - TX desc=1024 - TX free threshold=0
  TX threshold registers: pthresh=36 hthresh=0 wthresh=0
  TX RS bit threshold=0 - TXQ flags=0x0
testpmd> stop

Telling cores to stop...
Waiting for lcores to finish...

  ---------------------- Forward statistics for port 0  ----------------------
  RX-packets: 395534         RX-dropped: 0             RX-total: 395534
  Bad-ipcsum: 0              Bad-l4csum: 0              
  TX-packets: 396814         TX-dropped: 0             TX-total: 396814
  ----------------------------------------------------------------------------

  ---------------------- Forward statistics for port 1  ----------------------
  RX-packets: 396814         RX-dropped: 0             RX-total: 396814
  Bad-ipcsum: 0              Bad-l4csum: 0              
  TX-packets: 395534         TX-dropped: 0             TX-total: 395534
  ----------------------------------------------------------------------------

  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
  RX-packets: 792348         RX-dropped: 0             RX-total: 792348
  TX-packets: 792348         TX-dropped: 0             TX-total: 792348
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



[bmbenson]~/1.3.1.1/DPDK% sudo ./x86_64-default-linuxapp-gcc/app/testpmd -c 0xFF00FF00 -n 4 -b 0000:06:00.0 -- --portmask=0x3 --nb-cores=2 --enable-rx-cksum --disable-hw-vlan --disable-rss --crc-strip --rxd=1024 --txd=1024 --rxfreet=128 -i
[sudo] password for bmbenson: 
EAL: coremask set to ff00ff00
EAL: Detected lcore 8 as core 0 on socket 0
EAL: Detected lcore 9 as core 1 on socket 0
EAL: Detected lcore 10 as core 2 on socket 0
EAL: Detected lcore 11 as core 3 on socket 0
EAL: Detected lcore 12 as core 4 on socket 0
EAL: Detected lcore 13 as core 5 on socket 0
EAL: Detected lcore 14 as core 6 on socket 0
EAL: Detected lcore 15 as core 7 on socket 0
EAL: Detected lcore 24 as core 0 on socket 0
EAL: Detected lcore 25 as core 1 on socket 0
EAL: Detected lcore 26 as core 2 on socket 0
EAL: Detected lcore 27 as core 3 on socket 0
EAL: Detected lcore 28 as core 4 on socket 0
EAL: Detected lcore 29 as core 5 on socket 0
EAL: Detected lcore 30 as core 6 on socket 0
EAL: Detected lcore 31 as core 7 on socket 0
EAL: Setting up hugepage memory...
EAL: Ask a virtual area of 0x400000000 bytes
EAL: Virtual area found at 0x7f9f40000000 (size = 0x400000000)
EAL: Requesting 16 pages of size 1024MB from socket 0
EAL: WARNING: Cannot mmap /dev/hpet! The TSC will be used instead.
EAL: Master core 8 is ready (tid=4d24b800)
EAL: Core 9 is ready (tid=4c287700)
EAL: Core 10 is ready (tid=4ba86700)
EAL: Core 14 is ready (tid=3ffff700)
EAL: Core 25 is ready (tid=49a82700)
EAL: Core 29 is ready (tid=377fe700)
EAL: Core 30 is ready (tid=36ffd700)
EAL: Core 15 is ready (tid=3f7fe700)
EAL: Core 26 is ready (tid=49281700)
EAL: Core 27 is ready (tid=48a80700)
EAL: Core 13 is ready (tid=4a283700)
EAL: Core 31 is ready (tid=3e7fc700)
EAL: Core 11 is ready (tid=4b285700)
EAL: Core 12 is ready (tid=4aa84700)
EAL: Core 28 is ready (tid=37fff700)
EAL: Core 24 is ready (tid=3effd700)
EAL: probe driver: 8086:10d3 rte_em_pmd
EAL: probe driver: 8086:10fb rte_ixgbe_pmd
EAL: unbind kernel driver /sys/bus/pci/devices/0000:84:00.0/driver/unbind
EAL: bind PCI device 0000:84:00.0
EAL: Device bound
EAL: map PCI resource for device 0000:84:00.0
EAL: PCI memory mapped at 0x7fa34d1e7000
EAL: probe driver: 8086:10fb rte_ixgbe_pmd
EAL: unbind kernel driver /sys/bus/pci/devices/0000:84:00.1/driver/unbind
EAL: bind PCI device 0000:84:00.1
EAL: Device bound
EAL: map PCI resource for device 0000:84:00.1
EAL: PCI memory mapped at 0x7fa34d1c7000
Interactive-mode selected
Configuring Port 0
PMD: Disable RSC
PMD: Saved register RXCSUM:3000
Configuring Port 1
PMD: Disable RSC
PMD: Saved register RXCSUM:3000
Checking link statuses...
Port 0 Link Up - speed 10000 Mbps - full-duplex
Port 1 Link Up - speed 10000 Mbps - full-duplex
Done
testpmd> set fwd csum
Set csum packet forwarding mode
testpmd> start
  csum packet forwarding - CRC stripping enabled - packets/burst=16
  nb forwarding cores=2 - nb forwarding ports=2
  RX queues=1 - RX desc=1024 - RX free threshold=128
  RX threshold registers: pthresh=8 hthresh=8 wthresh=4
  TX queues=1 - TX desc=1024 - TX free threshold=0
  TX threshold registers: pthresh=36 hthresh=0 wthresh=0
  TX RS bit threshold=0 - TXQ flags=0x0
testpmd> stop

Telling cores to stop...
Waiting for lcores to finish...

  ---------------------- Forward statistics for port 0  ----------------------
  RX-packets: 372239         RX-dropped: 0             RX-total: 372239
  Bad-ipcsum: 0              Bad-l4csum: 0              
  TX-packets: 375310         TX-dropped: 0             TX-total: 375310
  ----------------------------------------------------------------------------

  ---------------------- Forward statistics for port 1  ----------------------
  RX-packets: 375310         RX-dropped: 0             RX-total: 375310
  Bad-ipcsum: 0              Bad-l4csum: 0              
  TX-packets: 372239         TX-dropped: 0             TX-total: 372239
  ----------------------------------------------------------------------------

  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
  RX-packets: 747549         RX-dropped: 0             RX-total: 747549
  TX-packets: 747549         TX-dropped: 0             TX-total: 747549
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Done.




________________________________________
From: dev [dev-bounces@dpdk.org] on behalf of Benson, Bryan
Sent: Wednesday, November 06, 2013 7:09 PM
To: dev@dpdk.org
Subject: Re: [dpdk-dev] RX checksum offloading

All,
The receive checksum issue seems to be caused by using a RX_FREE_THRESH value that is 32 or larger, as validated by the test-pmd application.
I used 2 different packet types - bad IP checksum sent to port 0 and bad tcp checksum to port 1.  The way I was sending the packets did not vary between the various tests.

Below is a brief summary of the testing - additional gory text is attached.

0, 8, 16, 24, 28, 30, 31 are okay.

Values above 32 are not, as tested with 32, 64 and 128.

I will continue researching this - The version I used to test this is the vanilla version of DPDK 1.3, but with the RSC disable patch applied (helps when there are many ACKs).

Thanks,
Bryan Benson

 [bmbenson]~/1.3.1.1/DPDK% sudo ./x86_64-default-linuxapp-gcc/app/testpmd -c 0xFF00FF00 -n 4 -b 0000:06:00.0 -- --portmask=0x3 --nb-cores=2 --enable-rx-cksum --disable-hw-vlan --disable-rss --crc-strip --rxd=1024 --txd=1024 -i
... <text removed>
testpmd> set fwd csum
Set csum packet forwarding mode
testpmd> start
  csum packet forwarding - CRC stripping enabled - packets/burst=16
  nb forwarding cores=2 - nb forwarding ports=2
  RX queues=1 - RX desc=1024 - RX free threshold=0
  RX threshold registers: pthresh=8 hthresh=8 wthresh=4
  TX queues=1 - TX desc=1024 - TX free threshold=0
  TX threshold registers: pthresh=36 hthresh=0 wthresh=0
  TX RS bit threshold=0 - TXQ flags=0x0
testpmd> stop

Telling cores to stop...
Waiting for lcores to finish...

  ---------------------- Forward statistics for port 0  ----------------------
  RX-packets: 490511         RX-dropped: 0             RX-total: 490511
  Bad-ipcsum: 490496         Bad-l4csum: 0
  TX-packets: 488720         TX-dropped: 0             TX-total: 488720
  ----------------------------------------------------------------------------

  ---------------------- Forward statistics for port 1  ----------------------
  RX-packets: 488804         RX-dropped: 0             RX-total: 488804
  Bad-ipcsum: 0              Bad-l4csum: 488704
  TX-packets: 490511         TX-dropped: 0             TX-total: 490511
  ----------------------------------------------------------------------------

  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
  RX-packets: 979315         RX-dropped: 0             RX-total: 979315
  TX-packets: 979231         TX-dropped: 0             TX-total: 979231
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Done.

[bmbenson]~/1.3.1.1/DPDK% sudo ./x86_64-default-linuxapp-gcc/app/testpmd -c 0xFF00FF00 -n 4 -b 0000:06:00.0 -- --portmask=0x3 --nb-cores=2 --enable-rx-cksum --disable-hw-vlan --disable-rss --crc-strip --rxd=1024 --txd=1024 --rxfreet=32 -i
... <text removed>
testpmd> set fwd csum
Set csum packet forwarding mode
testpmd> start
  csum packet forwarding - CRC stripping enabled - packets/burst=16
  nb forwarding cores=2 - nb forwarding ports=2
  RX queues=1 - RX desc=1024 - RX free threshold=32
  RX threshold registers: pthresh=8 hthresh=8 wthresh=4
  TX queues=1 - TX desc=1024 - TX free threshold=0
  TX threshold registers: pthresh=36 hthresh=0 wthresh=0
  TX RS bit threshold=0 - TXQ flags=0x0
testpmd> stop

Telling cores to stop...
Waiting for lcores to finish...

  ---------------------- Forward statistics for port 0  ----------------------
  RX-packets: 378894         RX-dropped: 0             RX-total: 378894
  Bad-ipcsum: 0              Bad-l4csum: 0
  TX-packets: 381197         TX-dropped: 0             TX-total: 381197
  ----------------------------------------------------------------------------

  ---------------------- Forward statistics for port 1  ----------------------
  RX-packets: 381197         RX-dropped: 0             RX-total: 381197
  Bad-ipcsum: 0              Bad-l4csum: 0
  TX-packets: 378894         TX-dropped: 0             TX-total: 378894
  ----------------------------------------------------------------------------

  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
  RX-packets: 760091         RX-dropped: 0             RX-total: 760091
  TX-packets: 760091         TX-dropped: 0             TX-total: 760091
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] RX checksum offloading
  2013-11-07  3:44   ` Benson, Bryan
@ 2013-11-07  9:06     ` Thomas Monjalon
  2013-11-07 11:44       ` Thomas Monjalon
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Monjalon @ 2013-11-07  9:06 UTC (permalink / raw)
  To: Benson, Bryan; +Cc: dev

07/11/2013 04:44, Benson, Bryan :
>   RX queues=1 - RX desc=1024 - RX free threshold=16
> ---------------------- Forward statistics for port 0 
>  RX-total: 543761 Bad-ipcsum: 543558         Bad-l4csum: 0
> ---------------------- Forward statistics for port 1 
>  RX-total: 542226 Bad-ipcsum: 0              Bad-l4csum: 542005
>
>   RX queues=1 - RX desc=1024 - RX free threshold=32
> ---------------------- Forward statistics for port 0 
>  RX-total: 378894 Bad-ipcsum: 0              Bad-l4csum: 0
> ---------------------- Forward statistics for port 1 
>  RX-total: 381197 Bad-ipcsum: 0              Bad-l4csum: 0

Excellent report, thank you !

We need to fix it now :)
-- 
Thomas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] RX checksum offloading
  2013-11-07  9:06     ` Thomas Monjalon
@ 2013-11-07 11:44       ` Thomas Monjalon
  2013-11-07 21:53         ` Benson, Bryan
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Monjalon @ 2013-11-07 11:44 UTC (permalink / raw)
  To: Benson, Bryan; +Cc: dev

07/11/2013 10:06, Thomas Monjalon :
> 07/11/2013 04:44, Benson, Bryan :
> >   RX queues=1 - RX desc=1024 - RX free threshold=16
> > 
> > ---------------------- Forward statistics for port 0
> > 
> >  RX-total: 543761 Bad-ipcsum: 543558         Bad-l4csum: 0
> > 
> > ---------------------- Forward statistics for port 1
> > 
> >  RX-total: 542226 Bad-ipcsum: 0              Bad-l4csum: 542005
> >  
> >   RX queues=1 - RX desc=1024 - RX free threshold=32
> > 
> > ---------------------- Forward statistics for port 0
> > 
> >  RX-total: 378894 Bad-ipcsum: 0              Bad-l4csum: 0
> > 
> > ---------------------- Forward statistics for port 1
> > 
> >  RX-total: 381197 Bad-ipcsum: 0              Bad-l4csum: 0
> 
> Excellent report, thank you !
> 
> We need to fix it now :)

LiuFeng had seen this issue with additonal comments:
	http://www.dpdk.org/ml/archives/dev/2013-September/000529.html

-- 
Thomas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] RX checksum offloading
  2013-11-07 11:44       ` Thomas Monjalon
@ 2013-11-07 21:53         ` Benson, Bryan
  0 siblings, 0 replies; 8+ messages in thread
From: Benson, Bryan @ 2013-11-07 21:53 UTC (permalink / raw)
  To: dev

All,
below is the validation of the submitted patch - I used the default rx free thresh (0) and 64 & it now works for both cases.

Thank you!
Bryan Benson

-- Validation --

[bmbenson]~/1.3.1.1/DPDK% sudo ./x86_64-default-linuxapp-gcc/app/testpmd -c 0xFF00FF00 -n 4 -b 0000:06:00.0 -- --portmask=0x3 --nb-cores=2 --enable-rx-cksum --disable-hw-vlan --disable-rss --crc-strip --rxd=1024 --txd=1024 -i
... <Text Removed> ...
testpmd> set fwd csum
Set csum packet forwarding mode
testpmd> start
  csum packet forwarding - CRC stripping enabled - packets/burst=16
  nb forwarding cores=2 - nb forwarding ports=2
  RX queues=1 - RX desc=1024 - RX free threshold=0
  RX threshold registers: pthresh=8 hthresh=8 wthresh=4
  TX queues=1 - TX desc=1024 - TX free threshold=0
  TX threshold registers: pthresh=36 hthresh=0 wthresh=0
  TX RS bit threshold=0 - TXQ flags=0x0
testpmd> stop

Telling cores to stop...
Waiting for lcores to finish...

  ---------------------- Forward statistics for port 0  ----------------------
  RX-packets: 505103         RX-dropped: 0             RX-total: 505103
  Bad-ipcsum: 505088         Bad-l4csum: 0              
  TX-packets: 508688         TX-dropped: 0             TX-total: 508688
  ----------------------------------------------------------------------------

  ---------------------- Forward statistics for port 1  ----------------------
  RX-packets: 508944         RX-dropped: 0             RX-total: 508944
  Bad-ipcsum: 0              Bad-l4csum: 508672         
  TX-packets: 505103         TX-dropped: 0             TX-total: 505103
  ----------------------------------------------------------------------------

  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
  RX-packets: 1014047        RX-dropped: 0             RX-total: 1014047
  TX-packets: 1013791        TX-dropped: 0             TX-total: 1013791
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Done.
testpmd> quit


[bmbenson]~/1.3.1.1/DPDK% sudo ./x86_64-default-linuxapp-gcc/app/testpmd -c 0xFF00FF00 -n 4 -b 0000:06:00.0 -- --portmask=0x3 --nb-cores=2 --enable-rx-cksum --disable-hw-vlan --disable-rss --crc-strip --rxd=1024 --txd=1024  --rxfreet=64 -i
... <Text Removed> ...
testpmd> set fwd csum
Set csum packet forwarding mode
testpmd> start
  csum packet forwarding - CRC stripping enabled - packets/burst=16
  nb forwarding cores=2 - nb forwarding ports=2
  RX queues=1 - RX desc=1024 - RX free threshold=64
  RX threshold registers: pthresh=8 hthresh=8 wthresh=4
  TX queues=1 - TX desc=1024 - TX free threshold=0
  TX threshold registers: pthresh=36 hthresh=0 wthresh=0
  TX RS bit threshold=0 - TXQ flags=0x0
testpmd> stop
Telling cores to stop...
Waiting for lcores to finish...

  ---------------------- Forward statistics for port 0  ----------------------
  RX-packets: 314382         RX-dropped: 0             RX-total: 314382
  Bad-ipcsum: 314368         Bad-l4csum: 0              
  TX-packets: 317453         TX-dropped: 0             TX-total: 317453
  ----------------------------------------------------------------------------

  ---------------------- Forward statistics for port 1  ----------------------
  RX-packets: 317492         RX-dropped: 0             RX-total: 317492
  Bad-ipcsum: 0              Bad-l4csum: 317440         
  TX-packets: 314382         TX-dropped: 0             TX-total: 314382
  ----------------------------------------------------------------------------

  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
  RX-packets: 631874         RX-dropped: 0             RX-total: 631874
  TX-packets: 631835         TX-dropped: 0             TX-total: 631835
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


________________________________________
From: Thomas Monjalon [thomas.monjalon@6wind.com]
Sent: Thursday, November 07, 2013 3:44 AM
To: Benson, Bryan
Cc: dev@dpdk.org; LiuFeng
Subject: Re: [dpdk-dev] RX checksum offloading

07/11/2013 10:06, Thomas Monjalon :
> 07/11/2013 04:44, Benson, Bryan :
> >   RX queues=1 - RX desc=1024 - RX free threshold=16
> >
> > ---------------------- Forward statistics for port 0
> >
> >  RX-total: 543761 Bad-ipcsum: 543558         Bad-l4csum: 0
> >
> > ---------------------- Forward statistics for port 1
> >
> >  RX-total: 542226 Bad-ipcsum: 0              Bad-l4csum: 542005
> >
> >   RX queues=1 - RX desc=1024 - RX free threshold=32
> >
> > ---------------------- Forward statistics for port 0
> >
> >  RX-total: 378894 Bad-ipcsum: 0              Bad-l4csum: 0
> >
> > ---------------------- Forward statistics for port 1
> >
> >  RX-total: 381197 Bad-ipcsum: 0              Bad-l4csum: 0
>
> Excellent report, thank you !
>
> We need to fix it now :)

LiuFeng had seen this issue with additonal comments:
        http://www.dpdk.org/ml/archives/dev/2013-September/000529.html

--
Thomas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] RX checksum offloading
  2013-11-07 21:50 Benson, Bryan
@ 2013-11-08 10:27 ` Thomas Monjalon
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Monjalon @ 2013-11-08 10:27 UTC (permalink / raw)
  To: Benson, Bryan; +Cc: dev

07/11/2013 22:50, Benson, Bryan :
> I have prepared a patch for the issue.  If it is not in the correct format,
> please advise.

First of all, thank you for the patch.

My comments on the format:

1) The content type is quoted-printable. So it cannot be applied wihtout 
modifications.
Please use git-send-email to send patches.

2) Please set a shorter title and longer explanation in the commit log.

Guidelines should be written on the web site. Probably coming soon.
-- 
Thomas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] RX checksum offloading
@ 2013-11-07 21:50 Benson, Bryan
  2013-11-08 10:27 ` Thomas Monjalon
  0 siblings, 1 reply; 8+ messages in thread
From: Benson, Bryan @ 2013-11-07 21:50 UTC (permalink / raw)
  To: dev

All,
I have prepared a patch for the issue.  If it is not in the correct format, please advise.  I also changed the array to be uint32_t to be consistent with the other functions that pull the status flags.

== PATCH BEGIN ==
>From 2ab73e88d92044c1d840f896d87e9a8cbcf29ce4 Mon Sep 17 00:00:00 2001
From: Bryan Benson <bmbenson@amazon.com>
Date: Thu, 7 Nov 2013 21:38:57 +0000
Subject: [PATCH] Do not unset the status bits in the scan_hw_ring function
 when counting the number of done descriptors.

---
 inteldpdk/DPDK/lib/librte_pmd_ixgbe/ixgbe_rxtx.c |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/inteldpdk/DPDK/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/inteldpdk/DPDK/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
index 2be9979..c4abf9a 100755
--- a/inteldpdk/DPDK/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
+++ b/inteldpdk/DPDK/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
@@ -1037,7 +1037,8 @@ ixgbe_rx_scan_hw_ring(struct igb_rx_queue *rxq)
        struct igb_rx_entry *rxep;
        struct rte_mbuf *mb;
        uint16_t pkt_len;
-       int s[LOOK_AHEAD], nb_dd;
+       uint32_t s[LOOK_AHEAD];
+       int nb_dd;
        int i, j, nb_rx = 0;
 
 
@@ -1060,12 +1061,12 @@ ixgbe_rx_scan_hw_ring(struct igb_rx_queue *rxq)
                for (j = LOOK_AHEAD-1; j >= 0; --j)
                        s[j] = rxdp[j].wb.upper.status_error;
 
-               /* Clear everything but the status bits (LSB) */
-               for (j = 0; j < LOOK_AHEAD; ++j)
-                       s[j] &= IXGBE_RXDADV_STAT_DD;
+               nb_dd = 0;
+               /* add to nd_dd when the status bit is set (LSB) */
+               for (j = 0; j < LOOK_AHEAD; ++j) {
+                       nb_dd += s[j] & IXGBE_RXDADV_STAT_DD;
+               }
 
-               /* Compute how many status bits were set */
-               nb_dd = s[0]+s[1]+s[2]+s[3]+s[4]+s[5]+s[6]+s[7];
                nb_rx += nb_dd;
 
                /* Translate descriptor info to mbuf format */
-- 
1.7.9.5

== PATCH END ==

A validation text email will follow.

Thank you,
Bryan Benson
Amazon Web Services
________________________________________
From: Thomas Monjalon [thomas.monjalon@6wind.com]
Sent: Thursday, November 07, 2013 3:44 AM
To: Benson, Bryan
Cc: dev@dpdk.org; LiuFeng
Subject: Re: [dpdk-dev] RX checksum offloading

07/11/2013 10:06, Thomas Monjalon :
> 07/11/2013 04:44, Benson, Bryan :
> >   RX queues=1 - RX desc=1024 - RX free threshold=16
> >
> > ---------------------- Forward statistics for port 0
> >
> >  RX-total: 543761 Bad-ipcsum: 543558         Bad-l4csum: 0
> >
> > ---------------------- Forward statistics for port 1
> >
> >  RX-total: 542226 Bad-ipcsum: 0              Bad-l4csum: 542005
> >
> >   RX queues=1 - RX desc=1024 - RX free threshold=32
> >
> > ---------------------- Forward statistics for port 0
> >
> >  RX-total: 378894 Bad-ipcsum: 0              Bad-l4csum: 0
> >
> > ---------------------- Forward statistics for port 1
> >
> >  RX-total: 381197 Bad-ipcsum: 0              Bad-l4csum: 0
>
> Excellent report, thank you !
>
> We need to fix it now :)

LiuFeng had seen this issue with additonal comments:
        http://www.dpdk.org/ml/archives/dev/2013-September/000529.html

--
Thomas



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-11-08 10:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-07  0:00 [dpdk-dev] RX checksum offloading Benson, Bryan
2013-11-07  3:09 ` Benson, Bryan
2013-11-07  3:44   ` Benson, Bryan
2013-11-07  9:06     ` Thomas Monjalon
2013-11-07 11:44       ` Thomas Monjalon
2013-11-07 21:53         ` Benson, Bryan
2013-11-07 21:50 Benson, Bryan
2013-11-08 10:27 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).