From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id E01941B272; Wed, 10 Apr 2019 23:43:19 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Apr 2019 14:43:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,334,1549958400"; d="scan'208";a="335647466" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by fmsmga006.fm.intel.com with ESMTP; 10 Apr 2019 14:43:17 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.31]) by IRSMSX152.ger.corp.intel.com ([169.254.6.225]) with mapi id 14.03.0415.000; Wed, 10 Apr 2019 22:43:17 +0100 From: "Ananyev, Konstantin" To: David Christensen CC: "dev@dpdk.org" , "radhika.chirra@ibm.com" , "stable@dpdk.org" Thread-Topic: [PATCH] bpf: rename bpf_validate() to rte_bpf_validate() to avoid collisions Thread-Index: AQHU79L6zYBEfJnD+Uavs2qotgi0zqY17Ivg Date: Wed, 10 Apr 2019 21:43:16 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772580148A95BE2@irsmsx105.ger.corp.intel.com> References: <1554924211-11946-1-git-send-email-drc@linux.vnet.ibm.com> In-Reply-To: <1554924211-11946-1-git-send-email-drc@linux.vnet.ibm.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjg3Y2Y5MWMtOWUzZC00YzZkLTk5ZWItMzRmOGI0NmQ4ODkyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiVE1USmk4V05zbStwWFNNQ1daamNHVlVLeVJUNXVsVGRcL01nMGZ5eE1RVnpQM01CV1grbVwvV2t6SlVGRlBNSTJHIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] bpf: rename bpf_validate() to rte_bpf_validate() to avoid collisions 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: , X-List-Received-Date: Wed, 10 Apr 2019 21:43:20 -0000 >=20 > When using libpcap libraries the error "multiple definition of > 'bpf_validate'" is observed. Rename the DPDK version to rte_bpf_validate > to be more consistenet with other DPDK defined functions. As I already ask Vivian, before we proceed any further with that patch could you provide some simple test-case to reproduce the problem? bpf_validate() function is not exposed as external API, so no need for rte_ prefix in general. Konstantin >=20 > Cc: stable@dpdk.org >=20 > Signed-off-by: David Christensen > Tested-by: Radhika Chirra > --- > lib/librte_bpf/bpf_impl.h | 2 +- > lib/librte_bpf/bpf_load.c | 2 +- > lib/librte_bpf/bpf_validate.c | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/lib/librte_bpf/bpf_impl.h b/lib/librte_bpf/bpf_impl.h > index b577e2c..f1d6f9a 100644 > --- a/lib/librte_bpf/bpf_impl.h > +++ b/lib/librte_bpf/bpf_impl.h > @@ -21,7 +21,7 @@ struct rte_bpf { > uint32_t stack_sz; > }; >=20 > -extern int bpf_validate(struct rte_bpf *bpf); > +extern int rte_bpf_validate(struct rte_bpf *bpf); >=20 > extern int bpf_jit(struct rte_bpf *bpf); >=20 > diff --git a/lib/librte_bpf/bpf_load.c b/lib/librte_bpf/bpf_load.c > index d9d163b..bd9eebf 100644 > --- a/lib/librte_bpf/bpf_load.c > +++ b/lib/librte_bpf/bpf_load.c > @@ -115,7 +115,7 @@ > return NULL; > } >=20 > - rc =3D bpf_validate(bpf); > + rc =3D rte_bpf_validate(bpf); > if (rc =3D=3D 0) { > bpf_jit(bpf); > if (mprotect(bpf, bpf->sz, PROT_READ) !=3D 0) > diff --git a/lib/librte_bpf/bpf_validate.c b/lib/librte_bpf/bpf_validate.= c > index 83983ef..12c34f0 100644 > --- a/lib/librte_bpf/bpf_validate.c > +++ b/lib/librte_bpf/bpf_validate.c > @@ -2209,7 +2209,7 @@ struct bpf_ins_check { > } >=20 > int > -bpf_validate(struct rte_bpf *bpf) > +rte_bpf_validate(struct rte_bpf *bpf) > { > int32_t rc; > struct bpf_verifier bvf; > -- > 1.8.3.1 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 DAE22A0096 for ; Wed, 10 Apr 2019 23:43:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 963D01B398; Wed, 10 Apr 2019 23:43:21 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id E01941B272; Wed, 10 Apr 2019 23:43:19 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Apr 2019 14:43:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,334,1549958400"; d="scan'208";a="335647466" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by fmsmga006.fm.intel.com with ESMTP; 10 Apr 2019 14:43:17 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.31]) by IRSMSX152.ger.corp.intel.com ([169.254.6.225]) with mapi id 14.03.0415.000; Wed, 10 Apr 2019 22:43:17 +0100 From: "Ananyev, Konstantin" To: David Christensen CC: "dev@dpdk.org" , "radhika.chirra@ibm.com" , "stable@dpdk.org" Thread-Topic: [PATCH] bpf: rename bpf_validate() to rte_bpf_validate() to avoid collisions Thread-Index: AQHU79L6zYBEfJnD+Uavs2qotgi0zqY17Ivg Date: Wed, 10 Apr 2019 21:43:16 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772580148A95BE2@irsmsx105.ger.corp.intel.com> References: <1554924211-11946-1-git-send-email-drc@linux.vnet.ibm.com> In-Reply-To: <1554924211-11946-1-git-send-email-drc@linux.vnet.ibm.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjg3Y2Y5MWMtOWUzZC00YzZkLTk5ZWItMzRmOGI0NmQ4ODkyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiVE1USmk4V05zbStwWFNNQ1daamNHVlVLeVJUNXVsVGRcL01nMGZ5eE1RVnpQM01CV1grbVwvV2t6SlVGRlBNSTJHIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] bpf: rename bpf_validate() to rte_bpf_validate() to avoid collisions 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: <20190410214316.6eDzuki0Gf3ucCxSdMjBRNk_KQ2kRc79Kgtdmi0vVTs@z> >=20 > When using libpcap libraries the error "multiple definition of > 'bpf_validate'" is observed. Rename the DPDK version to rte_bpf_validate > to be more consistenet with other DPDK defined functions. As I already ask Vivian, before we proceed any further with that patch could you provide some simple test-case to reproduce the problem? bpf_validate() function is not exposed as external API, so no need for rte_ prefix in general. Konstantin >=20 > Cc: stable@dpdk.org >=20 > Signed-off-by: David Christensen > Tested-by: Radhika Chirra > --- > lib/librte_bpf/bpf_impl.h | 2 +- > lib/librte_bpf/bpf_load.c | 2 +- > lib/librte_bpf/bpf_validate.c | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/lib/librte_bpf/bpf_impl.h b/lib/librte_bpf/bpf_impl.h > index b577e2c..f1d6f9a 100644 > --- a/lib/librte_bpf/bpf_impl.h > +++ b/lib/librte_bpf/bpf_impl.h > @@ -21,7 +21,7 @@ struct rte_bpf { > uint32_t stack_sz; > }; >=20 > -extern int bpf_validate(struct rte_bpf *bpf); > +extern int rte_bpf_validate(struct rte_bpf *bpf); >=20 > extern int bpf_jit(struct rte_bpf *bpf); >=20 > diff --git a/lib/librte_bpf/bpf_load.c b/lib/librte_bpf/bpf_load.c > index d9d163b..bd9eebf 100644 > --- a/lib/librte_bpf/bpf_load.c > +++ b/lib/librte_bpf/bpf_load.c > @@ -115,7 +115,7 @@ > return NULL; > } >=20 > - rc =3D bpf_validate(bpf); > + rc =3D rte_bpf_validate(bpf); > if (rc =3D=3D 0) { > bpf_jit(bpf); > if (mprotect(bpf, bpf->sz, PROT_READ) !=3D 0) > diff --git a/lib/librte_bpf/bpf_validate.c b/lib/librte_bpf/bpf_validate.= c > index 83983ef..12c34f0 100644 > --- a/lib/librte_bpf/bpf_validate.c > +++ b/lib/librte_bpf/bpf_validate.c > @@ -2209,7 +2209,7 @@ struct bpf_ins_check { > } >=20 > int > -bpf_validate(struct rte_bpf *bpf) > +rte_bpf_validate(struct rte_bpf *bpf) > { > int32_t rc; > struct bpf_verifier bvf; > -- > 1.8.3.1