Hi Akhil,

Please see inline.

Thanks,
Anoob

> -----Original Message-----
> From: Akhil Goyal <[email protected]>
> Sent: Monday, January 27, 2020 12:31 PM
> To: Anoob Joseph <[email protected]>; Declan Doherty
> <[email protected]>; Thomas Monjalon <[email protected]>
> Cc: Vamsi Krishna Attunuru <[email protected]>; Jerin Jacob
> Kollanukkaran <[email protected]>; Narayana Prasad Raju Athreya
> <[email protected]>; Kiran Kumar Kokkilagadda
> <[email protected]>; Nithin Kumar Dabilpuram
> <[email protected]>; Pavan Nikhilesh Bhagavatula
> <[email protected]>; Ankur Dwivedi <[email protected]>;
> Archana Muniganti <[email protected]>; Tejasree Kondoj
> <[email protected]>; Lukas Bartosik <[email protected]>;
> [email protected]
> Subject: [EXT] RE: [PATCH v2 02/15] common/octeontx2: add routine to check if
> sec capable otx2
> 
> External Email
> 
> ----------------------------------------------------------------------
> Hi Anoob,
> 
> >
> > From: Vamsi Attunuru <[email protected]>
> >
> > This routine returns true if given rte_eth_dev is security offload
> > capable and belongs to octeontx2.
> >
> > Signed-off-by: Anoob Joseph <[email protected]>
> > Signed-off-by: Tejasree Kondoj <[email protected]>
> > Signed-off-by: Vamsi Attunuru <[email protected]>
> > ---
> >  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 call in ethdev PMD, then there will be a build dependency. 

This is required because we need to map crypto queues to eth devices. This is 
required for outbound processing.
 
> 
> - Akhil

Reply via email to