Re: [dpdk-dev] L3fwd mode in testpmd
From: Stanislaw Kardach <hidden>
Date: 2021-04-29 10:39:29
On Thu, Apr 29, 2021 at 08:31:03AM +0000, Ananyev, Konstantin wrote:
Hi Stanislaw,quoted
On Wed, Apr 28, 2021 at 09:44:54PM +0000, Honnappa Nagarahalli wrote: <snip>quoted
[Honnappa] Sorry, I do not understand this. I see that vector code is under compile time flag as below #if defined RTE_ARCH_X86 || defined __ARM_NEON l3fwd_em_send_packets(nb_rx, pkts_burst, portid, qconf); #else l3fwd_em_no_opt_send_packets(nb_rx, pkts_burst, portid, qconf); #endifTake a look at the ifdef tree at the top of l3fwd_em.c, here: http://git.dpdk.org/dpdk/tree/examples/l3fwd/l3fwd_em.c#n218 #if defined(__SSE2__) ... #else #error No vector engine (SSE, NEON, ALTIVEC) available, check your toolchain #endifI think it is just a flaw and needs to be fixed. Patch would help here 😊 Konstantin
It looks as if implementing em_mask_key() is enough to get l3fwd working. However to me this ifdef seems tricky. How should a scalar implementation handle the xmm_t type? rte_xmm_t looks like an API type/union, but both are not mentioned in documentation and are in platform dependent rte_vect.h only. So either I add another case for RISC-V or (what seems more proper) add an else clause implementation. However then should I change this function to take rte_xmm_t? If not is casting xmm_t to i.e. int32_t[] always valid? Even if I change to rte_xmm_t, it's not a stable API type, is it? So what guarantee do I have that it maps to int32_t bit-wise on every platform? I think the semantic requirements of xmm_t typedef are a bit undefined as well as the vector handling across the architectures (being something rather arch specific). I don't have a clear idea on how to solve this yet and I would not like to hijack this discussion with vector stuff. Though I may be missing some obvious solution here. Any idea is welcome. :) -- Best Regards, Stanislaw Kardach