From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2 2/2] bpf: fix convert API can be undefined
Date: Tue, 2 Nov 2021 10:54:59 +0000 [thread overview]
Message-ID: <DM6PR11MB4491A7FCCD724859DB45BC6B9A8B9@DM6PR11MB4491.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20211101100558.6b33a12b@hermes.local>
> > rte_bpf_convert() implementation depends on libpcap.
> > Right now it is defined only when this library is installed and
> > RTE_PORT_PCAP is defined.
> > Fix that by providing for such case stub rte_bpf_convert()
> > implementation that will always return an error.
> > Also move stub for another function (rte_bpf_elf_load) into
> > the same place (bpf_stub.c).
> >
> > Fixes: 2eccf6afbea9 ("bpf: add function to convert classic BPF to DPDK BPF")
> >
> > Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
>
> Wouldn't it be better to fail compiling a program using unimplemented calls
> rather than forcing the user to see a failure later?
You mean to keep things as they are right now?
That way we'll have to put #ifdef RTE_PORT_PCAP around every call to bpf_convert().
Doesn't look like a good thing to me.
Also in other places we use similar approach: if HW/SW is not available provide
a dummy implementation that will report an error.
next prev parent reply other threads:[~2021-11-02 10:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-01 14:52 [dpdk-dev] [PATCH] " Konstantin Ananyev
2021-11-01 16:10 ` [dpdk-dev] [PATCH v2 0/2] few bpf library fixes Konstantin Ananyev
2021-11-01 16:10 ` [dpdk-dev] [PATCH v2 1/2] bpf: fix doxygen comments Konstantin Ananyev
2021-11-01 16:10 ` [dpdk-dev] [PATCH v2 2/2] bpf: fix convert API can be undefined Konstantin Ananyev
2021-11-01 17:05 ` Stephen Hemminger
2021-11-02 10:54 ` Ananyev, Konstantin [this message]
2021-11-02 15:05 ` Stephen Hemminger
2021-11-03 10:54 ` Ananyev, Konstantin
2021-11-02 15:27 ` Stephen Hemminger
2021-11-03 11:17 ` [dpdk-dev] [PATCH v3 0/2] few bpf library fixes Konstantin Ananyev
2021-11-03 11:17 ` [dpdk-dev] [PATCH v3 1/2] bpf: fix doxygen comments Konstantin Ananyev
2021-11-03 11:17 ` [dpdk-dev] [PATCH v3 2/2] bpf: fix convert API can be undefined Konstantin Ananyev
2021-11-04 19:00 ` [dpdk-dev] [PATCH v3 0/2] few bpf library fixes Thomas Monjalon
2021-11-01 16:15 ` [dpdk-dev] [PATCH] bpf: fix convert API can be undefined Stephen Hemminger
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=DM6PR11MB4491A7FCCD724859DB45BC6B9A8B9@DM6PR11MB4491.namprd11.prod.outlook.com \
--to=konstantin.ananyev@intel.com \
--cc=dev@dpdk.org \
--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).