From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 082E0A00E6 for ; Fri, 19 Apr 2019 12:08:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D90EB1BB2E; Fri, 19 Apr 2019 12:08:48 +0200 (CEST) Received: from stargate.chelsio.com (stargate.chelsio.com [12.32.117.8]) by dpdk.org (Postfix) with ESMTP id EE4A01BB22 for ; Fri, 19 Apr 2019 12:08:46 +0200 (CEST) Received: from localhost (scalar.blr.asicdesigners.com [10.193.185.94]) by stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id x3JA8ipm018454; Fri, 19 Apr 2019 03:08:45 -0700 Date: Fri, 19 Apr 2019 15:34:42 +0530 From: Rahul Lakkireddy To: Stephen Hemminger Cc: "dev@dpdk.org" Message-ID: <20190419100440.GA11982@chelsio.com> References: <20190418233701.20793-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190418233701.20793-1-stephen@networkplumber.org> User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [dpdk-dev] [PATCH] net/cxgbe: fix colliding function names X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190419100442.7z4a7nBaxvFavQyOSRiL5gU6uqFCO8-ceCB2JD8JIXM@z> 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 > --- > 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