From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DDE18A04B7; Tue, 13 Oct 2020 20:47:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 235A81DBC7; Tue, 13 Oct 2020 20:47:56 +0200 (CEST) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by dpdk.org (Postfix) with ESMTP id EAF151DB7E for ; Tue, 13 Oct 2020 20:47:53 +0200 (CEST) Received: by mail-io1-f67.google.com with SMTP id d20so698990iop.10 for ; Tue, 13 Oct 2020 11:47:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bTCw7f1hPKqPZRr41VokpdhrKTDj3LjxohQybMSX80s=; b=me/3u1uvf5qWFqy7SPSXFCvl5xsdlCowOtWTz5BgB9is4K169/CnaNI12mQEpFE+9y qdzblutPvjmCtx0iOR89njSG45CyTR+b+uVsHCQCzuY2w80TJDwR7wXDNvagV5qeRTFj 7xpI9bE23jtjtMu9NLlbAjardGzyfzwkiMaeuL5mhi4ZAjE0+ga70CIVPFdU7lxGVsaZ 6mBK/2G4U/zCvBifOGgsQjeESc8YHYf9q0CQ1YUp4+Gkd9awxcoDlgLlQJUKFqh8O0ZD w3r4Rj+eJBUbFTxk90ExXJwEXoVctKiKrpHtGz2yCWXhtArUoQ1QAw9Mn1iKf7uHL5O1 im+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bTCw7f1hPKqPZRr41VokpdhrKTDj3LjxohQybMSX80s=; b=D9pyT5EcN5NBMp5eDkmixx7l8eGVJJyWfACUdc3/Hltb0kC9qW1WvqeE+zUnho2MwD f303ASuOPIzfX436vIWiNxjXO9L0vzk9zQVvttdVOlKSlAd8DNh9K0zpt8CAEQKpJXGp sLjZ9YyEAYL2f74ziCsz6P9mTCq3WOhFhdlD9oYASKW0/4szTvUDKj/aggB8UAuX63Pr 0X6vGb3F1+cs0h9+zu3zzikVPJtraGhgj3QwdkNCy6rgdVhCHrfMp0F2iIvS+HIlD/TY SfGLLbWNoMVSujXIRd/6coHZQD7EH44xNhbwX0z9N2beRy4eF0rwDaZpKUu5Qe7bwQml /0Iw== X-Gm-Message-State: AOAM531tjBCxBLZQ+J9tIP4bTMqu1d4nXearaYhVpm5RGb+wyY17Cncr q2OqaiAk1xPIeD2LV5ZyML/vfw/f9QCldyQIllI= X-Google-Smtp-Source: ABdhPJxo8E4/nJmwWjoQmMNxRGgA8S0A1MdrzcghKitXPaSpqKr/mipNy1fzI3ZeHaDCDNCRettqWDSTHXoIE+pQBhA= X-Received: by 2002:a02:7:: with SMTP id 7mr216989jaa.112.1602614872158; Tue, 13 Oct 2020 11:47:52 -0700 (PDT) MIME-Version: 1.0 References: <1599843867-28048-1-git-send-email-timothy.mcdaniel@intel.com> <1602529284-29232-1-git-send-email-timothy.mcdaniel@intel.com> In-Reply-To: <1602529284-29232-1-git-send-email-timothy.mcdaniel@intel.com> From: Jerin Jacob Date: Wed, 14 Oct 2020 00:17:35 +0530 Message-ID: To: Timothy McDaniel Cc: Jerin Jacob , Ray Kinsella , Neil Horman , dpdk-dev , Erik Gabriel Carrillo , Gage Eads , "Van Haaren, Harry" Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] eventdev: add PCI probe named convenience function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Oct 13, 2020 at 12:29 AM Timothy McDaniel wrote: > > Add new internal wrapper function for use by pci drivers as a > .probe function to attach to an event interface. Same as > rte_event_pmd_pci_probe, except the caller can specify the name. > > Updated rte_event_pmd_pci_probe so as to not duplicate > code. > > Signed-off-by: Timothy McDaniel Latest patch is missing the updated version(v3) in patch commit[1] [1] http://patches.dpdk.org/patch/80394/ Also, it has apply issue[2] and builds issue in CI[3]. Please send the v4 for fix. [2] [for-main]dell[dpdk-next-eventdev] $ git am -3 /tmp/r/eventdev-add-PCI-probe-named-convenience-function Applying: eventdev: add PCI probe named convenience function error: sha1 information is lacking or useless (lib/librte_eventdev/rte_eventdev_pmd_pci.h). error: could not build fake ancestor Patch failed at 0001 eventdev: add PCI probe named convenience function hint: Use 'git am --show-current-patch=diff' to see the failed patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". [for-main]dell[dpdk-next-eventdev] $ [3] http://mails.dpdk.org/archives/test-report/2020-October/158330.html > --- > lib/librte_eventdev/rte_eventdev_pmd_pci.h | 46 ++++++++++++++++++++-------- > lib/librte_eventdev/rte_eventdev_version.map | 2 ++ > 2 files changed, 35 insertions(+), 13 deletions(-) > > diff --git a/lib/librte_eventdev/rte_eventdev_pmd_pci.h b/lib/librte_eventdev/rte_eventdev_pmd_pci.h > index a3f9244..5f238bf 100644 > --- a/lib/librte_eventdev/rte_eventdev_pmd_pci.h > +++ b/lib/librte_eventdev/rte_eventdev_pmd_pci.h > @@ -32,28 +32,25 @@ typedef int (*eventdev_pmd_pci_callback_t)(struct rte_eventdev *dev); > > /** > * @internal > - * Wrapper for use by pci drivers as a .probe function to attach to a event > - * interface. > + * Wrapper for use by pci drivers as a .probe function to attach to an event > + * interface. Same as rte_event_pmd_pci_probe, except caller can specify > + * the name. > */ > +__rte_experimental > static inline int > -rte_event_pmd_pci_probe(struct rte_pci_driver *pci_drv, > - struct rte_pci_device *pci_dev, > - size_t private_data_size, > - eventdev_pmd_pci_callback_t devinit) > +rte_event_pmd_pci_probe_named(struct rte_pci_driver *pci_drv, > + struct rte_pci_device *pci_dev, > + size_t private_data_size, > + eventdev_pmd_pci_callback_t devinit, > + const char *name) > { > struct rte_eventdev *eventdev; > - > - char eventdev_name[RTE_EVENTDEV_NAME_MAX_LEN]; > - > int retval; > > if (devinit == NULL) > return -EINVAL; > > - rte_pci_device_name(&pci_dev->addr, eventdev_name, > - sizeof(eventdev_name)); > - > - eventdev = rte_event_pmd_allocate(eventdev_name, > + eventdev = rte_event_pmd_allocate(name, > pci_dev->device.numa_node); > if (eventdev == NULL) > return -ENOMEM; > @@ -90,6 +87,29 @@ rte_event_pmd_pci_probe(struct rte_pci_driver *pci_drv, > > /** > * @internal > + * Wrapper for use by pci drivers as a .probe function to attach to a event > + * interface. > + */ > +static inline int > +rte_event_pmd_pci_probe(struct rte_pci_driver *pci_drv, > + struct rte_pci_device *pci_dev, > + size_t private_data_size, > + eventdev_pmd_pci_callback_t devinit) > +{ > + char eventdev_name[RTE_EVENTDEV_NAME_MAX_LEN]; > + > + rte_pci_device_name(&pci_dev->addr, eventdev_name, > + sizeof(eventdev_name)); > + > + return rte_event_pmd_pci_probe_named(pci_drv, > + pci_dev, > + private_data_size, > + devinit, > + eventdev_name); > +} > + > +/** > + * @internal > * Wrapper for use by pci drivers as a .remove function to detach a event > * interface. > */ > diff --git a/lib/librte_eventdev/rte_eventdev_version.map b/lib/librte_eventdev/rte_eventdev_version.map > index 2846d04..8ae8420 100644 > --- a/lib/librte_eventdev/rte_eventdev_version.map > +++ b/lib/librte_eventdev/rte_eventdev_version.map > @@ -136,4 +136,6 @@ EXPERIMENTAL { > > # changed in 20.11 > __rte_eventdev_trace_port_setup; > + # added in 20.11 > + rte_event_pmd_pci_probe_named; > }; > -- > 2.6.4 >