* [dpdk-dev] [PATCH] net/cxgbe: fix colliding function names
@ 2019-04-18 23:37 Stephen Hemminger
2019-04-18 23:37 ` Stephen Hemminger
` (3 more replies)
0 siblings, 4 replies; 16+ messages in thread
From: Stephen Hemminger @ 2019-04-18 23:37 UTC (permalink / raw)
To: rahul.lakkireddy; +Cc: dev, Stephen Hemminger
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>
---
drivers/net/cxgbe/cxgbe.h | 27 +++++++++++++------------
drivers/net/cxgbe/cxgbe_ethdev.c | 15 +++++++-------
drivers/net/cxgbe/cxgbe_main.c | 34 ++++++++++++++++----------------
drivers/net/cxgbe/cxgbevf_main.c | 10 +++++-----
4 files changed, 44 insertions(+), 42 deletions(-)
diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h
index 5a7490f914c8..951b3ed3e9b6 100644
--- a/drivers/net/cxgbe/cxgbe.h
+++ b/drivers/net/cxgbe/cxgbe.h
@@ -52,7 +52,7 @@
#define CXGBE_DEVARG_KEEP_OVLAN "keep_ovlan"
#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);
void cxgbe_get_speed_caps(struct port_info *pi, u32 *speed_caps);
@@ -65,19 +65,20 @@ void cxgbevf_stats_get(struct port_info *pi, struct port_stats *stats);
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);
+void cxgbe_init_rspq(struct adapter *adap, struct sge_rspq *q, unsigned int us,
+ unsigned int cnt, unsigned int size,
+ unsigned int iqe_size);
+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 833dd1f5f7cc..01d256da01db 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -200,7 +200,8 @@ int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev,
cxgbe_poll(&s->fw_evtq, NULL, budget, &work_done);
/* 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;
if (!wait_to_complete)
@@ -209,7 +210,7 @@ int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev,
rte_delay_ms(CXGBE_LINK_STATUS_POLL_MS);
}
- 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;
new_link.link_duplex = ETH_LINK_FULL_DUPLEX;
@@ -356,7 +357,7 @@ 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;
@@ -372,7 +373,7 @@ int cxgbe_dev_start(struct rte_eth_dev *eth_dev)
goto out;
}
- err = link_start(pi);
+ err = cxgbe_link_start(pi);
if (err)
goto out;
@@ -412,18 +413,18 @@ int cxgbe_dev_configure(struct rte_eth_dev *eth_dev)
CXGBE_FUNC_TRACE();
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;
}
}
- 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 fd0707b95580..5e72e844734e 100644
--- a/drivers/net/cxgbe/cxgbe_main.c
+++ b/drivers/net/cxgbe/cxgbe_main.c
@@ -116,7 +116,7 @@ static int fwevtq_handler(struct sge_rspq *q, const __be64 *rsp,
/**
* 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;
int err = 0, i = 0;
@@ -190,7 +190,7 @@ int cxgbe_poll_for_completion(struct sge_rspq *q, unsigned int ms,
return -ETIMEDOUT;
}
-int setup_sge_fwevtq(struct adapter *adapter)
+int cxgbe_setup_sge_fwevtq(struct adapter *adapter)
{
struct sge *s = &adapter->sge;
int err = 0;
@@ -475,7 +475,7 @@ inline void init_rspq(struct adapter *adap, struct sge_rspq *q,
q->size = size;
}
-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);
struct adapter *adap = pi->adapter;
@@ -502,7 +502,7 @@ int cfg_queue_count(struct rte_eth_dev *eth_dev)
return 0;
}
-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();
struct port_info *pi = (struct port_info *)(eth_dev->data->dev_private);
@@ -596,7 +596,7 @@ static void setup_memwin(struct adapter *adap)
MEMWIN_NIC));
}
-int init_rss(struct adapter *adap)
+int cxgbe_init_rss(struct adapter *adap)
{
unsigned int i;
@@ -623,7 +623,7 @@ 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)
{
/**
* Hardware/Firmware/etc. Version/Revision IDs.
@@ -631,7 +631,7 @@ void print_adapter_info(struct adapter *adap)
t4_dump_version_info(adap);
}
-void print_port_info(struct adapter *adap)
+void cxgbe_print_port_info(struct adapter *adap)
{
int i;
char buf[80];
@@ -779,7 +779,7 @@ 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;
@@ -1268,7 +1268,7 @@ static int adap_init0(struct adapter *adap)
t4_init_tp_params(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;
adap->flags |= FW_OK;
@@ -1322,7 +1322,7 @@ void t4_os_portmod_changed(const struct adapter *adap, int port_id)
pi->port_id, pi->mod_type);
}
-inline bool force_linkup(struct adapter *adap)
+bool cxgbe_force_linkup(struct adapter *adap)
{
struct rte_pci_device *pdev = adap->pdev;
@@ -1340,7 +1340,7 @@ 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;
u64 conf_offloads;
@@ -1382,7 +1382,7 @@ int link_start(struct port_info *pi)
true, true, false);
}
- 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;
}
@@ -1490,7 +1490,7 @@ int cxgbe_write_rss(const struct port_info *pi, const u16 *queues)
* We always configure the RSS mapping for all ports since the mapping
* table has plenty of entries.
*/
-int setup_rss(struct port_info *pi)
+int cxgbe_setup_rss(struct port_info *pi)
{
int j, err;
struct adapter *adapter = pi->adapter;
@@ -1864,10 +1864,10 @@ int cxgbe_probe(struct adapter *adapter)
}
}
- 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,
adapter->clipt_end);
@@ -1909,7 +1909,7 @@ int cxgbe_probe(struct adapter *adapter)
"Maskless filter support disabled. Continuing\n");
}
- 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 f440b43457e8..0ac2d98ebdd7 100644
--- a/drivers/net/cxgbe/cxgbevf_main.c
+++ b/drivers/net/cxgbe/cxgbevf_main.c
@@ -50,7 +50,7 @@ static void size_nports_qsets(struct adapter *adapter)
adapter->params.nports = pmask_nports;
}
- 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"
" virtual interfaces (too few Queue Sets)\n",
@@ -268,16 +268,16 @@ int cxgbevf_probe(struct adapter *adapter)
}
}
- 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);
if (!adapter->mpstcam)
dev_warn(adapter,
"VF could not allocate mps tcam table. Continuing\n");
- err = init_rss(adapter);
+ err = cxgbe_init_rss(adapter);
if (err)
goto out_free;
return 0;
--
2.20.1
^ permalink raw reply [flat|nested] 16+ messages in thread
* [dpdk-dev] [PATCH] net/cxgbe: fix colliding function names
2019-04-18 23:37 [dpdk-dev] [PATCH] net/cxgbe: fix colliding function names Stephen Hemminger
@ 2019-04-18 23:37 ` Stephen Hemminger
2019-04-19 8:15 ` Ferruh Yigit
` (2 subsequent siblings)
3 siblings, 0 replies; 16+ messages in thread
From: Stephen Hemminger @ 2019-04-18 23:37 UTC (permalink / raw)
To: rahul.lakkireddy; +Cc: dev, Stephen Hemminger
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>
---
drivers/net/cxgbe/cxgbe.h | 27 +++++++++++++------------
drivers/net/cxgbe/cxgbe_ethdev.c | 15 +++++++-------
drivers/net/cxgbe/cxgbe_main.c | 34 ++++++++++++++++----------------
drivers/net/cxgbe/cxgbevf_main.c | 10 +++++-----
4 files changed, 44 insertions(+), 42 deletions(-)
diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h
index 5a7490f914c8..951b3ed3e9b6 100644
--- a/drivers/net/cxgbe/cxgbe.h
+++ b/drivers/net/cxgbe/cxgbe.h
@@ -52,7 +52,7 @@
#define CXGBE_DEVARG_KEEP_OVLAN "keep_ovlan"
#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);
void cxgbe_get_speed_caps(struct port_info *pi, u32 *speed_caps);
@@ -65,19 +65,20 @@ void cxgbevf_stats_get(struct port_info *pi, struct port_stats *stats);
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);
+void cxgbe_init_rspq(struct adapter *adap, struct sge_rspq *q, unsigned int us,
+ unsigned int cnt, unsigned int size,
+ unsigned int iqe_size);
+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 833dd1f5f7cc..01d256da01db 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -200,7 +200,8 @@ int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev,
cxgbe_poll(&s->fw_evtq, NULL, budget, &work_done);
/* 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;
if (!wait_to_complete)
@@ -209,7 +210,7 @@ int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev,
rte_delay_ms(CXGBE_LINK_STATUS_POLL_MS);
}
- 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;
new_link.link_duplex = ETH_LINK_FULL_DUPLEX;
@@ -356,7 +357,7 @@ 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;
@@ -372,7 +373,7 @@ int cxgbe_dev_start(struct rte_eth_dev *eth_dev)
goto out;
}
- err = link_start(pi);
+ err = cxgbe_link_start(pi);
if (err)
goto out;
@@ -412,18 +413,18 @@ int cxgbe_dev_configure(struct rte_eth_dev *eth_dev)
CXGBE_FUNC_TRACE();
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;
}
}
- 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 fd0707b95580..5e72e844734e 100644
--- a/drivers/net/cxgbe/cxgbe_main.c
+++ b/drivers/net/cxgbe/cxgbe_main.c
@@ -116,7 +116,7 @@ static int fwevtq_handler(struct sge_rspq *q, const __be64 *rsp,
/**
* 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;
int err = 0, i = 0;
@@ -190,7 +190,7 @@ int cxgbe_poll_for_completion(struct sge_rspq *q, unsigned int ms,
return -ETIMEDOUT;
}
-int setup_sge_fwevtq(struct adapter *adapter)
+int cxgbe_setup_sge_fwevtq(struct adapter *adapter)
{
struct sge *s = &adapter->sge;
int err = 0;
@@ -475,7 +475,7 @@ inline void init_rspq(struct adapter *adap, struct sge_rspq *q,
q->size = size;
}
-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);
struct adapter *adap = pi->adapter;
@@ -502,7 +502,7 @@ int cfg_queue_count(struct rte_eth_dev *eth_dev)
return 0;
}
-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();
struct port_info *pi = (struct port_info *)(eth_dev->data->dev_private);
@@ -596,7 +596,7 @@ static void setup_memwin(struct adapter *adap)
MEMWIN_NIC));
}
-int init_rss(struct adapter *adap)
+int cxgbe_init_rss(struct adapter *adap)
{
unsigned int i;
@@ -623,7 +623,7 @@ 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)
{
/**
* Hardware/Firmware/etc. Version/Revision IDs.
@@ -631,7 +631,7 @@ void print_adapter_info(struct adapter *adap)
t4_dump_version_info(adap);
}
-void print_port_info(struct adapter *adap)
+void cxgbe_print_port_info(struct adapter *adap)
{
int i;
char buf[80];
@@ -779,7 +779,7 @@ 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;
@@ -1268,7 +1268,7 @@ static int adap_init0(struct adapter *adap)
t4_init_tp_params(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;
adap->flags |= FW_OK;
@@ -1322,7 +1322,7 @@ void t4_os_portmod_changed(const struct adapter *adap, int port_id)
pi->port_id, pi->mod_type);
}
-inline bool force_linkup(struct adapter *adap)
+bool cxgbe_force_linkup(struct adapter *adap)
{
struct rte_pci_device *pdev = adap->pdev;
@@ -1340,7 +1340,7 @@ 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;
u64 conf_offloads;
@@ -1382,7 +1382,7 @@ int link_start(struct port_info *pi)
true, true, false);
}
- 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;
}
@@ -1490,7 +1490,7 @@ int cxgbe_write_rss(const struct port_info *pi, const u16 *queues)
* We always configure the RSS mapping for all ports since the mapping
* table has plenty of entries.
*/
-int setup_rss(struct port_info *pi)
+int cxgbe_setup_rss(struct port_info *pi)
{
int j, err;
struct adapter *adapter = pi->adapter;
@@ -1864,10 +1864,10 @@ int cxgbe_probe(struct adapter *adapter)
}
}
- 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,
adapter->clipt_end);
@@ -1909,7 +1909,7 @@ int cxgbe_probe(struct adapter *adapter)
"Maskless filter support disabled. Continuing\n");
}
- 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 f440b43457e8..0ac2d98ebdd7 100644
--- a/drivers/net/cxgbe/cxgbevf_main.c
+++ b/drivers/net/cxgbe/cxgbevf_main.c
@@ -50,7 +50,7 @@ static void size_nports_qsets(struct adapter *adapter)
adapter->params.nports = pmask_nports;
}
- 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"
" virtual interfaces (too few Queue Sets)\n",
@@ -268,16 +268,16 @@ int cxgbevf_probe(struct adapter *adapter)
}
}
- 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);
if (!adapter->mpstcam)
dev_warn(adapter,
"VF could not allocate mps tcam table. Continuing\n");
- err = init_rss(adapter);
+ err = cxgbe_init_rss(adapter);
if (err)
goto out_free;
return 0;
--
2.20.1
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [dpdk-dev] [PATCH] net/cxgbe: fix colliding function names
2019-04-18 23:37 [dpdk-dev] [PATCH] net/cxgbe: fix colliding function names Stephen Hemminger
2019-04-18 23:37 ` Stephen Hemminger
@ 2019-04-19 8:15 ` Ferruh Yigit
2019-04-19 8:15 ` Ferruh Yigit
2019-04-19 10:05 ` Rahul Lakkireddy
2019-04-19 10:04 ` Rahul Lakkireddy
2019-04-19 11:44 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
3 siblings, 2 replies; 16+ messages in thread
From: Ferruh Yigit @ 2019-04-19 8:15 UTC (permalink / raw)
To: Stephen Hemminger, rahul.lakkireddy; +Cc: dev
On 4/19/2019 12:37 AM, Stephen Hemminger wrote:
> 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.
+1, not static functions should have module prefix
>
> Fixes: bfcb257d3014 ("net/cxgbe: enable RSS for VF")
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [dpdk-dev] [PATCH] net/cxgbe: fix colliding function names
2019-04-19 8:15 ` Ferruh Yigit
@ 2019-04-19 8:15 ` Ferruh Yigit
2019-04-19 10:05 ` Rahul Lakkireddy
1 sibling, 0 replies; 16+ messages in thread
From: Ferruh Yigit @ 2019-04-19 8:15 UTC (permalink / raw)
To: Stephen Hemminger, rahul.lakkireddy; +Cc: dev
On 4/19/2019 12:37 AM, Stephen Hemminger wrote:
> 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.
+1, not static functions should have module prefix
>
> Fixes: bfcb257d3014 ("net/cxgbe: enable RSS for VF")
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [dpdk-dev] [PATCH] net/cxgbe: fix colliding function names
2019-04-18 23:37 [dpdk-dev] [PATCH] net/cxgbe: fix colliding function names Stephen Hemminger
2019-04-18 23:37 ` Stephen Hemminger
2019-04-19 8:15 ` Ferruh Yigit
@ 2019-04-19 10:04 ` Rahul Lakkireddy
2019-04-19 10:04 ` Rahul Lakkireddy
2019-04-19 11:38 ` Ferruh Yigit
2019-04-19 11:44 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
3 siblings, 2 replies; 16+ messages in thread
From: Rahul Lakkireddy @ 2019-04-19 10:04 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev
On Friday, April 04/19/19, 2019 at 05:07:02 +0530, Stephen Hemminger wrote:
> 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.
>
Agreed. Thanks for fixing it up.
> Fixes: bfcb257d3014 ("net/cxgbe: enable RSS for VF")
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> drivers/net/cxgbe/cxgbe.h | 27 +++++++++++++------------
> drivers/net/cxgbe/cxgbe_ethdev.c | 15 +++++++-------
> drivers/net/cxgbe/cxgbe_main.c | 34 ++++++++++++++++----------------
> drivers/net/cxgbe/cxgbevf_main.c | 10 +++++-----
> 4 files changed, 44 insertions(+), 42 deletions(-)
>
> diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h
> index 5a7490f914c8..951b3ed3e9b6 100644
> --- a/drivers/net/cxgbe/cxgbe.h
> +++ b/drivers/net/cxgbe/cxgbe.h
> @@ -52,7 +52,7 @@
> #define CXGBE_DEVARG_KEEP_OVLAN "keep_ovlan"
> #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);
> void cxgbe_get_speed_caps(struct port_info *pi, u32 *speed_caps);
> @@ -65,19 +65,20 @@ void cxgbevf_stats_get(struct port_info *pi, struct port_stats *stats);
> 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);
> +void cxgbe_init_rspq(struct adapter *adap, struct sge_rspq *q, unsigned int us,
> + unsigned int cnt, unsigned int size,
> + unsigned int iqe_size);
I see following build error.
cxgbe_main.c:468:13: error: no previous prototype for ‘init_rspq’
[-Werror=missing-prototypes]
inline void init_rspq(struct adapter *adap, struct sge_rspq *q,
^
Since init_rspq() is not used outside cxgbe_main.c, let's make
it static.
Thanks,
Rahul
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [dpdk-dev] [PATCH] net/cxgbe: fix colliding function names
2019-04-19 10:04 ` Rahul Lakkireddy
@ 2019-04-19 10:04 ` Rahul Lakkireddy
2019-04-19 11:38 ` Ferruh Yigit
1 sibling, 0 replies; 16+ messages in thread
From: Rahul Lakkireddy @ 2019-04-19 10:04 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev
On Friday, April 04/19/19, 2019 at 05:07:02 +0530, Stephen Hemminger wrote:
> 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.
>
Agreed. Thanks for fixing it up.
> Fixes: bfcb257d3014 ("net/cxgbe: enable RSS for VF")
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> drivers/net/cxgbe/cxgbe.h | 27 +++++++++++++------------
> drivers/net/cxgbe/cxgbe_ethdev.c | 15 +++++++-------
> drivers/net/cxgbe/cxgbe_main.c | 34 ++++++++++++++++----------------
> drivers/net/cxgbe/cxgbevf_main.c | 10 +++++-----
> 4 files changed, 44 insertions(+), 42 deletions(-)
>
> diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h
> index 5a7490f914c8..951b3ed3e9b6 100644
> --- a/drivers/net/cxgbe/cxgbe.h
> +++ b/drivers/net/cxgbe/cxgbe.h
> @@ -52,7 +52,7 @@
> #define CXGBE_DEVARG_KEEP_OVLAN "keep_ovlan"
> #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);
> void cxgbe_get_speed_caps(struct port_info *pi, u32 *speed_caps);
> @@ -65,19 +65,20 @@ void cxgbevf_stats_get(struct port_info *pi, struct port_stats *stats);
> 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);
> +void cxgbe_init_rspq(struct adapter *adap, struct sge_rspq *q, unsigned int us,
> + unsigned int cnt, unsigned int size,
> + unsigned int iqe_size);
I see following build error.
cxgbe_main.c:468:13: error: no previous prototype for ‘init_rspq’
[-Werror=missing-prototypes]
inline void init_rspq(struct adapter *adap, struct sge_rspq *q,
^
Since init_rspq() is not used outside cxgbe_main.c, let's make
it static.
Thanks,
Rahul
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [dpdk-dev] [PATCH] net/cxgbe: fix colliding function names
2019-04-19 8:15 ` Ferruh Yigit
2019-04-19 8:15 ` Ferruh Yigit
@ 2019-04-19 10:05 ` Rahul Lakkireddy
2019-04-19 10:05 ` Rahul Lakkireddy
1 sibling, 1 reply; 16+ messages in thread
From: Rahul Lakkireddy @ 2019-04-19 10:05 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: Stephen Hemminger, dev
On Friday, April 04/19/19, 2019 at 13:45:12 +0530, Ferruh Yigit wrote:
> On 4/19/2019 12:37 AM, Stephen Hemminger wrote:
> > 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.
>
> +1, not static functions should have module prefix
>
Agreed. I still see some non-static functions missing cxgbe_
prefix. I'll analyze more and audit them.
> >
> > Fixes: bfcb257d3014 ("net/cxgbe: enable RSS for VF")
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>
Thanks,
Rahul
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [dpdk-dev] [PATCH] net/cxgbe: fix colliding function names
2019-04-19 10:05 ` Rahul Lakkireddy
@ 2019-04-19 10:05 ` Rahul Lakkireddy
0 siblings, 0 replies; 16+ messages in thread
From: Rahul Lakkireddy @ 2019-04-19 10:05 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: Stephen Hemminger, dev
On Friday, April 04/19/19, 2019 at 13:45:12 +0530, Ferruh Yigit wrote:
> On 4/19/2019 12:37 AM, Stephen Hemminger wrote:
> > 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.
>
> +1, not static functions should have module prefix
>
Agreed. I still see some non-static functions missing cxgbe_
prefix. I'll analyze more and audit them.
> >
> > Fixes: bfcb257d3014 ("net/cxgbe: enable RSS for VF")
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>
Thanks,
Rahul
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [dpdk-dev] [PATCH] net/cxgbe: fix colliding function names
2019-04-19 10:04 ` Rahul Lakkireddy
2019-04-19 10:04 ` Rahul Lakkireddy
@ 2019-04-19 11:38 ` Ferruh Yigit
2019-04-19 11:38 ` Ferruh Yigit
1 sibling, 1 reply; 16+ messages in thread
From: Ferruh Yigit @ 2019-04-19 11:38 UTC (permalink / raw)
To: Rahul Lakkireddy, Stephen Hemminger; +Cc: dev
On 4/19/2019 11:04 AM, Rahul Lakkireddy wrote:
> On Friday, April 04/19/19, 2019 at 05:07:02 +0530, Stephen Hemminger wrote:
>> 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.
>>
>
> Agreed. Thanks for fixing it up.
>
>> Fixes: bfcb257d3014 ("net/cxgbe: enable RSS for VF")
>> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>> ---
>> drivers/net/cxgbe/cxgbe.h | 27 +++++++++++++------------
>> drivers/net/cxgbe/cxgbe_ethdev.c | 15 +++++++-------
>> drivers/net/cxgbe/cxgbe_main.c | 34 ++++++++++++++++----------------
>> drivers/net/cxgbe/cxgbevf_main.c | 10 +++++-----
>> 4 files changed, 44 insertions(+), 42 deletions(-)
>>
>> diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h
>> index 5a7490f914c8..951b3ed3e9b6 100644
>> --- a/drivers/net/cxgbe/cxgbe.h
>> +++ b/drivers/net/cxgbe/cxgbe.h
>> @@ -52,7 +52,7 @@
>> #define CXGBE_DEVARG_KEEP_OVLAN "keep_ovlan"
>> #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);
>> void cxgbe_get_speed_caps(struct port_info *pi, u32 *speed_caps);
>> @@ -65,19 +65,20 @@ void cxgbevf_stats_get(struct port_info *pi, struct port_stats *stats);
>> 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);
>> +void cxgbe_init_rspq(struct adapter *adap, struct sge_rspq *q, unsigned int us,
>> + unsigned int cnt, unsigned int size,
>> + unsigned int iqe_size);
>
> I see following build error.
>
> cxgbe_main.c:468:13: error: no previous prototype for ‘init_rspq’
> [-Werror=missing-prototypes]
> inline void init_rspq(struct adapter *adap, struct sge_rspq *q,
> ^
>
> Since init_rspq() is not used outside cxgbe_main.c, let's make
> it static.
Hi Rahul,
Can you send a new version with this change, if not I can send one?
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [dpdk-dev] [PATCH] net/cxgbe: fix colliding function names
2019-04-19 11:38 ` Ferruh Yigit
@ 2019-04-19 11:38 ` Ferruh Yigit
0 siblings, 0 replies; 16+ messages in thread
From: Ferruh Yigit @ 2019-04-19 11:38 UTC (permalink / raw)
To: Rahul Lakkireddy, Stephen Hemminger; +Cc: dev
On 4/19/2019 11:04 AM, Rahul Lakkireddy wrote:
> On Friday, April 04/19/19, 2019 at 05:07:02 +0530, Stephen Hemminger wrote:
>> 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.
>>
>
> Agreed. Thanks for fixing it up.
>
>> Fixes: bfcb257d3014 ("net/cxgbe: enable RSS for VF")
>> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>> ---
>> drivers/net/cxgbe/cxgbe.h | 27 +++++++++++++------------
>> drivers/net/cxgbe/cxgbe_ethdev.c | 15 +++++++-------
>> drivers/net/cxgbe/cxgbe_main.c | 34 ++++++++++++++++----------------
>> drivers/net/cxgbe/cxgbevf_main.c | 10 +++++-----
>> 4 files changed, 44 insertions(+), 42 deletions(-)
>>
>> diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h
>> index 5a7490f914c8..951b3ed3e9b6 100644
>> --- a/drivers/net/cxgbe/cxgbe.h
>> +++ b/drivers/net/cxgbe/cxgbe.h
>> @@ -52,7 +52,7 @@
>> #define CXGBE_DEVARG_KEEP_OVLAN "keep_ovlan"
>> #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);
>> void cxgbe_get_speed_caps(struct port_info *pi, u32 *speed_caps);
>> @@ -65,19 +65,20 @@ void cxgbevf_stats_get(struct port_info *pi, struct port_stats *stats);
>> 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);
>> +void cxgbe_init_rspq(struct adapter *adap, struct sge_rspq *q, unsigned int us,
>> + unsigned int cnt, unsigned int size,
>> + unsigned int iqe_size);
>
> I see following build error.
>
> cxgbe_main.c:468:13: error: no previous prototype for ‘init_rspq’
> [-Werror=missing-prototypes]
> inline void init_rspq(struct adapter *adap, struct sge_rspq *q,
> ^
>
> Since init_rspq() is not used outside cxgbe_main.c, let's make
> it static.
Hi Rahul,
Can you send a new version with this change, if not I can send one?
^ permalink raw reply [flat|nested] 16+ messages in thread
* [dpdk-dev] [PATCH v2] net/cxgbe: fix colliding function names
2019-04-18 23:37 [dpdk-dev] [PATCH] net/cxgbe: fix colliding function names Stephen Hemminger
` (2 preceding siblings ...)
2019-04-19 10:04 ` Rahul Lakkireddy
@ 2019-04-19 11:44 ` Ferruh Yigit
2019-04-19 11:44 ` Ferruh Yigit
2019-04-19 12:03 ` Rahul Lakkireddy
3 siblings, 2 replies; 16+ messages in thread
From: Ferruh Yigit @ 2019-04-19 11:44 UTC (permalink / raw)
To: Rahul Lakkireddy; +Cc: dev, Stephen Hemminger, stable
From: Stephen Hemminger <stephen@networkplumber.org>
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")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
v2:
* ``init_rspq`` converted into static function instead of prefixing it.
---
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 5a7490f91..6af3ee79b 100644
--- a/drivers/net/cxgbe/cxgbe.h
+++ b/drivers/net/cxgbe/cxgbe.h
@@ -52,7 +52,7 @@
#define CXGBE_DEVARG_KEEP_OVLAN "keep_ovlan"
#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);
void cxgbe_get_speed_caps(struct port_info *pi, u32 *speed_caps);
@@ -65,19 +65,17 @@ void cxgbevf_stats_get(struct port_info *pi, struct port_stats *stats);
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 833dd1f5f..01d256da0 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -200,7 +200,8 @@ int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev,
cxgbe_poll(&s->fw_evtq, NULL, budget, &work_done);
/* 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;
if (!wait_to_complete)
@@ -209,7 +210,7 @@ int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev,
rte_delay_ms(CXGBE_LINK_STATUS_POLL_MS);
}
- 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;
new_link.link_duplex = ETH_LINK_FULL_DUPLEX;
@@ -356,7 +357,7 @@ 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;
@@ -372,7 +373,7 @@ int cxgbe_dev_start(struct rte_eth_dev *eth_dev)
goto out;
}
- err = link_start(pi);
+ err = cxgbe_link_start(pi);
if (err)
goto out;
@@ -412,18 +413,18 @@ int cxgbe_dev_configure(struct rte_eth_dev *eth_dev)
CXGBE_FUNC_TRACE();
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;
}
}
- 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 fd0707b95..28c3c66ba 100644
--- a/drivers/net/cxgbe/cxgbe_main.c
+++ b/drivers/net/cxgbe/cxgbe_main.c
@@ -116,7 +116,7 @@ static int fwevtq_handler(struct sge_rspq *q, const __be64 *rsp,
/**
* 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;
int err = 0, i = 0;
@@ -190,7 +190,7 @@ int cxgbe_poll_for_completion(struct sge_rspq *q, unsigned int ms,
return -ETIMEDOUT;
}
-int setup_sge_fwevtq(struct adapter *adapter)
+int cxgbe_setup_sge_fwevtq(struct adapter *adapter)
{
struct sge *s = &adapter->sge;
int err = 0;
@@ -465,7 +465,7 @@ static inline bool is_x_10g_port(const struct link_config *lc)
return high_speeds != 0;
}
-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)
{
@@ -475,7 +475,7 @@ inline void init_rspq(struct adapter *adap, struct sge_rspq *q,
q->size = size;
}
-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);
struct adapter *adap = pi->adapter;
@@ -502,7 +502,7 @@ int cfg_queue_count(struct rte_eth_dev *eth_dev)
return 0;
}
-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();
struct port_info *pi = (struct port_info *)(eth_dev->data->dev_private);
@@ -596,7 +596,7 @@ static void setup_memwin(struct adapter *adap)
MEMWIN_NIC));
}
-int init_rss(struct adapter *adap)
+int cxgbe_init_rss(struct adapter *adap)
{
unsigned int i;
@@ -623,7 +623,7 @@ 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)
{
/**
* Hardware/Firmware/etc. Version/Revision IDs.
@@ -631,7 +631,7 @@ void print_adapter_info(struct adapter *adap)
t4_dump_version_info(adap);
}
-void print_port_info(struct adapter *adap)
+void cxgbe_print_port_info(struct adapter *adap)
{
int i;
char buf[80];
@@ -779,7 +779,7 @@ 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;
@@ -1268,7 +1268,7 @@ static int adap_init0(struct adapter *adap)
t4_init_tp_params(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;
adap->flags |= FW_OK;
@@ -1322,7 +1322,7 @@ void t4_os_portmod_changed(const struct adapter *adap, int port_id)
pi->port_id, pi->mod_type);
}
-inline bool force_linkup(struct adapter *adap)
+bool cxgbe_force_linkup(struct adapter *adap)
{
struct rte_pci_device *pdev = adap->pdev;
@@ -1340,7 +1340,7 @@ 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;
u64 conf_offloads;
@@ -1382,7 +1382,7 @@ int link_start(struct port_info *pi)
true, true, false);
}
- 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;
}
@@ -1490,7 +1490,7 @@ int cxgbe_write_rss(const struct port_info *pi, const u16 *queues)
* We always configure the RSS mapping for all ports since the mapping
* table has plenty of entries.
*/
-int setup_rss(struct port_info *pi)
+int cxgbe_setup_rss(struct port_info *pi)
{
int j, err;
struct adapter *adapter = pi->adapter;
@@ -1864,10 +1864,10 @@ int cxgbe_probe(struct adapter *adapter)
}
}
- 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,
adapter->clipt_end);
@@ -1909,7 +1909,7 @@ int cxgbe_probe(struct adapter *adapter)
"Maskless filter support disabled. Continuing\n");
}
- 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 f440b4345..0ac2d98eb 100644
--- a/drivers/net/cxgbe/cxgbevf_main.c
+++ b/drivers/net/cxgbe/cxgbevf_main.c
@@ -50,7 +50,7 @@ static void size_nports_qsets(struct adapter *adapter)
adapter->params.nports = pmask_nports;
}
- 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"
" virtual interfaces (too few Queue Sets)\n",
@@ -268,16 +268,16 @@ int cxgbevf_probe(struct adapter *adapter)
}
}
- 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);
if (!adapter->mpstcam)
dev_warn(adapter,
"VF could not allocate mps tcam table. Continuing\n");
- err = init_rss(adapter);
+ err = cxgbe_init_rss(adapter);
if (err)
goto out_free;
return 0;
--
2.20.1
^ permalink raw reply [flat|nested] 16+ messages in thread
* [dpdk-dev] [PATCH v2] net/cxgbe: fix colliding function names
2019-04-19 11:44 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
@ 2019-04-19 11:44 ` Ferruh Yigit
2019-04-19 12:03 ` Rahul Lakkireddy
1 sibling, 0 replies; 16+ messages in thread
From: Ferruh Yigit @ 2019-04-19 11:44 UTC (permalink / raw)
To: Rahul Lakkireddy; +Cc: dev, Stephen Hemminger, stable
From: Stephen Hemminger <stephen@networkplumber.org>
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")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
v2:
* ``init_rspq`` converted into static function instead of prefixing it.
---
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 5a7490f91..6af3ee79b 100644
--- a/drivers/net/cxgbe/cxgbe.h
+++ b/drivers/net/cxgbe/cxgbe.h
@@ -52,7 +52,7 @@
#define CXGBE_DEVARG_KEEP_OVLAN "keep_ovlan"
#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);
void cxgbe_get_speed_caps(struct port_info *pi, u32 *speed_caps);
@@ -65,19 +65,17 @@ void cxgbevf_stats_get(struct port_info *pi, struct port_stats *stats);
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 833dd1f5f..01d256da0 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -200,7 +200,8 @@ int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev,
cxgbe_poll(&s->fw_evtq, NULL, budget, &work_done);
/* 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;
if (!wait_to_complete)
@@ -209,7 +210,7 @@ int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev,
rte_delay_ms(CXGBE_LINK_STATUS_POLL_MS);
}
- 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;
new_link.link_duplex = ETH_LINK_FULL_DUPLEX;
@@ -356,7 +357,7 @@ 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;
@@ -372,7 +373,7 @@ int cxgbe_dev_start(struct rte_eth_dev *eth_dev)
goto out;
}
- err = link_start(pi);
+ err = cxgbe_link_start(pi);
if (err)
goto out;
@@ -412,18 +413,18 @@ int cxgbe_dev_configure(struct rte_eth_dev *eth_dev)
CXGBE_FUNC_TRACE();
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;
}
}
- 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 fd0707b95..28c3c66ba 100644
--- a/drivers/net/cxgbe/cxgbe_main.c
+++ b/drivers/net/cxgbe/cxgbe_main.c
@@ -116,7 +116,7 @@ static int fwevtq_handler(struct sge_rspq *q, const __be64 *rsp,
/**
* 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;
int err = 0, i = 0;
@@ -190,7 +190,7 @@ int cxgbe_poll_for_completion(struct sge_rspq *q, unsigned int ms,
return -ETIMEDOUT;
}
-int setup_sge_fwevtq(struct adapter *adapter)
+int cxgbe_setup_sge_fwevtq(struct adapter *adapter)
{
struct sge *s = &adapter->sge;
int err = 0;
@@ -465,7 +465,7 @@ static inline bool is_x_10g_port(const struct link_config *lc)
return high_speeds != 0;
}
-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)
{
@@ -475,7 +475,7 @@ inline void init_rspq(struct adapter *adap, struct sge_rspq *q,
q->size = size;
}
-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);
struct adapter *adap = pi->adapter;
@@ -502,7 +502,7 @@ int cfg_queue_count(struct rte_eth_dev *eth_dev)
return 0;
}
-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();
struct port_info *pi = (struct port_info *)(eth_dev->data->dev_private);
@@ -596,7 +596,7 @@ static void setup_memwin(struct adapter *adap)
MEMWIN_NIC));
}
-int init_rss(struct adapter *adap)
+int cxgbe_init_rss(struct adapter *adap)
{
unsigned int i;
@@ -623,7 +623,7 @@ 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)
{
/**
* Hardware/Firmware/etc. Version/Revision IDs.
@@ -631,7 +631,7 @@ void print_adapter_info(struct adapter *adap)
t4_dump_version_info(adap);
}
-void print_port_info(struct adapter *adap)
+void cxgbe_print_port_info(struct adapter *adap)
{
int i;
char buf[80];
@@ -779,7 +779,7 @@ 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;
@@ -1268,7 +1268,7 @@ static int adap_init0(struct adapter *adap)
t4_init_tp_params(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;
adap->flags |= FW_OK;
@@ -1322,7 +1322,7 @@ void t4_os_portmod_changed(const struct adapter *adap, int port_id)
pi->port_id, pi->mod_type);
}
-inline bool force_linkup(struct adapter *adap)
+bool cxgbe_force_linkup(struct adapter *adap)
{
struct rte_pci_device *pdev = adap->pdev;
@@ -1340,7 +1340,7 @@ 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;
u64 conf_offloads;
@@ -1382,7 +1382,7 @@ int link_start(struct port_info *pi)
true, true, false);
}
- 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;
}
@@ -1490,7 +1490,7 @@ int cxgbe_write_rss(const struct port_info *pi, const u16 *queues)
* We always configure the RSS mapping for all ports since the mapping
* table has plenty of entries.
*/
-int setup_rss(struct port_info *pi)
+int cxgbe_setup_rss(struct port_info *pi)
{
int j, err;
struct adapter *adapter = pi->adapter;
@@ -1864,10 +1864,10 @@ int cxgbe_probe(struct adapter *adapter)
}
}
- 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,
adapter->clipt_end);
@@ -1909,7 +1909,7 @@ int cxgbe_probe(struct adapter *adapter)
"Maskless filter support disabled. Continuing\n");
}
- 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 f440b4345..0ac2d98eb 100644
--- a/drivers/net/cxgbe/cxgbevf_main.c
+++ b/drivers/net/cxgbe/cxgbevf_main.c
@@ -50,7 +50,7 @@ static void size_nports_qsets(struct adapter *adapter)
adapter->params.nports = pmask_nports;
}
- 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"
" virtual interfaces (too few Queue Sets)\n",
@@ -268,16 +268,16 @@ int cxgbevf_probe(struct adapter *adapter)
}
}
- 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);
if (!adapter->mpstcam)
dev_warn(adapter,
"VF could not allocate mps tcam table. Continuing\n");
- err = init_rss(adapter);
+ err = cxgbe_init_rss(adapter);
if (err)
goto out_free;
return 0;
--
2.20.1
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/cxgbe: fix colliding function names
2019-04-19 11:44 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
2019-04-19 11:44 ` Ferruh Yigit
@ 2019-04-19 12:03 ` Rahul Lakkireddy
2019-04-19 12:03 ` Rahul Lakkireddy
2019-04-19 12:20 ` Ferruh Yigit
1 sibling, 2 replies; 16+ messages in thread
From: Rahul Lakkireddy @ 2019-04-19 12:03 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: dev, Stephen Hemminger, stable
On Friday, April 04/19/19, 2019 at 17:14:25 +0530, Ferruh Yigit wrote:
> From: Stephen Hemminger <stephen@networkplumber.org>
>
> 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")
> Cc: stable@dpdk.org
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/cxgbe: fix colliding function names
2019-04-19 12:03 ` Rahul Lakkireddy
@ 2019-04-19 12:03 ` Rahul Lakkireddy
2019-04-19 12:20 ` Ferruh Yigit
1 sibling, 0 replies; 16+ messages in thread
From: Rahul Lakkireddy @ 2019-04-19 12:03 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: dev, Stephen Hemminger, stable
On Friday, April 04/19/19, 2019 at 17:14:25 +0530, Ferruh Yigit wrote:
> From: Stephen Hemminger <stephen@networkplumber.org>
>
> 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")
> Cc: stable@dpdk.org
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/cxgbe: fix colliding function names
2019-04-19 12:03 ` Rahul Lakkireddy
2019-04-19 12:03 ` Rahul Lakkireddy
@ 2019-04-19 12:20 ` Ferruh Yigit
2019-04-19 12:20 ` Ferruh Yigit
1 sibling, 1 reply; 16+ messages in thread
From: Ferruh Yigit @ 2019-04-19 12:20 UTC (permalink / raw)
To: Rahul Lakkireddy; +Cc: dev, Stephen Hemminger, stable
On 4/19/2019 1:03 PM, Rahul Lakkireddy wrote:
> On Friday, April 04/19/19, 2019 at 17:14:25 +0530, Ferruh Yigit wrote:
>> From: Stephen Hemminger <stephen@networkplumber.org>
>>
>> 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")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
>
> Acked-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/cxgbe: fix colliding function names
2019-04-19 12:20 ` Ferruh Yigit
@ 2019-04-19 12:20 ` Ferruh Yigit
0 siblings, 0 replies; 16+ messages in thread
From: Ferruh Yigit @ 2019-04-19 12:20 UTC (permalink / raw)
To: Rahul Lakkireddy; +Cc: dev, Stephen Hemminger, stable
On 4/19/2019 1:03 PM, Rahul Lakkireddy wrote:
> On Friday, April 04/19/19, 2019 at 17:14:25 +0530, Ferruh Yigit wrote:
>> From: Stephen Hemminger <stephen@networkplumber.org>
>>
>> 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")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
>
> Acked-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2019-04-19 12:20 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-18 23:37 [dpdk-dev] [PATCH] net/cxgbe: fix colliding function names Stephen Hemminger
2019-04-18 23:37 ` Stephen Hemminger
2019-04-19 8:15 ` Ferruh Yigit
2019-04-19 8:15 ` Ferruh Yigit
2019-04-19 10:05 ` Rahul Lakkireddy
2019-04-19 10:05 ` Rahul Lakkireddy
2019-04-19 10:04 ` Rahul Lakkireddy
2019-04-19 10:04 ` Rahul Lakkireddy
2019-04-19 11:38 ` Ferruh Yigit
2019-04-19 11:38 ` Ferruh Yigit
2019-04-19 11:44 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
2019-04-19 11:44 ` Ferruh Yigit
2019-04-19 12:03 ` Rahul Lakkireddy
2019-04-19 12:03 ` Rahul Lakkireddy
2019-04-19 12:20 ` Ferruh Yigit
2019-04-19 12:20 ` 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).