> -----Original Message-----
> From: Amber, Kumar <kumar.am...@intel.com>
> Sent: Wednesday, June 30, 2021 4:10 PM
> To: Eelco Chaudron <echau...@redhat.com>; Van Haaren, Harry
> <harry.van.haa...@intel.com>
> Cc: d...@openvswitch.org; i.maxim...@ovn.org; Flavio Leitner 
> <f...@sysclose.org>;
> Stokes, Ian <ian.sto...@intel.com>
> Subject: RE: [ovs-dev] [v4 11/12] dpif-netdev/mfex: add more AVX512 traffic 
> profiles
> 
> Hi Eelco,
> 
> Pls find my comments inline.

Snip away all except the "callbacks" topic.

> > NIT: As we might continue to add variants, would a callback in the profile 
> > be
> > cleaner? Not sure what arguments to pass? Just a thought…
> 
> Nice thought we have patch for IPv6 coming up we can surely explore the idea 😊

Callbacks can be more difficult for the compiler to inline.
A direct function call is always taken, and compilers know this.

A function pointer requires a little more "compiler knowledge"
to successfully inline the actual function. (GCC can do it, its been
tested before).

I'm not seeing a better solution overall however, as that function pointer
will still need to be set based on each profile... so we still have a switch()
with all profiles inside it.

We could abstract each specific profile away to a profile-specific helper 
function,
however that would cause an explosion of functions, instead of some code inside
a switch statement.

For now, lets leave as is, no need for churn at this point. If the list really 
gets
unmanageable, we can review again in future when adding more impls.

Thanks for feedback, -Harry
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to