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 250EAA0C47; Tue, 6 Jul 2021 11:14:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E044240688; Tue, 6 Jul 2021 11:14:00 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id EF7D24067E for ; Tue, 6 Jul 2021 11:13:59 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 1669CHnJ026405; Tue, 6 Jul 2021 02:13:58 -0700 Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2168.outbound.protection.outlook.com [104.47.57.168]) by mx0b-0016f401.pphosted.com with ESMTP id 39kt2mce06-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Jul 2021 02:13:57 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hg95Guesn96Gut/IBILgRdAf6xtO6sT227l/st1xy77vvyUBbwF1FleFKnk1zUctfFEFdoqar79IxLryFAbZO4NZ8RE73CnK3OjoXFcE/mlHh8jyiaDbQJF1Xk48hs4GvObTpcxImKKo+k3/u9cwVGkNAOEemZMH+9qezPUO+hRcnY6aGAu576rCNO+n/deTiWMkHsSArvRs2m2NChM9h3TWa5D5QBmnl2bP/xSLWJTxTmxr/NWsB87LBmNbI6ZutWqJYqZJ6MSoOmVFpd5qHtc78kIWMuRD5+0bbKgs3PdUMODcu1TjuAUMGh62innb8iWw4Ad9buCb4ew3NP+IbQ== 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:X-MS-Exchange-SenderADCheck; bh=usM4UpJZJPS0m+I3se0nJQE2EDdv+FvcplmhcQDly5I=; b=HajAKLA5ZZwc8dNCRB9o/xlorcFMPAkBoJjo0fLxnMpVHyw4OsuhTXoZEpJWFjJMTww2hiP179OkUzkk/ojMJ7c5MrooB79Miv/PpAzFhAvlPqudt2VmuToziwTVCLynPUj6LzX8MMh9br/FiwX1NhczzyuvNUezFBTGNR6NkAv5mPNdq+svX4Y8SOTPOdNrgWeNmUMcQaD75Limpj/krcXs6XVjEmP24CC+ATDrIhd4/mBqtIliLheuYNpyI31hxRhL/N8FzWBW3O8Y4cRR4PYiI9Bo2yfkedm6X4pv8/pqlwxSpkmBUkUsHWgdy15h5onsLIwxdtjcz80L/x4brQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=usM4UpJZJPS0m+I3se0nJQE2EDdv+FvcplmhcQDly5I=; b=s1OZC+uC5R3Lq5AQZyxbbR5fHXv1KBfzqcAFVvpZIZHarDPa0pH6+lqV4X6g3RvAX+CZ4MsnCHGsvnGu1CrUHNa4YNXkB9EWL1yd77MlBgMf8q9gGxi1+i7Y5zpjKt4uJEKioujG5W2FdvfUmsg7sXQHoBRl1W1HakJTqoG77vQ= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by CO1PR18MB4732.namprd18.prod.outlook.com (2603:10b6:303:eb::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.19; Tue, 6 Jul 2021 09:13:53 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::1455:9a67:a6e7:e557]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::1455:9a67:a6e7:e557%6]) with mapi id 15.20.4287.033; Tue, 6 Jul 2021 09:13:53 +0000 From: Akhil Goyal To: "dev@dpdk.org" , "olivier.matz@6wind.com" , "konstantin.ananyev@intel.com" CC: "hemant.agrawal@nxp.com" , "thomas@monjalon.net" , "g.singh@nxp.com" , "ferruh.yigit@intel.com" , "roy.fan.zhang@intel.com" , Jerin Jacob Kollanukkaran , Nithin Kumar Dabilpuram , Akhil Goyal Thread-Topic: [PATCH 1/2] security: enforce semantics for Tx inline processing Thread-Index: AQHXaOPRupyvlgl2k0+uvfbsoWMHlqs1u5VA Date: Tue, 6 Jul 2021 09:13:53 +0000 Message-ID: References: <20210624102848.3878788-1-gakhil@marvell.com> In-Reply-To: <20210624102848.3878788-1-gakhil@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=marvell.com; x-originating-ip: [182.68.121.110] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: cd43c5cc-efd3-4062-dcc2-08d9405e6068 x-ms-traffictypediagnostic: CO1PR18MB4732: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: q8MjpH7PdYWDc4diM9AIQM2X6R8RTqMoTR0kNKu5C+I6ILtmNVGXRt+/3PvvkrOg3JQN15LLTfCtUR21bYCJSJx1A0PubH6MtdvBBcsKSGnpLco+54erEEFLy3ItaEc3nCTuvSYLiqwCSjuwdv1gPmoOC3dzbVl1bd0ie/mlheBVrrs1uQiNhiVxxZ3l2EmxLfftWtDIugcIUTkkIK+7ZmNkKeVdanVWoFb4HZHe0C9mSuA9CYxW5UeeVa0sR4KXzPUOS2m7ldlrwQKy1QUkcWzAxE6E2pzfyvRSVKcoA685PaWv6oBuxUpoD2uHiUtilBRSSleNugrUxSmMIWJxqfbsJr4Tucdq/PVn5h/UOr3mFon6wFtzkYklnMAzkSw7HhvXNqcsc/YECNS/GyCbn515XTHub+79c+gFwIQDFoNZ/a7N7Er/r0nepC7mEQNQjRTm7go93nTOdcrFfeJRPXpahCkuWsv9kaIjINbKJWjz4VUqU2LC9jXJXWZKGlU78FAg3GBmIltkhZybmh6tQNSbOGYV1TqQ3T7FkjZwaV0RE9NJ1XA7fxBvEnXWMXIvZxUQCUYVZeVNYewNF62442Jh33nXyBAuNKgYN17GMgARgb3yoWf91eIcccGmX8+gZHMOsJoyKPds93MwV+M8rg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB4484.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(346002)(376002)(136003)(39860400002)(396003)(71200400001)(55016002)(76116006)(66476007)(15650500001)(64756008)(66946007)(66556008)(66446008)(9686003)(5660300002)(86362001)(2906002)(52536014)(83380400001)(33656002)(38100700002)(478600001)(26005)(7696005)(6506007)(110136005)(4326008)(8936002)(54906003)(122000001)(316002)(8676002)(107886003)(186003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?/oyKDZJ47aeaR6blK+UzcLZfqvw9IRjvZoIYVnuIeAgGixoYLxNlIve1/FQb?= =?us-ascii?Q?dhK697lI34LiiTV0MOR4Y0QgSlPdjISzIejPqy/fVtzBhTFyaw0w9gln/ZTp?= =?us-ascii?Q?t5X3qLFstjk6vEvV8qDVlKq03O1REIWeGAVtOGbs77CAuRXyfgXlfN7CdV51?= =?us-ascii?Q?GRl0Nan2cjYGU/YvADnAB4lYIjLPNI3IgtVIJxQHmKpdrSc9jCA3ki0YjhAl?= =?us-ascii?Q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+hlBLOBH6Jd4efwZ1i?= =?us-ascii?Q?XrmGcWR80EGSur/aw+ey7iAnGD8cIYYPtNzl+wxJ3yn899OdtrMfObTq9RQk?= =?us-ascii?Q?G7G0EWS90frMcTSbZf2LIEX/IxnF7F78Wapi7meUnDz6xmgdzgzyVqLp/7+a?= =?us-ascii?Q?YdYyw6op7S+TXbQjA2KegcZBXnTUz4UvGDNqm3yTteLIlZozoELs0wnWhYt7?= =?us-ascii?Q?urH7m5CIj24yEFqKqwxwSbRb?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR18MB4484.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd43c5cc-efd3-4062-dcc2-08d9405e6068 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jul 2021 09:13:53.6840 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 76BYjXLco/7cYuXnt0KJAArMAYw/QQnPeR3iIb8jO9C6jZ5cCJjvsHcV3NIgguSbJ3TbeRcVJW1T2PWz5Sz77w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR18MB4732 X-Proofpoint-ORIG-GUID: Li4pxvvdYFv-GMVCllkbBDevF_s4mxBq X-Proofpoint-GUID: Li4pxvvdYFv-GMVCllkbBDevF_s4mxBq X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-06_04:2021-07-02, 2021-07-06 signatures=0 Subject: Re: [dpdk-dev] [PATCH 1/2] 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" Hi Konstantin/ Olivier, Could you please review this patch? This has also an update in documentatio= n of mbuf. Regards,=20 Akhil > From: Nithin Dabilpuram >=20 > For Tx inline processing, when RTE_SECURITY_TX_OLOAD_NEED_MDATA is > set, rte_security_set_pkt_metadata() needs to be called for pkts > to associate a Security session with a mbuf before submitting > to Ethdev Tx. This is apart from setting PKT_TX_SEC_OFFLOAD in > mbuf.ol_flags. rte_security_set_pkt_metadata() is also used to > set some opaque metadata in mbuf for PMD's use. > This patch updates documentation that rte_security_set_pkt_metadata() > should be called only with mbuf containing Layer 3 and above data. > This behaviour is consistent with existing PMD's such as ixgbe. >=20 > On Tx, 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. > 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 > Reviewed-by: Akhil Goyal