[PATCH] event/dsw: fix missing device pointer

David Marchand david.marchand at redhat.com
Tue Oct 17 18:11:24 CEST 2023


On Tue, Oct 17, 2023 at 6:04 PM Jerin Jacob <jerinjacobk at gmail.com> wrote:
>
> On Tue, Oct 17, 2023 at 9:32 PM Bruce Richardson
> <bruce.richardson at intel.com> wrote:
> >
> > After calling rte_event_dev_info_get() the ".dev" field of the info
> > structure should have a pointer to the underlying device, allowing the
> > user to e.g. get the device name using using rte_dev_name(info.dev).
> >
> > The distributed software eventdev info structure did not return a
> > correct device pointer, though, instead returning NULL, which caused
> > crashes getting "rte_dev_name". Initializing the dev pointer inside the
> > "eventdev" struct in the device probe function fixes this by ensuring we
> > have a valid pointer to return in info_get calls.
> >
> > Fixes: 46a186b1f0c5 ("event/dsw: add device registration and build system")
> > Cc: mattias.ronnblom at ericsson.com
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
>
> Is this issue for all "vdev" devices? if so, Please check for
> drivers/event/skeleton too.

Should we add some eventdev wrappers for shared code like this?
Something like rte_eth_dev_pci_generic_probe() / rte_eth_vdev_allocate().


-- 
David Marchand



More information about the dev mailing list