DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] ixgbe and UDP with zero checksum
@ 2021-01-27 13:49 Paolo Valerio
  2021-01-27 17:26 ` Wang, Haiyue
  0 siblings, 1 reply; 9+ messages in thread
From: Paolo Valerio @ 2021-01-27 13:49 UTC (permalink / raw)
  To: dev; +Cc: jia.guo, haiyue.wang, Aaron Conole

Hi,

performing some tests, I noticed that on ixgbe when receiving UDP
packets with zero checksum (no checksum) over IPv4, the corresponding
ol_flag for the l4 checksum is set to PKT_RX_L4_CKSUM_BAD.

In particular, this apparently has an impact on OvS using ct() action
where UDP packets with zero checksum are not tracked because of that.

I also verified it using testpmd (on 20.11 and using the latest sources):

# lshw -businfo -c network
Bus info          Device     Class          Description
=======================================================
pci@0000:01:00.0  em1        network        82599ES 10-Gigabit SFI/SFP+ Network Connection
pci@0000:01:00.1  em2        network        82599ES 10-Gigabit SFI/SFP+ Network Connection

testpmd -l 2,4 -w 0000:01:00.0 -- -i --port-topology=chained --enable-rx-cksum
testpmd> show device info all

********************* Infos for device 0000:01:00.0 *********************
Bus name: pci
Driver name: net_ixgbe
Devargs: 
Connect to socket: 0

        Port id: 0 
        MAC address: EC:F4:BB:DB:FC:18
        Device name: 0000:01:00.0
        Device speed capability: 1 Gbps   10 Gbps


testpmd> set fwd rxonly
testpmd> set verbose 1
testpmd> start

and sending packets from a tester machine using scapy (w/ non zero and zero checksum):

sendp(Ether(src="ec:f4:bb:dc:09:d0",dst="ec:f4:bb:db:fc:18")/IP(src="192.168.30.200", dst="192.168.30.100")/UDP()/Raw("a"*100), iface="em1")

sendp(Ether(src="ec:f4:bb:dc:09:d0",dst="ec:f4:bb:db:fc:18")/IP(src="192.168.30.200", dst="192.168.30.100")/UDP(chksum=0)/Raw("a"*100), iface="em1")

the results are respectively:

port 0/queue 0: received 1 packets
  src=EC:F4:BB:DC:09:D0 - dst=EC:F4:BB:DB:FC:18 - type=0x0800 - length=142 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4 L4_UDP  - sw ptype: L2_ETHER L3_IPV4 L4_UDP  - l2_len=14 - l3_len=20 - l4_len=8 - Receive queue=0x0
  ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN

port 0/queue 0: received 1 packets
  src=EC:F4:BB:DC:09:D0 - dst=EC:F4:BB:DB:FC:18 - type=0x0800 - length=142 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4 L4_UDP  - sw ptype: L2_ETHER L3_IPV4 L4_UDP  - l2_len=14 - l3_len=20 - l4_len=8 - Receive queue=0x0
  ol_flags: PKT_RX_L4_CKSUM_BAD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN

Considering that the checksum for UDP over IPv4 can be optionally
disabled by the sender (although usually computed and transmitted),
is this behavior expected?

For completeness sake, I found an old patch [1] in the ixgbe linux
driver that seems to be related to what I'm seeing. The code changed a
little, but it's still there.

[1] https://patchwork.ozlabs.org/project/netdev/patch/20090724040031.30202.1531.stgit@localhost.localdomain/

Regards,
Paolo


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

end of thread, other threads:[~2021-02-02  9:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27 13:49 [dpdk-dev] ixgbe and UDP with zero checksum Paolo Valerio
2021-01-27 17:26 ` Wang, Haiyue
2021-01-27 18:21   ` Aaron Conole
2021-01-27 21:35   ` Paolo Valerio
2021-01-29  2:02     ` Wang, Haiyue
2021-01-29  2:59       ` Wang, Haiyue
2021-01-29 14:19         ` Paolo Valerio
2021-02-02  7:41           ` Wang, Haiyue
2021-02-02  9:33             ` [dpdk-dev] 回复: " Feifei Wang

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