[dpdk-dev] [PATCH 2/2] net/ice: add Rx AVX512 offload path

Van Haaren, Harry harry.van.haaren at intel.com
Thu Mar 18 11:35:11 CET 2021


> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Leyi Rong
> Sent: Wednesday, March 17, 2021 9:14 AM
> To: Zhang, Qi Z <qi.z.zhang at intel.com>; Lu, Wenzhuo <wenzhuo.lu at intel.com>
> Cc: dev at dpdk.org; Rong, Leyi <leyi.rong at intel.com>
> Subject: [dpdk-dev] [PATCH 2/2] net/ice: add Rx AVX512 offload path
> 
> Split AVX512 Rx data path into two, one is for basic,
> the other one can support additional Rx offload features,
> including Rx checksum offload, Rx vlan offload, RSS offload.
> 
> Signed-off-by: Leyi Rong <leyi.rong at intel.com>
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu at intel.com>


Hi Leyi and Wenzhou,

I'm a bit concerned over code-duplication of the RX datapath in this patch,
as it duplicates the core desc-to-mbuf RX loop.

I loaded the following functions, and compared in "meld" to view the diff
side-by-side, and it should be possible to "specialize" away the differences:
_ice_recv_raw_pkts_vec_avx512() /* original */
_ice_recv_raw_pkts_vec_avx512_offload() /* with offload */

Specializing the implementation (adding "do_offload" parameter to _ice_recv_raw_pkts_vec_avx512()),
and branch on it with an   if(do_offload)  when the offload and non-offload paths behave differently.

When inlining that function the compiler will remove the branches, and you'll only have one version
of the code to maintain, without any performance penalty.

If my suggestion around parameterizing, specializing and inlining isn't clear, please ask and I can
try to explain better.

Regards, -Harry

<snip patch contents>


More information about the dev mailing list