DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org, stable@dpdk.org,
	"Hemant Agrawal" <hemant.agrawal@nxp.com>,
	"Sachin Saxena" <sachin.saxena@nxp.com>,
	"Mattias Rönnblom" <mattias.ronnblom@ericsson.com>,
	"Jerin Jacob" <jerinj@marvell.com>,
	"Liang Ma" <liangma@liangbit.com>,
	"Peter Mccarthy" <peter.mccarthy@intel.com>,
	"Harry van Haaren" <harry.van.haaren@intel.com>,
	"Nipun Gupta" <nipun.gupta@amd.com>,
	"Santosh Shukla" <santosh.shukla@caviumnetworks.com>,
	"Gage Eads" <gage.eads@intel.com>
Subject: Re: [PATCH v4 1/2] event/*: set device pointer for vdev-based eventdevs
Date: Wed, 18 Oct 2023 15:01:18 +0200	[thread overview]
Message-ID: <CAJFAV8w5QwbUpnXP7krsJ_YOzbgg+NQTOWsjvUbUb6Y_4TyhXA@mail.gmail.com> (raw)
In-Reply-To: <20231018122558.126686-1-bruce.richardson@intel.com>

On Wed, Oct 18, 2023 at 2:26 PM Bruce Richardson
<bruce.richardson@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@dpdk.org
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

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


-- 
David Marchand


  parent reply	other threads:[~2023-10-18 13:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-16 15:17 [PATCH] event/sw: fix missing device pointer Bruce Richardson
2023-10-17 12:45 ` Van Haaren, Harry
2023-10-17 15:51 ` [PATCH v2 1/2] " Bruce Richardson
2023-10-17 15:51   ` [PATCH v2 2/2] event/dsw: " Bruce Richardson
2023-10-17 16:46 ` [PATCH v3 0/4] Fix device info for SW eventdevs Bruce Richardson
2023-10-17 16:46   ` [PATCH v3 1/4] event/sw: fix missing device pointer Bruce Richardson
2023-10-17 16:46   ` [PATCH v3 2/4] event/dsw: " Bruce Richardson
2023-10-18  6:27     ` Mattias Rönnblom
2023-10-17 16:46   ` [PATCH v3 3/4] event/skeleton: " Bruce Richardson
2023-10-17 16:46   ` [PATCH v3 4/4] event/skeleton: set driver name string Bruce Richardson
2023-10-18 12:25 ` [PATCH v4 1/2] event/*: set device pointer for vdev-based eventdevs Bruce Richardson
2023-10-18 12:25   ` [PATCH v4 2/2] event/skeleton: set driver name string Bruce Richardson
2023-10-18 12:44     ` David Marchand
2023-10-18 12:52       ` Bruce Richardson
2023-10-18 13:42         ` Bruce Richardson
2023-10-18 13:01   ` David Marchand [this message]
2023-10-18 13:39 ` [PATCH v5 1/2] eventdev: fix device pointer for vdev-based eventdevs Bruce Richardson
2023-10-18 13:39   ` [PATCH v5 2/2] eventdev: fix missing driver names in info struct Bruce Richardson
2023-10-19  5:35     ` Jerin Jacob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJFAV8w5QwbUpnXP7krsJ_YOzbgg+NQTOWsjvUbUb6Y_4TyhXA@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=gage.eads@intel.com \
    --cc=harry.van.haaren@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=jerinj@marvell.com \
    --cc=liangma@liangbit.com \
    --cc=mattias.ronnblom@ericsson.com \
    --cc=nipun.gupta@amd.com \
    --cc=peter.mccarthy@intel.com \
    --cc=sachin.saxena@nxp.com \
    --cc=santosh.shukla@caviumnetworks.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).