From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>,
Stephen Hemminger <stephen@networkplumber.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/cxgbe: fix colliding function names
Date: Fri, 19 Apr 2019 12:38:30 +0100 [thread overview]
Message-ID: <c761b087-d014-0750-d397-92ea0e820a80@intel.com> (raw)
Message-ID: <20190419113830.FFRJZd0jdUT6H0WtPf_9CQlJmwr5H-TrPKHqXg1sFBg@z> (raw)
In-Reply-To: <20190419100440.GA11982@chelsio.com>
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?
next prev parent reply other threads:[~2019-04-19 11:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-18 23:37 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 [this message]
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
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=c761b087-d014-0750-d397-92ea0e820a80@intel.com \
--to=ferruh.yigit@intel.com \
--cc=dev@dpdk.org \
--cc=rahul.lakkireddy@chelsio.com \
--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).