Hi Akhil, Minor correction. Please see inline.
Thanks, Anoob > -----Original Message----- > From: dev <dev-boun...@dpdk.org> On Behalf Of Anoob Joseph > Sent: Monday, January 27, 2020 1:33 PM > To: Akhil Goyal <akhil.go...@nxp.com>; Declan Doherty > <declan.dohe...@intel.com>; Thomas Monjalon <tho...@monjalon.net> > Cc: Vamsi Krishna Attunuru <vattun...@marvell.com>; Jerin Jacob > Kollanukkaran <jer...@marvell.com>; Narayana Prasad Raju Athreya > <pathr...@marvell.com>; Kiran Kumar Kokkilagadda > <kirankum...@marvell.com>; Nithin Kumar Dabilpuram > <ndabilpu...@marvell.com>; Pavan Nikhilesh Bhagavatula > <pbhagavat...@marvell.com>; Ankur Dwivedi <adwiv...@marvell.com>; > Archana Muniganti <march...@marvell.com>; Tejasree Kondoj > <ktejas...@marvell.com>; Lukas Bartosik <lbarto...@marvell.com>; > dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2 02/15] common/octeontx2: add routine to > check if sec capable otx2 > > Hi Akhil, > > Please see inline. > > Thanks, > Anoob > > > -----Original Message----- > > From: Akhil Goyal <akhil.go...@nxp.com> > > Sent: Monday, January 27, 2020 12:31 PM > > To: Anoob Joseph <ano...@marvell.com>; Declan Doherty > > <declan.dohe...@intel.com>; Thomas Monjalon <tho...@monjalon.net> > > Cc: Vamsi Krishna Attunuru <vattun...@marvell.com>; Jerin Jacob > > Kollanukkaran <jer...@marvell.com>; Narayana Prasad Raju Athreya > > <pathr...@marvell.com>; Kiran Kumar Kokkilagadda > > <kirankum...@marvell.com>; Nithin Kumar Dabilpuram > > <ndabilpu...@marvell.com>; Pavan Nikhilesh Bhagavatula > > <pbhagavat...@marvell.com>; Ankur Dwivedi <adwiv...@marvell.com>; > > Archana Muniganti <march...@marvell.com>; Tejasree Kondoj > > <ktejas...@marvell.com>; Lukas Bartosik <lbarto...@marvell.com>; > > 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 <vattun...@marvell.com> > > > > > > This routine returns true if given rte_eth_dev is security offload > > > capable and belongs to octeontx2. > > > > > > Signed-off-by: Anoob Joseph <ano...@marvell.com> > > > Signed-off-by: Tejasree Kondoj <ktejas...@marvell.com> > > > Signed-off-by: Vamsi Attunuru <vattun...@marvell.com> > > > --- > > > 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 <rte_atomic.h> > > > +#include <rte_ethdev.h> > > > #include <rte_malloc.h> > > > #include <rte_log.h> > > > > > > @@ -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 = RTE_ETH_DEV_TO_PCI(eth_dev); > > > + > > > + if (pci_dev->id.device_id == PCI_DEVID_OCTEONTX2_RVU_PF || > > > + pci_dev->id.device_id == PCI_DEVID_OCTEONTX2_RVU_VF || > > > + pci_dev->id.device_id == 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 > > driver. > > [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. > > This is required because we need to map crypto queues to eth devices. This is > required for outbound processing. > > > > > - Akhil