Skip to content

Commit

Permalink
net/mlx5e: Fix skb memory leak when TC classifier action offloads are…
Browse files Browse the repository at this point in the history
… disabled

When TC classifier action offloads are disabled (CONFIG_MLX5_CLS_ACT in
Kconfig), the mlx5e_rep_tc_receive() function which is responsible for
passing the skb to the stack (or freeing it) is defined as a nop, and
results in leaking the skb memory. Replace the nop with a call to
napi_gro_receive() to resolve the leak.

Fixes: 28e7606 ("net/mlx5e: Refactor rx handler of represetor device")
Signed-off-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Ariel Levkovich <lariel@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
  • Loading branch information
Gal Pressman authored and Saeed Mahameed committed Dec 23, 2021
1 parent 918fc38 commit a0cb909
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ mlx5e_rep_setup_tc(struct net_device *dev, enum tc_setup_type type,

static inline void
mlx5e_rep_tc_receive(struct mlx5_cqe64 *cqe, struct mlx5e_rq *rq,
struct sk_buff *skb) {}
struct sk_buff *skb) { napi_gro_receive(rq->cq.napi, skb); }

#endif /* CONFIG_MLX5_CLS_ACT */

Expand Down

0 comments on commit a0cb909

Please sign in to comment.