OSDN Git Service

net/mlx5e: Disallow inserting vxlan/vlan egress rules without decap/pop
authorPaul Blakey <paulb@mellanox.com>
Sun, 16 Feb 2020 10:01:33 +0000 (12:01 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 20 Feb 2020 01:49:49 +0000 (17:49 -0800)
commit7f2fd0a5f8d859d71e710a664a113c4a2620dc4f
treefb2236552c2ace52cad70120a61e1508a3d82d4f
parentea4cd837b99df6693c3aa067ade528f62544c18d
net/mlx5e: Disallow inserting vxlan/vlan egress rules without decap/pop

Currently, rules on tunnel devices can be offloaded without decap action
when a vlan pop action exists. Similarly, the driver will offload rules
on vlan interfaces with no pop action when a decap action exists.

Disallow the faulty behavior by checking that vlan egress rules do pop or
drop and vxlan egress rules do decap, as intended.

Signed-off-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Oz Shlomo <ozsh@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c