DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1 0/8] use generic flow command to re-realize mirror rule
@ 2020-10-14  8:41 SimonX Lu
  2020-10-14  8:41 ` [dpdk-dev] [PATCH v1 1/8] ethdev: support the mirror action for flow SimonX Lu
                   ` (8 more replies)
  0 siblings, 9 replies; 20+ messages in thread
From: SimonX Lu @ 2020-10-14  8:41 UTC (permalink / raw)
  To: dev; +Cc: jia.guo, haiyue.wang, qiming.yang, beilei.xing, orika, Simon Lu

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(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2021-02-19 12:59 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-14  8:41 [dpdk-dev] [PATCH v1 0/8] use generic flow command to re-realize mirror rule SimonX Lu
2020-10-14  8:41 ` [dpdk-dev] [PATCH v1 1/8] ethdev: support the mirror action for flow SimonX Lu
2020-10-14 12:07   ` Ori Kam
2020-10-14  8:41 ` [dpdk-dev] [PATCH v1 2/8] app/testpmd: support action mirror for flow command SimonX Lu
2020-10-14  8:41 ` [dpdk-dev] [PATCH v1 3/8] net/ixgbe: add mirror rule config and extend flow filter type SimonX Lu
2020-10-14  8:41 ` [dpdk-dev] [PATCH v1 4/8] net/ixgbe: define the mirror filter paser SimonX Lu
2020-10-14  8:41 ` [dpdk-dev] [PATCH v1 5/8] net/ixgbe: use generic flow command to re-realize mirror rule SimonX Lu
2020-10-14  8:41 ` [dpdk-dev] [PATCH v1 6/8] net/i40e: add mirror rule config and export add/del rule APIs SimonX Lu
2020-10-14  8:41 ` [dpdk-dev] [PATCH v1 7/8] net/i40e: define the mirror filter paser SimonX Lu
2020-10-14  8:41 ` [dpdk-dev] [PATCH v1 8/8] net/i40e: use generic flow command to re-realize mirror rule SimonX Lu
     [not found] ` <20201103082809.41149-1-stevex.yang@intel.com>
2020-11-03  8:28   ` [dpdk-dev] [RFC v2 1/6] net/i40e: add mirror rule config and add/del rule APIs Steve Yang
2020-11-03  8:28   ` [dpdk-dev] [RFC v2 2/6] net/i40e: define the mirror filter parser Steve Yang
2021-02-18 18:59     ` Thomas Monjalon
2021-02-19 12:56     ` Ferruh Yigit
2020-11-03  8:28   ` [dpdk-dev] [RFC v2 3/6] net/i40e: use generic flow command to re-realize mirror rule Steve Yang
2020-11-03  8:28   ` [dpdk-dev] [RFC v2 4/6] net/ixgbe: add mirror rule config and add/del rule APIs Steve Yang
2020-11-03  8:28   ` [dpdk-dev] [RFC v2 5/6] net/ixgbe: define the mirror filter parser Steve Yang
2021-02-19 12:57     ` Ferruh Yigit
2020-11-03  8:28   ` [dpdk-dev] [RFC v2 6/6] net/ixgbe: use flow sample to re-realize mirror rule Steve Yang
2021-02-19 12:59     ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).