From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8A96DA0524; Mon, 27 Jan 2020 09:02:58 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 86B4E1BE8E; Mon, 27 Jan 2020 09:02:57 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 367DD4C7A for ; Mon, 27 Jan 2020 09:02:56 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00R81rhP028347; Mon, 27 Jan 2020 00:02:55 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=4FoZWSq4uoPVyiQkZy/zTEXP8S/amZdPv+I8ScxZHkE=; b=fUBb30rNzJ146qFshQlBerEFWB4RuAS5i/tr3levIf8vDoTcWbDhhZHY/XRoMKSJsE2V WpvzgUABmjRlOtjHxdZSwopUuM9ZyQ6/OR6J8lyYFn8ACkdWETio/5yFIRqYWqBMurSv MzVcYQCSNFLKpJv4qz7wwTU2xNN9C/M78JKJJYmcLTm+qcE2MrMfpOxsQC8nfNH0WHSe JHK/2WsKg4ROF1TLfl1JvZb+w9HDOyWnt6+x95YPLLALCaHgGemafZMXJL/KpKzzs7OY PnajahJKKaRy75EI3Oxi6wrXIiJUhTIHFjNH1cGrzNx+tlJgLssXukCczWqU++tU2iq+ Sg== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 2xrkwuec2d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 27 Jan 2020 00:02:55 -0800 Received: from SC-EXCH02.marvell.com (10.93.176.82) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 27 Jan 2020 00:02:53 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.172) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Mon, 27 Jan 2020 00:02:53 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XkOujrm5MJjZMbnbkiF1UkOqqtt9YSeNYMJZESyT7yjiqDnbydPhoWKTZ6TaV+rJux8DjM/I+AW3JnvIe0XMePfIXnhCPESiv1VkPtWbwkY8S9D3rAisuRCLRaXORKgUFdVcgpm9ZFuCjoNNCi8DvluTznDD+opoBqOpelUXvjocVt8OCR8s4SKEXbwPoteJw0b7gB/EoJACOIqFBD+22eczs40FnW8AOOj40OhMMCvYSa63hfjrxXoZs1eHA7ZWWt5OzhL/nfwNC42rEoWl+39CFu3Rlu6Mgfr9yMkFv5/ku3BfnSjdjoW1hO9w/LHrjyK/ZFqbmli6S0JAGyF9PQ== 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=4FoZWSq4uoPVyiQkZy/zTEXP8S/amZdPv+I8ScxZHkE=; b=P9CU3TN/MLnGTDIBFwMqDj8Q0QpYMQMFebBzCpagxj6VDRzZtUEqblaFgF8ATSsI3K+6BoVvlsB0rlMIvtXmYCakKIT0GNC+WugaZXMBYqXLyy2KwH5pBVnGWWfdl32rvtKJvQ6PehK4YlS2ZmkA4x+UA3+BgB1rTjADaXszg8klc5sod0NCaBn40PSQnF1YMh4M9TyVeqwfzkGnFyZ960nhvkEhaMLhwXruAJYK4gA3nnPfh4QC+c0llcC8st1Wis0X+JJQKzfeb8mZcZnfya7WUXD4XhEJz6PVWJ67d6MRV7MQ0eclaqTY1GVBH8J8ilPaSuHZZ+/D6l5JLtgsJg== 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=4FoZWSq4uoPVyiQkZy/zTEXP8S/amZdPv+I8ScxZHkE=; b=UDx9icFIF9dIg86uQiKZ8d4/fxp07Lm8RKl7taNdj8v2uqrSLXUjFZX7EUlOJcvv10ydylV7/VWYvYti9PaS++gZU0n5qVdBZyMaliTRZbqJxYV1lib/ErAvBuy3aqUJ7itgUxfoAsAdVaN/DicDQ/W78hGzPhZndnktXu8N2/0= Received: from MN2PR18MB2877.namprd18.prod.outlook.com (20.179.20.218) by MN2PR18MB3182.namprd18.prod.outlook.com (10.255.236.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.24; Mon, 27 Jan 2020 08:02:52 +0000 Received: from MN2PR18MB2877.namprd18.prod.outlook.com ([fe80::e48d:494:fc46:3572]) by MN2PR18MB2877.namprd18.prod.outlook.com ([fe80::e48d:494:fc46:3572%7]) with mapi id 15.20.2665.017; Mon, 27 Jan 2020 08:02:52 +0000 From: Anoob Joseph To: Akhil Goyal , Declan Doherty , Thomas Monjalon CC: Vamsi Krishna Attunuru , Jerin Jacob Kollanukkaran , Narayana Prasad Raju Athreya , Kiran Kumar Kokkilagadda , Nithin Kumar Dabilpuram , Pavan Nikhilesh Bhagavatula , Ankur Dwivedi , "Archana Muniganti" , Tejasree Kondoj , Lukas Bartosik , "dev@dpdk.org" Thread-Topic: [PATCH v2 02/15] common/octeontx2: add routine to check if sec capable otx2 Thread-Index: AQHVze0FrEZlZI8I2Uup9KMcKNN4c6f+IzuAgAAQURA= Date: Mon, 27 Jan 2020 08:02:52 +0000 Message-ID: References: <1575806094-28391-1-git-send-email-anoobj@marvell.com> <1579344553-11428-1-git-send-email-anoobj@marvell.com> <1579344553-11428-3-git-send-email-anoobj@marvell.com> In-Reply-To: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [131.228.32.182] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6783b7c0-3be5-4a82-b78f-08d7a2ff4f42 x-ms-traffictypediagnostic: MN2PR18MB3182: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 02951C14DC x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(346002)(376002)(39850400004)(396003)(366004)(189003)(199004)(316002)(110136005)(54906003)(8936002)(81166006)(81156014)(8676002)(53546011)(55016002)(5660300002)(9686003)(52536014)(76116006)(6506007)(71200400001)(66946007)(64756008)(66556008)(66446008)(66476007)(4326008)(478600001)(186003)(2906002)(33656002)(7696005)(26005)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB3182; H:MN2PR18MB2877.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Qeul1qXAYPC62SuWiCMp2W1ScOswLuzkjjjfQeQqDKWhSl9MVGBnCp/ERJcJHJGNfTA0976fSxk9XVFYreucgA1AIWINQlj7v3gC6dc4P/VhC/LwQqw+E2iuaC2vFiFEkzXgqpYPeoOAUtgTrKvgPXSvX9sfuYKYmEqJ6iO8H75/3uSAJrBEZ8ra5lfLM9tKwD62N42fcpiyRcO9Jvw29jAunercCe7SW4UAPEuwuMNGkZumYvdUF2coqEzUmnNP9h13BbRYulk77f36mlGVsOS8nxfjKfLX95uPhimmhUnVn8JY8Ui5J7JSdCseTvrtDxKCqg3foreV8clcJpJkYdppRpiaMIHnEEY8CmD3adOqmNh0spB5fwPa3HlG6yr9MVkjLbvao8Rg85MYlwtcMtrUz8NiyF5KuEXMT2wjeH+GFO9hRf2aQ3EFVy//9MfJ x-ms-exchange-antispam-messagedata: FgAe/AzATBwUTQkQY1QKo1ijuBeWWongxOsIKoQM+XuJ58xyx+FR5qL8pyEkJhG57FhvwQpGJFHv3ll+vftZuVb9WhRwXebDSeOQDYsqj7UFTTSPlm6LHj7MDrPuOQ/vVwUXqMkAbiKo0IMfTjVgrQ== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 6783b7c0-3be5-4a82-b78f-08d7a2ff4f42 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jan 2020 08:02:52.3818 (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: oLPDfU67y0+QKCcPDhpB3rM/lztWNlmAFB0teZhW5GX0EskzxO+efvRIICX8QBisPsmJHojcUoRaTqo8mFG9Qw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB3182 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572 definitions=2020-01-27_02:2020-01-24, 2020-01-27 signatures=0 Subject: Re: [dpdk-dev] [PATCH v2 02/15] common/octeontx2: add routine to check if sec capable otx2 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 Akhil, Please see inline. Thanks, Anoob > -----Original Message----- > From: Akhil Goyal > Sent: Monday, January 27, 2020 12:31 PM > To: Anoob Joseph ; Declan Doherty > ; Thomas Monjalon > Cc: Vamsi Krishna Attunuru ; Jerin Jacob > Kollanukkaran ; Narayana Prasad Raju Athreya > ; Kiran Kumar Kokkilagadda > ; Nithin Kumar Dabilpuram > ; Pavan Nikhilesh Bhagavatula > ; Ankur Dwivedi ; > Archana Muniganti ; Tejasree Kondoj > ; Lukas Bartosik ; > dev@dpdk.org > Subject: [EXT] RE: [PATCH v2 02/15] common/octeontx2: add routine to chec= k if > sec capable otx2 >=20 > External Email >=20 > ---------------------------------------------------------------------- > Hi Anoob, >=20 > > > > From: Vamsi Attunuru > > > > This routine returns true if given rte_eth_dev is security offload > > capable and belongs to octeontx2. > > > > Signed-off-by: Anoob Joseph > > Signed-off-by: Tejasree Kondoj > > Signed-off-by: Vamsi Attunuru > > --- > > drivers/common/octeontx2/otx2_common.c | 20 > > ++++++++++++++++++++ > > drivers/common/octeontx2/otx2_common.h | 2 ++ > > .../octeontx2/rte_common_octeontx2_version.map | 1 + > > 3 files changed, 23 insertions(+) > > > > diff --git a/drivers/common/octeontx2/otx2_common.c > > b/drivers/common/octeontx2/otx2_common.c > > index 7e45366..2f9b167 100644 > > --- a/drivers/common/octeontx2/otx2_common.c > > +++ b/drivers/common/octeontx2/otx2_common.c > > @@ -3,6 +3,7 @@ > > */ > > > > #include > > +#include > > #include > > #include > > > > @@ -23,6 +24,25 @@ otx2_npa_set_defaults(struct otx2_idev_cfg *idev) > > > > /** > > * @internal > > + * Check if rte_eth_dev is security offload capable otx2_eth_dev */ > > +uint8_t otx2_ethdev_is_sec_capable(struct rte_eth_dev *eth_dev) { > > + struct rte_pci_device *pci_dev; > > + > > + pci_dev =3D RTE_ETH_DEV_TO_PCI(eth_dev); > > + > > + if (pci_dev->id.device_id =3D=3D PCI_DEVID_OCTEONTX2_RVU_PF || > > + pci_dev->id.device_id =3D=3D PCI_DEVID_OCTEONTX2_RVU_VF || > > + pci_dev->id.device_id =3D=3D PCI_DEVID_OCTEONTX2_RVU_AF_VF) > > + return 1; > > + > > + return 0; > > +} >=20 > Why is this API defined in common? > This is a capability of ethernet device and is only specific to OCTEONTX2= driver. [Anoob] Crypto PMD is querying eth dev device for 'security' capability. If= we put the call in ethdev PMD, then there will be a build dependency.=20 This is required because we need to map crypto queues to eth devices. This = is required for outbound processing. =20 >=20 > - Akhil