]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Consider tunnel type for encap contexts
authorEli Britstein <elibr@mellanox.com>
Mon, 18 Mar 2019 09:25:59 +0000 (09:25 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 29 Mar 2019 19:24:43 +0000 (12:24 -0700)
commit11bb34bd1c13412bc50fe55da6cc395a4a002825
tree2b669fc626ca55f611878690d88d919ff70d3564
parenta82c4aceca9c1c33d218014d425529a0bd0b7f0d
net/mlx5e: Consider tunnel type for encap contexts

The driver allocates an encap context based on the tunnel properties,
and reuse that context for all flows using the same tunnel properties.
Commit 092a50f68043 ("net/mlx5e: Add GRE protocol offloading")
introduced another tunnel protocol other than the single VXLAN
previously supported. A flow that uses a tunnel with the same tunnel
properties but with a different tunnel type (GRE vs VXLAN for example)
would mistakenly reuse the previous alocated context, causing the
traffic to be sent with the wrong encapsulation. Fix that by
considering the tunnel type for encap contexts.

Fixes: 092a50f68043 ("net/mlx5e: Add GRE protocol offloading")
Signed-off-by: Eli Britstein <elibr@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c