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 17EB1A0524; Mon, 27 Jan 2020 09:12:15 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B93401BE94; Mon, 27 Jan 2020 09:12:13 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id CEDDA4C7B for ; Mon, 27 Jan 2020 09:12:11 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00R86HIY028623; Mon, 27 Jan 2020 00:12:11 -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=nRvs649+VXXkhjz74xcgmiSHLvCRYjknlFf+BhRaqfg=; b=KQ8bubFUQUJOIrtNgoZm8RLjUa8VRI0H4I/I+5q1hll+poiT91ezX/jusuZNdkaAcSS4 PMS4KccFUrLLv66a/lkvWUODBF/9yqyECW/G50Q+mJfrvJ9hUFEMU8VHj0vREphPzpq5 gkcmz+L08TYh9XU3n3tPwL6ONDk+HKrXRHCqqT9DxQzWoyw6SlsuhjnnRj1xVKIqQpvC kDW45Xl2plzcPwVOUmHTGGY0/ugc9ApR8kHB88W3o/8uOU+6ACrOg19wBU8zCsKQP7lR 8E5yEUDHBsM3bSSCwIqlCY0vdxgpv8Ssm/QFrak0RKDCL2ygBwm2LYS95g0I/KtDScNE 7Q== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 2xrp2swx57-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 27 Jan 2020 00:12:11 -0800 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 27 Jan 2020 00:12:09 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.104) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Mon, 27 Jan 2020 00:12:09 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NRd7zGbwRJ71XhqRhb3FM/bcU9r0mhSyNSMaQyotZe6cmmskQ7NRcSlHcV3wC0p7Rrd93InkiQivwoFAqQhk85ewa2P5lRlXj3cWHMTISi3lP8jEHhgDwfbhGyGAn5ckqF7TcZOqLIlLQTfTdAEZ+jMIJPsNQfq8E5Ev/gehd1iX3zd71JEkmx7kC1neVv6xvDO7vN5u6AQn+nIrGQ/lXkOayDdZ3SW7t1PR4F4rojVk0ZwOYfUWv8aeAyKPYdBd1SX+eV+1dko+FPLbCXAkghWZM9bCA0LYP0/vQ9PlzM988N4n23SP+b1kY58W/8EFvxcrWA1Fv0kt+79KpZIuqw== 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=nRvs649+VXXkhjz74xcgmiSHLvCRYjknlFf+BhRaqfg=; b=IkkUt8+vr9b5F7h3JSUDCBBQ8XmVvb6g7tvYQDIRC8E1MnQpDWJbYu+RZ0WXm6EkuXblYgOFYVIc3fM7yruivhUJJhdbQ6uZST1IGnQtIeQaGh3yNKwmRlrzcW4VIE+fvclE53MA8a/P5aCJsUM2F47bBQ5JlWboKRaqKaMNc3zcZijFxEeXpyVRc4P3ByU6YoX8fuvQeXn4oQJipmBDKLfHQMIX8XuTROkNbNf6pTMX39IDh2DTNVLwWj+Wx+8VsEdo9Xf2x0ERZ5mY4DraUWuFaYotpNV/ohvdGEY7HbksQtc+fyXel+ITE66w2z+APw9IMOThx+GZDyalFh/mxg== 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=nRvs649+VXXkhjz74xcgmiSHLvCRYjknlFf+BhRaqfg=; b=jhICrtZ+/WXOvNhankHpqNB7wEt3rUTyy0yv11w/xABmjYv0YvkABkqg18QzuzzrzxNOLvFqoASE3YdyDPSEZUG6EFIQEZFii6c1e5OZaxxsjLHdF5AKTw2f5OPvEuMzkcyz6gvAg0OLdp9MyhdETHVQ/b0QdAYtdyw2+TnjQ6w= Received: from MN2PR18MB2877.namprd18.prod.outlook.com (20.179.20.218) by MN2PR18MB3197.namprd18.prod.outlook.com (10.255.239.205) 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 08:12:08 +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:12:07 +0000 From: Anoob Joseph To: Anoob Joseph , 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+IzuAgAAQURCAAAMHEA== Date: Mon, 27 Jan 2020 08:12:07 +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: c1ff7fe2-2d8b-4c4c-495c-08d7a3009a3d x-ms-traffictypediagnostic: MN2PR18MB3197: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 02951C14DC x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39850400004)(376002)(346002)(366004)(136003)(396003)(189003)(199004)(2940100002)(8936002)(71200400001)(53546011)(6506007)(81156014)(8676002)(81166006)(26005)(66446008)(186003)(316002)(64756008)(66476007)(66556008)(66946007)(110136005)(76116006)(2906002)(54906003)(52536014)(5660300002)(55016002)(33656002)(9686003)(86362001)(478600001)(7696005)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB3197; 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: u7QhlRi6KoWp3FOeaEMkdMHZzxpyppdiVX9PO26p6/Y8c7uZR83pTrYL8NUq6+3wCxj+KzQN5OSZpLW1e7wCEzjcICMEdOURwiq5ajcd1cyccplJLyfe4Wgl5FyuOGDqCTL7or75uPS3OwxAiYH47kRp/OnQH/tD63YA9In9pu4y4F3cULgTRH5zACMoyd2AD5SGrmwSup87AfJ6Igbonl59uGipsoAKZIsJ6IuLUR3Wm/OU6NPTYIsSs1DIQ0/ULTNAcVlk51hIVPBy0AC+eLgg4R+Havay8fzu1K1qGWcxvmx15iU7y1G1yROCMLRou4StQPYUjfM4nWjXX/GPgh/EFyc0EOeOR2gYtdnLtzFuTqr6xw6VRB12Ro4YqRNosTPGhmNofMxbZIYn7TS+yMbUryGjQejFWbkRnCrzRZa8Z9vrGUDccEPvhZAUxQ56 x-ms-exchange-antispam-messagedata: 0EcVlQxT3+l6AjC/hh6U9C3QT4KPcipg5UbBTHFTNOlEPAqLSbUeQ8dNcIdirCLMFTF8c9dB4nd4xuZYNTLYp9d9DzyE46ABQkTDLUDmxFuqrgxGShFgX8gNWzGNe/pEDM+dCdj7SbyI/VmuRze9RQ== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: c1ff7fe2-2d8b-4c4c-495c-08d7a3009a3d X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jan 2020 08:12:07.7290 (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: b7AGAFd1xJCM7Y0qi8WGcoWYufDZMkyL37UGuEniovKvWvUOCjtIrAuQ9OPHvXIX5Eap2CNactzDpYoqjSAZJw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB3197 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, Minor correction. Please see inline. Thanks, Anoob > -----Original Message----- > From: dev On Behalf Of Anoob Joseph > Sent: Monday, January 27, 2020 1:33 PM > 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 > Subject: Re: [dpdk-dev] [PATCH v2 02/15] common/octeontx2: add routine to > check if sec capable otx2 >=20 > Hi Akhil, >=20 > Please see inline. >=20 > Thanks, > Anoob >=20 > > -----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 > > check if sec capable otx2 > > > > External Email > > > > ---------------------------------------------------------------------- > > Hi Anoob, > > > > > > > > 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; > > > +} > > > > Why is this API defined in common? > > This is a capability of ethernet device and is only specific to OCTEONT= X2 driver. >=20 > [Anoob] Crypto PMD is querying eth dev device for 'security' capability. = If we put > the "definition" in ethdev PMD, then there will be a build dependency. [Anoob] Minor correction in the above line.=20 >=20 > This is required because we need to map crypto queues to eth devices. Thi= s is > required for outbound processing. >=20 > > > > - Akhil