Skip to contentSkip to conversation

cxgbe: Minor bug fix and update license year

PATCH Superseded Rahul Lakkireddy 2 participants 7 messages Jan 31, 2016 – Feb 25, 2016 Network drivers

lore
Share & tools
lore
#0 lore raw

cover cxgbe: Minor bug fix and update license year

Patch 1 fixes an issue where pci device information was not being copied to other ports on the Chelsio NIC.

Patch 2 updates the license year for CXGBE PMD to 2016.

Rahul Lakkireddy (2):
cxgbe: fix to copy pci info to other ports under same PF
cxgbe: update license year to 2016

 doc/guides/nics/cxgbe.rst               | 2 +-
 drivers/net/cxgbe/Makefile              | 2 +-
 drivers/net/cxgbe/base/adapter.h        | 2 +-
 drivers/net/cxgbe/base/common.h         | 2 +-
 drivers/net/cxgbe/base/t4_chip_type.h   | 2 +-
 drivers/net/cxgbe/base/t4_hw.c          | 2 +-
 drivers/net/cxgbe/base/t4_hw.h          | 2 +-
 drivers/net/cxgbe/base/t4_msg.h         | 2 +-
 drivers/net/cxgbe/base/t4_pci_id_tbl.h  | 2 +-
 drivers/net/cxgbe/base/t4_regs.h        | 2 +-
 drivers/net/cxgbe/base/t4_regs_values.h | 2 +-
 drivers/net/cxgbe/base/t4fw_interface.h | 2 +-
 drivers/net/cxgbe/cxgbe.h               | 2 +-
 drivers/net/cxgbe/cxgbe_compat.h        | 2 +-
 drivers/net/cxgbe/cxgbe_ethdev.c        | 4 +---
 drivers/net/cxgbe/cxgbe_main.c          | 5 ++++-
 drivers/net/cxgbe/sge.c                 | 2 +-
 17 files changed, 20 insertions(+), 19 deletions(-)
Signature · 1 line
2.5.3
#1 lore raw

PATCH 1/2 cxgbe: fix to copy pci info to other ports under same PF

Chelsio NIC ports share a single PF. Move rte_eth_copy_pci_info() to copy the pci device information to the remaining ports as well.

Fixes eeefe73f0af1 ("drivers: copy PCI device info to ethdev data")
---
 drivers/net/cxgbe/cxgbe_ethdev.c | 2 --
 drivers/net/cxgbe/cxgbe_main.c   | 3 +++
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/net/cxgbe/cxgbe_ethdev.c +0 -2
index 97ef152..fd0eb1c 100644
@@ -819,8 +819,6 @@ static int eth_cxgbe_dev_init(struct rte_eth_dev *eth_dev)
 
 	pci_dev = eth_dev->pci_dev;
 
-	rte_eth_copy_pci_info(eth_dev, pci_dev);
-
 	snprintf(name, sizeof(name), "cxgbeadapter%d", eth_dev->data->port_id);
 	adapter = rte_zmalloc(name, sizeof(*adapter), 0);
 	if (!adapter)
drivers/net/cxgbe/cxgbe_main.c +3 -0
index aff23d0..6c7eb7f 100644
@@ -1166,6 +1166,9 @@ allocate_mac:
 		pi->eth_dev->dev_ops = adapter->eth_dev->dev_ops;
 		pi->eth_dev->tx_pkt_burst = adapter->eth_dev->tx_pkt_burst;
 		pi->eth_dev->rx_pkt_burst = adapter->eth_dev->rx_pkt_burst;
+
+		rte_eth_copy_pci_info(pi->eth_dev, pi->eth_dev->pci_dev);
+
 		TAILQ_INIT(&pi->eth_dev->link_intr_cbs);
 
 		pi->eth_dev->data->mac_addrs = rte_zmalloc(name,
Signature · 1 line
2.5.3
#3 lore raw

PATCH 2/2 cxgbe: update license year to 2016

In reply to Rahul Lakkireddy

Update CXGBE PMD license year to 2016.

---
 doc/guides/nics/cxgbe.rst               | 2 +-
 drivers/net/cxgbe/Makefile              | 2 +-
 drivers/net/cxgbe/base/adapter.h        | 2 +-
 drivers/net/cxgbe/base/common.h         | 2 +-
 drivers/net/cxgbe/base/t4_chip_type.h   | 2 +-
 drivers/net/cxgbe/base/t4_hw.c          | 2 +-
 drivers/net/cxgbe/base/t4_hw.h          | 2 +-
 drivers/net/cxgbe/base/t4_msg.h         | 2 +-
 drivers/net/cxgbe/base/t4_pci_id_tbl.h  | 2 +-
 drivers/net/cxgbe/base/t4_regs.h        | 2 +-
 drivers/net/cxgbe/base/t4_regs_values.h | 2 +-
 drivers/net/cxgbe/base/t4fw_interface.h | 2 +-
 drivers/net/cxgbe/cxgbe.h               | 2 +-
 drivers/net/cxgbe/cxgbe_compat.h        | 2 +-
 drivers/net/cxgbe/cxgbe_ethdev.c        | 2 +-
 drivers/net/cxgbe/cxgbe_main.c          | 2 +-
 drivers/net/cxgbe/sge.c                 | 2 +-
 17 files changed, 17 insertions(+), 17 deletions(-)
doc/guides/nics/cxgbe.rst +1 -1
index d718f19..ac0a02c 100644
@@ -1,5 +1,5 @@
 ..  BSD LICENSE
-    Copyright 2015 Chelsio Communications.
+    Copyright 2015-2016 Chelsio Communications.
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
drivers/net/cxgbe/Makefile +1 -1
index 0711976..404154d 100644
@@ -1,6 +1,6 @@
 #   BSD LICENSE
 #
-#   Copyright(c) 2014-2015 Chelsio Communications.
+#   Copyright(c) 2014-2016 Chelsio Communications.
 #   All rights reserved.
 #
 #   Redistribution and use in source and binary forms, with or without
drivers/net/cxgbe/base/adapter.h +1 -1
index a5225c0..9c54691 100644
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2014-2015 Chelsio Communications.
+ *   Copyright(c) 2014-2016 Chelsio Communications.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
drivers/net/cxgbe/base/common.h +1 -1
index cf2e82d..e166279 100644
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2014-2015 Chelsio Communications.
+ *   Copyright(c) 2014-2016 Chelsio Communications.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
drivers/net/cxgbe/base/t4_chip_type.h +1 -1
index 1ca6803..3135733 100644
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2014-2015 Chelsio Communications.
+ *   Copyright(c) 2014-2016 Chelsio Communications.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
drivers/net/cxgbe/base/t4_hw.c +1 -1
index 884d2cf..f4099cc 100644
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2014-2015 Chelsio Communications.
+ *   Copyright(c) 2014-2016 Chelsio Communications.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
drivers/net/cxgbe/base/t4_hw.h +1 -1
index bf623cf..c4b24ba 100644
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2014-2015 Chelsio Communications.
+ *   Copyright(c) 2014-2016 Chelsio Communications.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
drivers/net/cxgbe/base/t4_msg.h +1 -1
index 4b04cd0..62c503d 100644
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2014-2015 Chelsio Communications.
+ *   Copyright(c) 2014-2016 Chelsio Communications.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
drivers/net/cxgbe/base/t4_pci_id_tbl.h +1 -1
index 110fadb..252ec4e 100644
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2014-2015 Chelsio Communications.
+ *   Copyright(c) 2014-2016 Chelsio Communications.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
drivers/net/cxgbe/base/t4_regs.h +1 -1
index 9057e40..6a85771 100644
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2014-2015 Chelsio Communications.
+ *   Copyright(c) 2014-2016 Chelsio Communications.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
drivers/net/cxgbe/base/t4_regs_values.h +1 -1
index d7d3144..aa079ef 100644
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2014-2015 Chelsio Communications.
+ *   Copyright(c) 2014-2016 Chelsio Communications.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
drivers/net/cxgbe/base/t4fw_interface.h +1 -1
index 74f19fe..22b328d 100644
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2014-2015 Chelsio Communications.
+ *   Copyright(c) 2014-2016 Chelsio Communications.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
drivers/net/cxgbe/cxgbe.h +1 -1
index 0201c99..6cb9d1e 100644
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2014-2015 Chelsio Communications.
+ *   Copyright(c) 2014-2016 Chelsio Communications.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
drivers/net/cxgbe/cxgbe_compat.h +1 -1
index e68f8f5..b5aeff7 100644
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2014-2015 Chelsio Communications.
+ *   Copyright(c) 2014-2016 Chelsio Communications.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
drivers/net/cxgbe/cxgbe_ethdev.c +1 -1
index fd0eb1c..8b63e16 100644
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2014-2015 Chelsio Communications.
+ *   Copyright(c) 2014-2016 Chelsio Communications.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
drivers/net/cxgbe/cxgbe_main.c +1 -1
index 6c7eb7f..6783d0b 100644
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2014-2015 Chelsio Communications.
+ *   Copyright(c) 2014-2016 Chelsio Communications.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
drivers/net/cxgbe/sge.c +1 -1
index 3c62d03..fd24753 100644
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2014-2015 Chelsio Communications.
+ *   Copyright(c) 2014-2016 Chelsio Communications.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
Signature · 1 line
2.5.3
#2 lore raw

Re: [PATCH 1/2] cxgbe: fix to copy pci info to other ports under same PF

In reply to Rahul Lakkireddy
Quoted 8 lines · Rahul Lakkireddy

Chelsio NIC ports share a single PF. Move rte_eth_copy_pci_info() to copy the pci device information to the remaining ports as well.

Fixes eeefe73f0af1 ("drivers: copy PCI device info to ethdev data")

---

Hi,

can you perhaps submit this fix as a patch alone, without the copyright update patch attached. [Feel free to upate the copyright year on the two files affected here by this change, if you like.]

FYI: Also, the commit title is slightly too long. It should be around 50 characters long (for me, vim highlights the correct length for me). It could be shortened by dropping the word "other". :-)

/Bruce

Quoted 34 lines
 drivers/net/cxgbe/cxgbe_ethdev.c | 2 --
 drivers/net/cxgbe/cxgbe_main.c   | 3 +++
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/net/cxgbe/cxgbe_ethdev.c +0 -2
index 97ef152..fd0eb1c 100644
@@ -819,8 +819,6 @@ static int eth_cxgbe_dev_init(struct rte_eth_dev *eth_dev)
 
 	pci_dev = eth_dev->pci_dev;
 
-	rte_eth_copy_pci_info(eth_dev, pci_dev);
-
 	snprintf(name, sizeof(name), "cxgbeadapter%d", eth_dev->data->port_id);
 	adapter = rte_zmalloc(name, sizeof(*adapter), 0);
 	if (!adapter)
drivers/net/cxgbe/cxgbe_main.c +3 -0
index aff23d0..6c7eb7f 100644
@@ -1166,6 +1166,9 @@ allocate_mac:
 		pi->eth_dev->dev_ops = adapter->eth_dev->dev_ops;
 		pi->eth_dev->tx_pkt_burst = adapter->eth_dev->tx_pkt_burst;
 		pi->eth_dev->rx_pkt_burst = adapter->eth_dev->rx_pkt_burst;
+
+		rte_eth_copy_pci_info(pi->eth_dev, pi->eth_dev->pci_dev);
+
 		TAILQ_INIT(&pi->eth_dev->link_intr_cbs);
 
 		pi->eth_dev->data->mac_addrs = rte_zmalloc(name,
Signature · 1 line
2.5.3
#5 lore raw

PATCH v2 1/1 cxgbe: fix to copy pci info to ports under same PF

In reply to Rahul Lakkireddy

Chelsio NIC ports share a single PF. Move rte_eth_copy_pci_info() to copy the pci device information to the remaining ports as well.

Also update license year to 2016.

Fixes eeefe73f0af1 ("drivers: copy PCI device info to ethdev data")

---
v2:
- Dropped the separate patch that updated license year for unmodified CXGBE related files.

 drivers/net/cxgbe/cxgbe_ethdev.c | 4 +---
 drivers/net/cxgbe/cxgbe_main.c   | 5 ++++-
 2 files changed, 5 insertions(+), 4 deletions(-)
drivers/net/cxgbe/cxgbe_ethdev.c +1 -3
index 97ef152..8b63e16 100644
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2014-2015 Chelsio Communications.
+ *   Copyright(c) 2014-2016 Chelsio Communications.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
@@ -819,8 +819,6 @@ static int eth_cxgbe_dev_init(struct rte_eth_dev *eth_dev)
 
 	pci_dev = eth_dev->pci_dev;
 
-	rte_eth_copy_pci_info(eth_dev, pci_dev);
-
 	snprintf(name, sizeof(name), "cxgbeadapter%d", eth_dev->data->port_id);
 	adapter = rte_zmalloc(name, sizeof(*adapter), 0);
 	if (!adapter)
drivers/net/cxgbe/cxgbe_main.c +4 -1
index 649b941..9321cbe 100644
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2014-2015 Chelsio Communications.
+ *   Copyright(c) 2014-2016 Chelsio Communications.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
@@ -1166,6 +1166,9 @@ allocate_mac:
 		pi->eth_dev->dev_ops = adapter->eth_dev->dev_ops;
 		pi->eth_dev->tx_pkt_burst = adapter->eth_dev->tx_pkt_burst;
 		pi->eth_dev->rx_pkt_burst = adapter->eth_dev->rx_pkt_burst;
+
+		rte_eth_copy_pci_info(pi->eth_dev, pi->eth_dev->pci_dev);
+
 		TAILQ_INIT(&pi->eth_dev->link_intr_cbs);
 
 		pi->eth_dev->data->mac_addrs = rte_zmalloc(name,
Signature · 1 line
2.5.3
#6 lore raw

Re: [PATCH v2] cxgbe: fix to copy pci info to ports under same PF

Quoted 9 lines · Rahul Lakkireddy

Chelsio NIC ports share a single PF. Move rte_eth_copy_pci_info() to copy the pci device information to the remaining ports as well.

Also update license year to 2016.

Fixes eeefe73f0af1 ("drivers: copy PCI device info to ethdev data")

Applied to dpdk-next-net/rel_16_04

Thanks,
/Bruce