Message ID | 206669e001a4561a5f5c10deebcf70742688f380.1497999826.git.gaetan.rivet@6wind.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 69415378B; Wed, 21 Jun 2017 01:30:57 +0200 (CEST) Received: from mail-wr0-f181.google.com (mail-wr0-f181.google.com [209.85.128.181]) by dpdk.org (Postfix) with ESMTP id 8291E7CC3 for <dev@dpdk.org>; Wed, 21 Jun 2017 01:30:51 +0200 (CEST) Received: by mail-wr0-f181.google.com with SMTP id 77so111491198wrb.1 for <dev@dpdk.org>; Tue, 20 Jun 2017 16:30:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=DZhIzKw+SsJXXY3KY6tq5fi643Z/MaNrfhQi7Y215f4=; b=FQeGmb/21+IcE7+DwY40QncLF/b7cdNqy3GRL7CYuTpThMAZ+2m5+bVb5H7mj9oeAm CobAMwj1D6RLnO26hNSMUhSruFueGJeayvDvjXq6BgoVxWnWjmdMeRUU8fFeJkq8z7xT fRkEQ/xK/Rck8r5ki8yQmA11N5C5mv0YSkSCWyLP3FO+Mp8sYExp4mLgZbs4kjJZFxDQ RUbQ5cPvApHIFbYwAqTyc2jWGblgBAXe/yHzfNwiOt+sWypBPK+WryzzEPocCVfmUvAy iwjXiVG2n1p5Gk4qjSHFluisGz49E/euuyEwIXzO7Kf3vfddgrI9ch7MeaQVC+GaZ9y3 NGhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=DZhIzKw+SsJXXY3KY6tq5fi643Z/MaNrfhQi7Y215f4=; b=VLpTG6+0c6KOuRHMyBGny2TyTaPzLL8lNL8NwC6sshCwc1oBH2gK6WulZCZVbz/bkh unvFHZoRKhXfvi/NsIGIXpb9HRn036z1snYcyK7vGNurEZnlYzMXHFLR07Yw+7U/3FCv oMwNHGAvDrnKdI39wyRjT4HSlZjN4HtPp0nqGO0NjcdKhKjxnSYAeVWF5vLNbBNQtGkl xe5DVeNnt4TKfYflYEm0fpM1secQM6ehjMfauybARlQfPh/6wj0yi+jfokZ5d1MQxKqm a1YWvKiTm53pxdjoaKH9ta6HuertWnxOcoYZFdOul9Tnfm1Rl0I0k3tYh1kLFVvKFLBT IXdg== X-Gm-Message-State: AKS2vOzpv7/URZquovwTvuWbuys13kcFTECIkRwrQoNMviLA23cIcCam Cjctam66URVuApKe5Us= X-Received: by 10.28.126.133 with SMTP id z127mr4412429wmc.46.1498001450919; Tue, 20 Jun 2017 16:30:50 -0700 (PDT) Received: from bidouze.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id w30sm17593338wrb.49.2017.06.20.16.30.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Jun 2017 16:30:49 -0700 (PDT) From: Gaetan Rivet <gaetan.rivet@6wind.com> To: dev@dpdk.org Cc: Gaetan Rivet <gaetan.rivet@6wind.com>, stable@dpdk.org Date: Wed, 21 Jun 2017 01:30:30 +0200 Message-Id: <206669e001a4561a5f5c10deebcf70742688f380.1497999826.git.gaetan.rivet@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <cover.1497999826.git.gaetan.rivet@6wind.com> References: <cover.1496876810.git.gaetan.rivet@6wind.com> <cover.1497999826.git.gaetan.rivet@6wind.com> In-Reply-To: <cover.1497999826.git.gaetan.rivet@6wind.com> References: <cover.1497999826.git.gaetan.rivet@6wind.com> Subject: [dpdk-dev] [PATCH v5 1/7] bus: fix bus name registration X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
ci/Intel-compilation | fail | apply patch file failure |
Commit Message
Gaëtan Rivet
June 20, 2017, 11:30 p.m. UTC
The default bus registration function should not result in buses
registering with double quotes within their names.
Fixes: a97725791eec ("bus: introduce bus abstraction")
Cc: stable@dpdk.org
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
lib/librte_eal/common/include/rte_bus.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Wed, Jun 21, 2017 at 01:30:30AM +0200, Gaetan Rivet wrote: > The default bus registration function should not result in buses > registering with double quotes within their names. > > Fixes: a97725791eec ("bus: introduce bus abstraction") > Cc: stable@dpdk.org > > Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
On Wed, Jun 21, 2017 at 1:30 AM, Gaetan Rivet <gaetan.rivet@6wind.com> wrote: > The default bus registration function should not result in buses > registering with double quotes within their names. > This is breaking expectations with users. All other registration macro pass the names through the stringification. The problem is that you pass in the name as a string already ("PCI" instead of PCI). > Fixes: a97725791eec ("bus: introduce bus abstraction") > Cc: stable@dpdk.org > > Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com> > --- > lib/librte_eal/common/include/rte_bus.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_eal/common/include/rte_bus.h b/lib/librte_eal/common/include/rte_bus.h > index fcc2442..b220299 100644 > --- a/lib/librte_eal/common/include/rte_bus.h > +++ b/lib/librte_eal/common/include/rte_bus.h > @@ -254,7 +254,7 @@ struct rte_bus *rte_bus_find_by_device(const struct rte_device *dev); > #define RTE_REGISTER_BUS(nm, bus) \ > static void __attribute__((constructor(101), used)) businitfn_ ##nm(void) \ > {\ > - (bus).name = RTE_STR(nm);\ > + (bus).name = nm;\ > rte_bus_register(&bus); \ > } > > -- > 2.1.4 >
On Tue, Jun 27, 2017 at 09:19:14PM +0200, Jan Blunck wrote: > On Wed, Jun 21, 2017 at 1:30 AM, Gaetan Rivet <gaetan.rivet@6wind.com> wrote: > > The default bus registration function should not result in buses > > registering with double quotes within their names. > > > > This is breaking expectations with users. All other registration macro > pass the names through the stringification. The problem is that you > pass in the name as a string already ("PCI" instead of PCI). > > I agree that it does not behave as expected. However, all buses are currently using it this way, and this cannot be fixed if maintainers keep using public define's for their bus name. > > Fixes: a97725791eec ("bus: introduce bus abstraction") > > Cc: stable@dpdk.org > > > > Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com> > > --- > > lib/librte_eal/common/include/rte_bus.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/lib/librte_eal/common/include/rte_bus.h b/lib/librte_eal/common/include/rte_bus.h > > index fcc2442..b220299 100644 > > --- a/lib/librte_eal/common/include/rte_bus.h > > +++ b/lib/librte_eal/common/include/rte_bus.h > > @@ -254,7 +254,7 @@ struct rte_bus *rte_bus_find_by_device(const struct rte_device *dev); > > #define RTE_REGISTER_BUS(nm, bus) \ > > static void __attribute__((constructor(101), used)) businitfn_ ##nm(void) \ > > {\ > > - (bus).name = RTE_STR(nm);\ > > + (bus).name = nm;\ > > rte_bus_register(&bus); \ > > } > > > > -- > > 2.1.4 > >
diff --git a/lib/librte_eal/common/include/rte_bus.h b/lib/librte_eal/common/include/rte_bus.h index fcc2442..b220299 100644 --- a/lib/librte_eal/common/include/rte_bus.h +++ b/lib/librte_eal/common/include/rte_bus.h @@ -254,7 +254,7 @@ struct rte_bus *rte_bus_find_by_device(const struct rte_device *dev); #define RTE_REGISTER_BUS(nm, bus) \ static void __attribute__((constructor(101), used)) businitfn_ ##nm(void) \ {\ - (bus).name = RTE_STR(nm);\ + (bus).name = nm;\ rte_bus_register(&bus); \ }