From patchwork Wed Aug 17 19:11:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nithin Dabilpuram X-Patchwork-Id: 115211 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 39E57A0032; Wed, 17 Aug 2022 21:12:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DEE4E406A2; Wed, 17 Aug 2022 21:12:13 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id F3CF64068E for ; Wed, 17 Aug 2022 21:12:12 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27HGqmn8032513; Wed, 17 Aug 2022 12:12:11 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=r9RzLlhWSvIxFxpR+y5tpzI6DDszrMWs/oKcv5KoUko=; b=ai+30OiGm9A+MjNzg+jceoLWDBjXGxcEZyAo2tFqm/NS6G+VYL5gOovttjfrmAPdXDkE I4dpKqd8pfX3lbHELTDKZJu1ouTLUIjdugGGSNdUjQK4erwhN+MZYhQPeQ4DRiWXB/0m YSJdX3XV8Bh8nYCvg/JXPYjvqVnRMyxCdLGNCzEAefKo7UUFsDTqvbl4gUEP7wcyi0MC l/XrRjQg/WV0hRB5DkPSl+ol7ZXAT6twYkSKbjZMCD5+gA6CKJea7qzjvlmouaF4MpTM kSA3xKpLszbqFV/R4N33MNEjjEgv5Hg/ial9+CHJLry1YKHSlHmm0PFbVmhOPKGjgnHp +w== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3j0v1q2n0w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 17 Aug 2022 12:12:11 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 17 Aug 2022 12:12:09 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Wed, 17 Aug 2022 12:12:09 -0700 Received: from hyd1588t430.marvell.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 30F843F70F3; Wed, 17 Aug 2022 12:11:48 -0700 (PDT) From: Nithin Dabilpuram To: Olivier Matz CC: , , , "Nithin Dabilpuram" Subject: [PATCH v2 1/5] mbuf: clarify meta data needed for Outbound Inline Date: Thu, 18 Aug 2022 00:41:42 +0530 Message-ID: <20220817191146.30085-1-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20220707072921.13448-1-ndabilpuram@marvell.com> References: <20220707072921.13448-1-ndabilpuram@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: EQbuwK5qk3s_41QAbCsFfFarj26eYkK9 X-Proofpoint-GUID: EQbuwK5qk3s_41QAbCsFfFarj26eYkK9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-17_13,2022-08-16_02,2022-06-22_01 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 Clarify mbuf meta data needed for Outbound Inline processing. Application needs to provide mbuf.l3_len and L3 type in mbuf.ol_flags so that like tunnel mode using mbuf.l2_len, transport mode can make use of l3_len and l3_type to determine perform proper transport mode IPsec processing. Signed-off-by: Nithin Dabilpuram --- v2: - Modified ipsec-secgw to do ether type update for outbound path. doc/guides/nics/features.rst | 2 +- lib/mbuf/rte_mbuf_core.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst index 7f6cb91..b4a8e98 100644 --- a/doc/guides/nics/features.rst +++ b/doc/guides/nics/features.rst @@ -431,7 +431,7 @@ protocol operations. See security library and PMD documentation for more details * **[uses] rte_eth_rxconf,rte_eth_rxmode**: ``offloads:RTE_ETH_RX_OFFLOAD_SECURITY``, * **[uses] rte_eth_txconf,rte_eth_txmode**: ``offloads:RTE_ETH_TX_OFFLOAD_SECURITY``. -* **[uses] mbuf**: ``mbuf.l2_len``. +* **[uses] mbuf**: ``mbuf.l2_len``, ``mbuf.l3_len``, ``mbuf.ol_flags``. * **[implements] rte_security_ops**: ``session_create``, ``session_update``, ``session_stats_get``, ``session_destroy``, ``set_pkt_metadata``, ``get_userdata``, ``capabilities_get``. diff --git a/lib/mbuf/rte_mbuf_core.h b/lib/mbuf/rte_mbuf_core.h index 3d6ddd6..b62a7c6 100644 --- a/lib/mbuf/rte_mbuf_core.h +++ b/lib/mbuf/rte_mbuf_core.h @@ -267,7 +267,8 @@ extern "C" { /** * Request security offload processing on the TX packet. * To use Tx security offload, the user needs to fill l2_len in mbuf - * indicating L2 header size and where L3 header starts. + * indicating L2 header size and where L3 header starts. Similarly, + * l3_len should also be filled along with ol_flags reflecting current L3 type. */ #define RTE_MBUF_F_TX_SEC_OFFLOAD (1ULL << 43) #define PKT_TX_SEC_OFFLOAD RTE_DEPRECATED(PKT_TX_SEC_OFFLOAD) \