DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: David Christensen <drc@linux.vnet.ibm.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"radhika.chirra@ibm.com" <radhika.chirra@ibm.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] bpf: rename bpf_validate() to rte_bpf_validate() to avoid collisions
Date: Wed, 10 Apr 2019 21:43:16 +0000	[thread overview]
Message-ID: <2601191342CEEE43887BDE71AB9772580148A95BE2@irsmsx105.ger.corp.intel.com> (raw)
Message-ID: <20190410214316.6eDzuki0Gf3ucCxSdMjBRNk_KQ2kRc79Kgtdmi0vVTs@z> (raw)
In-Reply-To: <1554924211-11946-1-git-send-email-drc@linux.vnet.ibm.com>


> 
> 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

> 
> Cc: stable@dpdk.org
> 
> Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
> Tested-by: Radhika Chirra <radhika.chirra@ibm.com>
> ---
>  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(-)
> 
> 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;
>  };
> 
> -extern int bpf_validate(struct rte_bpf *bpf);
> +extern int rte_bpf_validate(struct rte_bpf *bpf);
> 
>  extern int bpf_jit(struct rte_bpf *bpf);
> 
> 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;
>  	}
> 
> -	rc = bpf_validate(bpf);
> +	rc = rte_bpf_validate(bpf);
>  	if (rc == 0) {
>  		bpf_jit(bpf);
>  		if (mprotect(bpf, bpf->sz, PROT_READ) != 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 {
>  }
> 
>  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


  parent reply	other threads:[~2019-04-10 21:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10 19:23 David Christensen
2019-04-10 19:23 ` David Christensen
2019-04-10 21:43 ` Ananyev, Konstantin [this message]
2019-04-10 21:43   ` Ananyev, Konstantin

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=2601191342CEEE43887BDE71AB9772580148A95BE2@irsmsx105.ger.corp.intel.com \
    --to=konstantin.ananyev@intel.com \
    --cc=dev@dpdk.org \
    --cc=drc@linux.vnet.ibm.com \
    --cc=radhika.chirra@ibm.com \
    --cc=stable@dpdk.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).