[PATCH v4 1/2] event/*: set device pointer for vdev-based eventdevs

David Marchand david.marchand at redhat.com
Wed Oct 18 15:01:18 CEST 2023


On Wed, Oct 18, 2023 at 2:26 PM Bruce Richardson
<bruce.richardson at intel.com> wrote:
>
> The eventdevs based on vdevs, rather than on e.g. HW PCI devices, were,
> as a rule, not setting the ".dev" pointer in the eventdev structure.
> This caused issues as a NULL pointer was returned in calls to info_get,
> triggering crashes if the pointer is passed unchecked to e.g.
> rte_dev_name() to print out the name of an event device.
>
> Most effective, and future-proofed fix, is to not rely on the eventdev
> drivers to set the pointer themselves, but to change the vdev init
> function to take the vdev struct as parameter, and set the "dev" pointer
> centrally on init. This allows us to fix all drivers in one go, enforced
> by compiler error if the parameter is missing.
>
> Fixes: aaa4a221da26 ("event/sw: add new software-only eventdev driver")
> Fixes: 46a186b1f0c5 ("event/dsw: add device registration and build system")
> Fixes: bbbb929da5e6 ("event/skeleton: add skeleton eventdev driver")
> Fixes: 3c7f3dcfb099 ("event/opdl: add PMD main body and helper function")
> Fixes: 9caac5dd1e7f ("event/dpaa: introduce PMD")
> Fixes: 8a5d7a8ec74b ("event/dpaa2: initialize device")
> Fixes: 34498de6000f ("event/octeontx: add octeontx eventdev driver")
> Cc: stable at dpdk.org
>
> Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>

Acked-by: David Marchand <david.marchand at redhat.com>


-- 
David Marchand



More information about the stable mailing list