> -----Original Message----- > From: Amber, Kumar <[email protected]> > Sent: Tuesday, May 24, 2022 12:39 PM > To: [email protected] > Cc: [email protected]; [email protected]; [email protected]; Van Haaren, > Harry <[email protected]>; Ferriter, Cian <[email protected]>; > Stokes, Ian <[email protected]>; Amber, Kumar <[email protected]> > Subject: [PATCH v2 3/5] dpif-netdev-avx512: Refactor avx512 dpif and create > new > APIs. > > This Patch creates new APIs for avx512 dpif.
This could be a bit more descriptive as to what is going on; Create new APIs for the avx512 DPIF, enabling one baseline common code to be specialized into DPIF implementations for "outer" processing, and "recirc" processing. > Signed-off-by: Kumar Amber <[email protected]> > Signed-off-by: Cian Ferriter <[email protected]> > Co-authored-by: Cian Ferriter <[email protected]> > --- > lib/dpif-netdev-avx512.c | 32 +++++++++++++++++++++++++++----- > lib/dpif-netdev-private-dpif.c | 4 ++-- > lib/dpif-netdev-private-dpif.h | 12 ++++++++---- > 3 files changed, 37 insertions(+), 11 deletions(-) > > diff --git a/lib/dpif-netdev-avx512.c b/lib/dpif-netdev-avx512.c > index 11d9a0005..ecf512651 100644 > --- a/lib/dpif-netdev-avx512.c > +++ b/lib/dpif-netdev-avx512.c > @@ -59,8 +59,13 @@ struct dpif_userdata { > struct pkt_flow_meta pkt_meta[NETDEV_MAX_BURST]; > }; > > +static int32_t > +dp_netdev_input_avx512__(struct dp_netdev_pmd_thread *pmd, > + struct dp_packet_batch *packets, > + bool md_is_valid, odp_port_t in_port); > + > int32_t > -dp_netdev_input_outer_avx512_probe(void) > +dp_netdev_input_avx512_probe(void) > { > bool avx512f_available = cpu_has_isa(OVS_CPU_ISA_X86_AVX512F); > bool bmi2_available = cpu_has_isa(OVS_CPU_ISA_X86_BMI2); > @@ -72,10 +77,10 @@ dp_netdev_input_outer_avx512_probe(void) > return 0; > } > > -int32_t > -dp_netdev_input_outer_avx512(struct dp_netdev_pmd_thread *pmd, > - struct dp_packet_batch *packets, > - odp_port_t in_port) > +static inline int32_t ALWAYS_INLINE > +dp_netdev_input_avx512__(struct dp_netdev_pmd_thread *pmd, > + struct dp_packet_batch *packets, > + bool md_is_valid OVS_UNUSED, odp_port_t in_port) > { > /* Allocate DPIF userdata. */ > if (OVS_UNLIKELY(!pmd->netdev_input_func_userdata)) { > @@ -380,5 +385,22 @@ dp_netdev_input_outer_avx512(struct > dp_netdev_pmd_thread *pmd, > return 0; > } > > +int32_t > +dp_netdev_input_avx512(struct dp_netdev_pmd_thread *pmd, > + struct dp_packet_batch *packets, > + odp_port_t in_port) > +{ > + int ret = dp_netdev_input_avx512__(pmd, packets, false, in_port); > + return ret; > +} Notice the return values here, it returns 0 on success, and -1 on failure. This will be referred to in next 4/5 review. <snip> _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
