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 888511B1CE for ; Fri, 29 Sep 2017 10:15:07 +0200 (CEST) Received: by mail-oi0-f68.google.com with SMTP id n129so352001oia.0 for ; Fri, 29 Sep 2017 01:15:07 -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=xiQ7U/WtWbcYjcMxBahbivXQBn7LUohIcn7kTRu/4FA=; b=atlJQ7aYuxL7h07u8g3I2bEVX8FhrK32icccPSoqcVATTcPPDiNb8vZ5mL73R5VXop LM7U8l3WrtWDDRb3MnH7oNpmcHbZ178MvG5r1oHspGELG/6aa8+r6JEGEMamIVbzLhbZ LQMSX1clLnyQow8y7RDsrVF9kh8HL0Flw/+HP9MViObXdyZmplhEE+MmetVytpSQaYZp yq/ibk5Yoium/TMAMFz0Dr6nqha5am+2T05FeE3shGRUuF/mue96j623UxeqV4U45+9n w6CGOxXm1IaT5E2gG25nGrxXM4Do1iPm/WN/hmKSJyCWWa71kcIYRpJ51HwBTYhrM1Kn /88w== 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=xiQ7U/WtWbcYjcMxBahbivXQBn7LUohIcn7kTRu/4FA=; b=nKSlrJdHSW+xbPRCSjdy7LokUnBDDOeV1EaaM/tHGLu9WxLcwABKxnad4SZA6lfrsC nbbnJDZb3kFjWF/h1+vXf67R8m6pa60fFM0BAAnncaXExT34ayzqBMidABHcK4Q4yZHn EFnv6zACBbXu5bjTaO2TmbdXXEbuqRCU4ox2wv2nnS8oCPKP1vFNPNPc/XVTilRei4d5 r+QbevrncmoyCODcA5YptorMAHWAlR08QXmtuRz5muFOcHG/hvQ5LQhM704fN7PM4qw5 10WBCmPsdSvuMBGPhdu3YD8uyuWQQ+KctjbDnZG1n+KBfaXNgo40wz/MD0sEMGpfH5q+ 2hNw== X-Gm-Message-State: AMCzsaVW860fcXjlnkp5E3ZbNnfnFuo4OUII0VFDEBLSMqRq1LqI3pWt GBZME3f4pm0/i88Cs+zsUgeVDONngQ95GyMJ4hRHmQ== X-Google-Smtp-Source: AOwi7QCpVe9BK5nQCfkm9l8BI/+pMAs7rAIM7sPgLURJDRQgNO5lRR+wy1d7UWYdu11yRscPScg4R16DdCxAuK4WYa8= X-Received: by 10.157.43.138 with SMTP id u10mr2235955ota.388.1506672906725; Fri, 29 Sep 2017 01:15:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.83.193 with HTTP; Fri, 29 Sep 2017 01:15:06 -0700 (PDT) In-Reply-To: <1506662342-18966-5-git-send-email-beilei.xing@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> From: Sean Harte Date: Fri, 29 Sep 2017 09:15:06 +0100 Message-ID: To: Beilei Xing Cc: jingjing.wu@intel.com, andrey.chilikin@intel.com, 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 08:15:09 -0000 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? > + > +/** 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 >