From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 14D452A58 for ; Tue, 4 Jul 2017 03:05:16 +0200 (CEST) Received: by mail-wm0-f42.google.com with SMTP id w126so181644482wme.0 for ; Mon, 03 Jul 2017 18:05:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=KHp+7YjLBJVGkEd7pPEb4woB+k4/a8r/WcqNq1S6+Fs=; b=w0UengYRpvw1CVCyAYzlDhG5dM6lEclSwX2jpIc3+vuoNRcUAGzINC7tZ2RSr59O8+ oYnFGUfyoOZfDglWHeJahFIYqGOerNZUq7ijYo2Oq/NkInjPgmt1vQFzlOMI2jhv2UsV 4nL1qJ87cXc9j1HMHSS4GeaOjPuN+ejlvmRChsEi+0YdCrRbV0wvxAS+bVOVhEW7wUAv 0/NTMA47BzihPHM7K9jh1WmyiAvT/5gc+NUUYufT11q4taaYWgVuGwydH2ey3CrF3MtL WoL8UVs5k6znVskaB5dsOJKcVKFBD35ddKKefxyTkA2tp3Ydm8nM35/ElzlEHXLZElsi pDBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=KHp+7YjLBJVGkEd7pPEb4woB+k4/a8r/WcqNq1S6+Fs=; b=iyLsr+OOspMyLia308hpOdKfAdG7LtFhh/vMlmBQ7U0vWw+bK6nR9dfPrJvngoyaEX A3RW3bWrjpKFiTbmcvD5TUQ8VWAisJGf0xECG2rb5RkS1ZgegLdHmW/4AY8CB4bHN1lU iL8G9PCLmcs+jxYMWR83QM3Eqr+e/VPynYHHIddKJZGYGyM2gswRswbSyuk1O1Lt0DQ8 N4dPpAxEP4oATxSATFfbRLvNxT3CagR4O3pALDauqooZmtVO0Spb1Qhn/kUCRC2wIG5f E691obonsxZ96qddmboPqSWO7jsSIvfzbZvxTFQKQT7eu3OU5VkA6L0n4+86HrsKNCrA UHcg== X-Gm-Message-State: AKS2vOwZT2axUSwAtBKdfZatQOetbVB1p2HqWVX4Gh0bmIrUAUwataR+ +DJvGp9oVWCwYfohP74= X-Received: by 10.28.214.133 with SMTP id n127mr16890270wmg.16.1499130316337; Mon, 03 Jul 2017 18:05:16 -0700 (PDT) Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id y77sm20294737wrb.39.2017.07.03.18.05.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Jul 2017 18:05:15 -0700 (PDT) Date: Tue, 4 Jul 2017 03:05:01 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Jan Blunck Cc: dev , stable@dpdk.org Message-ID: <20170704010501.GA11154@bidouze.vm.6wind.com> References: <206669e001a4561a5f5c10deebcf70742688f380.1497999826.git.gaetan.rivet@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 01:05:17 -0000 On Tue, Jun 27, 2017 at 09:19:14PM +0200, Jan Blunck wrote: > On Wed, Jun 21, 2017 at 1:30 AM, Gaetan Rivet 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 > > --- > > 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 > > -- Gaëtan Rivet 6WIND