net/mlx5: rewrite MAC address by E-Switch
authorXiaoyu Min <jackmin@mellanox.com>
Thu, 11 Oct 2018 13:31:46 +0000 (13:31 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 18 Oct 2018 08:24:39 +0000 (10:24 +0200)
commit7604677883d50c4f2b1970e2a877706947bf192b
tree061be12c94fb236952c9828806a0ba6b8bfb2ad8
parent4dff9e297606b7a1ac13b822f970692d663d88a3
net/mlx5: rewrite MAC address by E-Switch

Offload following modify MAC address actions to E-Switch
via TC-Flower driver

- RTE_FLOW_ACTION_TYPE_SET_MAC_SRC
- RTE_FLOW_ACTION_TYPE_SET_MAC_DST

The corresponding rte_flow_item_eth must be present in
rte_flow pattern

Only support modify outer layer MAC address

The example testpmd command is:

    flow create 0 transfer ingress
         pattern eth / ipv4 / udp dst is 7000 / end
         actions set_mac_dst mac_addr dd:00:aa:11:bb:33 /
         set_mac_src mac_addr bb:00:cc:11:aa:22 /
 port_id id 1 / end

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