From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6E751A0547; Thu, 29 Apr 2021 12:39:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 512DB41194; Thu, 29 Apr 2021 12:39:27 +0200 (CEST) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) by mails.dpdk.org (Postfix) with ESMTP id 4627141125 for ; Thu, 29 Apr 2021 12:39:25 +0200 (CEST) Received: by mail-lf1-f54.google.com with SMTP id x20so73754061lfu.6 for ; Thu, 29 Apr 2021 03:39:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=M0prJgHpMg1A0KkVrXS3s4nU32V+ObpFLFO7tSi3WJc=; b=ddnBK5C8bPt/8AdbAb+e/vZ+8K4yQmKicavt21gLGgnk9zKpupjB1PLlFJglTsRt2+ yc1pARlw9pssmLV8eh7SEQW313mjbeVAOdR4dImye8ODexZKoKqTgCcphLDE9QXnseLv Xkxy6+F2iZUaghCQxY7FK7ogK+3u7/zCF51STYmvvlbdevnnaNGvQ9WpJafwwydHcUaz AgNbG/gkgA2XGmEiWQiZMptM7ubsX6LyrkPDuckFLzgfCM8NWGlfViEPhEiS7gNA/3eo tnloV4S8MYpQk+qOOKh+4GniYELlsjYbJLYcHaDyQ0YlfABtdzWRnnyaiDH0IiknIb4f ADFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=M0prJgHpMg1A0KkVrXS3s4nU32V+ObpFLFO7tSi3WJc=; b=SdTNKOXIIKMyKeZl4+Hfp11BnsUIeVOu7nuJerz6zzOm0I4xH1i9+CuOks0rn5Tq41 ReHPoRUDd/o9eyHV5HJfXt9+zM+9J21zdOTRwRdjQjC7m7arl/+Yb9PY4GSUWX4wS/6M T1sD4b6Pvk8T4LyvyhK+veBPr33RSwNjPbD9XF0r4DMMAFL3ntxpJqOKiyYjKXlON3o+ MMLTBYOHXKx6r6k8varwAOBngTY0tf398hiz8nvEBdkImBkIfj0K8mXY4i7YYHkzMFnR 2Kzim/3q7iX1YlZ8Ofp1P3wW8/aCV5zTy0uA9KR0fkem2fKJWJ3Zx2G96FlIBbGK6I59 DHqg== X-Gm-Message-State: AOAM530en3I6Nikf91+eVQ4euwx8J9haDJYQdq0YSZFbWunD9FXc+EAO oEGnXguQnhYAryjpY83yEtSvDw== X-Google-Smtp-Source: ABdhPJxywWZD6iHaFaqFDW4yWT/7Ck1uAIWaHuVK3NZv8Q8uZKaOxPhHT3LNlpt6SCAA0nCKcr5vBQ== X-Received: by 2002:a05:6512:3a8c:: with SMTP id q12mr24777920lfu.129.1619692764767; Thu, 29 Apr 2021 03:39:24 -0700 (PDT) Received: from toster (89-73-146-138.dynamic.chello.pl. [89.73.146.138]) by smtp.gmail.com with ESMTPSA id o12sm468136ljp.104.2021.04.29.03.39.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 03:39:24 -0700 (PDT) Date: Thu, 29 Apr 2021 12:39:22 +0200 From: Stanislaw Kardach To: "Ananyev, Konstantin" Cc: Honnappa Nagarahalli , "Richardson, Bruce" , "Yigit, Ferruh" , Stephen Hemminger , Jerin Jacob , Kathleen Capella , "thomas@monjalon.net" , "dev@dpdk.org" , Dharmik Thakkar , Ruifeng Wang , "david.marchand@redhat.com" , "jerinj@marvell.com" , "hemant.agrawal@nxp.com" , Stephen Hemminger , nd Message-ID: <20210429103922.7jw2e24qemsd4y3y@toster> References: <20210426104720.2b892045@hermes.local> <81781e97-735c-f584-4148-ff07dedc5cb4@intel.com> <20210429074945.alquywrvyxjdezqi@toster> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Subject: Re: [dpdk-dev] L3fwd mode in testpmd X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Apr 29, 2021 at 08:31:03AM +0000, Ananyev, Konstantin wrote: > Hi Stanislaw, > > > > > On Wed, Apr 28, 2021 at 09:44:54PM +0000, Honnappa Nagarahalli wrote: > > > > > [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); > > > #endif > > Take 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 > > #endif > > > > I 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