crypto/octeontx2: enable unbinding

Message ID 20200210073512.25977-1-thierry.herbelot@6wind.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series crypto/octeontx2: enable unbinding |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/Intel-compilation fail apply issues

Commit Message

Thierry Herbelot Feb. 10, 2020, 7:35 a.m. UTC
  Like for OCTEON TX, the OCTEON TX2 crypto engines must
first be unbound from their kernel module, then rebound to
vfio-pci, before being used in DPDK.

As this capability is detected at runtime by dpdk-pmdinfo,
add the info in the PMD registering directives.

Then an external script can be used for bind and unbind.

Fixes: 2f8a1b963eb77 ("crypto/octeontx2: add PMD skeleton")
Cc: stable@dpdk.org
Cc: Anoob Joseph <anoobj@marvell.com>

Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
---
 drivers/crypto/octeontx2/otx2_cryptodev.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Anoob Joseph Feb. 10, 2020, 7:44 a.m. UTC | #1
> 
> Like for OCTEON TX, the OCTEON TX2 crypto engines must first be unbound
> from their kernel module, then rebound to vfio-pci, before being used in DPDK.
> 
> As this capability is detected at runtime by dpdk-pmdinfo, add the info in the
> PMD registering directives.
> 
> Then an external script can be used for bind and unbind.
> 
> Fixes: 2f8a1b963eb77 ("crypto/octeontx2: add PMD skeleton")
> Cc: stable@dpdk.org
> Cc: Anoob Joseph <anoobj@marvell.com>
> 
> Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>

Acked-by: Anoob Joseph <anoobj@marvell.com>
  
Akhil Goyal Feb. 12, 2020, 10:28 a.m. UTC | #2
> >
> > Like for OCTEON TX, the OCTEON TX2 crypto engines must first be unbound
> > from their kernel module, then rebound to vfio-pci, before being used in DPDK.
> >
> > As this capability is detected at runtime by dpdk-pmdinfo, add the info in the
> > PMD registering directives.
> >
> > Then an external script can be used for bind and unbind.
> >
> > Fixes: 2f8a1b963eb77 ("crypto/octeontx2: add PMD skeleton")
> > Cc: stable@dpdk.org
> > Cc: Anoob Joseph <anoobj@marvell.com>
> >
> > Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
> 
> Acked-by: Anoob Joseph <anoobj@marvell.com>

Applied to dpdk-next-crypto

Thanks.
  

Patch

diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c b/drivers/crypto/octeontx2/otx2_cryptodev.c
index 7fd216bb3901..7b8add1bfc6a 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev.c
@@ -145,6 +145,7 @@  static struct cryptodev_driver otx2_cryptodev_drv;
 RTE_INIT(otx2_cpt_init_log);
 RTE_PMD_REGISTER_PCI(CRYPTODEV_NAME_OCTEONTX2_PMD, otx2_cryptodev_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(CRYPTODEV_NAME_OCTEONTX2_PMD, pci_id_cpt_table);
+RTE_PMD_REGISTER_KMOD_DEP(CRYPTODEV_NAME_OCTEONTX2_PMD, "vfio-pci");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(otx2_cryptodev_drv, otx2_cryptodev_pmd.driver,
 		otx2_cryptodev_driver_id);