From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 0A817A0519;
	Fri,  3 Jul 2020 17:09:02 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 876F51DBCC;
	Fri,  3 Jul 2020 17:09:01 +0200 (CEST)
Received: from mail-il1-f194.google.com (mail-il1-f194.google.com
 [209.85.166.194]) by dpdk.org (Postfix) with ESMTP id A50EA1D911
 for <dev@dpdk.org>; Fri,  3 Jul 2020 17:08:59 +0200 (CEST)
Received: by mail-il1-f194.google.com with SMTP id t27so22596530ill.9
 for <dev@dpdk.org>; Fri, 03 Jul 2020 08:08:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=F3kIbReNn3+0xp1PzY+NVsSqgW/+KApyGPKGJFiExsA=;
 b=gXnST5AlQeHPHDq8CiDFUa9cyPjqjn7B8KT555T3Ta0MMRDs4C+fhVfM7uKNIdXowJ
 4ZCtCHi4fXKuk4GckEEHqydTmcN9sUs2rUQbPOM2yfxyBNofIBn15pLy3v+2wrMZk6fh
 NJ2UABcZGH+SeXNmxxz6Q7Sxfd1YP+sE8SjuYWxKWGLo6j6B9hKTa7zK4rOcsPlDQrso
 TxbrXX0Gmne57QwaxsGoCFpXKd1m2p4cs0YlfF75h2MX5F4WwLVovrMb9be0YXlhvHp+
 s3GCOfPfBHxiJ4kAWXz0cRt4TU2eTPuOeNNFoCxF7bMo5Iv2E6HiuwN2u5CC9rzxT0uI
 PO9g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=F3kIbReNn3+0xp1PzY+NVsSqgW/+KApyGPKGJFiExsA=;
 b=ZdmEKZR1tDkRGGp0wbNrYN7jVsYhuAiMIzzYFjmKivecW5gb7eHxaiIyaZITKMfGru
 MuIfIyYfLy9BUItHiOpi+hMrqizJ0KEkXutjRYKD03d2pYMm6zPRzjBT5kz6G+XjSzr9
 x8DhHQYoi0NPN6RO3CvaqryoKerHg/8Sj6t5kacXDrBijnGbQU333XDE1tr7X/g0JLPl
 V2yiARLxc00uJb22vwjkmoro9/7E3xloZTjDxzE0RASYpS2Uaqyj3lkPM27/vRVfun6Q
 EZi3QAbzaYsefpC25SIi1INh9DWrl0AxcGcxoKNCTa1451sY1CtmpOkhm3f5CIm4+83L
 qn4A==
X-Gm-Message-State: AOAM532+F5+fnBeBvHvjFr+/aM294T+9+4AWr+XkqCaEQDpMZEJe51Mv
 IommLRxtgPTG/NBeFa8uMhavSvxpNJYJM1yOh6KlRAzhN1Q=
X-Google-Smtp-Source: ABdhPJxyqS5GWNfFS0tE3hUEWuNqm69e+pQYZPrmoUok7HBWsuDDvm+iUWWAIrpA8pSBoLzh0halSKK33tzhHtdQHeg=
X-Received: by 2002:a92:d01:: with SMTP id 1mr18498490iln.294.1593788938800;
 Fri, 03 Jul 2020 08:08:58 -0700 (PDT)
MIME-Version: 1.0
References: <1593102379-400132-1-git-send-email-jiaweiw@mellanox.com>
 <1593715390-83047-1-git-send-email-jiaweiw@mellanox.com>
 <1593715390-83047-2-git-send-email-jiaweiw@mellanox.com>
 <CALBAE1N2rv0e79qAKe8Zmhssi4NOu1_7oHX63e_qpqrkphUojQ@mail.gmail.com>
 <AM0PR0502MB40191263150E3A4F6E91758ED26A0@AM0PR0502MB4019.eurprd05.prod.outlook.com>
In-Reply-To: <AM0PR0502MB40191263150E3A4F6E91758ED26A0@AM0PR0502MB4019.eurprd05.prod.outlook.com>
From: Jerin Jacob <jerinjacobk@gmail.com>
Date: Fri, 3 Jul 2020 20:38:42 +0530
Message-ID: <CALBAE1PE3kTKAyhLQAaZQ8dg2nbBS9ch6_QOXAN2hNjeTira1Q@mail.gmail.com>
To: Matan Azrad <matan@mellanox.com>
Cc: "Jiawei(Jonny) Wang" <jiaweiw@mellanox.com>, Ori Kam <orika@mellanox.com>, 
 Slava Ovsiienko <viacheslavo@mellanox.com>, dpdk-dev <dev@dpdk.org>, 
 Thomas Monjalon <thomas@monjalon.net>, Raslan Darawsheh <rasland@mellanox.com>,
 "ian.stokes@intel.com" <ian.stokes@intel.com>,
 "fbl@redhat.com" <fbl@redhat.com>
Content-Type: text/plain; charset="UTF-8"
Subject: Re: [dpdk-dev] [PATCH v2 1/7] ethdev: introduce sample action for
	rte flow
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On Fri, Jul 3, 2020 at 8:25 PM Matan Azrad <matan@mellanox.com> wrote:
>
>
> Hi Jerin

Hi Matan,

>
> From: Jerin Jacob:
> > On Fri, Jul 3, 2020 at 12:13 AM Jiawei Wang <jiaweiw@mellanox.com> wrote:
> > >
> > > When using full offload, all traffic will be handled by the HW, and
> > > directed to the requested vf or wire, the control application loses
> > > visibility on the traffic.
> > > So there's a need for an action that will enable the control
> > > application some visibility.
> > >
> > > The solution is introduced a new action that will sample the incoming
> > > traffic and send a duplicated traffic in some predefined ratio to the
> > > application, while the original packet will continue to the target
> > > destination.
> > >
> > > The packets sampled equals is '1/ratio', if the ratio value be set to
> > > 1 , means that the packets would be completely mirrored. The sample
> > > packet can be assigned with different set of actions from the original
> > packet.
> > >
> > > In order to support the sample packet in rte_flow, new rte_flow action
> > > definition RTE_FLOW_ACTION_TYPE_SAMPLE and structure
> > > rte_flow_action_sample will be introduced.
> > >
> > > Signed-off-by: Jiawei Wang <jiaweiw@mellanox.com>
> > > Acked-by: Ori Kam <orika@mellanox.com>
> >
> > When adding overlapping API(rte_eth_mirror_rule_set()) in the same
> > library(ethdev).
> > Please depreciate the old API.
> > We should not have two separate paths for the same function in the same
> > ethdev library. It is pain for app and driver developers.
>
> What are about all the other rte_flow parallel configuration APIs in ethdev:
>  promiscuous_enable;
> promiscuous_disable;
> allmulticast_enable;
> allmulticast_disable;
> mac_addr_remove;
> mac_addr_add;
> mac_addr_set;
> set_mc_addr_list;
> vlan_filter_set;
> vlan_tpid_set;
> vlan_strip_queue_set;
> vlan_offload_set;
> vlan_pvid_set;
> udp_tunnel_port_add;
> udp_tunnel_port_del;
> ...
>
> These APIs can be replaced easily by rte_flow API.
> Do you think we need to deprecate all?

I think, basic stuff like below can have separate API.
1)  promiscuous_enable;
2) promiscuous_disable;
3) allmulticast_enable;
4) allmulticast_disable;
5) mac_addr_remove;
6) mac_addr_add;
7) mac_addr_set;
8) set_mc_addr_list;

But The VLAN and UDP related should be rte_flow candidates.(IMO)

>
> > With the above deprecation notice,
> > Acked-by: Jerin Jacob <jerinj@marvell.com>