[dpdk-dev] [PATCH v6 4/8] ethdev: add GTP items to support flow API

Xing, Beilei beilei.xing at intel.com
Fri Sep 29 11:37:46 CEST 2017



> -----Original Message-----
> From: Sean Harte [mailto:seanbh at gmail.com]
> Sent: Friday, September 29, 2017 5:30 PM
> To: Xing, Beilei <beilei.xing at intel.com>
> Cc: Wu, Jingjing <jingjing.wu at intel.com>; Chilikin, Andrey
> <andrey.chilikin at intel.com>; dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v6 4/8] ethdev: add GTP items to support
> flow API
> 
> On 29 September 2017 at 09:54, Xing, Beilei <beilei.xing at intel.com> wrote:
> >
> >
> >> -----Original Message-----
> >> From: Sean Harte [mailto:seanbh at gmail.com]
> >> Sent: Friday, September 29, 2017 4:15 PM
> >> To: Xing, Beilei <beilei.xing at intel.com>
> >> Cc: Wu, Jingjing <jingjing.wu at intel.com>; Chilikin, Andrey
> >> <andrey.chilikin at intel.com>; dev at 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 <beilei.xing at intel.com> 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 <beilei.xing at intel.com>
> >> > Acked-by: Adrien Mazarguil <adrien.mazarguil at 6wind.com>
> >> > ---
> >> >  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(+)
> >>
> >> <snip>
> >>
> >> >  /**
> >> > + * 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.
> 

Yes, actually I have no a good idea for the compatibility between GTPv1 and GTPv2 currently...
Maybe we can consider it in future.

> >>
> >> > +
> >> > +/** 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
> >> >


More information about the dev mailing list