From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f68.google.com (mail-oi0-f68.google.com [209.85.218.68]) by dpdk.org (Postfix) with ESMTP id B5AEC199B0 for ; Thu, 5 Oct 2017 13:50:39 +0200 (CEST) Received: by mail-oi0-f68.google.com with SMTP id u130so24185852oib.11 for ; Thu, 05 Oct 2017 04:50:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=xV0lcMW7s9xzkXerJQ2rp3hUYtKaGqQ4qacX+XM1//o=; b=np9jdcSkzuKIag5swJVd4nbmk52JbwzEi1/AlXebqHYpf6vg5Ylq2M5XnZVrsr+fc+ sK+Ixp4b01KLBD0Nbhey3q3RPJDtqP+NN/OYYnb3ZbMeHkxmJNjj/UDdfcfnrxOGXJ/H Hh8QiiHDy/eseQ0ltLanckHciZ0Ks2wIde1ZWF98yUPwuK6J+CMkwXw9jbAiDjt3Ka09 t7IuKeOVFCL1akQT07UcSORPowxGVckwtSUjNEAFCu2DW+y/V3l8dIMnI8nWbVEu0804 2RjRu88g3KaWjpZETlkiHipMslOWNjXdkvpu0L4NmrxdcaoHx3YFPbFsR7FDw92eXOBW a3MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=xV0lcMW7s9xzkXerJQ2rp3hUYtKaGqQ4qacX+XM1//o=; b=ojAdbo6aRDgVNYAdxGPz6eYGV4hckgoDE+Dv+QqgU3CwVqFaOnLjitQL8Vjtiv6LUc VxDecQAZ5fZWqnkAyU43GEo7ukC0g+bGKe8qEf7sfMBgTWYbsWkeo304YKvNEKgUaqfU +heCgzNmHA1TZGgSXVoDxedKK8vUyBLabaVtIcuC+TgKHf33/cKwVODsONwg4kw8QCwP WKPO50glERzYa8PvH/8Y+c7hu144yMe8IMS0+LKWwMx5Eo2GgjBxP7j0Yndtxz/SrPff 0AeLSe3UlpYgIlHE3T0l4L61JUpYqHtisJkrayngdzov988nqWx/d8PTcSToLTYU6XKC aPSQ== X-Gm-Message-State: AMCzsaVdElyvEUsfW4lKzUPKxr4szAbi7v5b5L8gfnZI6L3ZyfEgCiQc cPoZmlsms1aRAYmtNTqPuhk7kw+KcR+7VfyNg5U= X-Google-Smtp-Source: AOwi7QCUfy6OIdcxIs7hw9KSg1rVUrZBoKDO9Or3rvFl7QUiBaW2veCH1onajSJsTHnSGCFogQg3wWQdo/fI0BcJIP4= X-Received: by 10.202.63.132 with SMTP id m126mr11480122oia.137.1507204238916; Thu, 05 Oct 2017 04:50:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.83.193 with HTTP; Thu, 5 Oct 2017 04:50:38 -0700 (PDT) In-Reply-To: <1507191297-122088-2-git-send-email-beilei.xing@intel.com> References: <1506700252-34949-1-git-send-email-beilei.xing@intel.com> <1507191297-122088-1-git-send-email-beilei.xing@intel.com> <1507191297-122088-2-git-send-email-beilei.xing@intel.com> From: Sean Harte Date: Thu, 5 Oct 2017 12:50:38 +0100 Message-ID: To: Beilei Xing Cc: "Wu, Jingjing" , "Chilikin, Andrey" , dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v8 1/7] mbuf: support GTP in software packet type parser 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: Thu, 05 Oct 2017 11:50:40 -0000 On 5 October 2017 at 09:14, Beilei Xing wrote: > Add support of GTP-C and GTP-U tunnels in rte_net_get_ptype(). > > Signed-off-by: Beilei Xing > Acked-by: Olivier Matz > --- > lib/librte_mbuf/rte_mbuf_ptype.c | 2 ++ > lib/librte_mbuf/rte_mbuf_ptype.h | 32 ++++++++++++++++++++++++++++++++ > 2 files changed, 34 insertions(+) > > diff --git a/lib/librte_mbuf/rte_mbuf_ptype.c b/lib/librte_mbuf/rte_mbuf_= ptype.c > index e5c4fae..a450814 100644 > --- a/lib/librte_mbuf/rte_mbuf_ptype.c > +++ b/lib/librte_mbuf/rte_mbuf_ptype.c > @@ -89,6 +89,8 @@ const char *rte_get_ptype_tunnel_name(uint32_t ptype) > case RTE_PTYPE_TUNNEL_NVGRE: return "TUNNEL_NVGRE"; > case RTE_PTYPE_TUNNEL_GENEVE: return "TUNNEL_GENEVE"; > case RTE_PTYPE_TUNNEL_GRENAT: return "TUNNEL_GRENAT"; > + case RTE_PTYPE_TUNNEL_GTPC: return "TUNNEL_GTPC"; > + case RTE_PTYPE_TUNNEL_GTPU: return "TUNNEL_GTPU"; > default: return "TUNNEL_UNKNOWN"; > } > } > diff --git a/lib/librte_mbuf/rte_mbuf_ptype.h b/lib/librte_mbuf/rte_mbuf_= ptype.h > index acd70bb..978c4a2 100644 > --- a/lib/librte_mbuf/rte_mbuf_ptype.h > +++ b/lib/librte_mbuf/rte_mbuf_ptype.h > @@ -383,6 +383,38 @@ extern "C" { > */ > #define RTE_PTYPE_TUNNEL_GRENAT 0x00006000 > /** > + * GTP-C (GPRS Tunnelling Protocol) control tunneling packet type. > + * Packet format: > + * <'ether type'=3D0x0800 > + * | 'version'=3D4, 'protocol'=3D17 > + * | 'destination port'=3D2123> > + * or, > + * <'ether type'=3D0x86DD > + * | 'version'=3D6, 'next header'=3D17 > + * | 'destination port'=3D2123> > + * or, > + * <'ether type'=3D0x0800 > + * | 'version'=3D4, 'protocol'=3D17 > + * | 'source port'=3D2123> > + * or, > + * <'ether type'=3D0x86DD > + * | 'version'=3D6, 'next header'=3D17 > + * | 'source port'=3D2123> > + */ > +#define RTE_PTYPE_TUNNEL_GTPC 0x00007000 > +/** > + * GTP-U (GPRS Tunnelling Protocol) user data tunneling packet type. > + * Packet format: > + * <'ether type'=3D0x0800 > + * | 'version'=3D4, 'protocol'=3D17 > + * | 'destination port'=3D2152> > + * or, > + * <'ether type'=3D0x86DD > + * | 'version'=3D6, 'next header'=3D17 > + * | 'destination port'=3D2152> > + */ > +#define RTE_PTYPE_TUNNEL_GTPU 0x00008000 > +/** > * Mask of tunneling packet types. > */ > #define RTE_PTYPE_TUNNEL_MASK 0x0000f000 > -- > 2.5.5 > Reviewed-by: Se=C3=A1n Harte