From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by dpdk.org (Postfix) with ESMTP id E66FA2C15 for ; Tue, 19 Jun 2018 11:40:16 +0200 (CEST) Received: by mail-wr0-f195.google.com with SMTP id l10-v6so19832925wrn.2 for ; Tue, 19 Jun 2018 02:40:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-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 :user-agent; bh=d0w8a3KAoI3qrpHNRdDEAx2ZsnI4dIVoMu4gDk37HKU=; b=0ga/Z+4JE7FtgHO4hreuxFCebJLdBi0+was+GGJlfojVrpbhO471WBSaQe2mJeFxJP /tdJdYxlQfblu8RDbiuzHiVA0J/+iErPrzHH58Ix+1BlDNOIJ1R92MnnHwAj1EYpaMzD /9mCG4OIFAjODjjFoIolPdozscuzyaPhgEM8rpizvSMhuqnAFbEgiGh5FNw6wjxHFjcR Nq4yvPxcmJidCZ+GGrkhLLGPOfY5quqfV/Q2iMnTjZMTTtKxVVLxfIED6erAXpS//EhM bWjJrYK7Z9AIoTpccIL3cwXu4axEjYl1IbqiFW6ia/NqH8KG6GJ5fqYYzws0Egc8PeoT iSeA== 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:user-agent; bh=d0w8a3KAoI3qrpHNRdDEAx2ZsnI4dIVoMu4gDk37HKU=; b=ACP3jplxEiBXbqrB0VfvqNMqqFYdFU1By7O4Lhls4ehrCvBDoJ/KGZFPYO6NiASLUM FHEZVska6e8PrX571Q4KRSaX3VIVvKTeZB1PjlWzShvU4P369WARGuCVjJfzhOouPdod JkiAo1L/6ZOF/Ly2LyJ9+taRy4ep74inMM3J9qgd5iiQ7BKnXVeJMNYq+AkuSyrqnetV HsbiXIBwzmd0TWhCFCsXYJsT48ParZTXErQPaN/MbWMFhmDWdHjsoh8ncP5lErSlvDyV kdoU10VNUOK//kuQWfQiaJx3eeUkhlxCv8g80AYK4a+h3iLKdleXzHtdwA7DWTrH9Bab jj0A== X-Gm-Message-State: APt69E1ggfgSOQfW0Xgx1k/c1qgFVTsnvEFDSMVpoZz/CQeHy09ZL0Km hmzU3RSvtzEbPeEOid03SBby X-Google-Smtp-Source: ADUXVKJkqctuLkurvQnH3y3aXBKZRPtXQcKz/jfgjHys8szgyI/Kky2TTNXAOyikEt6NnBrRcnT56Q== X-Received: by 2002:adf:a20a:: with SMTP id p10-v6mr13352019wra.196.1529401216546; Tue, 19 Jun 2018 02:40:16 -0700 (PDT) Received: from laranjeiro-vm.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id g129-v6sm10074638wmf.5.2018.06.19.02.40.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Jun 2018 02:40:15 -0700 (PDT) Date: Tue, 19 Jun 2018 11:40:25 +0200 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Ori Kam Cc: "dev@dpdk.org" , Adrien Mazarguil , Wenzhuo Lu , Jingjing Wu , Bernard Iremonger , Mohammad Abdul Awal Message-ID: <20180619094025.7rfomfrqbb7yq335@laranjeiro-vm.dev.6wind.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v3 1/2] app/testpmd: add VXLAN encap/decap support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2018 09:40:17 -0000 On Tue, Jun 19, 2018 at 07:09:28AM +0000, Ori Kam wrote: > > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Nelio Laranjeiro > > Signed-off-by: Nelio Laranjeiro > > --- > > app/test-pmd/cmdline.c | 129 ++++++++++++++++++ > > app/test-pmd/cmdline_flow.c | 139 ++++++++++++++++++++ > > app/test-pmd/testpmd.c | 17 +++ > > app/test-pmd/testpmd.h | 17 +++ > > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 13 ++ > > 5 files changed, 315 insertions(+) > > > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > > index 27e2aa8c8..93573606f 100644 > > --- a/app/test-pmd/cmdline.c > > +++ b/app/test-pmd/cmdline.c > > +static void cmd_set_vxlan_parsed(void *parsed_result, > > + __attribute__((unused)) struct cmdline *cl, > > + __attribute__((unused)) void *data) > > +{ > > + struct cmd_set_vxlan_result *res = parsed_result; > > + uint32_t vni = rte_cpu_to_be_32(res->vni) >> 8; > > Is this also correct in case of big endian system? > I think it will remove part of the vni. > > > + > > + if (strcmp(res->vxlan, "vxlan") == 0) > > + vxlan_encap_conf.select_vlan = 0; > > + else if (strcmp(res->vxlan, "vxlan-with-vlan") == 0) > > + vxlan_encap_conf.select_vlan = 1; > > + if (strcmp(res->ip_version, "ipv4") == 0) > > + vxlan_encap_conf.select_ipv4 = 1; > > + else if (strcmp(res->ip_version, "ipv6") == 0) > > + vxlan_encap_conf.select_ipv4 = 0; > > + else > > + return; > > + memcpy(vxlan_encap_conf.vni, &vni, 3); > > I don't think this line is correct when running on big endian system. Yes, this is wrong, it will be fixed in v4. Thanks, -- Nélio Laranjeiro 6WIND