patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>,
	Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>,
	dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'net/cxgbe: fix colliding function names' has been queued to LTS release 18.11.2
Date: Wed,  8 May 2019 11:15:06 +0100	[thread overview]
Message-ID: <20190508101534.8984-24-ktraynor@redhat.com> (raw)
In-Reply-To: <20190508101534.8984-1-ktraynor@redhat.com>

Hi,

FYI, your patch has been queued to LTS release 18.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/13/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/2a7dc0c595e48482888860ed4390511b0354cbf8

Thanks.

Kevin Traynor

---
From 2a7dc0c595e48482888860ed4390511b0354cbf8 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 19 Apr 2019 12:44:25 +0100
Subject: [PATCH] net/cxgbe: fix colliding function names

[ upstream commit b7fd9ea8425acd6851663e148765c6612cbd3fbb ]

This driver defines lots of functions (like init_rss) which are intended
to only be used in this device. But when doing static linking these
global functions cause link failures when similar function name is
used in application.

This patch prefixes all functions defined in cxgbe.h with cxgbe_
to avoid these kind of conflicts.

Fixes: bfcb257d3014 ("net/cxgbe: enable RSS for VF")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/cxgbe.h        | 24 ++++++++++-----------
 drivers/net/cxgbe/cxgbe_ethdev.c | 15 ++++++-------
 drivers/net/cxgbe/cxgbe_main.c   | 36 ++++++++++++++++----------------
 drivers/net/cxgbe/cxgbevf_main.c | 10 ++++-----
 4 files changed, 42 insertions(+), 43 deletions(-)

diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h
index eb58f8802..cf2621344 100644
--- a/drivers/net/cxgbe/cxgbe.h
+++ b/drivers/net/cxgbe/cxgbe.h
@@ -53,5 +53,5 @@
 #define CXGBE_DEVARG_FORCE_LINK_UP "force_link_up"
 
-bool force_linkup(struct adapter *adap);
+bool cxgbe_force_linkup(struct adapter *adap);
 int cxgbe_probe(struct adapter *adapter);
 int cxgbevf_probe(struct adapter *adapter);
@@ -66,18 +66,16 @@ void cxgbe_stats_reset(struct port_info *pi);
 int cxgbe_poll_for_completion(struct sge_rspq *q, unsigned int us,
 			      unsigned int cnt, struct t4_completion *c);
-int link_start(struct port_info *pi);
-void init_rspq(struct adapter *adap, struct sge_rspq *q, unsigned int us,
-	       unsigned int cnt, unsigned int size, unsigned int iqe_size);
-int setup_sge_fwevtq(struct adapter *adapter);
-int setup_sge_ctrl_txq(struct adapter *adapter);
-void cfg_queues(struct rte_eth_dev *eth_dev);
-int cfg_queue_count(struct rte_eth_dev *eth_dev);
-int init_rss(struct adapter *adap);
-int setup_rss(struct port_info *pi);
+int cxgbe_link_start(struct port_info *pi);
+int cxgbe_setup_sge_fwevtq(struct adapter *adapter);
+int cxgbe_setup_sge_ctrl_txq(struct adapter *adapter);
+void cxgbe_cfg_queues(struct rte_eth_dev *eth_dev);
+int cxgbe_cfg_queue_count(struct rte_eth_dev *eth_dev);
+int cxgbe_init_rss(struct adapter *adap);
+int cxgbe_setup_rss(struct port_info *pi);
 void cxgbe_enable_rx_queues(struct port_info *pi);
-void print_port_info(struct adapter *adap);
-void print_adapter_info(struct adapter *adap);
+void cxgbe_print_port_info(struct adapter *adap);
+void cxgbe_print_adapter_info(struct adapter *adap);
 int cxgbe_get_devargs(struct rte_devargs *devargs, const char *key);
-void configure_max_ethqsets(struct adapter *adapter);
+void cxgbe_configure_max_ethqsets(struct adapter *adapter);
 
 #endif /* _CXGBE_H_ */
diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index b2f83ea37..7babdfb49 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -201,5 +201,6 @@ int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev,
 
 		/* Exit if link status changed or always forced up */
-		if (pi->link_cfg.link_ok != old_link || force_linkup(adapter))
+		if (pi->link_cfg.link_ok != old_link ||
+		    cxgbe_force_linkup(adapter))
 			break;
 
@@ -210,5 +211,5 @@ int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev,
 	}
 
-	new_link.link_status = force_linkup(adapter) ?
+	new_link.link_status = cxgbe_force_linkup(adapter) ?
 			       ETH_LINK_UP : pi->link_cfg.link_ok;
 	new_link.link_autoneg = pi->link_cfg.autoneg;
@@ -357,5 +358,5 @@ int cxgbe_dev_start(struct rte_eth_dev *eth_dev)
 	cxgbe_enable_rx_queues(pi);
 
-	err = setup_rss(pi);
+	err = cxgbe_setup_rss(pi);
 	if (err)
 		goto out;
@@ -373,5 +374,5 @@ int cxgbe_dev_start(struct rte_eth_dev *eth_dev)
 	}
 
-	err = link_start(pi);
+	err = cxgbe_link_start(pi);
 	if (err)
 		goto out;
@@ -413,10 +414,10 @@ int cxgbe_dev_configure(struct rte_eth_dev *eth_dev)
 
 	if (!(adapter->flags & FW_QUEUE_BOUND)) {
-		err = setup_sge_fwevtq(adapter);
+		err = cxgbe_setup_sge_fwevtq(adapter);
 		if (err)
 			return err;
 		adapter->flags |= FW_QUEUE_BOUND;
 		if (is_pf4(adapter)) {
-			err = setup_sge_ctrl_txq(adapter);
+			err = cxgbe_setup_sge_ctrl_txq(adapter);
 			if (err)
 				return err;
@@ -424,5 +425,5 @@ int cxgbe_dev_configure(struct rte_eth_dev *eth_dev)
 	}
 
-	err = cfg_queue_count(eth_dev);
+	err = cxgbe_cfg_queue_count(eth_dev);
 	if (err)
 		return err;
diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c
index 5fa6cdd05..6a3cbc1e5 100644
--- a/drivers/net/cxgbe/cxgbe_main.c
+++ b/drivers/net/cxgbe/cxgbe_main.c
@@ -117,5 +117,5 @@ out:
  * Setup sge control queues to pass control information.
  */
-int setup_sge_ctrl_txq(struct adapter *adapter)
+int cxgbe_setup_sge_ctrl_txq(struct adapter *adapter)
 {
 	struct sge *s = &adapter->sge;
@@ -191,5 +191,5 @@ int cxgbe_poll_for_completion(struct sge_rspq *q, unsigned int ms,
 }
 
-int setup_sge_fwevtq(struct adapter *adapter)
+int cxgbe_setup_sge_fwevtq(struct adapter *adapter)
 {
 	struct sge *s = &adapter->sge;
@@ -466,5 +466,5 @@ static inline bool is_x_10g_port(const struct link_config *lc)
 }
 
-inline void init_rspq(struct adapter *adap, struct sge_rspq *q,
+static inline void init_rspq(struct adapter *adap, struct sge_rspq *q,
 		      unsigned int us, unsigned int cnt,
 		      unsigned int size, unsigned int iqe_size)
@@ -476,5 +476,5 @@ inline void init_rspq(struct adapter *adap, struct sge_rspq *q,
 }
 
-int cfg_queue_count(struct rte_eth_dev *eth_dev)
+int cxgbe_cfg_queue_count(struct rte_eth_dev *eth_dev)
 {
 	struct port_info *pi = (struct port_info *)(eth_dev->data->dev_private);
@@ -503,5 +503,5 @@ int cfg_queue_count(struct rte_eth_dev *eth_dev)
 }
 
-void cfg_queues(struct rte_eth_dev *eth_dev)
+void cxgbe_cfg_queues(struct rte_eth_dev *eth_dev)
 {
 	struct rte_config *config = rte_eal_get_configuration();
@@ -597,5 +597,5 @@ static void setup_memwin(struct adapter *adap)
 }
 
-int init_rss(struct adapter *adap)
+int cxgbe_init_rss(struct adapter *adap)
 {
 	unsigned int i;
@@ -624,5 +624,5 @@ int init_rss(struct adapter *adap)
  * Dump basic information about the adapter.
  */
-void print_adapter_info(struct adapter *adap)
+void cxgbe_print_adapter_info(struct adapter *adap)
 {
 	/**
@@ -632,5 +632,5 @@ void print_adapter_info(struct adapter *adap)
 }
 
-void print_port_info(struct adapter *adap)
+void cxgbe_print_port_info(struct adapter *adap)
 {
 	int i;
@@ -780,5 +780,5 @@ static void configure_pcie_ext_tag(struct adapter *adapter)
 
 /* Figure out how many Queue Sets we can support */
-void configure_max_ethqsets(struct adapter *adapter)
+void cxgbe_configure_max_ethqsets(struct adapter *adapter)
 {
 	unsigned int ethqsets;
@@ -1269,5 +1269,5 @@ static int adap_init0(struct adapter *adap)
 	configure_pcie_ext_tag(adap);
 	configure_vlan_types(adap);
-	configure_max_ethqsets(adap);
+	cxgbe_configure_max_ethqsets(adap);
 
 	adap->params.drv_memwin = MEMWIN_NIC;
@@ -1323,5 +1323,5 @@ void t4_os_portmod_changed(const struct adapter *adap, int port_id)
 }
 
-inline bool force_linkup(struct adapter *adap)
+bool cxgbe_force_linkup(struct adapter *adap)
 {
 	struct rte_pci_device *pdev = adap->pdev;
@@ -1341,5 +1341,5 @@ inline bool force_linkup(struct adapter *adap)
  * Performs the MAC and PHY actions needed to enable a port.
  */
-int link_start(struct port_info *pi)
+int cxgbe_link_start(struct port_info *pi)
 {
 	struct adapter *adapter = pi->adapter;
@@ -1383,5 +1383,5 @@ int link_start(struct port_info *pi)
 	}
 
-	if (ret == 0 && force_linkup(adapter))
+	if (ret == 0 && cxgbe_force_linkup(adapter))
 		pi->eth_dev->data->dev_link.link_status = ETH_LINK_UP;
 	return ret;
@@ -1491,5 +1491,5 @@ int cxgbe_write_rss(const struct port_info *pi, const u16 *queues)
  * table has plenty of entries.
  */
-int setup_rss(struct port_info *pi)
+int cxgbe_setup_rss(struct port_info *pi)
 {
 	int j, err;
@@ -1865,8 +1865,8 @@ allocate_mac:
 	}
 
-	cfg_queues(adapter->eth_dev);
+	cxgbe_cfg_queues(adapter->eth_dev);
 
-	print_adapter_info(adapter);
-	print_port_info(adapter);
+	cxgbe_print_adapter_info(adapter);
+	cxgbe_print_port_info(adapter);
 
 	adapter->clipt = t4_init_clip_tbl(adapter->clipt_start,
@@ -1910,5 +1910,5 @@ allocate_mac:
 	}
 
-	err = init_rss(adapter);
+	err = cxgbe_init_rss(adapter);
 	if (err)
 		goto out_free;
diff --git a/drivers/net/cxgbe/cxgbevf_main.c b/drivers/net/cxgbe/cxgbevf_main.c
index 61bd85193..c46bc98a4 100644
--- a/drivers/net/cxgbe/cxgbevf_main.c
+++ b/drivers/net/cxgbe/cxgbevf_main.c
@@ -51,5 +51,5 @@ static void size_nports_qsets(struct adapter *adapter)
 	}
 
-	configure_max_ethqsets(adapter);
+	cxgbe_configure_max_ethqsets(adapter);
 	if (adapter->sge.max_ethqsets < adapter->params.nports) {
 		dev_warn(adapter->pdev_dev, "only using %d of %d available"
@@ -269,7 +269,7 @@ allocate_mac:
 	}
 
-	cfg_queues(adapter->eth_dev);
-	print_adapter_info(adapter);
-	print_port_info(adapter);
+	cxgbe_cfg_queues(adapter->eth_dev);
+	cxgbe_print_adapter_info(adapter);
+	cxgbe_print_port_info(adapter);
 
 	adapter->mpstcam = t4_init_mpstcam(adapter);
@@ -278,5 +278,5 @@ allocate_mac:
 			 "VF could not allocate mps tcam table. Continuing\n");
 
-	err = init_rss(adapter);
+	err = cxgbe_init_rss(adapter);
 	if (err)
 		goto out_free;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:07.041527231 +0100
+++ 0024-net-cxgbe-fix-colliding-function-names.patch	2019-05-08 11:05:05.807933222 +0100
@@ -1 +1 @@
-From b7fd9ea8425acd6851663e148765c6612cbd3fbb Mon Sep 17 00:00:00 2001
+From 2a7dc0c595e48482888860ed4390511b0354cbf8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b7fd9ea8425acd6851663e148765c6612cbd3fbb ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 5a7490f91..6af3ee79b 100644
+index eb58f8802..cf2621344 100644
@@ -68 +69 @@
-index 833dd1f5f..01d256da0 100644
+index b2f83ea37..7babdfb49 100644
@@ -121 +122 @@
-index fd0707b95..28c3c66ba 100644
+index 5fa6cdd05..6a3cbc1e5 100644
@@ -242 +243 @@
-index f440b4345..0ac2d98eb 100644
+index 61bd85193..c46bc98a4 100644

  parent reply	other threads:[~2019-05-08 10:16 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-08 10:14 [dpdk-stable] patch 'net/bnx2x: fix MTU for jumbo frame' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'net/bnx2x: fix memory leak' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'net/bnx2x: fix ramrod timeout' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'net/bnx2x: fix DMAE " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'net/bnx2x: fix race for periodic flags' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'net/bnx2x: fix optic module verification' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'net/mlx5: fix RSS validation function' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'net/enetc: fix SMMU unhandled context fault' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'net/enetc: fix big endian build and buffer allocation' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'net/enetc: fix crash at high speed traffic' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'app/testpmd: set fixed flag for exact link speed' " Kevin Traynor
2019-05-08 10:20   ` Andrew Rybchenko
2019-05-08 10:26     ` Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'net/iavf: fix info get' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'crypto/virtio: fix IV offset' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'net/virtio: fix buffer leak on VLAN insert' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'net/virtio-user: fix return value check' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'vhost: fix device leak on connection add failure' " Kevin Traynor
2019-05-08 10:14 ` [dpdk-stable] patch 'vhost: fix null pointer checking' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'vhost: fix passing destroyed device to destroy callback' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'vhost: fix silent queue enabling with legacy guests' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'net/virtio: fix dangling pointer on failure' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'net/i40e: fix logging on VF close' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'net/mlx5: fix memory region cleanup' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'net/mlx4: " Kevin Traynor
2019-05-08 10:15 ` Kevin Traynor [this message]
2019-05-08 10:15 ` [dpdk-stable] patch 'net/tap: fix multi process reply buffer' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'bus/vmbus: fix resource leak on error' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'app/bbdev: replace sprintf with snprintf or strlcpy' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'power: fix thread-safety environment modification' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'examples/power: fix resource leak' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'examples/power: fix unreachable VF MAC init' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'examples/power: fix string null termination' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'examples/power: fix string overflow' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'examples/power: fix overflowed value' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'examples/power: fix build with some disabled PMDs' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'examples/vhost_scsi: fix null-check for parameter' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'net/i40e: fix dereference before null check in mbuf release' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'net/i40e: fix dereference before check when getting EEPROM' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'app/testpmd: fix variable use before null check' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'bitrate: fix unchecked return value' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'doc: fix heading levels in bbdev test guide' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'crypto/qat: fix null cipher algo for non 8-byte multiple' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'eventdev: fix crypto adapter' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'crypto/snow3g: add to meson build' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'crypto/kasumi: fix dependency check' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'crypto/zuc: " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'net/ixgbe: fix warning with GCC 9' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'bus/fslmc: " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'raw/skeleton: fix warnings " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'raw/dpaa2_cmdif: " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'build: fix meson binutils workaround' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'build: fix crash by disabling AVX512 with binutils 2.31' " Kevin Traynor
2019-05-08 10:15 ` [dpdk-stable] patch 'build: fix ninja install on FreeBSD' " Kevin Traynor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190508101534.8984-24-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=ferruh.yigit@intel.com \
    --cc=rahul.lakkireddy@chelsio.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).