net/mlx5: rewrite IP address UDP/TCP port by E-Switch
authorXiaoyu Min <jackmin@mellanox.com>
Thu, 11 Oct 2018 13:22:06 +0000 (13:22 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 11 Oct 2018 16:56:02 +0000 (18:56 +0200)
commit2ed2fe5f0a9c0891dd3e0d35309d179b5fb26b62
tree9f81a5e3a158b9b784c336ab6a9bde8620b1e3f3
parent92378c2b7fdf45f378783e2ba8b298bef797e6a9
net/mlx5: rewrite IP address UDP/TCP port by E-Switch

Offload the following rte_flow actions by inserting accordingly
E-Switch rules via TC Flower driver

 - RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC
 - RTE_FLOW_ACTION_TYPE_SET_IPV4_DST
 - RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC
 - RTE_FLOW_ACTION_TYPE_SET_IPV6_DST
 - RTE_FLOW_ACTION_TYPE_SET_TP_SRC
 - RTE_FLOW_ACTION_TYPE_SET_TP_DST

The example testpmd command is:

    flow create 0 transfer ingress
         pattern eth / ipv4 / udp dst is 7000 / end
 actions set_ipv4_src ipv4_addr 172.168.0.1 /
 set_ipv4_dst ipv4_addr 172.168.10.1 /
 set_tp_dst port 9000 /
 set_tp_src port 700 /
 port_id id 1 / end

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
drivers/net/mlx5/Makefile
drivers/net/mlx5/meson.build
drivers/net/mlx5/mlx5_flow.h
drivers/net/mlx5/mlx5_flow_tcf.c