> -----Original Message-----
> From: William Tu <[email protected]>
> Sent: Saturday, June 27, 2020 7:27 PM
> To: Van Haaren, Harry <[email protected]>
> Cc: ovs-dev <[email protected]>; Stokes, Ian <[email protected]>;
> Ilya Maximets <[email protected]>; Federico Iezzi <[email protected]>
> Subject: Re: [PATCH v4 4/7] dpdk: enable cpu feature detection.
>
> On Thu, Jun 18, 2020 at 9:53 AM Harry van Haaren
> <[email protected]> wrote:
> >
> > This commit implements a method to retrieve the CPU ISA capabilities.
> > These ISA capabilities can be used in OVS to at runtime select a function
> > implementation to make the best use of the available ISA on the CPU.
> >
> > Signed-off-by: Harry van Haaren <[email protected]>
> >
> > ---
> >
> > v4:
> > - Improve commit title and message
> > ---
> > lib/dpdk-stub.c | 13 +++++++++++++
> > lib/dpdk.c | 27 +++++++++++++++++++++++++++
> > lib/dpdk.h | 2 ++
> > 3 files changed, 42 insertions(+)
> >
> > diff --git a/lib/dpdk-stub.c b/lib/dpdk-stub.c
> > index c332c217c..9935f3d2b 100644
> > --- a/lib/dpdk-stub.c
> > +++ b/lib/dpdk-stub.c
> > @@ -79,6 +79,19 @@ print_dpdk_version(void)
> > {
> > }
> >
> > +int
> > +dpdk_get_cpu_has_isa(const char *arch OVS_UNUSED,
> > + const char *feature OVS_UNUSED)
>
> should we just have bool as a return type?
Sure yes, will fix.
> > +{
> > + static struct ovsthread_once once = OVSTHREAD_ONCE_INITIALIZER;
> > + if (ovsthread_once_start(&once)) {
> > + VLOG_ERR("DPDK not supported in this version of Open vSwitch, "
> > + "cannot use CPU flag based optimizations");
> > + ovsthread_once_done(&once);
>
> How about using VLOG_ERR_ONCE()?
Ah nice - indeed manually doing the ovsthread_once_start() etc felt a little
clunky.
Updated in v5.
> > + }
> > + return 0;
> and just return false here.
Yep, will do.
> The rest looks good to me, thanks
>
> William
Cheers!
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev