From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f65.google.com (mail-oi0-f65.google.com [209.85.218.65]) by dpdk.org (Postfix) with ESMTP id B6D061B202 for ; Fri, 29 Sep 2017 11:29:56 +0200 (CEST) Received: by mail-oi0-f65.google.com with SMTP id l81so420434oib.1 for ; Fri, 29 Sep 2017 02:29:56 -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; bh=gSUgjEYNLQbtZvHLeGE/FmazOhJnRE+m5mhJdl/Lc9o=; b=IJKOfpxm8Lmp4Tf78bkhQwMyRjiqX6h2hpufhp/nNRGd2OcstB9mh7o0sxjGTnJ4cq aUGtRNdeO/UElqU7Cz2CaKzGSGK5qNVPCQA7XlInMYgQJjHpUj765ZWpkR8HKkModN5o 5mxxBRPxawSES/woJu3Aa0UR1clTiDJWzcGuSGv7Mw2AWlPkrBnrWae0gOyp0Uihl47X Rx2nJA19LGHyPwiexhs0SkLsINOqGqXshJeEEA+tTHMQAZlXPaqnwGv7hBMAKTKnRqUv SVz4at1+XNfxYGbBVLwtTKV6eGr4L0cQJGeRtC6tlo7gI0gsbFSNC8eB+vptZtjSyNx8 8sbQ== 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; bh=gSUgjEYNLQbtZvHLeGE/FmazOhJnRE+m5mhJdl/Lc9o=; b=CX/NRkK1+7rcbDMQse4HUWlb1s0YG6eMxzYiRlbwCA2Hce3m28SaBNmGNf0P3KafTB wANwJ3a0NzqkELvG5A+oEljDJiNRuZ63WdlKUsq9HvFhoCgcCC+g8srzsMSdFIW3Z7K0 YNP8eccLJIhoTegqUKTRUivWiCPREqsh4ZAvAg7414Rb8WgeWcvXLDFQIqrfuwQI9TG5 oH9WFH3DfaNL4YmPZ+O09LkwCQEyg5Au4OL4zOJaJLeYON2r82VdkggERMxv7uzsVM/i 724JNW28yc74tMg19MC2XGJyy11a0qM0+Gty2NJclBBiJiV3mky79IgYvcFGsGRUGTHm KGzw== X-Gm-Message-State: AMCzsaXvoAJRApeJBgxv1aX3mPZRaR97a+kfOIaTAa4Y9UUUogdYxzIR +/zBaJ154aWxODn9cPLKBJk0i7DL2k796zSeLZY= X-Google-Smtp-Source: AOwi7QBrbMn8GWTNOVwkmDCT1Iz701VhHL7wSBGIWGDYRrKyVhQ6Hmxhp4rgRbaA7UdhQmRZAwLqf6yfC++uZY3baMQ= X-Received: by 10.157.54.100 with SMTP id w91mr2334083otb.77.1506677395932; Fri, 29 Sep 2017 02:29:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.83.193 with HTTP; Fri, 29 Sep 2017 02:29:55 -0700 (PDT) In-Reply-To: <94479800C636CB44BD422CB454846E0132038E26@SHSMSX101.ccr.corp.intel.com> References: <1506565054-67690-1-git-send-email-beilei.xing@intel.com> <1506662342-18966-1-git-send-email-beilei.xing@intel.com> <1506662342-18966-5-git-send-email-beilei.xing@intel.com> <94479800C636CB44BD422CB454846E0132038E26@SHSMSX101.ccr.corp.intel.com> From: Sean Harte Date: Fri, 29 Sep 2017 10:29:55 +0100 Message-ID: To: "Xing, Beilei" Cc: "Wu, Jingjing" , "Chilikin, Andrey" , "dev@dpdk.org" Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v6 4/8] ethdev: add GTP items to support flow API 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: Fri, 29 Sep 2017 09:29:56 -0000 On 29 September 2017 at 09:54, Xing, Beilei wrote: > > >> -----Original Message----- >> From: Sean Harte [mailto:seanbh@gmail.com] >> Sent: Friday, September 29, 2017 4:15 PM >> To: Xing, Beilei >> Cc: Wu, Jingjing ; Chilikin, Andrey >> ; dev@dpdk.org >> Subject: Re: [dpdk-dev] [PATCH v6 4/8] ethdev: add GTP items to support >> flow API >> >> On 29 September 2017 at 06:18, Beilei Xing wrote: >> > This patch adds GTP, GTPC and GTPU items for generic flow API, and >> > also exposes item fields through the flow command. >> > >> > Signed-off-by: Beilei Xing >> > Acked-by: Adrien Mazarguil >> > --- >> > app/test-pmd/cmdline_flow.c | 40 ++++++++++++++++++++++ >> > app/test-pmd/config.c | 3 ++ >> > doc/guides/prog_guide/rte_flow.rst | 17 ++++++++++ >> > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 +++ >> > lib/librte_ether/rte_flow.h | 52 >> +++++++++++++++++++++++++++++ >> > 5 files changed, 116 insertions(+) >> >> >> >> > /** >> > + * RTE_FLOW_ITEM_TYPE_GTP. >> > + * >> > + * Matches a GTPv1 header. >> > + */ >> > +struct rte_flow_item_gtp { >> > + /** >> > + * Version (3b), protocol type (1b), reserved (1b), >> > + * Extension header flag (1b), >> > + * Sequence number flag (1b), >> > + * N-PDU number flag (1b). >> > + */ >> > + uint8_t v_pt_rsv_flags; >> > + uint8_t msg_type; /**< Message type. */ >> > + rte_be16_t msg_len; /**< Message length. */ >> > + rte_be32_t teid; /**< Tunnel endpoint identifier. */ }; >> >> In future, you might add support for GTPv2 (which is used since LTE). >> Maybe this structure should have v1 in its name to avoid confusion? > > I considered it before. But I think we can modify it when we support GTPv2 in future, and keep concise 'GTP' currently:) since I have described it matches v1 header. > You could rename v_pt_rsv_flags to version_flags to avoid some future code changes to support GTPv2. There's still the issue that not all GTPv2 messages have a TEID though. >> >> > + >> > +/** Default mask for RTE_FLOW_ITEM_TYPE_GTP. */ #ifndef __cplusplus >> > +static const struct rte_flow_item_gtp rte_flow_item_gtp_mask = { >> > + .teid = RTE_BE32(0xffffffff), >> > +}; >> > +#endif >> > + >> > +/** >> > * Matching pattern item definition. >> > * >> > * A pattern is formed by stacking items starting from the lowest >> > protocol >> > -- >> > 2.5.5 >> >