From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id AE7CF1B359 for ; Mon, 29 Jan 2018 16:11:17 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from xuemingl@mellanox.com) with ESMTPS (AES256-SHA encrypted); 29 Jan 2018 17:11:11 +0200 Received: from dev-r630-06.mtbc.labs.mlnx (dev-r630-06.mtbc.labs.mlnx [10.12.205.180]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w0TFB83w001308; Mon, 29 Jan 2018 17:11:10 +0200 Received: from dev-r630-06.mtbc.labs.mlnx (localhost [127.0.0.1]) by dev-r630-06.mtbc.labs.mlnx (8.14.7/8.14.7) with ESMTP id w0TF9WLn071634; Mon, 29 Jan 2018 23:09:32 +0800 Received: (from xuemingl@localhost) by dev-r630-06.mtbc.labs.mlnx (8.14.7/8.14.7/Submit) id w0TF9PaK071625; Mon, 29 Jan 2018 23:09:25 +0800 From: Xueming Li To: Olivier MATZ Cc: Xueming Li , dev@dpdk.org, Jingjing Wu , Shahaf Shuler , Yongseok Koh , Thomas Monjalon , Ferruh Yigit Date: Mon, 29 Jan 2018 23:08:55 +0800 Message-Id: <20180129150859.71573-1-xuemingl@mellanox.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20180109141110.146250-2-xuemingl@mellanox.com> References: <20180109141110.146250-2-xuemingl@mellanox.com> Subject: [dpdk-dev] [PATCH v2 1/5] ethdev: introduce Tx generic tunnel offloads X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2018 15:11:18 -0000 This patch introduce new TX offloads flag for devices that support tunnel agnostic checksum and TSO offloads. The support from the device is for inner and outer checksums on IPV4/TCP/UDP and TSO for *any packet with the following format*: < some headers > / [optional IPv4/IPv6] / [optional TCP/UDP] / / [optional inner IPv4/IPv6] / [optional TCP/UDP] For example the following packets can use this feature: 1. eth / ipv4 / udp / VXLAN / ip / tcp 2. eth / ipv4 / GRE / MPLS / ipv4 / udp Signed-off-by: Xueming Li --- lib/librte_ether/rte_ethdev.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 1a5b4cdc5..d8d08ccb2 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -979,6 +979,16 @@ struct rte_eth_conf { * the same mempool and has refcnt = 1. */ #define DEV_TX_OFFLOAD_SECURITY 0x00020000 +/**< Device supports generic tunnel checksum and TSO offloading. + * Checksum and TSO are done based on following mbuf fields: + * - Length of each header + * - Type of outer/inner L3 type, IPv4 or IPv6 + * - Type of outer/inner L4 type, TCP or UDP. + * - PKT_TX_TUNNEL_VXLAN implies outer UDP type. + * - PKT_TX_TCP_SEG implies inner TCP type. + * Tunnel type is optional except PKT_TX_TUNNEL_VXLAN to hint outer UDP. + */ +#define DEV_TX_OFFLOAD_GENERIC_TNL_CKSUM_TSO 0x00040000 /* * If new Tx offload capabilities are defined, they also must be -- 2.13.3