[PATCH v2 1/5] crypto/dpaa2_sec: remove crypto device in bus device
Maxime Leroy
maxime at leroys.fr
Mon Nov 17 10:28:43 CET 2025
Hi David,
Le lun. 17 nov. 2025 à 09:59, David Marchand
<david.marchand at redhat.com> a écrit :
>
> Hello,
>
> On Mon, 17 Nov 2025 at 09:36, Maxime Leroy <maxime at leroys.fr> wrote:
> > > @@ -4526,10 +4524,14 @@ cryptodev_dpaa2_sec_probe(struct rte_dpaa2_driver *dpaa2_drv __rte_unused,
> > > static int
> > > cryptodev_dpaa2_sec_remove(struct rte_dpaa2_device *dpaa2_dev)
> > > {
> > > + char cryptodev_name[RTE_CRYPTODEV_NAME_MAX_LEN];
> > > struct rte_cryptodev *cryptodev;
> > > int ret;
> > >
> > > - cryptodev = dpaa2_dev->cryptodev;
> > > + snprintf(cryptodev_name, sizeof(cryptodev_name), "dpsec-%d",
> > > + dpaa2_dev->object_id);
> > > +
> > > + cryptodev = rte_cryptodev_pmd_get_named_dev(cryptodev_name);
> > > if (cryptodev == NULL)
> > > return -ENODEV;
> > >
> > > --
> > > 2.51.0
> > >
> > Should we add a function to generate the cryptodev name instead of
> > duplicating the code, similar to how it’s done for PCI devices (i.e.,
> > rte_pci_device_name)?
>
> I am not sure I get the parallel..
> rte_pci_device_name is a bus level name, I don't see how we could
> define a fslmc bus level helper that would help here.
> Ah, you mean adding a helper internal to this cryptodev driver?
>
Yes. It's a minor improvement.
Else everything seems good on this serie.
Regards,
Maxime Leroy
More information about the dev
mailing list