net/mlx5: Release tunnel device after tc update skb
authorChris Mi <cmi@nvidia.com>
Tue, 4 Apr 2023 00:45:04 +0000 (03:45 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 21 Apr 2023 01:47:32 +0000 (18:47 -0700)
commit4fbef0f8ea6350eaea89b1e3175f9325252913ac
tree930ba05894d1163169eb862e52be804f4d1ab395
parent4c8189302567f75099a336b0efcff8291ec86ff4
net/mlx5: Release tunnel device after tc update skb

The cited commit causes a regression. Tunnel device is not released
after tc update skb if skb needs to be freed. The following error
message will be printed:

  unregister_netdevice: waiting for vxlan1 to become free. Usage count = 11

Fix it by releasing tunnel device if skb needs to be freed.

Fixes: 93a1ab2c545b ("net/mlx5: Refactor tc miss handling to a single function")
Signed-off-by: Chris Mi <cmi@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c