On Wed, Oct 18, 2023 at 10:48:14AM +0530, Jerin Jacob wrote:
> On Tue, Oct 17, 2023 at 10:21 PM Jerin Jacob <jerinjac...@gmail.com> wrote:
> >
> > On Tue, Oct 17, 2023 at 9:45 PM Bruce Richardson
> > <bruce.richard...@intel.com> wrote:
> > >
> > > On Tue, Oct 17, 2023 at 09:34:04PM +0530, Jerin Jacob wrote:
> > > > On Tue, Oct 17, 2023 at 9:32 PM Bruce Richardson
> > > > <bruce.richard...@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.ronnb...@ericsson.com
> > > > >
> > > > > Signed-off-by: Bruce Richardson <bruce.richard...@intel.com>
> > > >
> > > > Is this issue for all "vdev" devices? if so, Please check for
> > > > drivers/event/skeleton too.
> > > >
> > > Yes, good point, looks like event/skeleton also returns NULL for the 
> > > device
> > > pointer.
> > >
> > > I'll do up a v3 with the extra patch in it.
> >
> > Looks there are more vdev devuces. Can we have common PMD function or
> > extend rte_event_pmd_vdev_init or so.
> 
> 
> @Richardson, Bruce I will be on vacation from Friday, So would like to
> give PR for rc2 before that.
> 
> Adding helper function in rc2 may be risky, Could you fix all vdev
> mentioned below.
> Helper work, I think, we can take in next release.
> 

Having looked at it more, and considering I cannot test a number of the
drivers (dpaa*, octeon), I actually think the safest approach is to modify
the vdev_init function. It's a small change, so I think it's pretty low
risk. Patch will follow shortly.

/Bruce

Reply via email to