[v1,0/8] use generic flow command to re-realize mirror rule
Message ID | 20201014084131.72035-1-simonx.lu@intel.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 39033A04B7; Wed, 14 Oct 2020 10:43:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2176A1DCC6; Wed, 14 Oct 2020 10:43:09 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 4A5EC1BC72 for <dev@dpdk.org>; Wed, 14 Oct 2020 10:43:07 +0200 (CEST) IronPort-SDR: 9JIerDjbr77CPHYjmuIya+lsNFH1OxFw0c902kZGZ3zFk3w8Fot7dB14qKCCOA8jBFYSIhXBxz zy2VGMlqY/mw== X-IronPort-AV: E=McAfee;i="6000,8403,9773"; a="163432180" X-IronPort-AV: E=Sophos;i="5.77,374,1596524400"; d="scan'208";a="163432180" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2020 01:43:05 -0700 IronPort-SDR: uh3kR2lX+GXEcvOKvUMJe9PtDJr3kuQtvcRP6j/tk+6kj0YB3XyN3RcYAwC2nYe9zTn58FLA9+ QcNQwoqc1djg== X-IronPort-AV: E=Sophos;i="5.77,374,1596524400"; d="scan'208";a="299864495" Received: from intel-npg-odc-srv01.cd.intel.com ([10.240.178.136]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2020 01:43:02 -0700 From: SimonX Lu <simonx.lu@intel.com> To: dev@dpdk.org Cc: jia.guo@intel.com, haiyue.wang@intel.com, qiming.yang@intel.com, beilei.xing@intel.com, orika@nvidia.com, Simon Lu <simonx.lu@intel.com> Date: Wed, 14 Oct 2020 08:41:23 +0000 Message-Id: <20201014084131.72035-1-simonx.lu@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH v1 0/8] use generic flow command to re-realize mirror rule 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> |
Message
SimonX Lu
Oct. 14, 2020, 8:41 a.m. UTC
From: Simon Lu <simonx.lu@intel.com>
follow mirror rule to add new action called mirror in flow management,
so we can use "flow create * pattern * action mirror *" to replace
old "set port * mirror-rule *" command now
the example of mirror rule command mapping to flow management command:
(in below command, port 0 is PF and port 1-3 is VF):
1) ingress: pf => pf
set port 0 mirror-rule 0 uplink-mirror dst-pool 4 on
or
flow create 0 ingress pattern pf / end actions mirror pf / end
2) egress: pf => pf
set port 0 mirror-rule 0 downlink-mirror dst-pool 4 on
or
flow create 0 egress pattern pf / end actions mirror pf / end
3) ingress: pf => vf 3
set port 0 mirror-rule 0 uplink-mirror dst-pool 3 on
or
flow create 0 ingress pattern pf / end actions mirror vf id 3 / end
4) egress: pf => vf 3
set port 0 mirror-rule 0 downlink-mirror dst-pool 3 on
or
flow create 0 egress pattern pf / end actions mirror vf id 3 / end
5) ingress: vf 0,1 => pf
set port 0 mirror-rule 0 pool-mirror-up 0x3 dst-pool 4 on
or
flow create 0 ingress pattern vf id is 0 / end actions mirror pf / end
flow create 0 ingress pattern vf id is 1 / end actions mirror pf / end
or
flow create 0 ingress pattern vf id last 1 / end actions mirror pf / end
or
flow create 0 ingress pattern vf id mask 0x3 / end actions mirror pf / end
6) egress: vf 0,1 => pf
set port 0 mirror-rule 0 pool-mirror-down 0x3 dst-pool 4 on
or
flow create 0 egress pattern vf id is 0 / end actions mirror pf / end
flow create 0 egress pattern vf id is 1 / end actions mirror pf / end
or
flow create 0 egress pattern vf id last 1 / end actions mirror pf / end
or
flow create 0 egress pattern vf id mask 0x3 / end actions mirror pf / end
7) ingress: vf 1,2 => vf 3
set port 0 mirror-rule 0 pool-mirror-up 0x6 dst-pool 3 on
or
flow create 0 ingress pattern vf id is 1 / end actions mirror vf id 3 / end
flow create 0 ingress pattern vf id is 2 / end actions mirror vf id 3 / end
or
flow create 0 ingress pattern vf id is 1 id last 2 / end actions mirror vf id 3 / end
or
flow create 0 ingress pattern vf id mask 0x6 / end actions mirror vf id 3 / end
8) egress: vf 1,2 => vf 3
set port 0 mirror-rule 0 pool-mirror-down 0x6 dst-pool 3 on
or
flow create 0 egress pattern vf id is 1 / end actions mirror vf id 3 / end
flow create 0 egress pattern vf id is 2 / end actions mirror vf id 3 / end
or
flow create 0 egress pattern vf id is 1 id last 2 / end actions mirror vf id 3 / end
or
flow create 0 egress pattern vf id mask 0x6 / end actions mirror vf id 3 / end
9) ingress: vlan 4,6 => vf 3
set port 0 mirror-rule 0 vlan-mirror 4,6 dst-pool 4 on
or
flow create 0 ingress pattern vlan vid is 4 / end actions mirror vf id 3 / end
flow create 0 ingress pattern vlan vid is 6 / end actions mirror vf id 3 end
or
flow create 0 ingress pattern vlan vid mask 0x28 / end actions mirror vf id 3 / end
or
flow create 0 ingress pattern vlan vid is 4 vid last 6 vid mask 0x5 / end
actions mirror vf id 3 / end
Simon Lu (8):
ethdev: support the mirror action for flow
app/testpmd: support action mirror for flow command
net/ixgbe: add mirror rule config and extend flow filter type
net/ixgbe: define the mirror filter paser
net/ixgbe: use generic flow command to re-realize mirror rule
net/i40e: add mirror rule config and export add/del rule APIs
net/i40e: define the mirror filter paser
net/i40e: use generic flow command to re-realize mirror rule
app/test-pmd/cmdline_flow.c | 36 +++
drivers/net/i40e/i40e_ethdev.c | 13 +-
drivers/net/i40e/i40e_ethdev.h | 34 +++
drivers/net/i40e/i40e_flow.c | 416 +++++++++++++++++++++++++++-
drivers/net/ixgbe/ixgbe_ethdev.c | 8 -
drivers/net/ixgbe/ixgbe_ethdev.h | 53 +++-
drivers/net/ixgbe/ixgbe_flow.c | 456 +++++++++++++++++++++++++++++++
lib/librte_ethdev/rte_eth_ctrl.h | 1 +
lib/librte_ethdev/rte_flow.c | 1 +
lib/librte_ethdev/rte_flow.h | 7 +
10 files changed, 1000 insertions(+), 25 deletions(-)