From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id CA92E5477 for ; Thu, 7 Jul 2016 18:25:44 +0200 (CEST) Received: by mail-wm0-f50.google.com with SMTP id f126so217276765wma.1 for ; Thu, 07 Jul 2016 09:25:44 -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:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=P+uDsb/vXZwX+4CcTuxVM07reg+xC7qsJ3v/NjTat9w=; b=OA5T1eaGJQvJ9Yf0vYl7ZUTiBjp7B+8qTyEdfUPfGu+TQrz0qh6+nfatXxbFy9aMPO k+z7KzW8iW6ZGPnr9ocGmur1eL8VJiF8gPK7KDL5wKOspNSVT0paEUhrOcyiPUnxCT9+ J94rATe9LrY39oT4fI0IQtn+45f4nUWweGbcMa/h3nuJY9jbNJ58Mp2UN7Cj13r2J173 L6Sf5t++x37THrFs+djEUs9Lr5hzMVoIPI/qmxcn5PpiMTKx+05K4hibUNMIxu/4+AJJ Cod1XPIfUYbRC0BzNmHdimPz3wPRUjZkupLiLEPJ+BDDIMciRlaHfI0I/NivlKBWsUxM 6UhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=P+uDsb/vXZwX+4CcTuxVM07reg+xC7qsJ3v/NjTat9w=; b=irPBz5tvNMh+m5EJKxxNnqmXdi7TOeiBAtU5l06HCICmwiy20hBhhsL9PZ9zeO3VaY DRgGGiKldXQB5qeklgKMSsNb98tdi+iRdJA7OdJzcpTVS0kvrIyES881LI/Wca4hJR2O S37o64WA+hZm1ubhYU2vI6Hy+HCwGhjDjqCD9YbvsycToXZBIFhjLUB2L59qwEsYw9Sf h3D8CQh8dXesMOUG2FWjLGd33TRFFIqR/Ria0LYw6C9raRIfoeq12C2GQnC9wjxYb5u6 8mujhKl94Seu8yKoUgTNoOXY+AS9rHvd4B0K11pHHHXn1EdVZ+p3UDqP+++WsdBSGrte 1WZw== X-Gm-Message-State: ALyK8tKEVs0BBi9gO3ObsmCdgd3JWalssaMgpufBlhPnDVYSXV3cTzHOSXKeHMIhKseMMN1v X-Received: by 10.194.25.135 with SMTP id c7mr935490wjg.63.1467908744598; Thu, 07 Jul 2016 09:25:44 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id u4sm5450649wjz.4.2016.07.07.09.25.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jul 2016 09:25:44 -0700 (PDT) From: Thomas Monjalon To: Neil Horman Cc: dev@dpdk.org, david.marchand@6wind.com Date: Thu, 07 Jul 2016 18:25:43 +0200 Message-ID: <4984337.X4DjHj7U46@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20160707161141.GH26064@hmsreliant.think-freely.org> References: <1467905790-10597-1-git-send-email-thomas.monjalon@6wind.com> <1467905790-10597-10-git-send-email-thomas.monjalon@6wind.com> <20160707161141.GH26064@hmsreliant.think-freely.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH 09/11] eal: move PCI table macro X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jul 2016 16:25:45 -0000 2016-07-07 12:11, Neil Horman: > On Thu, Jul 07, 2016 at 05:36:28PM +0200, Thomas Monjalon wrote: > > Remove include of rte_pci.h in the generic header rte_dev.h > > and move the macro DRIVER_REGISTER_PCI_TABLE in rte_pci.h. [...] > > --- a/lib/librte_eal/common/include/rte_dev.h > > +++ b/lib/librte_eal/common/include/rte_dev.h > > @@ -48,7 +48,7 @@ extern "C" { > > > > #include > > #include > > -#include > > + > > #include > > > > __attribute__((format(printf, 2, 0))) > > @@ -195,10 +195,6 @@ DRIVER_EXPORT_NAME(nm, __COUNTER__) > > > > #define DRV_EXP_TAG(name, tag) __##name##_##tag > > > > -#define DRIVER_REGISTER_PCI_TABLE(name, table) \ > > -static const char DRV_EXP_TAG(name, pci_tbl_export)[] __attribute__((used)) = \ > > -RTE_STR(table) > > - > > #define DRIVER_REGISTER_PARAM_STRING(name, str) \ > > static const char DRV_EXP_TAG(name, param_string_export)[] \ > > __attribute__((used)) = str > > diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h > > index fa74962..3b0d26a 100644 > > --- a/lib/librte_eal/common/include/rte_pci.h > > +++ b/lib/librte_eal/common/include/rte_pci.h > > @@ -188,6 +188,11 @@ struct rte_pci_device { > > .subsystem_device_id = PCI_ANY_ID > > #endif > > > > +#define DRIVER_REGISTER_PCI_TABLE(name, table) \ > > +static const char __##name##_pci_tbl_export[] \ > > + __attribute__((used)) = \ > > + RTE_STR(table) > > + > > This seems strange to me, in that its odd for the driver information export > macros to be spread out in multiple locations. Specifically it enjoins the use > of the DRV_EXP_TAG macro, which helps centralize tag naming. Perhaps the happy > medium is to place all the export macros (includnig PMD_REGISTER_DRIVER) into > its own pmd_register.h header? I don't know. David, your opinion?