From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DF8D24319A; Wed, 18 Oct 2023 15:01:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 64F2C402CD; Wed, 18 Oct 2023 15:01:36 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id CBD3C40261 for ; Wed, 18 Oct 2023 15:01:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697634094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8qqeR8DKUYCviRULz6daynU+WRd3g23sGcwwyYy9xUM=; b=HTh4Fyr6zc668+P7mJ5UwquHAiImvrNmyl2GztxlAFcQwBj3YZUo/h4GOPmaf+MQVEwKLR xbfb11dMfhQGbeevBVpsfYJ07aosb1DCP2F2x2g6JBnKcfmpIo0zyjajggUbxrr6P/3Bca RNaF5yZBtuzjF5NfXPU0fIIo2FsHfEU= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-549--ST94dAvPO26LXUc419XMA-1; Wed, 18 Oct 2023 09:01:33 -0400 X-MC-Unique: -ST94dAvPO26LXUc419XMA-1 Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-2c53c85e482so15769231fa.1 for ; Wed, 18 Oct 2023 06:01:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697634090; x=1698238890; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8qqeR8DKUYCviRULz6daynU+WRd3g23sGcwwyYy9xUM=; b=kjJNnFLtlD3kB0+1YJi/sywvS21rYoeZzO4b1dhjZAaqnRgPN8nHLSOt086afBSPw3 +jeqP1VqFFxs8CwMMIi1yEWS2noBLQ/8GvDBquOS4xak+phfVWe6zdNZ9MLTmsKhnHwU nGj55aDv/t4qxaLIvl0O8aK+4q0Y8YeMTBu4N+7fS7OCjdl6DK4MOHpBwFoWzUS6yiRr P9e6TlL5T8nvb+PgCCydzBHu78Q6NSFvUQL8XwkYq1if/csAwNlNXD/5aD+9k3Zg0HrH W0HyO+C0LHTBtObFQ1UovKUZfPvVp0Pncsu/35Nqms0e8Hr5VfSOWpXKUkmZ6Y5AjZ4w gNpg== X-Gm-Message-State: AOJu0YxKarw4Zn3wEIfGNbKJ7qFQvk4PHlKqv0pxDdNZCanpSfNH+jUX MfMIlmPHNa3txPtWqG3BAxDoG4cA4dlbZk3gBcd3ftkZtf24kUgInm+kGtq0oKsKLOgB7KjZSKY 6UnUvSL3mu58A46Qrn/o= X-Received: by 2002:a2e:8719:0:b0:2c5:1f46:3323 with SMTP id m25-20020a2e8719000000b002c51f463323mr4218768lji.47.1697634090316; Wed, 18 Oct 2023 06:01:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGC8Fd2PIs6mtU0e7mppz4vbg0LH1jN7SvCWWht4bwd15W6UUF44VJe/ycsb+ulpeq2zf8liLlS//OBlp/KBKs= X-Received: by 2002:a2e:8719:0:b0:2c5:1f46:3323 with SMTP id m25-20020a2e8719000000b002c51f463323mr4218740lji.47.1697634090014; Wed, 18 Oct 2023 06:01:30 -0700 (PDT) MIME-Version: 1.0 References: <20231016151713.711965-1-bruce.richardson@intel.com> <20231018122558.126686-1-bruce.richardson@intel.com> In-Reply-To: <20231018122558.126686-1-bruce.richardson@intel.com> From: David Marchand Date: Wed, 18 Oct 2023 15:01:18 +0200 Message-ID: Subject: Re: [PATCH v4 1/2] event/*: set device pointer for vdev-based eventdevs To: Bruce Richardson Cc: dev@dpdk.org, stable@dpdk.org, Hemant Agrawal , Sachin Saxena , =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , Jerin Jacob , Liang Ma , Peter Mccarthy , Harry van Haaren , Nipun Gupta , Santosh Shukla , Gage Eads X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, Oct 18, 2023 at 2:26=E2=80=AFPM Bruce Richardson 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 Acked-by: David Marchand --=20 David Marchand