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 3F30EA0540; Mon, 22 Aug 2022 16:38:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2399C40A81; Mon, 22 Aug 2022 16:38:26 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id EF0E040694 for ; Mon, 22 Aug 2022 16:38:24 +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 27MATEWJ009447; Mon, 22 Aug 2022 07:38:21 -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=8+nypCGtHewVXXTuTWy4SSnNbvALWIdzlpDH6D+mG1E=; b=FCBAfJDWmzfsvueRS6mBiMpei4UTnxmtPifH6VsHpHh3xG0xEElzdq+VhVWYdDWOmLZt 2VQo4p5oEXV/7TXMb+SmrkA+JTdwlu0JZu7RZ5LYqWosBUcE7AVFWNORE+caYC+Cywrz sUGuViq6/qeO5xqKb7LbSnejzfEo/NE75J2G2vUUhnU1RPfXk3EI+O2gbT8e9Vw18eLl iIXGB/qfdAj4TwY8XHJHadif/YwnHePrLKJc0tw5hHCPk2HbGlB+UTQXtTOP21u1I/hb ve4HCsmyqJmhUSs6KSR8kguaGPGAYbpFBOyT1mIHLswSDoUmhb40bjHwlW1ANQd8YHaG 1A== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3j2y4jxy3e-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 22 Aug 2022 07:38:21 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 22 Aug 2022 07:38:20 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 22 Aug 2022 07:38:19 -0700 Received: from hyd1588t430.marvell.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 1A9C73F704B; Mon, 22 Aug 2022 07:38:17 -0700 (PDT) From: Nithin Dabilpuram To: Olivier Matz CC: , , , , Nithin Dabilpuram Subject: [PATCH v3 1/5] mbuf: clarify meta data needed for Outbound Inline Date: Mon, 22 Aug 2022 20:08:08 +0530 Message-ID: <20220822143812.30010-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 Content-Type: text/plain X-Proofpoint-GUID: wxH12s7zSdejIm4jVKVRQomVoSwkdsWn X-Proofpoint-ORIG-GUID: wxH12s7zSdejIm4jVKVRQomVoSwkdsWn X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-22_08,2022-08-22_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 --- v3: - Addressed comments on patch 4/5 and added acks. 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) \ -- 2.8.4