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 A1E68A052A; Wed, 27 Jan 2021 14:49:44 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6EBC9140DA2; Wed, 27 Jan 2021 14:49:44 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 0B027140D56 for ; Wed, 27 Jan 2021 14:49:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611755382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=J43pVIOpWAEuU7ZNXqE0RPW5UL7XGh1wo21VAOSs3DI=; b=bOALXhBGoW24/rnc+aYXYsBCuR/jmNI0q34iuBv6Sq6ryB4Fxp3Bm3tSwhVaRCR++Th9Hj SXKa5Mo9jJlUbmGop/HSHpmXo1R+83w+YllKAAd25UFQXFnqCSAGDmoJpS2jBUrfB0s8fs D1pnl1woh9qEmSlFAldkgl6tKc0bJfU= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-331-SSrJNpa2OpCE6P4tiHef8A-1; Wed, 27 Jan 2021 08:49:39 -0500 X-MC-Unique: SSrJNpa2OpCE6P4tiHef8A-1 Received: by mail-wr1-f70.google.com with SMTP id n18so1012196wrm.8 for ; Wed, 27 Jan 2021 05:49:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version; bh=J43pVIOpWAEuU7ZNXqE0RPW5UL7XGh1wo21VAOSs3DI=; b=fJhN5oTJYW7LaefMh2hoTJ7JlR6HyMBLeUwKrNLhC2CrxP13c2lodZzmv6g84dJfTi n4fNmp2vPWKFrx3eoraBhwbK1H0r2rkiKwIvpmLq2t9Gxu/2R6hZNk3rp7PkL1xTBcSj 3834yVvAlMjXVPUd2z1xKiNctJMBQ0jvEwp3Kd6Dv3BoVyntBJdPR7YFnlEVxAGa6MsY aVg002XARmg2ersP5ujp57bHFB0mCJ9ynm/VFVS3bd1IPbhN0N2M+S7U4I2EesF19vIU YrgwRqwwKe3XSC10mTLpa5KV1TkxSELdtOhERtpHSisymkjdYA8AB6doTyQChIzCzcqw qFUw== X-Gm-Message-State: AOAM530KHcdIR/FfGRLKcIfvMKwcUHrV4MIxnwZ/uC9Njgf67kGTAn+q eWJA7E8vqDUy93ZkPT9LhLhI4eMM548zwm9vkjfMTH9LtJFUP/vo6puhWxj3WWTrwGls3zAhaic 2002cWqAQYouM2lyM21rmAoTL2pAWbcyMBxc6Bx/YbE+mbApQ7BilgbA= X-Received: by 2002:a5d:4b50:: with SMTP id w16mr11346349wrs.391.1611755377079; Wed, 27 Jan 2021 05:49:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJy0gdOl6hdkkAm7JSm6FUl+PGhbi6pPvj03wH9zIUmiOAMk6bhf+oQWjqPs9oneWbSSCmbK1w== X-Received: by 2002:a5d:4b50:: with SMTP id w16mr11346338wrs.391.1611755376917; Wed, 27 Jan 2021 05:49:36 -0800 (PST) Received: from localhost (net-37-116-32-78.cust.vodafonedsl.it. [37.116.32.78]) by smtp.gmail.com with ESMTPSA id a184sm2742006wme.35.2021.01.27.05.49.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jan 2021 05:49:36 -0800 (PST) From: Paolo Valerio To: dev@dpdk.org Cc: jia.guo@intel.com, haiyue.wang@intel.com, Aaron Conole Date: Wed, 27 Jan 2021 14:49:31 +0100 Message-ID: <87zh0u1od0.fsf@fed.void> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pvalerio@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Subject: [dpdk-dev] ixgbe and UDP with zero checksum 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 Sender: "dev" 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