[dpdk-dev,v7,1/9] eal/pci: export match function
Checks
Commit Message
Export rte_pci_match() function as it needed in the followup patch.
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
lib/librte_eal/bsdapp/eal/rte_eal_version.map | 7 +++++++
lib/librte_eal/common/eal_common_pci.c | 10 +---------
lib/librte_eal/common/include/rte_pci.h | 15 +++++++++++++++
lib/librte_eal/linuxapp/eal/rte_eal_version.map | 7 +++++++
4 files changed, 30 insertions(+), 9 deletions(-)
Comments
> From: Santosh Shukla [mailto:santosh.shukla@caviumnetworks.com]
> Sent: Thursday, August 31, 2017 4:26 AM
> To: dev@dpdk.org
> Cc: thomas@monjalon.net; jerin.jacob@caviumnetworks.com;
> hemant.agrawal@nxp.com; olivier.matz@6wind.com;
> maxime.coquelin@redhat.com; Gonzalez Monroy, Sergio
> <sergio.gonzalez.monroy@intel.com>; Richardson, Bruce
> <bruce.richardson@intel.com>; shreyansh.jain@nxp.com;
> gaetan.rivet@6wind.com; Burakov, Anatoly <anatoly.burakov@intel.com>;
> stephen@networkplumber.org; aconole@redhat.com; Santosh Shukla
> <santosh.shukla@caviumnetworks.com>
> Subject: [PATCH v7 1/9] eal/pci: export match function
>
> Export rte_pci_match() function as it needed in the followup patch.
>
> Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
On 8/31/2017 4:26 AM, Santosh Shukla wrote:
> Export rte_pci_match() function as it needed in the followup patch.
>
> Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
> lib/librte_eal/bsdapp/eal/rte_eal_version.map | 7 +++++++
> lib/librte_eal/common/eal_common_pci.c | 10 +---------
> lib/librte_eal/common/include/rte_pci.h | 15 +++++++++++++++
> lib/librte_eal/linuxapp/eal/rte_eal_version.map | 7 +++++++
> 4 files changed, 30 insertions(+), 9 deletions(-)
>
> diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
> index aac6fd776..c819e3084 100644
> --- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map
> +++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
> @@ -237,3 +237,10 @@ EXPERIMENTAL {
> rte_service_unregister;
>
> } DPDK_17.08;
> +
> +DPDK_17.11 {
> + global:
> +
> + rte_pci_match;
> +
> +} DPDK_17.08;
Is updating .map file required? As far as I can see rte_pci_match()
calls are within the same library, and no need to expose the API out of
library.
<...>
Hi Ferruh,
On Wednesday 06 September 2017 09:09 PM, Ferruh Yigit wrote:
> On 8/31/2017 4:26 AM, Santosh Shukla wrote:
>> Export rte_pci_match() function as it needed in the followup patch.
>>
>> Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
>> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
>> Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
>> ---
>> lib/librte_eal/bsdapp/eal/rte_eal_version.map | 7 +++++++
>> lib/librte_eal/common/eal_common_pci.c | 10 +---------
>> lib/librte_eal/common/include/rte_pci.h | 15 +++++++++++++++
>> lib/librte_eal/linuxapp/eal/rte_eal_version.map | 7 +++++++
>> 4 files changed, 30 insertions(+), 9 deletions(-)
>>
>> diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
>> index aac6fd776..c819e3084 100644
>> --- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map
>> +++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
>> @@ -237,3 +237,10 @@ EXPERIMENTAL {
>> rte_service_unregister;
>>
>> } DPDK_17.08;
>> +
>> +DPDK_17.11 {
>> + global:
>> +
>> + rte_pci_match;
>> +
>> +} DPDK_17.08;
> Is updating .map file required? As far as I can see rte_pci_match()
> calls are within the same library, and no need to expose the API out of
> library.
>
> <...>
>
Its used in file eal/eal_pci.c in following patch.
Thanks.
@@ -237,3 +237,10 @@ EXPERIMENTAL {
rte_service_unregister;
} DPDK_17.08;
+
+DPDK_17.11 {
+ global:
+
+ rte_pci_match;
+
+} DPDK_17.08;
@@ -150,16 +150,8 @@ pci_unmap_resource(void *requested_addr, size_t size)
/*
* Match the PCI Driver and Device using the ID Table
- *
- * @param pci_drv
- * PCI driver from which ID table would be extracted
- * @param pci_dev
- * PCI device to match against the driver
- * @return
- * 1 for successful match
- * 0 for unsuccessful match
*/
-static int
+int
rte_pci_match(const struct rte_pci_driver *pci_drv,
const struct rte_pci_device *pci_dev)
{
@@ -366,6 +366,21 @@ int rte_pci_scan(void);
int
rte_pci_probe(void);
+/*
+ * Match the PCI Driver and Device using the ID Table
+ *
+ * @param pci_drv
+ * PCI driver from which ID table would be extracted
+ * @param pci_dev
+ * PCI device to match against the driver
+ * @return
+ * 1 for successful match
+ * 0 for unsuccessful match
+ */
+int
+rte_pci_match(const struct rte_pci_driver *pci_drv,
+ const struct rte_pci_device *pci_dev);
+
/**
* Map the PCI device resources in user space virtual memory address
*
@@ -242,3 +242,10 @@ EXPERIMENTAL {
rte_service_unregister;
} DPDK_17.08;
+
+DPDK_17.11 {
+ global:
+
+ rte_pci_match;
+
+} DPDK_17.08;