diff options
author | Tonghao Zhang | 2019-05-06 20:28:37 +0200 |
---|---|---|
committer | Saeed Mahameed | 2019-05-31 22:04:25 +0200 |
commit | d1bda7eecd88e3d10e44541d675c07564f4f6938 (patch) | |
tree | 4f93a6e5278025f0403affd9c0dab7924d170d74 /drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | |
parent | net/mlx5e: Generalize vport type in vport representor (diff) | |
download | kernel-qcow2-linux-d1bda7eecd88e3d10e44541d675c07564f4f6938.tar.gz kernel-qcow2-linux-d1bda7eecd88e3d10e44541d675c07564f4f6938.tar.xz kernel-qcow2-linux-d1bda7eecd88e3d10e44541d675c07564f4f6938.zip |
net/mlx5e: Allow matching only enc_key_id/enc_dst_port for decapsulation action
In some case, we don't care the enc_src_ip and enc_dst_ip, and
if we don't match the field enc_src_ip and enc_dst_ip, we can use
fewer flows in hardware when revice the tunnel packets. For example,
the tunnel packets may be sent from different hosts, we must offload
one rule for each host.
$ tc filter add dev vxlan0 protocol ip parent ffff: prio 1 \
flower dst_mac 00:11:22:33:44:00 \
enc_src_ip Host0_IP enc_dst_ip 2.2.2.100 \
enc_dst_port 4789 enc_key_id 100 \
action tunnel_key unset action mirred egress redirect dev eth0_1
$ tc filter add dev vxlan0 protocol ip parent ffff: prio 1 \
flower dst_mac 00:11:22:33:44:00 \
enc_src_ip Host1_IP enc_dst_ip 2.2.2.100 \
enc_dst_port 4789 enc_key_id 100 \
action tunnel_key unset action mirred egress redirect dev eth0_1
If we support flows which only match the enc_key_id and enc_dst_port,
a flow can process the packets sent to VM which (mac 00:11:22:33:44:00).
$ tc filter add dev vxlan0 protocol ip parent ffff: prio 1 \
flower dst_mac 00:11:22:33:44:00 \
enc_dst_port 4789 enc_key_id 100 \
action tunnel_key unset action mirred egress redirect dev eth0_1
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c')
0 files changed, 0 insertions, 0 deletions