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 23134A0524; Mon, 27 Jan 2020 08:01:10 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6814F4C74; Mon, 27 Jan 2020 08:01:09 +0100 (CET) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10084.outbound.protection.outlook.com [40.107.1.84]) by dpdk.org (Postfix) with ESMTP id EDE16397D for ; Mon, 27 Jan 2020 08:01:07 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KlRnmiHep8slS5Ni3IMzvm+U1rn0I91iKY1FUi3aRm7wKrBqiZcCtC1ydEUZx59hK5EFg0b7MxEdI6mt5qCe25FQC3m2V1PXfG2S32i3843cZJ+jgDSv8RM6hvvIPvWLi+sxrT/V6t9XbfybZVkBjJkGIrSH1n8fAIExLLNeSp+A0bjZtM7M50RYGuIqYGvYHBXg1uFFs3tNfJCdKNPrI5/8Xl5zTj4unE5oUGziscZHYM8XcnXKqnkDlZvp27s7lExoVPdlSA/2t0xuIKERCwfDH2/X3BYH6E3dVd5W94mAcvBvIqQ44OoAzBShIHiJEDPbo5VNl8gz47kYPkXRyw== 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=OERqeF8mXZgnIv92lSaLdDCkcbP2OjxHyP2fnw7xYjA=; b=gTOLed4Ixc9zs9Cl3hW9ALINh5VnsG2HMkQBNqyfNbw1SMqXtKzUlOy1vLTyYRqDe0V2g1Lf5Ea/OfhMr0bi2DvHAP4xeJjZ19txa8oMPCMxjCb88b/AJFDHyprHtS7NTxzfbLoJI2b5EVB+fwu6h2uTOmbxOnrRkZKIHUxcw+Da+MmCI3aqtXLMNmvCOnxwnU2qMtnw8x/hY86TTpy/oxegwdwmDatP8aaeJZo8MzKu2e2nnj05eK0ZFQ5FbkBlZYLdilKS9uaBh1x5qzVcKiAESXR3yi39URV3hR5X3nIXGuJSQ3lJOdGJE2RtaClBMsGDl1RlVyvJaTMw6uHLnQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OERqeF8mXZgnIv92lSaLdDCkcbP2OjxHyP2fnw7xYjA=; b=pOwgtv+wWeWf69e/MRyqV8RTULICn/3giG77cGQpqRdFvaiOCS81r+GRnNivFQG5ufgkoRx2gxg15W3L2aOup1so8UcIpusLtubveSWtxtAchyuP/h7ken1YteQ2CZeK1AD1pHUOjnIDMuTSj7T4vYMbKdXZYIw78WJJYTjc15c= Received: from VE1PR04MB6639.eurprd04.prod.outlook.com (10.255.118.11) by VE1PR04MB6688.eurprd04.prod.outlook.com (20.179.235.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.22; Mon, 27 Jan 2020 07:01:05 +0000 Received: from VE1PR04MB6639.eurprd04.prod.outlook.com ([fe80::25b0:b1ac:aed0:63e1]) by VE1PR04MB6639.eurprd04.prod.outlook.com ([fe80::25b0:b1ac:aed0:63e1%7]) with mapi id 15.20.2665.026; Mon, 27 Jan 2020 07:01:05 +0000 From: Akhil Goyal To: Anoob Joseph , Declan Doherty , Thomas Monjalon CC: Vamsi Attunuru , Jerin Jacob , Narayana Prasad , Kiran Kumar K , Nithin Dabilpuram , Pavan Nikhilesh , Ankur Dwivedi , Archana Muniganti , Tejasree Kondoj , Lukasz Bartosik , "dev@dpdk.org" Thread-Topic: [PATCH v2 02/15] common/octeontx2: add routine to check if sec capable otx2 Thread-Index: AQHVze0H9YMJIXcv9U2DbmE0OZs1Zaf+Ioqg Date: Mon, 27 Jan 2020 07:01:05 +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: <1579344553-11428-3-git-send-email-anoobj@marvell.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=akhil.goyal@nxp.com; x-originating-ip: [92.120.1.72] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 0fee3e16-4c15-4f4b-915a-08d7a2f6adc6 x-ms-traffictypediagnostic: VE1PR04MB6688: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2399; x-forefront-prvs: 02951C14DC x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(136003)(396003)(366004)(346002)(376002)(189003)(199004)(86362001)(44832011)(4326008)(186003)(7416002)(110136005)(54906003)(2906002)(5660300002)(9686003)(55016002)(26005)(316002)(6506007)(76116006)(71200400001)(8936002)(8676002)(81166006)(81156014)(7696005)(52536014)(66946007)(33656002)(478600001)(66476007)(66556008)(64756008)(66446008); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR04MB6688; H:VE1PR04MB6639.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: M5YRfpK/0TedHcrYLUk1G67nbIKMEMzVsjQedEam3USiFyzw/Z9KlLNjPQnjCx+HYgb+hB08w65yIoqS1TJRFZdUZrnxKjDUjU4Mlci6tonOGF29SECzxeG40fB9c6DeUc5ZRKYHKTwkSpWy0bVTwW/UCwnUGbQtQ7yJwF5myi7FcXAHXyxYEUSmLUf0HPnN2muO+hyDWuJARGRU56V2Fr6+2eUjZhk1Mz+wQvIXChc6ufAESl1UYk7LG4dnIO9Nhs2w+UyNVXSdRBwqRozhl8Zq9wC1WdsFCBup/+qoOpDD3y6K5ATRaDovOMBMSo5TS488o+Iwh3XPXWtAz0leJe2kRV1BkLf+NFVaHgdwAvAZeRlLUpb7vq6SdJltK3gh+RS+jgc+0WSDwWjYc4LNbOquvOQiqzxLJ23aAaJ6wAFsHZpZPtk8a/8DAjynUrzQ x-ms-exchange-antispam-messagedata: tEr88nzReE0LWnYekJmMhK8XsV3VQG+tv6z1u86eifVxGl9STi3vvMckN9HgtNG78oa2VRGxfniGtnpMw46YyJgw4haWcOoV1h3bq4CQRT1zPuppxoEie8vqHSNU5wqOslJhaKytUhUBiM3COihvFg== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0fee3e16-4c15-4f4b-915a-08d7a2f6adc6 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jan 2020 07:01:05.5771 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 63yURKJ3aV9CDZvh/y7BV+wRG5Bjs4ZbcFUXIHEmdfzbEyYvn7gABLvhC4030MzxAWZJhL1HyoBU5VUbxBx4bA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6688 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 Anoob, >=20 > From: Vamsi Attunuru >=20 > This routine returns true if given rte_eth_dev is security offload > capable and belongs to octeontx2. >=20 > 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(+) >=20 > 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 @@ > */ >=20 > #include > +#include > #include > #include >=20 > @@ -23,6 +24,25 @@ otx2_npa_set_defaults(struct otx2_idev_cfg *idev) >=20 > /** > * @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; > +} Why is this API defined in common? This is a capability of ethernet device and is only specific to OCTEONTX2 d= river. - Akhil