[v5,2/2] eventdev: fix missing driver names in info struct

Message ID 20231018133932.150177-2-bruce.richardson@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series [v5,1/2] eventdev: fix device pointer for vdev-based eventdevs |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/github-robot: build success github build: passed
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS

Commit Message

Bruce Richardson Oct. 18, 2023, 1:39 p.m. UTC
  Rather than relying on the individual drivers to always populated the
driver name field in the info structure - something missed by some
drivers, we can do so in the eventdev rte_event_dev_info_get() function.
This fixes issues

Fixes: bbbb929da5e6 ("event/skeleton: add skeleton eventdev driver")
Fixes: 0ce3ce7c275c ("event/dpaa2: add configuration functions")
Cc: stable@dpdk.org

Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/eventdev/rte_eventdev.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Jerin Jacob Oct. 19, 2023, 5:35 a.m. UTC | #1
On Wed, Oct 18, 2023 at 9:07 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> Rather than relying on the individual drivers to always populated the
> driver name field in the info structure - something missed by some
> drivers, we can do so in the eventdev rte_event_dev_info_get() function.
> This fixes issues
>
> Fixes: bbbb929da5e6 ("event/skeleton: add skeleton eventdev driver")
> Fixes: 0ce3ce7c275c ("event/dpaa2: add configuration functions")
> Cc: stable@dpdk.org
>
> Suggested-by: David Marchand <david.marchand@redhat.com>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

Series applied to dpdk-next--eventdev/for-main. Thanks
  

Patch

diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index 95373bbaad..0ca32d6721 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -104,6 +104,8 @@  rte_event_dev_info_get(uint8_t dev_id, struct rte_event_dev_info *dev_info)
 	dev_info->dequeue_timeout_ns = dev->data->dev_conf.dequeue_timeout_ns;
 
 	dev_info->dev = dev->dev;
+	if (dev->dev != NULL && dev->dev->driver != NULL)
+		dev_info->driver_name = dev->dev->driver->name;
 
 	rte_eventdev_trace_info_get(dev_id, dev_info, dev_info->dev);