From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 75C64A327F for ; Mon, 21 Oct 2019 18:51:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 24F6F1BF5A; Mon, 21 Oct 2019 18:51:02 +0200 (CEST) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by dpdk.org (Postfix) with ESMTP id 773101BF51 for ; Mon, 21 Oct 2019 18:51:00 +0200 (CEST) Received: by mail-wm1-f66.google.com with SMTP id g24so4951369wmh.5 for ; Mon, 21 Oct 2019 09:51:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=qApWoI5ODDt5AKk5J2Cm9Y0/4TWICbp+xtz+B+b0/Ok=; b=RfPyKqHLNwS/FZOVcdeNWrawQa28NlnfRGK+2X9zjKRwxczy3AeBWe3BE7ap8s08ub F2x3RrFzcrJL4mcrOtj9iKdMG0ztrX5N01XmJMx08+6Krn2aXR/e6dTXgnT8bARvlsUt vrsEH/5Uc+kYove1BlbUEeGz0AC6IPVFSSwQ0Df5IWf6VQx3XBUDq6rbS2rb0lFcaMs6 CbpT+VNED4ZR3uttedbK8MblEj/C4hZzHqzHe02qEcAj18s+EroBUaZlAgx2vvmi3BFx buT/2tz3BOby51evkgokDUZGE7ICoyvHsxHqU4YarmgYLYEkNesXb9QYq0rvzjVDQMuS p0Gw== 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:in-reply-to:user-agent; bh=qApWoI5ODDt5AKk5J2Cm9Y0/4TWICbp+xtz+B+b0/Ok=; b=Mgga9buIJbWESjVVJZsRxz5Rj9nlddru29u0fniJ5ll+obYH0bIgFUCVHopOXKbULN dch8fTkC4CXP282kAGMhJotuWHY1I+7UdeehSYWcE2F/UnILysu9MrapVhXUmw9PK4KJ IZAfYwB8ArzqUusj7HI9tr/Zdvg/msvNAublHYECBvsorH+XC1jZPDtycXehlXHz50Uq 13t/0DLY9jwooLI80jzGUPpztIsadhhCSJxo74ToMcEmh/Y92OVc1q2P0KPjUDYzDfBJ I3D8gUdRCiY7GtmcQvtP6Amjd9vSy9va4kMSW5cMImmvWXH+fw+XbOU9D1EKtfFEyfnt 6sWA== X-Gm-Message-State: APjAAAX9F9LqPJ9tO8Kyn9/OQS0BxO/pTEWsF3hPPNQzytI2CiA5ZNAP +j8HT8Nm7jR+VWxsPY+WUPhrEg== X-Google-Smtp-Source: APXvYqxwSna1Fs0oSrAMV9gu1mMOhoj/+biGf/tGAWeSGln1lcO8vpD+LzBofUYmg9EV8znFTAaMgg== X-Received: by 2002:a05:600c:2c2:: with SMTP id 2mr20434921wmn.112.1571676660134; Mon, 21 Oct 2019 09:51:00 -0700 (PDT) Received: from 6wind.com (2a01cb0c0005a6000226b0fffeed02fc.ipv6.abo.wanadoo.fr. [2a01:cb0c:5:a600:226:b0ff:feed:2fc]) by smtp.gmail.com with ESMTPSA id d8sm2372577wrr.71.2019.10.21.09.50.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2019 09:50:59 -0700 (PDT) Date: Mon, 21 Oct 2019 18:50:58 +0200 From: Olivier Matz To: Ferruh Yigit Cc: Ting Xu , dev@dpdk.org, wenzhuo.lu@intel.com, jingjing.wu@intel.com, bernard.iremonger@intel.com Message-ID: <20191021165058.b7haufktbylwvidu@platinum> References: <20191018160819.24678-1-ting.xu@intel.com> <20191021122913.35281-1-ting.xu@intel.com> <61d640b1-23e9-f4c6-14c2-c7c25a5c8da5@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <61d640b1-23e9-f4c6-14c2-c7c25a5c8da5@intel.com> User-Agent: NeoMutt/20180716 Subject: Re: [dpdk-dev] [PATCH v4] app/testpmd: enable GTP header parse and Tx checksum offload 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Oct 21, 2019 at 11:52:46AM +0100, Ferruh Yigit wrote: > On 10/21/2019 10:28 AM, Ferruh Yigit wrote: > > On 10/21/2019 1:29 PM, Ting Xu wrote: > >> This patch enables testpmd to forward GTP packet in csum fwd mode. > >> GTP header structure (without optional fields and extension header) > >> and parser function are added. GTPU and GTPC packets are both > >> supported, with respective UDP destination port and GTP message > >> type. > >> > >> Signed-off-by: Ting Xu > >> > >> --- > >> v4: Move GTP header defination to rte_ether.h > >> v3: correct coding style issue. > >> v2: modify commit log > >> depend on patch: lib/mbuf: add GTP tunnel type flag. > >> --- > >> app/test-pmd/csumonly.c | 96 ++++++++++++++++++++++++++++++++++---- > >> lib/librte_net/rte_ether.h | 23 +++++++++ > >> 2 files changed, 109 insertions(+), 10 deletions(-) > > > > <...> > > > >> --- a/lib/librte_net/rte_ether.h > >> +++ b/lib/librte_net/rte_ether.h > >> @@ -342,6 +342,29 @@ struct rte_vxlan_gpe_hdr { > >> sizeof(struct rte_vxlan_gpe_hdr)) > >> /**< VXLAN-GPE tunnel header length. */ > >> > >> +/** > >> + * Simplified GTP protocol header. > >> + * Contains 8-bit flag, 8-bit message type, > >> + * 16-bit message length, 32-bit TEID. > >> + * No optional fields and next extension header. > >> + */ > >> +struct rte_gtp_hdr { > >> + uint8_t gtp_hdr_info; > >> + uint8_t msg_type; > >> + uint16_t msg_len; > >> + uint32_t teid; > >> +} __attribute__((__packed__)); > >> + > >> +/* GTP header length */ > >> +#define RTE_ETHER_GTP_HLEN \ > >> + (sizeof(struct rte_udp_hdr) + sizeof(struct rte_gtp_hdr)) > >> +/* GTP next protocal type */ > >> +#define RTE_GTP_TYPE_IPV4 0x40 > >> +#define RTE_GTP_TYPE_IPV6 0x60 > >> +/* GTP destination port number */ > >> +#define RTE_GTPC_UDP_PORT 2123 > >> +#define RTE_GTPU_UDP_PORT 2152 > >> + > >> /** > >> * Extract VLAN tag information into mbuf > >> * > >> > > > > lgtm, @Oliver, any comment/objection on GTP part in rte_ether.h? > > > > What about moving the defines to its own header, like rte_gtp? Is these defines > part of the ether? +1 I also think it deserves its own file.