From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5F06BA00C3; Wed, 19 Jan 2022 18:01:16 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 033204117A; Wed, 19 Jan 2022 18:01:16 +0100 (CET) Received: from mail-oo1-f49.google.com (mail-oo1-f49.google.com [209.85.161.49]) by mails.dpdk.org (Postfix) with ESMTP id 8A92141147 for ; Wed, 19 Jan 2022 17:53:13 +0100 (CET) Received: by mail-oo1-f49.google.com with SMTP id w15-20020a4a9d0f000000b002c5cfa80e84so910486ooj.5 for ; Wed, 19 Jan 2022 08:53:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=mime-version:from:date:message-id:subject:to:cc; bh=kuIMoN+ayB+013GXhVNnIPoeQ4lEtkSI+7diUD0ZXKc=; b=hmxJdy0mojZv67kqqa9WI7IfIZNF83Tvi8jOXscn6jcILWy8Upa4zcXQ99dvk2CAKH rn59VAPgexucdQLa221+nxlrFYdNKZ5LlAdhue4yOP5qv8Ec6/+sf26SeN7CDFJZxfrU iUv+7/7aIg5UZaMIFBvp6pJ8abHfTTMnUYwQS+zlAG1W0qc4x9PX0CtucmdiNi3bIj5B 36aDFp03PyRMp0y/8GNevM63MTHMekU1gGo0vbmg4hfWsUimO0BdTvsZPy9My7gBoNuf 3t59monLv/2eTpmyN1j4TA6Nn1A0GE65MxvsBx60fLZZIiqdCx31BRLN4RPVIcNY3v9c XoOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=kuIMoN+ayB+013GXhVNnIPoeQ4lEtkSI+7diUD0ZXKc=; b=dEYvU4fKptQuzReSHLPfDxE0B5KB4OlZuxcLm2skXMl5zG5fRJkA+dLgM5mXq/6Hg+ Xz9HmWpX3q+auq5BC7RqDMeqh5msqT+EAEnxIMhxDMF0a6KlLNscWLoXwx9E2ORRcsFn C1fW2NZvqOLxOHexqb4sRqnMsQvKoZYr/gGyPf1K3RKJx7ls3X7t+X+CIetdvALm4S5b x98LtUAaFGpu3kRw+sVqudmoD5OI7igACt6TtZqJoh6ulLDE2uPfWXVwQivQMlDvGPw+ LJXscG8cE7KFtrB9T8h6kag+Nrg9A3Cw7eO3G4s0i89h9o8iV47ukEVKA9nUtKDkAYFt O6PQ== X-Gm-Message-State: AOAM532vYhacj1QVbf4NSRy47fIy2hIqSGd5U/oDuy8TfEs3k80VhIqb THejEycBnNz85tOI8a4QE3lQKJTcpKSDfln8+iuXyDSakSBg1PHd X-Google-Smtp-Source: ABdhPJzqKtOhKp1ptqCRlWX/3qeaqyQoK5Xtm5Se9s4OV9oTtnKVSMGea9aEYjK5fSOSPdn0BlKwpie3pun7TIujShQ= X-Received: by 2002:a4a:c593:: with SMTP id x19mr22368989oop.52.1642611192588; Wed, 19 Jan 2022 08:53:12 -0800 (PST) MIME-Version: 1.0 From: Thomas Tsakiris Date: Wed, 19 Jan 2022 17:53:01 +0100 Message-ID: Subject: iavf/ice seem to report incorrect ol_flags in certain cases To: dev@dpdk.org Cc: Jingjing Wu , Beilei Xing , David Marchand , Ferruh Yigit , Andrew Rybchenko , Olivier Matz Content-Type: text/plain; charset="UTF-8" X-Mailman-Approved-At: Wed, 19 Jan 2022 18:01:15 +0100 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 -a -- -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