[2/3] rawdev: return NUMA socket id to the user
Checks
Commit Message
The rawdev info struct has a socket_id field which was not filled in.
We can also omit the checks for the parameter struct being null, since
that is previously checked in the function.
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/librte_rawdev/rte_rawdev.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
Comments
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
06/07/2020 12:31, Bruce Richardson:
> The rawdev info struct has a socket_id field which was not filled in.
>
> We can also omit the checks for the parameter struct being null, since
> that is previously checked in the function.
>
> Cc: stable@dpdk.org
It looks to be a fix.
Which commit introduced this bug? The original one?
Fixes: c88b3f2558ed ("rawdev: introduce raw device library")
On Tue, Jul 07, 2020 at 02:23:04PM +0200, Thomas Monjalon wrote:
> 06/07/2020 12:31, Bruce Richardson:
> > The rawdev info struct has a socket_id field which was not filled in.
> >
> > We can also omit the checks for the parameter struct being null, since
> > that is previously checked in the function.
> >
> > Cc: stable@dpdk.org
>
> It looks to be a fix.
> Which commit introduced this bug? The original one?
> Fixes: c88b3f2558ed ("rawdev: introduce raw device library")
>
Yes, it can be viewed as a fix and that is the commit introducing the
issue.
/Bruce
@@ -95,11 +95,9 @@ rte_rawdev_info_get(uint16_t dev_id, struct rte_rawdev_info *dev_info)
(*rawdev->dev_ops->dev_info_get)(rawdev, dev_info->dev_private);
}
- if (dev_info) {
-
- dev_info->driver_name = rawdev->driver_name;
- dev_info->device = rawdev->device;
- }
+ dev_info->driver_name = rawdev->driver_name;
+ dev_info->device = rawdev->device;
+ dev_info->socket_id = rawdev->socket_id;
return 0;
}