DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] event/dsw: fix missing device pointer
@ 2023-10-17 15:45 Bruce Richardson
  2023-10-17 15:55 ` Bruce Richardson
  2023-10-17 16:04 ` Jerin Jacob
  0 siblings, 2 replies; 10+ messages in thread
From: Bruce Richardson @ 2023-10-17 15:45 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, mattias.ronnblom

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@ericsson.com

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/event/dsw/dsw_evdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c
index 785c12f61f..44da3c60d1 100644
--- a/drivers/event/dsw/dsw_evdev.c
+++ b/drivers/event/dsw/dsw_evdev.c
@@ -440,6 +440,7 @@ dsw_probe(struct rte_vdev_device *vdev)
 		return -EFAULT;
 
 	dev->dev_ops = &dsw_evdev_ops;
+	dev->dev = &vdev->device;
 	dev->enqueue = dsw_event_enqueue;
 	dev->enqueue_burst = dsw_event_enqueue_burst;
 	dev->enqueue_new_burst = dsw_event_enqueue_new_burst;
-- 
2.39.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] event/dsw: fix missing device pointer
  2023-10-17 15:45 [PATCH] event/dsw: fix missing device pointer Bruce Richardson
@ 2023-10-17 15:55 ` Bruce Richardson
  2023-10-17 16:04 ` Jerin Jacob
  1 sibling, 0 replies; 10+ messages in thread
From: Bruce Richardson @ 2023-10-17 15:55 UTC (permalink / raw)
  To: dev; +Cc: mattias.ronnblom

On Tue, Oct 17, 2023 at 04:45:32PM +0100, Bruce Richardson 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@ericsson.com
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> ---
Since checkpatch has flagged a duplicated word in my commit log above,
copy-pasted from the equivalent event/sw patch fix, I'm sending a v2 of the
two together in a patchset. See thread [1] for that v2.

/Bruce

[1] https://inbox.dpdk.org/dev/20231017155148.153095-1-bruce.richardson@intel.com/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] event/dsw: fix missing device pointer
  2023-10-17 15:45 [PATCH] event/dsw: fix missing device pointer Bruce Richardson
  2023-10-17 15:55 ` Bruce Richardson
@ 2023-10-17 16:04 ` Jerin Jacob
  2023-10-17 16:11   ` David Marchand
  2023-10-17 16:15   ` Bruce Richardson
  1 sibling, 2 replies; 10+ messages in thread
From: Jerin Jacob @ 2023-10-17 16:04 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, mattias.ronnblom

On Tue, Oct 17, 2023 at 9:32 PM Bruce Richardson
<bruce.richardson@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@ericsson.com
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

Is this issue for all "vdev" devices? if so, Please check for
drivers/event/skeleton too.

> ---
>  drivers/event/dsw/dsw_evdev.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c
> index 785c12f61f..44da3c60d1 100644
> --- a/drivers/event/dsw/dsw_evdev.c
> +++ b/drivers/event/dsw/dsw_evdev.c
> @@ -440,6 +440,7 @@ dsw_probe(struct rte_vdev_device *vdev)
>                 return -EFAULT;
>
>         dev->dev_ops = &dsw_evdev_ops;
> +       dev->dev = &vdev->device;
>         dev->enqueue = dsw_event_enqueue;
>         dev->enqueue_burst = dsw_event_enqueue_burst;
>         dev->enqueue_new_burst = dsw_event_enqueue_new_burst;
> --
> 2.39.2
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] event/dsw: fix missing device pointer
  2023-10-17 16:04 ` Jerin Jacob
@ 2023-10-17 16:11   ` David Marchand
  2023-10-17 16:15   ` Bruce Richardson
  1 sibling, 0 replies; 10+ messages in thread
From: David Marchand @ 2023-10-17 16:11 UTC (permalink / raw)
  To: Jerin Jacob, Bruce Richardson; +Cc: dev, mattias.ronnblom

On Tue, Oct 17, 2023 at 6:04 PM Jerin Jacob <jerinjacobk@gmail.com> wrote:
>
> On Tue, Oct 17, 2023 at 9:32 PM Bruce Richardson
> <bruce.richardson@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@ericsson.com
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] event/dsw: fix missing device pointer
  2023-10-17 16:04 ` Jerin Jacob
  2023-10-17 16:11   ` David Marchand
@ 2023-10-17 16:15   ` Bruce Richardson
  2023-10-17 16:51     ` Jerin Jacob
  1 sibling, 1 reply; 10+ messages in thread
From: Bruce Richardson @ 2023-10-17 16:15 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: dev, mattias.ronnblom

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.richardson@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@ericsson.com
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@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.

/Bruce

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] event/dsw: fix missing device pointer
  2023-10-17 16:15   ` Bruce Richardson
@ 2023-10-17 16:51     ` Jerin Jacob
  2023-10-18  5:18       ` Jerin Jacob
  0 siblings, 1 reply; 10+ messages in thread
From: Jerin Jacob @ 2023-10-17 16:51 UTC (permalink / raw)
  To: Bruce Richardson, David Marchand; +Cc: dev, mattias.ronnblom

On Tue, Oct 17, 2023 at 9:45 PM Bruce Richardson
<bruce.richardson@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.richardson@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@ericsson.com
> > >
> > > Signed-off-by: Bruce Richardson <bruce.richardson@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.

[main]dell[dpdk.org] $ git grep rte_event_pmd_vdev_init
drivers/event/dpaa/dpaa_eventdev.c:     eventdev = rte_event_pmd_vdev_init(name,
drivers/event/dpaa2/dpaa2_eventdev.c:   eventdev = rte_event_pmd_vdev_init(name,
drivers/event/dsw/dsw_evdev.c:  dev = rte_event_pmd_vdev_init(name,
sizeof(struct dsw_evdev),
drivers/event/octeontx/ssovf_evdev.c:   eventdev =
rte_event_pmd_vdev_init(name, sizeof(struct ssovf_evdev),
drivers/event/opdl/opdl_evdev.c:        dev = rte_event_pmd_vdev_init(name,
drivers/event/skeleton/skeleton_eventdev.c:     eventdev =
rte_event_pmd_vdev_init(name,
drivers/event/sw/sw_evdev.c:    dev = rte_event_pmd_vdev_init(name,
lib/eventdev/eventdev_pmd_vdev.h:rte_event_pmd_vdev_init(const char
*name, size_t dev_private_size,
lib/eventdev/version.map:       rte_event_pmd_vdev_init;


> /Bruce

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] event/dsw: fix missing device pointer
  2023-10-17 16:51     ` Jerin Jacob
@ 2023-10-18  5:18       ` Jerin Jacob
  2023-10-18  6:29         ` Mattias Rönnblom
                           ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Jerin Jacob @ 2023-10-18  5:18 UTC (permalink / raw)
  To: Bruce Richardson, David Marchand; +Cc: dev, mattias.ronnblom

On Tue, Oct 17, 2023 at 10:21 PM Jerin Jacob <jerinjacobk@gmail.com> wrote:
>
> On Tue, Oct 17, 2023 at 9:45 PM Bruce Richardson
> <bruce.richardson@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.richardson@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@ericsson.com
> > > >
> > > > Signed-off-by: Bruce Richardson <bruce.richardson@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.


>
> [main]dell[dpdk.org] $ git grep rte_event_pmd_vdev_init
> drivers/event/dpaa/dpaa_eventdev.c:     eventdev = rte_event_pmd_vdev_init(name,
> drivers/event/dpaa2/dpaa2_eventdev.c:   eventdev = rte_event_pmd_vdev_init(name,
> drivers/event/dsw/dsw_evdev.c:  dev = rte_event_pmd_vdev_init(name,
> sizeof(struct dsw_evdev),
> drivers/event/octeontx/ssovf_evdev.c:   eventdev =
> rte_event_pmd_vdev_init(name, sizeof(struct ssovf_evdev),
> drivers/event/opdl/opdl_evdev.c:        dev = rte_event_pmd_vdev_init(name,
> drivers/event/skeleton/skeleton_eventdev.c:     eventdev =
> rte_event_pmd_vdev_init(name,
> drivers/event/sw/sw_evdev.c:    dev = rte_event_pmd_vdev_init(name,
> lib/eventdev/eventdev_pmd_vdev.h:rte_event_pmd_vdev_init(const char
> *name, size_t dev_private_size,
> lib/eventdev/version.map:       rte_event_pmd_vdev_init;
>
>
> > /Bruce

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] event/dsw: fix missing device pointer
  2023-10-18  5:18       ` Jerin Jacob
@ 2023-10-18  6:29         ` Mattias Rönnblom
  2023-10-18  9:45         ` Bruce Richardson
  2023-10-18 12:13         ` Bruce Richardson
  2 siblings, 0 replies; 10+ messages in thread
From: Mattias Rönnblom @ 2023-10-18  6:29 UTC (permalink / raw)
  To: Jerin Jacob, Bruce Richardson, David Marchand; +Cc: dev, mattias.ronnblom

On 2023-10-18 07:18, Jerin Jacob wrote:
> On Tue, Oct 17, 2023 at 10:21 PM Jerin Jacob <jerinjacobk@gmail.com> wrote:
>>
>> On Tue, Oct 17, 2023 at 9:45 PM Bruce Richardson
>> <bruce.richardson@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.richardson@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@ericsson.com
>>>>>
>>>>> Signed-off-by: Bruce Richardson <bruce.richardson@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.
> 

I agree.

Thanks Bruce!

> 
>>
>> [main]dell[dpdk.org] $ git grep rte_event_pmd_vdev_init
>> drivers/event/dpaa/dpaa_eventdev.c:     eventdev = rte_event_pmd_vdev_init(name,
>> drivers/event/dpaa2/dpaa2_eventdev.c:   eventdev = rte_event_pmd_vdev_init(name,
>> drivers/event/dsw/dsw_evdev.c:  dev = rte_event_pmd_vdev_init(name,
>> sizeof(struct dsw_evdev),
>> drivers/event/octeontx/ssovf_evdev.c:   eventdev =
>> rte_event_pmd_vdev_init(name, sizeof(struct ssovf_evdev),
>> drivers/event/opdl/opdl_evdev.c:        dev = rte_event_pmd_vdev_init(name,
>> drivers/event/skeleton/skeleton_eventdev.c:     eventdev =
>> rte_event_pmd_vdev_init(name,
>> drivers/event/sw/sw_evdev.c:    dev = rte_event_pmd_vdev_init(name,
>> lib/eventdev/eventdev_pmd_vdev.h:rte_event_pmd_vdev_init(const char
>> *name, size_t dev_private_size,
>> lib/eventdev/version.map:       rte_event_pmd_vdev_init;
>>
>>
>>> /Bruce

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] event/dsw: fix missing device pointer
  2023-10-18  5:18       ` Jerin Jacob
  2023-10-18  6:29         ` Mattias Rönnblom
@ 2023-10-18  9:45         ` Bruce Richardson
  2023-10-18 12:13         ` Bruce Richardson
  2 siblings, 0 replies; 10+ messages in thread
From: Bruce Richardson @ 2023-10-18  9:45 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: David Marchand, dev, mattias.ronnblom

On Wed, Oct 18, 2023 at 10:48:14AM +0530, Jerin Jacob wrote:
> On Tue, Oct 17, 2023 at 10:21 PM Jerin Jacob <jerinjacobk@gmail.com> wrote:
> >
> > On Tue, Oct 17, 2023 at 9:45 PM Bruce Richardson
> > <bruce.richardson@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.richardson@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@ericsson.com
> > > > >
> > > > > Signed-off-by: Bruce Richardson <bruce.richardson@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.
> 
Yes, I was going to reply with some similar sentiment. I think it would be
risky to try and do a proper solution in a hurry. I will attempt to fix all
vdevs for rc2.

/Bruce

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] event/dsw: fix missing device pointer
  2023-10-18  5:18       ` Jerin Jacob
  2023-10-18  6:29         ` Mattias Rönnblom
  2023-10-18  9:45         ` Bruce Richardson
@ 2023-10-18 12:13         ` Bruce Richardson
  2 siblings, 0 replies; 10+ messages in thread
From: Bruce Richardson @ 2023-10-18 12:13 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: David Marchand, dev, mattias.ronnblom

On Wed, Oct 18, 2023 at 10:48:14AM +0530, Jerin Jacob wrote:
> On Tue, Oct 17, 2023 at 10:21 PM Jerin Jacob <jerinjacobk@gmail.com> wrote:
> >
> > On Tue, Oct 17, 2023 at 9:45 PM Bruce Richardson
> > <bruce.richardson@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.richardson@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@ericsson.com
> > > > >
> > > > > Signed-off-by: Bruce Richardson <bruce.richardson@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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-10-18 12:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-17 15:45 [PATCH] event/dsw: fix missing device pointer Bruce Richardson
2023-10-17 15:55 ` Bruce Richardson
2023-10-17 16:04 ` Jerin Jacob
2023-10-17 16:11   ` David Marchand
2023-10-17 16:15   ` Bruce Richardson
2023-10-17 16:51     ` Jerin Jacob
2023-10-18  5:18       ` Jerin Jacob
2023-10-18  6:29         ` Mattias Rönnblom
2023-10-18  9:45         ` Bruce Richardson
2023-10-18 12:13         ` Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).