DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Tsakiris <thomas.tsakiris@6wind.com>
To: dev@dpdk.org
Cc: Jingjing Wu <jingjing.wu@intel.com>,
	Beilei Xing <beilei.xing@intel.com>,
	 David Marchand <david.marchand@redhat.com>,
	Ferruh Yigit <ferruh.yigit@intel.com>,
	 Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Olivier Matz <olivier.matz@6wind.com>
Subject: iavf/ice seem to report incorrect ol_flags in certain cases
Date: Wed, 19 Jan 2022 17:53:01 +0100	[thread overview]
Message-ID: <CAFE7AN7jg0LWsbq+ZpXfMaqisV_nrjUrPj7d3g-Qp+eEyU=NCw@mail.gmail.com> (raw)

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

                 reply	other threads:[~2022-01-19 17:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFE7AN7jg0LWsbq+ZpXfMaqisV_nrjUrPj7d3g-Qp+eEyU=NCw@mail.gmail.com' \
    --to=thomas.tsakiris@6wind.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=beilei.xing@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=olivier.matz@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).