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 B10BFA0C41; Wed, 15 Sep 2021 16:25:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 766D44068F; Wed, 15 Sep 2021 16:25:23 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 3F09E4014F for ; Wed, 15 Sep 2021 16:25:21 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10107"; a="201835494" X-IronPort-AV: E=Sophos;i="5.85,295,1624345200"; d="scan'208";a="201835494" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2021 07:25:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,295,1624345200"; d="scan'208";a="651218405" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga005.jf.intel.com with ESMTP; 15 Sep 2021 07:25:19 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 15 Sep 2021 07:25:18 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 15 Sep 2021 07:25:18 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Wed, 15 Sep 2021 07:25:18 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Wed, 15 Sep 2021 07:25:18 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F5FhjPxOFR7KPVKbdsaByBSYknrsmPdcZnghM2r4CtYM5hSunKC01+XmbuQl63j0mwBjtXGJz2V0SvOgekVVwa8MxrCLrLp/RUa7G3im3KCqA/HJ4QoCeg5H/yhNSv5OY0sj9mT0RpudjanF/WyFBmHuV4y/bhzijPQOXg9WSCs2sJjzKSAGOgVLvXDhxtV6Br7DCERkBoGhtaak6k6cDkMqw4iAcmaL+jrnPRwalhfxg0S/dc3naYsg+vAcwnv8Kt/ZDyFO7851OofgJ76FzOKtZZ5iy0RpmEsXSET2qg503mQA3S1B9VUfVWevVLcMw1A2nSd9DBRXhclKXMWlDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=65Ix0MZLBSxQKxVYvkvShRoaFj+ZJvMkCO1K/ohai8g=; b=U2K7b9WgRdrmR+6xtIPVEjk8kqOENRInTqg9KmE1F8vLJWZyWMhRK5PkuKhiVGyeQS6OmyYZcYlmgpv9LuzGuVbHwV6wsZhF80dl24n6c3/sZ97LJ22YXjg2M5NrAEq6oZ6P8yvfwb99Sv4RdKiw3iK1EMKnsjsdHbUhFtZpQsWXNzlba6gIVJw+6mwiQQun1gKWDWlB/wPi3dTLwRSGzL3TVYQ9afkCgi58svLUu+Ot8/KzxcIMdF4a5YGd14PfYqBzmPcxOhQZHUp6Iwdejbg8E96U1aLB5qYVabt+SBIjD3vIlZy0H5sG7KfWvir1HnyE8/6kbx+fFsVAAuc3WQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=65Ix0MZLBSxQKxVYvkvShRoaFj+ZJvMkCO1K/ohai8g=; b=bDO1UJDPjz0pTHrt3GZoNPspxiQqyEykSPNHaUxt7ARTSSfdDgrHBITOEbMuQmU/rPRyZchN8eSVn0S1qSDtZbBF2pRaRqSw5ba1SKJUK3X+JWQi5G/4LR1rUTyeGnoJ3ll/hSzB5BEIdm4FkzLCKeMgW/qZKVYvGez5MEk5Rsk= Received: from BY5PR11MB4482.namprd11.prod.outlook.com (2603:10b6:a03:1ca::33) by SJ0PR11MB4895.namprd11.prod.outlook.com (2603:10b6:a03:2de::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14; Wed, 15 Sep 2021 14:25:16 +0000 Received: from BY5PR11MB4482.namprd11.prod.outlook.com ([fe80::a850:4ae9:9444:7334]) by BY5PR11MB4482.namprd11.prod.outlook.com ([fe80::a850:4ae9:9444:7334%5]) with mapi id 15.20.4500.019; Wed, 15 Sep 2021 14:25:16 +0000 From: "Ananyev, Konstantin" To: Nithin Dabilpuram , "jerinj@marvell.com" , "gakhil@marvell.com" , "Zhang, Roy Fan" , "hemant.agrawal@nxp.com" , "matan@nvidia.com" CC: "dev@dpdk.org" , "Yigit, Ferruh" , "Nicolau, Radu" , "olivier.matz@6wind.com" , "g.singh@nxp.com" , "Doherty, Declan" , "jiawenwu@trustnetic.com" Thread-Topic: [PATCH v5 1/3] security: enforce semantics for Tx inline processing Thread-Index: AQHXqXuyS26sl/6pREyTuyl8g+BMfaulJ9cw Date: Wed, 15 Sep 2021 14:25:16 +0000 Message-ID: References: <20210624102848.3878788-1-gakhil@marvell.com> <20210914151434.29922-1-ndabilpuram@marvell.com> <20210914151434.29922-2-ndabilpuram@marvell.com> In-Reply-To: <20210914151434.29922-2-ndabilpuram@marvell.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 464c424e-3e25-4b3a-74c5-08d97854a3b9 x-ms-traffictypediagnostic: SJ0PR11MB4895: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5797; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: vR1jUgUHnvx9Vda5BV+1MKcu9U2DX3SOepx/+AT7XljdQQ5HWk5iIGCNcbFkTwBlDiJjha2PwWM+38gjpBwKN7xJF04VMFy3QpozURgbuW3kVZ6yhxb1xUszELhGcLlavjHCB8/BPQx7S7ZNg42YLbsFIe/MMUngvxetB+uksc4T2/GOZxb0a6aMJyB9GfkhonJpGzbXs775hVPpZmNSvvESocdO7zwG/kScmaa2u1IDrEkxMojZ2Wu0h1bpYIy7/cc45XrpDrdhodJvz4WtCFfM/LBX/uYaeqZHoSysUJFO1vYBoGXmhj9MNs3zzRYz212bwOgFYi+PFv8TA4k1vDUWePDVil0LSonhS2mXz/WroS79ZIYtvI1S+L/RKAuCJnqq1i9jbx0pePMv9R4J1i9logk53E/OPG6cVvgBFMs0JEpoJVXURAPdcW6oxbLXHgqUcQ16xJH8wO1hXSW8z0iVHC6zyLFCS93aQHB4u1ikgICJwxRcXZuSWl+anHeF3JT83e1+OSrM52fOGPbrWy7AeD79GM9wsUqtF8MVOprfZmIrdzxjOezV2heypGKCapPnmia1vWKadMGpcDeuByk8qW8rqzr1E5IYjPujTWCOQtulyhWi2KCofk23H2HlirpxQWK5h0YZe8lBBUm5B6IlkqjEHtUiMTlkizdjG9NIrjWrgTi4Ji5DnDg+74LYqBMlHAVD+m3+4itpazUu8g== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR11MB4482.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(396003)(376002)(346002)(39860400002)(186003)(26005)(5660300002)(83380400001)(6506007)(55236004)(86362001)(15650500001)(478600001)(4326008)(52536014)(64756008)(66476007)(7696005)(316002)(9686003)(38070700005)(55016002)(8936002)(66946007)(66556008)(71200400001)(2906002)(33656002)(8676002)(54906003)(38100700002)(76116006)(66446008)(110136005)(122000001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?0OnwrFUGpz+Y7uq6iAYG3Xzy4O3MDaRoW0Z99zXfbNsHDRXNh/l+VI5/Uyrz?= =?us-ascii?Q?48/1tmqDcPBp8m79FBDXZFh55OfQ9KeuJj5s9OomxG0hXDBmPKWkn+gh9ON/?= =?us-ascii?Q?GpDqMAHnYhBL3oqJtjOUbPBFJoJu+P5patL7NOn6Xx7T4ICPG6deyju1mW/o?= =?us-ascii?Q?KM/SrG0hSqAaB0g1+thqjU6D5bgnecwnsXVWYKuBPINHk3zxA7sV6lOIsIDW?= =?us-ascii?Q?2vJ+b+r4xNfV8ovR+GTJWg5EYrdPvHe0s9uwRWNoTw/ppmByXbbELtuvDi4e?= =?us-ascii?Q?st3nIJ7Gc2vI39m3p+oPGPiVEO0EutNEze3L2B4zTnWLQfQ+vH65egFn5cxV?= =?us-ascii?Q?IeoAJKQQXKBO83JhSuSjHYLlHldUaIGTzaKNeqTvwP9+cAkpZf8PwSHplo6I?= =?us-ascii?Q?/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N6X6R7n3joEvbc?= =?us-ascii?Q?N6LwjBiVH3+PtNdCsa1gX1uO?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY5PR11MB4482.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 464c424e-3e25-4b3a-74c5-08d97854a3b9 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Sep 2021 14:25:16.7712 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: AA7X3AzA48mT7LsxIvkFmd1VuLeQoH8B5uPXlR7o7slNo0yZK0+Ev7BPx1EORBlZ/0M3jJozxKKdyIvXQJN0LT3cv0Z4dRx4MOXJW9zpT2Q= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB4895 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v5 1/3] security: enforce semantics for Tx inline processing 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" >=20 > Not all net PMD's/HW can parse packet and identify L2 header and > L3 header locations on Tx. This is inline with other Tx offloads > requirements such as L3 checksum, L4 checksum offload, etc, > where mbuf.l2_len, mbuf.l3_len etc, needs to be set for HW to be > able to generate checksum. Since Inline IPSec is also such a Tx > offload, some PMD's at least need mbuf.l2_len to be valid to > find L3 header and perform Outbound IPSec processing. >=20 > Hence, this patch updates documentation to enforce setting > mbuf.l2_len while setting PKT_TX_SEC_OFFLOAD in mbuf.ol_flags > for Inline IPSec Crypto / Protocol offload processing to > work on Tx. >=20 > Signed-off-by: Nithin Dabilpuram > Acked-by: Akhil Goyal > --- > doc/guides/nics/features.rst | 2 ++ > lib/mbuf/rte_mbuf_core.h | 2 ++ > 2 files changed, 4 insertions(+) >=20 > diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst > index a96e12d..4fce8cd 100644 > --- a/doc/guides/nics/features.rst > +++ b/doc/guides/nics/features.rst > @@ -430,6 +430,7 @@ of protocol operations. See Security library and PMD = documentation for more deta >=20 > * **[uses] rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFL= OAD_SECURITY``, > * **[uses] rte_eth_txconf,rte_eth_txmode**: ``offloads:DEV_TX_OFFL= OAD_SECURITY``. > +* **[uses] mbuf**: ``mbuf.l2_len``. > * **[implements] rte_security_ops**: ``session_create``, ``session_updat= e``, > ``session_stats_get``, ``session_destroy``, ``set_pkt_metadata``, ``ca= pabilities_get``. > * **[provides] rte_eth_dev_info**: ``rx_offload_capa,rx_queue_offload_ca= pa:DEV_RX_OFFLOAD_SECURITY``, > @@ -451,6 +452,7 @@ protocol operations. See security library and PMD doc= umentation for more details >=20 > * **[uses] rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFL= OAD_SECURITY``, > * **[uses] rte_eth_txconf,rte_eth_txmode**: ``offloads:DEV_TX_OFFL= OAD_SECURITY``. > +* **[uses] mbuf**: ``mbuf.l2_len``. > * **[implements] rte_security_ops**: ``session_create``, ``session_updat= e``, > ``session_stats_get``, ``session_destroy``, ``set_pkt_metadata``, ``ge= t_userdata``, > ``capabilities_get``. > diff --git a/lib/mbuf/rte_mbuf_core.h b/lib/mbuf/rte_mbuf_core.h > index bb38d7f..9d8e3dd 100644 > --- a/lib/mbuf/rte_mbuf_core.h > +++ b/lib/mbuf/rte_mbuf_core.h > @@ -228,6 +228,8 @@ extern "C" { >=20 > /** > * 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. > */ > #define PKT_TX_SEC_OFFLOAD (1ULL << 43) >=20 > -- Acked-by: Konstantin Ananyev > 2.8.4