Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp834392lqj; Mon, 3 Jun 2024 02:06:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVlEIlVJDs3jEkocexX22JG4nPE9moNPea2JsuV3rZx4Dr3cKNODfAiD0G/BVXCCSXaJz1//rqqMmQCBMB1zNdcXGtERL+rzqD/f8gjMw== X-Google-Smtp-Source: AGHT+IGGfqg+rkoyD+C/BejG17zj8wMj+tSIfkjfqQj0cFJiVr2SPpbL7efCEmctwFIYEMTzDYdf X-Received: by 2002:a17:906:f59c:b0:a68:e335:3e62 with SMTP id a640c23a62f3a-a68e3353fe1mr296218166b.72.1717405613983; Mon, 03 Jun 2024 02:06:53 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a68a9416298si277327566b.541.2024.06.03.02.06.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 02:06:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198834-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=selector1 header.b=h6n0nuX4; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-198834-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198834-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 844371F22E15 for ; Mon, 3 Jun 2024 09:06:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF9E98061B; Mon, 3 Jun 2024 09:06:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=marvell.com header.i=@marvell.com header.b="h6n0nuX4" Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2099E7A140; Mon, 3 Jun 2024 09:06:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=67.231.148.174 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717405586; cv=fail; b=Ol0GdCB3DpXSHN1pqd789lWu/+J1J1EPWmLP5Rb17GZJkcSqXuwQi14/WIZydlhwbNZpH+Q5IOnsNu3se2SOd4Kxg/gtyzKXYEtQi2JvJUSciInRdeHjvijFlQUGJmmR3Tvgx4Upklv+DZbif7DjLhR0uCnRGM/14dt02yusF+g= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717405586; c=relaxed/simple; bh=S1spURpvq/SrRUfYymQH22t9HjCWO/JMFYZ8XFvI9iY=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=T0R9eLY2sLM9na3L+OBO9Oei2zumasJPAn7/vZa/Ugj6LXB1zY/ul+zOGWWrPzf/3B7jdCgbEMUzSyrBVMer0i7rIgZSZ+q3QkFZckL0YZTuhoNWw0TNawLbElLbDCD8DIWFZ9iGRaTvd7x4sHEtnOw3jbSLBhU7Dh/Dit/fOVI= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=marvell.com; spf=pass smtp.mailfrom=marvell.com; dkim=pass (1024-bit key) header.d=marvell.com header.i=@marvell.com header.b=h6n0nuX4; arc=fail smtp.client-ip=67.231.148.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=marvell.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=marvell.com Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 452LkQDW015935; Mon, 3 Jun 2024 02:06:16 -0700 Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2044.outbound.protection.outlook.com [104.47.66.44]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3ygufmsymk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jun 2024 02:06:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XwAK3kTdPzYzQhhw7MFlYRwo8xwjn1sXLhfUoIiSpqh8F1uWZ5AnHNi1R8Mo/74vpjMx32PzsJ53LtF/BX7qJpjn1anMg09+PvW/YERo8FxovsT5tqXE/mc3R+0NMuPmWtM33HsJ2HsI2vysFAE3bIQTNNLPBJBKsc7lK+TJlx+73jS87xA0eFwm+qgHaCns+5wpv8wPATMzjJYQPFjcq/8y6QrGcoulppixgyXXjFtZG4NWomk2SLmecd3k1VwDFvkYt8779IO+IkBjYGa9BZQoqS0fLAD5oxky7AMDzWjlqrox/p7LYJTDepZ6zHGmLt2dK9Uy2AumPX+rHB5mYA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/rs0jhJFAInPk+o2aYkuzei81RhHCIz19Br0ZPqWkoA=; b=TBqwds5blU6Np/kv84KNveRAtUZkwtrSSyEDdz/3am+aFAi7h74bGVXWI2rv6b9+UJtcKMGhI2710qTZFz09whAZYeI04UP7mK7ga7Gt8QIaEaYlVWb2PbJSPmcW51gNacuCU7mUHsPwrwrkPUTtpNgG0pNK8muTicL2fuK0mdsyxLAski0kUlCUP4AnM1i2qmvSoodXcYLLWQlxDwmFLFnJFKiqLHL6SSRq6cKdGt6uAzGOW/JlRzfvBxIHecSDhYwQiwE35fjQpvh/7XAijvoX+SfmEZKVApOaoZAOuIsaT+1pHavxSte/Vh/369aXx3fVtw6ZAqSE8YMuweQApQ== 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.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/rs0jhJFAInPk+o2aYkuzei81RhHCIz19Br0ZPqWkoA=; b=h6n0nuX4reR/qXISWZpR6mvJG4ghuSIf7RbniJE7MztLsie9IjlBh4bCFcEO/ddj9FHjL4neMy76Cg6l/OQMo7C0WYNwU/EV0jxAl51bxW/Ue/bXPvEKe5gohZUvM/n6dvKdZWqui+BYF/utq78vxoqrhONFWlt3dViAsq7TZhg= Received: from SN7PR18MB5314.namprd18.prod.outlook.com (2603:10b6:806:2ef::8) by CH3PR18MB5859.namprd18.prod.outlook.com (2603:10b6:610:1d8::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.36; Mon, 3 Jun 2024 09:06:13 +0000 Received: from SN7PR18MB5314.namprd18.prod.outlook.com ([fe80::f808:b798:6233:add8]) by SN7PR18MB5314.namprd18.prod.outlook.com ([fe80::f808:b798:6233:add8%6]) with mapi id 15.20.7633.021; Mon, 3 Jun 2024 09:06:13 +0000 From: Bharat Bhushan To: Simon Horman CC: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Sunil Kovvuri Goutham , Geethasowjanya Akula , Subbaraya Sundeep Bhatta , Hariprasad Kelam , "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , Jerin Jacob , Linu Cherian , "richardcochran@gmail.com" Subject: RE: [EXTERNAL] Re: [net-next,v3 6/8] cn10k-ipsec: Process inline ipsec transmit offload Thread-Topic: [EXTERNAL] Re: [net-next,v3 6/8] cn10k-ipsec: Process inline ipsec transmit offload Thread-Index: AQHasQaTfyi6mWkXDkOBPclCj0tdJLGyuFMAgAMP14A= Date: Mon, 3 Jun 2024 09:06:13 +0000 Message-ID: References: <20240528135349.932669-1-bbhushan2@marvell.com> <20240528135349.932669-7-bbhushan2@marvell.com> <20240601101930.GB491852@kernel.org> In-Reply-To: <20240601101930.GB491852@kernel.org> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN7PR18MB5314:EE_|CH3PR18MB5859:EE_ x-ms-office365-filtering-correlation-id: 0495eb40-a67d-4db2-ba92-08dc83ac6b3e x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230031|366007|1800799015|376005|38070700009; x-microsoft-antispam-message-info: =?us-ascii?Q?Ah82SZ05tPX+7uYX6/H8wtIxI295UE+K5P67SlWgx5x8rUwzKc9S8G2ywcD4?= =?us-ascii?Q?pqrb5r3PFRG5IcjWLqa8BQ8FQevoxPuNNwtffsrHoqoc1XC9y3N727o1RBgO?= =?us-ascii?Q?SmWooNGDTc4ymRdvyMO3tGfIcIKEyJFcOj3SFWMDN4x3x6eddYecUFRURMhr?= =?us-ascii?Q?e/h61rrN+G5jonexrjYY6gnk30kZ2YUc1oOz/Bm6Q0Lm0qVK/eoxXr9QklXI?= =?us-ascii?Q?FFLDoclvwoMdFhgNBQ+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7?= =?us-ascii?Q?1FZYJvSclqRrphV+rOGH0rMgcrqLNAe9KEFBum34qDd3zCs8YZMJXyt7D3om?= =?us-ascii?Q?gJykqDZw7W5JqVhi5yPEbUAfZKqrp+yS6YkFR05Yx0S8PMuU4/AxAk/u+eJe?= =?us-ascii?Q?xXOWzqtPKvNiL9JnuJEKBl7QtkFt+/dxKxdXva1HVqf9f1i8VK96yT49fgIx?= =?us-ascii?Q?BRNRzY+YaR1tHjpTAP8HMrEfZ6q3IKcpi0nZxobeFcKcBA=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR18MB5314.namprd18.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(1800799015)(376005)(38070700009);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?08LZcTtI86cQALu+b/vUXX4zY3mAyqDH9agoRN2nrpwY7bnKrcMgUxvqaYIc?= =?us-ascii?Q?nbQvi/gZpJ6g2NQJx4HvvsnYm2oVt6jbkrupTB0LoZMg+QWF5PYrV67CZ7Vm?= =?us-ascii?Q?8ViRhXT5ANZaYrtBmiB6cevbyEmCyAW55lp8+SVftFoXzy1PXMmdtksmJ7Ty?= =?us-ascii?Q?yG7ZvbbH/T/1mqo/8ghtKsNB2EgrytVNLNZd6wSiEgoYKFxNKzydLIZX+bpB?= =?us-ascii?Q?weI9rLjo+RsKjGGiiol6IvxIVrTAG27ovDt/QXySnAVIlulJrG9hAco2JXHA?= =?us-ascii?Q?cDIfUnp3FmSbXTVczcLL2rKNZCEk6911Y1A/XRvI4oiGnE+C67F+4tILk8sg?= =?us-ascii?Q?EXOn2esQXi3H83C+CdV+/ySPNSIEzAtJq/2PZG/2xzhy1XSlju/EC5pkxnj/?= =?us-ascii?Q?lsIhjgG6IzdewfZbo8GLK+TVevdZcxEj7wWsFVytuhSCano+aD1WJ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V5z+Xy5nKo5byGx1jAjJGlFV?= =?us-ascii?Q?z2JYNendSj1/2GlzUJOfwxnUC5beO1IDLVe4Y6O/EPIPmVR6SFnqWA34R/g4?= =?us-ascii?Q?O3PjF/JHdNpApPukaP01dFIcZb5Vb68Fbk1I2EdaHUA4ZJ9N8niZMaQiN0OG?= =?us-ascii?Q?AvBHq+2x+7Jdsd8Mw8+CASQnUI2/s2wWB7uGqoQbJrczpBUHnF5qzO7zfkBi?= =?us-ascii?Q?DJ3S7SZKiS4icFHq0eirNwetmxVLHpTPvuaBqbdK?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN7PR18MB5314.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0495eb40-a67d-4db2-ba92-08dc83ac6b3e X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jun 2024 09:06:13.6427 (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: PnXC5l6op3nG+RzX2Jim6c02jeAsKdImxk/CXXPoXpEqTyka3QOtkzI/n1y7TuaYMO128e5JuMuxLO4h0QeX1g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR18MB5859 X-Proofpoint-ORIG-GUID: uZYKiq0BANrirF2A9dCKnEoRnbabKiWD X-Proofpoint-GUID: uZYKiq0BANrirF2A9dCKnEoRnbabKiWD X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-06-03_05,2024-05-30_01,2024-05-17_01 > -----Original Message----- > From: Simon Horman > Sent: Saturday, June 1, 2024 3:50 PM > To: Bharat Bhushan > Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Sunil Kovvuri > Goutham ; Geethasowjanya Akula > ; Subbaraya Sundeep Bhatta ; > Hariprasad Kelam ; davem@davemloft.net; > edumazet@google.com; kuba@kernel.org; pabeni@redhat.com; Jerin Jacob > ; Linu Cherian ; > richardcochran@gmail.com > Subject: [EXTERNAL] Re: [net-next,v3 6/8] cn10k-ipsec: Process inline ips= ec > transmit offload >=20 >=20 > ---------------------------------------------------------------------- > On Tue, May 28, 2024 at 07:23:47PM +0530, Bharat Bhushan wrote: > > Prepare and submit crypto hardware (CPT) instruction for outbound > > inline ipsec crypto mode offload. The CPT instruction have > > authentication offset, IV offset and encapsulation offset in input > > packet. Also provide SA context pointer which have details about algo, > > keys, salt etc. Crypto hardware encrypt, authenticate and provide the > > ESP packet to networking hardware. > > > > Signed-off-by: Bharat Bhushan >=20 > Hi Bharat, >=20 > A minor nit from my side as it looks like there will be a v4 anyway. >=20 > ... >=20 > > diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c > > b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c >=20 > ... >=20 > > +bool cn10k_ipsec_transmit(struct otx2_nic *pf, struct netdev_queue *tx= q, > > + struct otx2_snd_queue *sq, struct sk_buff *skb, > > + int num_segs, int size) > > +{ >=20 > ... >=20 > > + /* Check for valid SA context */ > > + sa_info =3D (struct cpt_ctx_info_s *)x->xso.offload_handle; > > + if (!sa_info || !sa_info->sa_iova) { > > + netdev_err(pf->netdev, "Invalid SA conext\n"); >=20 > nit: context >=20 > checkpatch.pl --codespell is your friend. Will fix here and run this on all patches. Thanks -Bharat >=20 > > + goto drop; > > + } >=20 > ...