DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [RFC] net/mlx5: support multiple groups and jump action
@ 2018-09-07 18:42 Yongseok Koh
  0 siblings, 0 replies; only message in thread
From: Yongseok Koh @ 2018-09-07 18:42 UTC (permalink / raw)
  To: dev; +Cc: Shahaf Shuler

Hi,

rte_flow has 'group' attribute and 'jump' action in order to support multiple
groups. This feature is known as multi-table support ('chain' in linux TC
flower) in general because a group means a table of flows. This will be added
to mlx5 PMD for 18.11. Example commands are:

	flow create 0 transfer priority 1 ingress
	     pattern eth / vlan vid is 100 / end
	     actions of_pop_vlan / jump group 100 / end

	flow create 0 transfer priority 1 ingress
	     pattern eth / vlan vid is 200 / end
	     actions of_pop_vlan / jump group 200 / end

	flow create 0 transfer group 100 priority 2 ingress
	     pattern eth / ipv4 dst spec 192.168.40.0 dst prefix 24 / end
	     actions drop / end

	flow create 0 transfer group 100 priority 2 ingress
	     pattern end
	     actions port_id id 1 / end

	flow create 0 transfer group 200 priority 2 ingress
	     pattern eth / ipv4 dst spec 192.168.40.0 dst prefix 24 / end
	     actions of_push_vlan ethertype 0x0800 / of_set_vlan_vid vlan_vid 300 /
		     port_id 1 / end

	flow create 0 transfer group 200 priority 2 ingress
	     pattern end
	     actions of_push_vlan ethertype 0x0800 / of_set_vlan_vid vlan_vid 400 /
		     port_id 1 / end

With theses flows, if a packet having vlan 200 and src_ip as 192.168.40.1, this
packet will hit the 2nd flow and the vlan tag will be stripped off. Then it will
hit the 5th flow because of the 'jump' action. As a result, the packet will have
a new vlan tag with vid=300 and will be forwarded to a different interface.  If
the packet had vlan 100, it would be dropped according to 3rd flow.


Thanks,
Yongseok

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-09-07 18:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-07 18:42 [dpdk-dev] [RFC] net/mlx5: support multiple groups and jump action Yongseok Koh

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