]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Geneve, Keep tunnel info as pointer to the original struct
authorYevgeny Kliteynik <kliteyn@mellanox.com>
Tue, 12 Feb 2019 11:31:00 +0000 (13:31 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 31 May 2019 20:04:26 +0000 (13:04 -0700)
commit7ff3c5f4d535da15f20c7db07c8722d4cfffa598
tree22598a7dc40ec58ea271ab042703136ab473bd2c
parent56e702b36a5b791bb9b66a1bc5450087f947be6b
net/mlx5e: Geneve, Keep tunnel info as pointer to the original struct

In mlx5e encap entry structure, IP tunnel info data structure is copied
by value. This approach worked till now, but it breaks when there are
encapsulation options, such as in case of Geneve.

These options are stored in the structure that is allocated adjacent to
the IP tunnel info struct, and not pointed at by any field in that struct.
Therefore, when copying the struct by value, we loose the address of the
original struct and can't get to the encapsulation options.

Fix the problem by storing the pointer to the tunnel info data instead.

Reviewed-by: Oz Shlomo <ozsh@mellanox.com>
Signed-off-by: Yevgeny Kliteynik <kliteyn@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
drivers/net/ethernet/mellanox/mlx5/core/en_rep.h
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c