From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 41A46A09E9; Tue, 15 Dec 2020 08:50:30 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B6F7DC9DE; Tue, 15 Dec 2020 08:49:58 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 0F4F0C9BC for ; Tue, 15 Dec 2020 08:49:52 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from jiaweiw@nvidia.com) with SMTP; 15 Dec 2020 09:49:52 +0200 Received: from nvidia.com (gen-l-vrt-281.mtl.labs.mlnx [10.237.44.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0BF7nqhN023341; Tue, 15 Dec 2020 09:49:52 +0200 From: Jiawei Wang To: viacheslavo@nvidia.com, matan@nvidia.com, orika@nvidia.com Cc: dev@dpdk.org, rasland@nvidia.com Date: Tue, 15 Dec 2020 09:49:47 +0200 Message-Id: <1608018591-97942-1-git-send-email-jiaweiw@nvidia.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [RFC 0/4] Add the E-Switch mirroring and jump supports 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" MLX5 E-Switch mirroring is implemented as multiple destination array in one steering table. The array currently supports only port ID as destination actions. This RFC adds the below supports for MLX5 PMD driver: - Supports the metadata register Cx preserve capability query. - Supports the jump action support as one of destination of array. - Supports the modify action only impact on the one of destination. The examples for the E-Switch flow use case and result as below: set sample_actions 0 port_id id 1 / end flow create 0 ingress transfer pattern eth / end actions sample ratio 1 index 0 / jump group 1 / end flow create 1 ingress transfer group 1 pattern eth / end actions set_mac_dst mac_addr 00:aa:bb:cc:dd:ee / port_id id 2 / end The flow results all the matched ingress packets are mirrored to port id 1 and go to group 1. In the group 1, packets are modified with the destination mac and sent to port id 2. Jiawei Wang (4): common/mlx5: query register c preserve capability via DevX net/mlx5: support E-Switch mirroring and jump in one flow net/mlx5: extend the skip scale flag net/mlx5: supports modify one port in E-Switch mirroring drivers/common/mlx5/mlx5_devx_cmds.c | 2 + drivers/common/mlx5/mlx5_devx_cmds.h | 1 + drivers/common/mlx5/mlx5_prm.h | 4 +- drivers/net/mlx5/mlx5_flow.c | 203 ++++++++++++++++++++++++----------- drivers/net/mlx5/mlx5_flow.h | 23 +++- drivers/net/mlx5/mlx5_flow_dv.c | 92 ++++++++++------ 6 files changed, 226 insertions(+), 99 deletions(-) -- 1.8.3.1