DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] drivers/net: make PCI device id struct const
@ 2017-01-26 14:07 Ferruh Yigit
  2017-01-27  7:10 ` Shreyansh Jain
  0 siblings, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2017-01-26 14:07 UTC (permalink / raw)
  To: dev; +Cc: Ferruh Yigit, Thomas Monjalon, Pablo de Lara

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/bnx2x/bnx2x_ethdev.c | 4 ++--
 drivers/net/bnxt/bnxt_ethdev.c   | 2 +-
 drivers/net/cxgbe/cxgbe_ethdev.c | 2 +-
 drivers/net/ena/ena_ethdev.c     | 2 +-
 drivers/net/nfp/nfp_net.c        | 2 +-
 drivers/net/qede/qede_ethdev.c   | 4 ++--
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index d149468..a0b0dfa 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -17,7 +17,7 @@
  * The set of PCI devices this driver supports
  */
 #define BROADCOM_PCI_VENDOR_ID 0x14E4
-static struct rte_pci_id pci_id_bnx2x_map[] = {
+static const struct rte_pci_id pci_id_bnx2x_map[] = {
 	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57800) },
 	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57711) },
 	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57810) },
@@ -33,7 +33,7 @@ static struct rte_pci_id pci_id_bnx2x_map[] = {
 	{ .vendor_id = 0, }
 };
 
-static struct rte_pci_id pci_id_bnx2xvf_map[] = {
+static const struct rte_pci_id pci_id_bnx2xvf_map[] = {
 	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57800_VF) },
 	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57810_VF) },
 	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57811_VF) },
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 501c97d..d1b2518 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -92,7 +92,7 @@ static const char bnxt_version[] =
 #define BROADCOM_DEV_ID_57414_MF 0x16ec
 #define BROADCOM_DEV_ID_57416_MF 0x16ee
 
-static struct rte_pci_id bnxt_pci_id_map[] = {
+static const struct rte_pci_id bnxt_pci_id_map[] = {
 	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57301) },
 	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57302) },
 	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57304_PF) },
diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index 64345e3..4d543a7 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -68,7 +68,7 @@
  * Macros needed to support the PCI Device ID Table ...
  */
 #define CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN \
-	static struct rte_pci_id cxgb4_pci_tbl[] = {
+	static const struct rte_pci_id cxgb4_pci_tbl[] = {
 #define CH_PCI_DEVICE_ID_FUNCTION 0x4
 
 #define PCI_VENDOR_ID_CHELSIO 0x1425
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 88a4977..a580345 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -177,7 +177,7 @@ static const struct ena_stats ena_stats_ena_com_strings[] = {
 #define	ENA_TX_OFFLOAD_NOTSUP_MASK	\
 	(PKT_TX_OFFLOAD_MASK ^ ENA_TX_OFFLOAD_MASK)
 
-static struct rte_pci_id pci_id_ena_map[] = {
+static const struct rte_pci_id pci_id_ena_map[] = {
 	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_AMAZON, PCI_DEVICE_ID_ENA_VF) },
 	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_AMAZON, PCI_DEVICE_ID_ENA_LLQ_VF) },
 	{ .device_id = 0 },
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index ab2d331..1020d9e 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2583,7 +2583,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
 	return 0;
 }
 
-static struct rte_pci_id pci_id_nfp_net_map[] = {
+static const struct rte_pci_id pci_id_nfp_net_map[] = {
 	{
 		RTE_PCI_DEVICE(PCI_VENDOR_ID_NETRONOME,
 			       PCI_DEVICE_ID_NFP6000_PF_NIC)
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 5e8e97e..0494dbd 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -2288,7 +2288,7 @@ static int qedevf_eth_dev_uninit(struct rte_eth_dev *eth_dev)
 	return qede_dev_common_uninit(eth_dev);
 }
 
-static struct rte_pci_id pci_id_qedevf_map[] = {
+static const struct rte_pci_id pci_id_qedevf_map[] = {
 #define QEDEVF_RTE_PCI_DEVICE(dev) RTE_PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, dev)
 	{
 		QEDEVF_RTE_PCI_DEVICE(PCI_DEVICE_ID_QLOGIC_NX2_VF)
@@ -2302,7 +2302,7 @@ static struct rte_pci_id pci_id_qedevf_map[] = {
 	{.vendor_id = 0,}
 };
 
-static struct rte_pci_id pci_id_qede_map[] = {
+static const struct rte_pci_id pci_id_qede_map[] = {
 #define QEDE_RTE_PCI_DEVICE(dev) RTE_PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, dev)
 	{
 		QEDE_RTE_PCI_DEVICE(PCI_DEVICE_ID_QLOGIC_NX2_57980E)
-- 
2.9.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] drivers/net: make PCI device id struct const
  2017-01-26 14:07 [dpdk-dev] [PATCH] drivers/net: make PCI device id struct const Ferruh Yigit
@ 2017-01-27  7:10 ` Shreyansh Jain
  2017-01-27  9:37   ` Ferruh Yigit
  2017-01-27 11:01   ` Ferruh Yigit
  0 siblings, 2 replies; 4+ messages in thread
From: Shreyansh Jain @ 2017-01-27  7:10 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, Thomas Monjalon, Pablo de Lara

On Thursday 26 January 2017 07:37 PM, Ferruh Yigit wrote:
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
>  drivers/net/bnx2x/bnx2x_ethdev.c | 4 ++--
>  drivers/net/bnxt/bnxt_ethdev.c   | 2 +-
>  drivers/net/cxgbe/cxgbe_ethdev.c | 2 +-
>  drivers/net/ena/ena_ethdev.c     | 2 +-
>  drivers/net/nfp/nfp_net.c        | 2 +-
>  drivers/net/qede/qede_ethdev.c   | 4 ++--
>  6 files changed, 8 insertions(+), 8 deletions(-)
>
<snip>
Do you think making this change in test_pci.c also makes sense?
Either way:

Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] drivers/net: make PCI device id struct const
  2017-01-27  7:10 ` Shreyansh Jain
@ 2017-01-27  9:37   ` Ferruh Yigit
  2017-01-27 11:01   ` Ferruh Yigit
  1 sibling, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2017-01-27  9:37 UTC (permalink / raw)
  To: Shreyansh Jain; +Cc: dev, Thomas Monjalon, Pablo de Lara

On 1/27/2017 7:10 AM, Shreyansh Jain wrote:
> On Thursday 26 January 2017 07:37 PM, Ferruh Yigit wrote:
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>> ---
>>  drivers/net/bnx2x/bnx2x_ethdev.c | 4 ++--
>>  drivers/net/bnxt/bnxt_ethdev.c   | 2 +-
>>  drivers/net/cxgbe/cxgbe_ethdev.c | 2 +-
>>  drivers/net/ena/ena_ethdev.c     | 2 +-
>>  drivers/net/nfp/nfp_net.c        | 2 +-
>>  drivers/net/qede/qede_ethdev.c   | 4 ++--
>>  6 files changed, 8 insertions(+), 8 deletions(-)
>>
> <snip>
> Do you think making this change in test_pci.c also makes sense?

Yes it does, I will send a patch, thanks.

> Either way:
> 
> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] drivers/net: make PCI device id struct const
  2017-01-27  7:10 ` Shreyansh Jain
  2017-01-27  9:37   ` Ferruh Yigit
@ 2017-01-27 11:01   ` Ferruh Yigit
  1 sibling, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2017-01-27 11:01 UTC (permalink / raw)
  To: Shreyansh Jain; +Cc: dev, Thomas Monjalon, Pablo de Lara

On 1/27/2017 7:10 AM, Shreyansh Jain wrote:
> On Thursday 26 January 2017 07:37 PM, Ferruh Yigit wrote:
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>> ---
>>  drivers/net/bnx2x/bnx2x_ethdev.c | 4 ++--
>>  drivers/net/bnxt/bnxt_ethdev.c   | 2 +-
>>  drivers/net/cxgbe/cxgbe_ethdev.c | 2 +-
>>  drivers/net/ena/ena_ethdev.c     | 2 +-
>>  drivers/net/nfp/nfp_net.c        | 2 +-
>>  drivers/net/qede/qede_ethdev.c   | 4 ++--
>>  6 files changed, 8 insertions(+), 8 deletions(-)
>>
> <snip>
> Do you think making this change in test_pci.c also makes sense?
> Either way:
> 
> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-27 11:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-26 14:07 [dpdk-dev] [PATCH] drivers/net: make PCI device id struct const Ferruh Yigit
2017-01-27  7:10 ` Shreyansh Jain
2017-01-27  9:37   ` Ferruh Yigit
2017-01-27 11:01   ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).