From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <adrien.mazarguil@6wind.com>
Received: from mail-wr0-f177.google.com (mail-wr0-f177.google.com
 [209.85.128.177]) by dpdk.org (Postfix) with ESMTP id 503E21B53
 for <dev@dpdk.org>; Tue, 12 Sep 2017 12:46:59 +0200 (CEST)
Received: by mail-wr0-f177.google.com with SMTP id a43so20551269wrc.0
 for <dev@dpdk.org>; Tue, 12 Sep 2017 03:46:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=6wind-com.20150623.gappssmtp.com; s=20150623;
 h=date:from:to:cc:subject:message-id:references:mime-version
 :content-disposition:in-reply-to;
 bh=nQzcJ46aQ5uuD+VjSTibxLkyEsIQFn7QH5VqlAoEqis=;
 b=z50g5KERnGNHGhlJqF+JBmw7aNmMtdz7ENoohdIhE+z1As5IB7Obf/n5VE35lwy6SQ
 EPKW1NY0LbD1OqnkYBzBCj3tT6fi6i7RppJ1QsMRw4+5zuyWVFy6LAaU3Jrj6ZpJN11V
 z0TFCCbWJ7600WQRDmmWMMVVCSGJcvjTGFLBbefr4C12cucF/X6RMLo187RvPbbAuFcd
 a/Xt9CXpNdFR1BXRrayWeqw2pTaYJjeXw4GIFHcHcmi7PA0s6KB+eMN2vB3KijJZhZhO
 /MwZoC6MWso6Dw3Mx7H7rMa1nov2NywdPnLUbd/IuqvGeLBpz/GIRUQ7gOW0VHMsEkkX
 m4Wg==
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;
 bh=nQzcJ46aQ5uuD+VjSTibxLkyEsIQFn7QH5VqlAoEqis=;
 b=ttDYbimT1F+vq/uZM+70Q/pf5ffzV4OkpWzWbOlns8PkgoKNWTA6XnlTnMWmUwwEAI
 ugiXPw1KwRtT5oEXKbWmPEzaIHp4ydxg7PznlBcyBH3WDpT+ZCKluoD+DOEC9+jhKNa4
 GI6hwZ9lVRgSlV950zafLzTmbrsTEHSW0TMWR4g9vLF5Lt24aXuJ1ebHIKhsmRZncJqR
 xD7tkVeXHKbsUK3K9u1yB32jlw/eqUiI2ayFqC6bX0TjCVjGe8/tzyMIGMiGrPUXH1vL
 O00Ekcx9UP7kXG4qdvRlasBlhBIsWNDN/brpanaq6YwR+SIDaFIO77jsGiI9gsXnF899
 L+sQ==
X-Gm-Message-State: AHPjjUhdKUHOuQ4LNHaYT2pGw01sYGpNO7V7D52iX/NxET5dIRuNGTgW
 ygBTHi6A94+zNqI1
X-Google-Smtp-Source: AOwi7QAfw0wo2bo68V5givKmrgkh/Qs8UpfVEret5k7fhgRZGDZiCgMHAZT/B1hdH+cUy4d4SCtn2w==
X-Received: by 10.223.163.155 with SMTP id l27mr1841406wrb.165.1505213218841; 
 Tue, 12 Sep 2017 03:46:58 -0700 (PDT)
Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78])
 by smtp.gmail.com with ESMTPSA id z132sm7290147wmb.4.2017.09.12.03.46.57
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 12 Sep 2017 03:46:58 -0700 (PDT)
Date: Tue, 12 Sep 2017 12:46:48 +0200
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: "Xing, Beilei" <beilei.xing@intel.com>
Cc: "Wu, Jingjing" <jingjing.wu@intel.com>,
 "Chilikin, Andrey" <andrey.chilikin@intel.com>,
 "dev@dpdk.org" <dev@dpdk.org>
Message-ID: <20170912104648.GN2481@6wind.com>
References: <1503647430-93905-2-git-send-email-beilei.xing@intel.com>
 <1504783263-20575-1-git-send-email-beilei.xing@intel.com>
 <1504783263-20575-3-git-send-email-beilei.xing@intel.com>
 <20170907121949.GI4301@6wind.com>
 <94479800C636CB44BD422CB454846E013201B7A3@SHSMSX101.ccr.corp.intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <94479800C636CB44BD422CB454846E013201B7A3@SHSMSX101.ccr.corp.intel.com>
Subject: Re: [dpdk-dev] [PATCH v2 2/6] ethdev: add GTPC and GTPU items
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 12 Sep 2017 10:46:59 -0000

Hi Beilei,

On Tue, Sep 12, 2017 at 06:40:50AM +0000, Xing, Beilei wrote:
> Hi Adrien,
> 
> > -----Original Message-----
> > From: Adrien Mazarguil [mailto:adrien.mazarguil@6wind.com]
> > Sent: Thursday, September 7, 2017 8:20 PM
> > To: Xing, Beilei <beilei.xing@intel.com>
> > Cc: Wu, Jingjing <jingjing.wu@intel.com>; Chilikin, Andrey
> > <andrey.chilikin@intel.com>; dev@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH v2 2/6] ethdev: add GTPC and GTPU items
> > 
> > Hi Beilei,
> > 
> > I assume this patch supersedes [1]?
> > 
> > [1] http://dpdk.org/ml/archives/dev/2017-August/073501.html
> > 
> > Thanks for merging testpmd and the API change as a single patch, I still have
> > a few comments, see below.
> > 
> > (please add "flow API" somewhere in the title by the way)
> 
> Thanks for all your comments.
> Yes, http://dpdk.org/ml/archives/dev/2017-August/073501.html is superseded and did merging testpmd and API change.
> I will update title in next version.

All right, thanks.

> > On Thu, Sep 07, 2017 at 07:20:59PM +0800, Beilei Xing wrote:
> > > This patch adds GTPC and GTPU items to generic rte flow, and also
> > > exposes the following item fields through the flow command:
> > >
> > > - GTPC TEID
> > > - GTPU TEID
> > >
> > > Signed-off-by: Beilei Xing <beilei.xing@intel.com>
> > 
> > Won't there be a need to match nonspecific GTP traffic as well (both GTP-C
> > and GTP-U a once), since they use the same structure?
> > 
> > I'm not familiar with the protocol at all so I wonder if you should maybe leave
> > the GTP item in addition to those two.
> > 
> 
> Agree, I will leave the GTP item in next version.
> 
> GTP-C and GTP-U use the same structure, the difference between them is UDP port, 2123 is for GTP-C, and 2152 is for GTP-U.
> Add GTP-C and GTP -U item since I want to design a user-friendly CLI.
> 
> For example, if user wants to add such flow: assign GTP-U packets with TEID 0x123456 to queue 14. 
> Then use can use following CLI:
> flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x123456 / end actions queue index 14 / end
> instead of below CLI to distinguish GTP-C and GTP-U with UDP port:
> flow create 0 ingress pattern eth / ipv4 / udp dst spec 2125 dst mask 0 / gtp teid is 0x123456 / end actions queue index 14 / end

I agree with you from a usability standpoint it's much nicer. I have one
question though, could one send GTP-C / GTP-U traffic using nondefault UDP
ports and expect hardware to match it without explicitly specifying a port
in the UDP item, that is, is there some property in GTP-C / GTP-U traffic
outside the UDP port that would theoretically allow a host (even a stateful
one) to tell them apart?

If it really depends on the UDP port only, not specifying one will use
hardware defaults regardless of the item (GTP / GTP-U / GTP-C). However if
like VXLAN, this default value can be modified outside of rte_flow, most
users will have to specify it regardless in order to get consistent results
across various vendors/adapters.

In any case I don't mind three items. GTP encompasses both GTP-U and GTP-C
(possibly two different UDP ports at once), while GTP-U and GTP-C match
exactly one. You only have to describe this properly in the documentation.

Thanks.

-- 
Adrien Mazarguil
6WIND