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 491974318E; Tue, 17 Oct 2023 18:11:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1E6B540273; Tue, 17 Oct 2023 18:11:51 +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 C42FC40270 for ; Tue, 17 Oct 2023 18:11:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697559109; 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=DXb0piVZ6+FUOoDyHXnaYmyUVjmckZcaWs7lM7Crimc=; b=JV27i89eKNEY6zLA/FhQ0iSruNVXZiFsLDOdf++a/UOY+kmJ7eJnaCyaJ2fiOn2BFUUt62 8LyrXmTtUI/kYIF/gp7s5DsR6pu7r97dPBwVhM1ltR4AEnYQaKcbxsqqCs4Pc80uD5bVgV SDoYiM2idKrB36dTjf0kxTlSZStgm2U= 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-158-wiAQ-t0cOMyyUyWX1FgfHg-1; Tue, 17 Oct 2023 12:11:37 -0400 X-MC-Unique: wiAQ-t0cOMyyUyWX1FgfHg-1 Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-2c5098fe88bso31471261fa.0 for ; Tue, 17 Oct 2023 09:11:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697559096; x=1698163896; 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=DXb0piVZ6+FUOoDyHXnaYmyUVjmckZcaWs7lM7Crimc=; b=pORR3ONyFgnsbruEtnAQuhionDzaLp7Mp+fZgn6tNmGnBStZ77wuWmHilNiQ8GePmQ CxyyQMUDtq1VPecW98boZa9RLXhqyA5EwBwdaG9WCvakdBy4nJd0KtccXWjwp5EAdA1F /828Em/eHyCZJDq7M4YBCMSYQYEOht1yZd2rm9cnw2MOMfUhQ7X8QW31dVe4izWDtX5c 0w1JepYFu6bsSfTVsALxS4/lzLXghPcETZLxqimVyX5A8DRMzK6t14lDatXqW2QZvEKu T8I6lbjAgirXJTooTINisq8nOjNm7hKSnAKOtPdr96t7S9l6cJvFAvcNinHgPetv9R5w DKnQ== X-Gm-Message-State: AOJu0YwMu15WSCSWTv+Trd1okbSCv1fxVmJ7k0HY/IH/79iWLi8nnQ8E C9HfBtr5h8ZapgZdhvV0g6JwwaDG6YYo2EYLEEOpb6kF2zEGwq0ZvQ7OowvfcBt56dSxxDv80yk RF2uDe1NmvlfBoVypcoQ= X-Received: by 2002:a2e:bc14:0:b0:2c5:6aa:e6ac with SMTP id b20-20020a2ebc14000000b002c506aae6acmr1462620ljf.1.1697559096085; Tue, 17 Oct 2023 09:11:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH5dmxyxKNjbetDdReIjzUpRnOwJEP8fY6nyX0G+DnKrHnXwgcvSH5njsVjYqB0kEwEY0JQ3s9nVkoJtRwmYzs= X-Received: by 2002:a2e:bc14:0:b0:2c5:6aa:e6ac with SMTP id b20-20020a2ebc14000000b002c506aae6acmr1462605ljf.1.1697559095725; Tue, 17 Oct 2023 09:11:35 -0700 (PDT) MIME-Version: 1.0 References: <20231017154532.152741-1-bruce.richardson@intel.com> In-Reply-To: From: David Marchand Date: Tue, 17 Oct 2023 18:11:24 +0200 Message-ID: Subject: Re: [PATCH] event/dsw: fix missing device pointer To: Jerin Jacob , Bruce Richardson Cc: dev@dpdk.org, mattias.ronnblom@ericsson.com 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 Tue, Oct 17, 2023 at 6:04=E2=80=AFPM Jerin Jacob = wrote: > > On Tue, Oct 17, 2023 at 9:32=E2=80=AFPM Bruce Richardson > wrote: > > > > After calling rte_event_dev_info_get() the ".dev" field of the info > > structure should have a pointer to the underlying device, allowing the > > user to e.g. get the device name using using rte_dev_name(info.dev). > > > > The distributed software eventdev info structure did not return a > > correct device pointer, though, instead returning NULL, which caused > > crashes getting "rte_dev_name". Initializing the dev pointer inside the > > "eventdev" struct in the device probe function fixes this by ensuring w= e > > have a valid pointer to return in info_get calls. > > > > Fixes: 46a186b1f0c5 ("event/dsw: add device registration and build syst= em") > > Cc: mattias.ronnblom@ericsson.com > > > > Signed-off-by: Bruce Richardson > > Is this issue for all "vdev" devices? if so, Please check for > drivers/event/skeleton too. Should we add some eventdev wrappers for shared code like this? Something like rte_eth_dev_pci_generic_probe() / rte_eth_vdev_allocate(). --=20 David Marchand