From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gaetan.rivet@6wind.com>
Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44])
 by dpdk.org (Postfix) with ESMTP id 4932E2C2F
 for <dev@dpdk.org>; Wed, 17 May 2017 18:38:55 +0200 (CEST)
Received: by mail-wm0-f44.google.com with SMTP id 70so16747384wmq.1
 for <dev@dpdk.org>; Wed, 17 May 2017 09:38:55 -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:content-transfer-encoding:in-reply-to
 :user-agent; bh=4RRUdyb41VtuqGiNLOyJ76KZ+ULh8JopnVe2ivyJiiE=;
 b=TLYmRkcoow5IJ8lbjtaDsj4h4dLuliqTCDQZOCAbbm89KCaa5RFp4fu4obhgQZQQWA
 DgeUTsEKbxNaXC4Cp9FKRb2AAdn1ARdVigMbr0MolKalWTnJMBIvk/gSGBYNHOlNaeRH
 A9noUsu2NIFPaCqdvg2UGYt+Zkelox4Tqi2IlNTcZoao+ptclnDqyDmZEtSlUSGhat5e
 Np6e7q6lJG3gOSE7rqeITN0yvlt4B7dY/HLfU0kJMc6yvI1ygaqFugkmzfBCczDT0ovl
 /okNeVfauqBvjP8mW+8Fs5EOL2CDU97FWubWy8ikIDBA7T6zEnHIhaonIz7XTWyhdyyy
 Zang==
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:content-transfer-encoding
 :in-reply-to:user-agent;
 bh=4RRUdyb41VtuqGiNLOyJ76KZ+ULh8JopnVe2ivyJiiE=;
 b=kGZT3KG4ZEmU8xje/hq6aMOqbQ2Y+lbqSkWjvhBZebnqh4buQ2mTtYNCkeuFwknt/h
 1oHbEhP+6c8XwUZy921fi6O/kZd/zyY+u27q71ZOyOepVy2/PYF1qCy6+RtzbMLhwL+y
 kQ3mdjITzB3WpsdtfNjLz6KddMPrC4+zfFTf6x0iiBUfN7E1fnbvB+maOWoD6Lklcknt
 ZIZM0BbkYWpW9jb9Mi2A3pTZrIcTHDcSSoHcT1FvE3o14oybixDlkPqvC5rkSeM6glBb
 EZPzvxlskn5bZgUM5on6q/EzvWXQmsJw/yZ8dUCxsxC9yyoWl/6EuzFWIlpxRES2tVy0
 bl8w==
X-Gm-Message-State: AODbwcCBNQcdlhF21It+siX0qtVycPWIjc3R1y3om7uqSV5F57kNUs1n
 bZbS3mVH3zffEyxX
X-Received: by 10.28.31.16 with SMTP id f16mr11039916wmf.118.1495039134871;
 Wed, 17 May 2017 09:38:54 -0700 (PDT)
Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com.
 [62.23.145.78])
 by smtp.gmail.com with ESMTPSA id l45sm2071828wre.2.2017.05.17.09.38.53
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 17 May 2017 09:38:53 -0700 (PDT)
Date: Wed, 17 May 2017 18:38:48 +0200
From: =?iso-8859-1?Q?Ga=EBtan?= Rivet <gaetan.rivet@6wind.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
 "dev@dpdk.org" <dev@dpdk.org>, "Mcnamara, John" <john.mcnamara@intel.com>,
 "Tahhan, Maryam" <maryam.tahhan@intel.com>
Message-ID: <20170517163848.GQ14914@bidouze.vm.6wind.com>
References: <20170420185448.19162-1-ferruh.yigit@intel.com>
 <20170420185448.19162-2-ferruh.yigit@intel.com>
 <2601191342CEEE43887BDE71AB9772583FAF774A@IRSMSX109.ger.corp.intel.com>
 <64f62140-86d9-22e8-6605-487da657a4f4@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <64f62140-86d9-22e8-6605-487da657a4f4@intel.com>
User-Agent: Mutt/1.5.23 (2014-03-12)
Subject: Re: [dpdk-dev] [RFC 17.08] flow_classify: add librte_flow_classify
 library
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: Wed, 17 May 2017 16:38:55 -0000

Hi Ferruh,

On Wed, May 17, 2017 at 05:02:50PM +0100, Ferruh Yigit wrote:
>On 5/17/2017 3:54 PM, Ananyev, Konstantin wrote:
>> Hi Ferruh,
>> Please see my comments/questions below.
>
>Thanks for review.
>
>> Thanks
>> Konstantin
>
><...>
>
>> I think it was discussed already, but I still wonder why rte_flow_item can't be used for that approach?
>
>Missed this one:
>
>Gaëtan also had same comment, copy-paste from other mail related to my
>concerns using rte_flow:
>
>"
>rte_flow is to create flow rules in PMD level, but what this library
>aims to collect flow information, independent from if underlying PMD
>implemented rte_flow or not.
>
>So issues with using rte_flow for this use case:
>1- It may not be implemented for all PMDs (including virtual ones).
>2- It may conflict with other rte_flow rules created by user.
>3- It may not gather all information required. (I mean some actions
>here, count like ones are easy but rte_flow may not be so flexible to
>extract different metrics from flows)
>"

There are two separate elements to using rte_flow in this context I think.

One is the use of the existing actions, and as you say, this makes the
support of this library dependent on the rte_flow support in PMDs.

The other is the expression of flows through a shared syntax. Using
flags to propose presets can be simpler, but will probably not be flexible
enough. rte_flow_items are a first-class citizen in DPDK and are
already a data type that can express flows with flexibility. As
mentioned, they are however missing a few elements to fully cover IPFIX
meters, but nothing that cannot be added I think.

So I was probably not clear enough, but I was thinking about
supporting rte_flow_items in rte_flow_classify as the possible key
applications would use to configure their measurements. This should not
require rte_flow supports from the PMDs they would be using, only
rte_flow_item parsing from the rte_flow_classify library.

Otherwise, DPDK will probably end up with two competing flow
representations. Additionally, it may be interesting for applications
to bind these data directly to rte_flow actions once the
classification has been analyzed.

-- 
Gaëtan Rivet
6WIND