> -----Original Message-----
> From: dev <dev-boun...@dpdk.org> On Behalf Of Leyi Rong
> Sent: Wednesday, March 17, 2021 9:14 AM
> To: Zhang, Qi Z <qi.z.zh...@intel.com>; Lu, Wenzhuo <wenzhuo...@intel.com>
> Cc: dev@dpdk.org; Rong, Leyi <leyi.r...@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.r...@intel.com>
> Signed-off-by: Wenzhuo Lu <wenzhuo...@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>

Reply via email to