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 C4187423B5; Thu, 12 Jan 2023 10:22:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7357E40156; Thu, 12 Jan 2023 10:22:50 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 69B7C400EF for ; Thu, 12 Jan 2023 10:22:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673515369; x=1705051369; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=w7oybOS5ltvV2XhRQ9vj49/Yite0H/jFMEzFvsADUA8=; b=bwMxTK0XrY40aHo6CeVM2ilKJKUmrNKz2GX8r/VwnMnnt9RoxThayjoj tJ+PsbTY1mFb+UWLNFQO0MexbBC7z2HX+pXTG+e7iQ4L0RUofcNlPWsSF BRZAFbtui1KKOPrB0fIXfyMmneRz6zOFtUhxhaT4sywGz5xDPa5Y2GkuB LnWnfKPNC7sveCRglYooJDD/RC+dKm0mmbvQCfcjOq44+PZ5dYY1hRsHR 8RDZJkUWWAo5ApQESVnQ1CHuHtJlq7PnhDOmv5hebrHwtHHQLSG8im06j fo+rPkg85+tJbcZSqHvB4ShaTq9l/OKxvTDjKSWkuev+JTY4lLMVQCkpi g==; X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="307176983" X-IronPort-AV: E=Sophos;i="5.96,319,1665471600"; d="scan'208";a="307176983" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2023 01:22:48 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="651066730" X-IronPort-AV: E=Sophos;i="5.96,319,1665471600"; d="scan'208";a="651066730" Received: from unknown (HELO localhost.localdomain) ([10.239.252.103]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2023 01:22:43 -0800 From: Zhichao Zeng To: dev@dpdk.org Cc: yidingx.zhou@intel.com, Zhichao Zeng , Olivier Matz Subject: [PATCH] lib/net: support UDP pseudo-header for UFO Date: Thu, 12 Jan 2023 17:26:08 +0800 Message-Id: <20230112092608.868006-1-zhichaox.zeng@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Add UDP pseudo-header processing for UDP segmentation offload by adding the UDP_SEG flag. Signed-off-by: Zhichao Zeng --- lib/net/rte_ip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/net/rte_ip.h b/lib/net/rte_ip.h index 9c8e8206f0..4761ede747 100644 --- a/lib/net/rte_ip.h +++ b/lib/net/rte_ip.h @@ -345,7 +345,7 @@ rte_ipv4_phdr_cksum(const struct rte_ipv4_hdr *ipv4_hdr, uint64_t ol_flags) psd_hdr.dst_addr = ipv4_hdr->dst_addr; psd_hdr.zero = 0; psd_hdr.proto = ipv4_hdr->next_proto_id; - if (ol_flags & RTE_MBUF_F_TX_TCP_SEG) { + if (ol_flags & (RTE_MBUF_F_TX_TCP_SEG | RTE_MBUF_F_TX_UDP_SEG)) { psd_hdr.len = 0; } else { l3_len = rte_be_to_cpu_16(ipv4_hdr->total_length); -- 2.25.1