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 919204319B for ; Wed, 18 Oct 2023 15:01:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8258340EF0; Wed, 18 Oct 2023 15:01:37 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 1DA57402CD for ; Wed, 18 Oct 2023 15:01:35 +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-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-584-sa0jIwA9NF-Mf0gNHk-Y8A-1; Wed, 18 Oct 2023 09:01:33 -0400 X-MC-Unique: sa0jIwA9NF-Mf0gNHk-Y8A-1 Received: by mail-lj1-f199.google.com with SMTP id 38308e7fff4ca-2c53c85e482so15769211fa.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=mT1vq5yV+XADeGaF+vDyttUuIy4vxcFnZUtcwY71yyfCzWHzBkEqmTDYd0nb5387TL tJB8nNgTkUfIbNp4qZA4uL559DOjierhAO6KjYnW2b0WNTXJKmhf4XP890meRx7pJmAa IW/TXyZ2nNzYpe7e/3p+5fIHc+67GmB9OkJBEDmGyXQNoJoKW55dIC2HgbIX9pp4hyub kHVyRPbxx3VdBi6L8FnGl3p7WHK1lAAiW6+ES0CVI1T0SdKr/xFJQ+p1arMTBNUrAo+F yhcS84Bfkr+Jv3rUp3tdUadjR7LkR3MRu1nwKqpNwuCF20bcy0IzQ4K/7yKGN8hrmMHG oYQQ== X-Gm-Message-State: AOJu0Yx3+3E5DtJ/6IS9hStw6kzGuE8LUkJGfMhojGeG2z6BdiaXAG6B dh0ban5LNTSI46FfiOHqhEgXFRxT48btyLwOG4uW3+kFhdPr6C7KHvcGJoCdROnnZX6+MnP8mH9 q86HjL5lx6Ff6A7THdCYYP+Q= X-Received: by 2002:a2e:8719:0:b0:2c5:1f46:3323 with SMTP id m25-20020a2e8719000000b002c51f463323mr4218755lji.47.1697634090297; 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: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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