Message ID | 1599634114-148013-1-git-send-email-jiaweiw@nvidia.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1E48DA04B1; Wed, 9 Sep 2020 08:48:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7A51B1C0CA; Wed, 9 Sep 2020 08:48:39 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 82ACD1C0BC for <dev@dpdk.org>; Wed, 9 Sep 2020 08:48:36 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from jiaweiw@nvidia.com) with SMTP; 9 Sep 2020 09:48:34 +0300 Received: from nvidia.com (gen-l-vrt-280.mtl.labs.mlnx [10.237.45.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0896mYFt029471; Wed, 9 Sep 2020 09:48:34 +0300 From: Jiawei Wang <jiaweiw@nvidia.com> To: orika@nvidia.com, viacheslavo@nvidia.com, matan@nvidia.com, thomas@monjalon.net, ferruh.yigit@intel.com, marko.kovacevic@intel.com, arybchenko@solarflare.com Cc: dev@dpdk.org, rasland@nvidia.com, ian.stokes@intel.com, fbl@redhat.com, asafp@nvidia.com Date: Wed, 9 Sep 2020 09:48:22 +0300 Message-Id: <1599634114-148013-1-git-send-email-jiaweiw@nvidia.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1598540492-406340-1-git-send-email-jiaweiw@nvidia.com> References: <1598540492-406340-1-git-send-email-jiaweiw@nvidia.com> Subject: [dpdk-dev] [PATCH v6 00/12] support the flow-based traffic sampling 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> |
Series |
support the flow-based traffic sampling
|
|
Message
Jiawei Wang
Sept. 9, 2020, 6:48 a.m. UTC
This patch set implement the flow sampling for mlx5 driver. The solution is introduced a new rte_flow action that will sample the incoming traffic and send a duplicated traffic with the specified ratio to the application, while the original packet will continue to the target destination. If the sample 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. MLX5 PMD driver will be responsible for validate and translate the sample action while creating a flow. v6: * Update the function that restore vport through metadata register c0 for FDB sampler. * Add multiple destination support. * Support the remote mirroring with different encapsulation header. * Fix coverity error. v5: * Add the release note. * Remove Make changes since it's deprecated. v4: * Rebase. * Fix the coding style issue. v3: * Remove 'const' of ratio field. * Update description and commit messages. v2: * Rebase patches based on the latest code. * Update rte_flow and release documents. * Fix the compile error. * Removed unnecessary change in [PATCH 7/8] net/mlx5: update the metadata register c0 support since FDB will use 5-tuple to do match. * Update changes based on the comments. Jiawei Wang (12): ethdev: introduce sample action for rte flow common/mlx5: glue for sample action common/mlx5: query sampler object capability via DevX net/mlx5: add the validate sample action net/mlx5: split sample flow into two sub flows net/mlx5: update translate function for sample action app/testpmd: add testpmd command for sample action common/mlx5: add glue function for mirroring net/mlx5: update validation for mirroring flow net/mlx5: update translate function for mirror app/testpmd: add port and encap support for sample action net/mlx5: support the native port id actions for mirroring app/test-pmd/cmdline_flow.c | 301 ++++++++- doc/guides/prog_guide/rte_flow.rst | 25 + doc/guides/rel_notes/release_20_11.rst | 6 + drivers/common/mlx5/linux/meson.build | 4 + drivers/common/mlx5/linux/mlx5_glue.c | 52 ++ drivers/common/mlx5/linux/mlx5_glue.h | 18 + drivers/common/mlx5/mlx5_devx_cmds.c | 27 + drivers/common/mlx5/mlx5_devx_cmds.h | 1 + drivers/common/mlx5/mlx5_prm.h | 61 ++ drivers/net/mlx5/linux/mlx5_os.c | 14 + drivers/net/mlx5/mlx5.c | 22 + drivers/net/mlx5/mlx5.h | 6 + drivers/net/mlx5/mlx5_flow.c | 344 +++++++++- drivers/net/mlx5/mlx5_flow.h | 76 ++- drivers/net/mlx5/mlx5_flow_dv.c | 1125 +++++++++++++++++++++++++++++++- lib/librte_ethdev/rte_flow.c | 1 + lib/librte_ethdev/rte_flow.h | 30 + 17 files changed, 2060 insertions(+), 53 deletions(-)