DPDK patches and discussions
 help / color / mirror / Atom feed
* iavf/ice seem to report incorrect ol_flags in certain cases
@ 2022-01-19 16:53 Thomas Tsakiris
  0 siblings, 0 replies; only message in thread
From: Thomas Tsakiris @ 2022-01-19 16:53 UTC (permalink / raw)
  To: dev
  Cc: Jingjing Wu, Beilei Xing, David Marchand, Ferruh Yigit,
	Andrew Rybchenko, Olivier Matz

Hi All,

iavf and ice seem to report ol_flags for inner checksum even when not
configured to do so.
This results in packet with good outer/wrong inner ip checksums having
flag RTE_MBUF_F_RX_IP_CKSUM_BAD
And packet with wrong outer/good inner checksums having both
RTE_MBUF_F_RX_IP_CKSUM_GOOD
and RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD
From what I understand in the documentation,
RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD should only be set when
RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM is set on the port.

Test results below.

Am I missing something ?

testpmd is started this way:
$dpdk-testpmd -l 0-2 -a <nic1> -a <nic2> -- -i
testpmd>port stop all
testpmd>port config 1 rx_offload ipv4_cksum on
testpmd>port config 0 rx_offload ipv4_cksum on
testpmd>port start all
testpmd>set log global 10
testpmd>set verbose 1
testpmd>start

Sent packet are built this way in scapy :
a =  IP(dst="10.200.0.1",src="10.100.0.1",proto=4)/IP(dst="10.125.0.1",src="10.125.0.2")/ICMP()
b =  IP(dst="10.200.0.1",src="10.100.0.1",proto=4,chksum=0xAAAA)/IP(dst="10.125.0.1",src="10.125.0.2")/ICMP()
c =  IP(dst="10.200.0.1",src="10.100.0.1",proto=4)/IP(dst="10.125.0.1",src="10.125.0.2",chksum=0xAAAA)/ICMP()

Here are the results by pmd:
ice_version=1.7.16 iavf_version=4.3.19 ddp_version=1.3.30.0 dpdk_version=21.11
#test on e810vf iavf
testpmd> show port summary 0
Number of available ports: 2
Port MAC Address       Name         Driver         Status   Link
0    40:A6:B7:19:00:32 0000:00:04.0 net_iavf       up       100 Gbps
testpmd> show port 0 rx_offload configuration
Rx Offloading Configuration of port 0 :
  Port : IPV4_CKSUM
  Queue[ 0] : IPV4_CKSUM
# packet a
port 0/queue 0: received 1 packets
  src=24:8A:07:A3:E3:34 - dst=FF:FF:FF:FF:FF:FF - type=0x0800 -
length=62 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN
TUNNEL_IP INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_ICMP  - sw ptype:
L2_ETHER L3_IPV4 TUNNEL_IP INNER_L3_IPV4  - l2_len=14 - l3_len=20 -
tunnel_len=0 - inner_l3_len=20 - Receive queue=0x0
  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD
RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN
# packet b
  port 0/queue 0: received 1 packets
  src=24:8A:07:A3:E3:34 - dst=FF:FF:FF:FF:FF:FF - type=0x0800 -
length=62 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN
TUNNEL_IP INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_ICMP  - sw ptype:
L2_ETHER L3_IPV4 TUNNEL_IP INNER_L3_IPV4  - l2_len=14 - l3_len=20 -
tunnel_len=0 - inner_l3_len=20 - Receive queue=0x0
  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD
RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN
# packet c
  port 0/queue 0: received 1 packets
  src=24:8A:07:A3:E3:34 - dst=FF:FF:FF:FF:FF:FF - type=0x0800 -
length=62 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN
TUNNEL_IP INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_ICMP  - sw ptype:
L2_ETHER L3_IPV4 TUNNEL_IP INNER_L3_IPV4  - l2_len=14 - l3_len=20 -
tunnel_len=0 - inner_l3_len=20 - Receive queue=0x0
  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_BAD
RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN

#test on e810 ice
testpmd> show port summary 0
Number of available ports: 2
Port MAC Address       Name         Driver         Status   Link
0    40:A6:B7:19:04:60 0000:b3:00.0 net_ice        up       100 Gbps
testpmd> show port 0 rx_offload configuration
Rx Offloading Configuration of port 0 :
  Port : IPV4_CKSUM
  Queue[ 0] : IPV4_CKSUM
# packet a
port 0/queue 0: received 1 packets
  src=24:8A:07:A3:E3:34 - dst=FF:FF:FF:FF:FF:FF - type=0x0800 -
length=62 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN
TUNNEL_IP INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_ICMP  - sw ptype:
L2_ETHER L3_IPV4 TUNNEL_IP INNER_L3_IPV4  - l2_len=14 - l3_len=20 -
tunnel_len=0 - inner_l3_len=20 - Receive queue=0x0
  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD
RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
# packet b
port 0/queue 0: received 1 packets
  src=24:8A:07:A3:E3:34 - dst=FF:FF:FF:FF:FF:FF - type=0x0800 -
length=62 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN
TUNNEL_IP INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_ICMP  - sw ptype:
L2_ETHER L3_IPV4 TUNNEL_IP INNER_L3_IPV4  - l2_len=14 - l3_len=20 -
tunnel_len=0 - inner_l3_len=20 - Receive queue=0x0
  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD
RTE_MBUF_F_RX_OUTER_IP_CKSUM_BAD RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD
# packet c
testpmd> port 0/queue 0: received 1 packets
  src=24:8A:07:A3:E3:34 - dst=FF:FF:FF:FF:FF:FF - type=0x0800 -
length=62 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN
TUNNEL_IP INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_ICMP  - sw ptype:
L2_ETHER L3_IPV4 TUNNEL_IP INNER_L3_IPV4  - l2_len=14 - l3_len=20 -
tunnel_len=0 - inner_l3_len=20 - Receive queue=0x0
  ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_BAD
RTE_MBUF_F_RX_OUTER_L4_CKSUM_GOOD

#test on niantic ixgbe
testpmd> show port summary 0
Number of available ports: 2
Port MAC Address       Name         Driver         Status   Link
0    00:09:C0:2B:0F:4C 0000:00:04.0 net_ixgbe_vf   up       10 Gbps
testpmd> show port 0 rx_offload configuration
Rx Offloading Configuration of port 0 :
  Port : IPV4_CKSUM
  Queue[ 0] : IPV4_CKSUM
# packet a
port 0/queue 0: received 1 packets
  src=90:E2:BA:29:E1:24 - dst=FF:FF:FF:FF:FF:FF - type=0x0800 -
length=62 - nb_segs=1 - RSS hash=0xaf7a05b - RSS queue=0x0 - hw ptype:
L2_ETHER L3_IPV4  - sw ptype: L2_ETHER L3_IPV4 TUNNEL_IP INNER_L3_IPV4
 - l2_len=14 - l3_len=20 - tunnel_len=0 - inner_l3_len=20 - Receive
queue=0x0
  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN
# packet b
port 0/queue 0: received 1 packets
  src=90:E2:BA:29:E1:24 - dst=FF:FF:FF:FF:FF:FF - type=0x0800 -
length=62 - nb_segs=1 - RSS hash=0xaf7a05b - RSS queue=0x0 - hw ptype:
L2_ETHER L3_IPV4  - sw ptype: L2_ETHER L3_IPV4 TUNNEL_IP INNER_L3_IPV4
 - l2_len=14 - l3_len=20 - tunnel_len=0 - inner_l3_len=20 - Receive
queue=0x0
  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
RTE_MBUF_F_RX_IP_CKSUM_BAD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN
# packet c
port 0/queue 0: received 1 packets
  src=90:E2:BA:29:E1:24 - dst=FF:FF:FF:FF:FF:FF - type=0x0800 -
length=62 - nb_segs=1 - RSS hash=0xaf7a05b - RSS queue=0x0 - hw ptype:
L2_ETHER L3_IPV4  - sw ptype: L2_ETHER L3_IPV4 TUNNEL_IP INNER_L3_IPV4
 - l2_len=14 - l3_len=20 - tunnel_len=0 - inner_l3_len=20 - Receive
queue=0x0
  ol_flags: RTE_MBUF_F_RX_RSS_HASH RTE_MBUF_F_RX_L4_CKSUM_GOOD
RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN

Let me know if you need any more information,
Sincerely,
-- 
Tsakiris Thomas

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-19 17:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-19 16:53 iavf/ice seem to report incorrect ol_flags in certain cases Thomas Tsakiris

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