All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gal Pressman <gal@nvidia.com>
To: Vadim Fedorenko <vadfed@meta.com>, Aya Levin <ayal@nvidia.com>,
	Saeed Mahameed <saeedm@nvidia.com>,
	Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net 2/2] mlx5: fix skb leak while fifo resync
Date: Mon, 23 Jan 2023 14:38:35 +0200	[thread overview]
Message-ID: <8537aa82-8ac9-3f76-c8ae-395a60ccddf8@nvidia.com> (raw)
In-Reply-To: <20230122161602.1958577-3-vadfed@meta.com>

On 22/01/2023 18:16, Vadim Fedorenko wrote:
> During ptp resync operation SKBs were poped from the fifo but were never
> freed neither by napi_consume nor by dev_kfree_skb_any. Add call to
> napi_consume_skb to properly free SKBs.
> 
> Fixes: 19b43a432e3e ("net/mlx5e: Extend SKB room check to include PTP-SQ")

Same comment as previous patch?

> Signed-off-by: Vadim Fedorenko <vadfed@meta.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c b/drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c
> index 11a99e0f00c6..d60bb997c53b 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c
> @@ -102,6 +102,7 @@ static bool mlx5e_ptp_skb_fifo_ts_cqe_resync(struct mlx5e_ptpsq *ptpsq, u16 skb_
>  		hwts.hwtstamp = mlx5e_skb_cb_get_hwts(skb)->cqe_hwtstamp;
>  		skb_tstamp_tx(skb, &hwts);
>  		ptpsq->cq_stats->resync_cqe++;
> +		napi_consume_skb(skb, 1);

Was wondering whether we should pass the actual budget here instead of
1, but looking at napi_consume_skb() it doesn't really matter..

Anyway:
Reviewed-by: Gal Pressman <gal@nvidia.com>

>  		skb_cc = PTP_WQE_CTR2IDX(ptpsq->skb_fifo_cc);
>  	}
>  

  reply	other threads:[~2023-01-23 12:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-22 16:16 [PATCH net 0/2] mlx5: bugfixes for ptp fifo queue Vadim Fedorenko
2023-01-22 16:16 ` [PATCH net 1/2] mlx5: fix possible ptp queue fifo overflow Vadim Fedorenko
2023-01-23  7:20   ` Leon Romanovsky
2023-01-23 14:19     ` Vadim Fedorenko
2023-01-23 12:32   ` Gal Pressman
2023-01-23 23:49     ` Vadim Fedorenko
2023-01-23 17:24   ` Vadim Fedorenko
2023-01-24 14:39     ` Gal Pressman
2023-01-24 15:09       ` Vadim Fedorenko
2023-01-25 14:42       ` Vadim Fedorenko
2023-01-25 20:33         ` Saeed Mahameed
2023-01-25 21:24           ` Vadim Fedorenko
2023-01-22 16:16 ` [PATCH net 2/2] mlx5: fix skb leak while fifo resync Vadim Fedorenko
2023-01-23 12:38   ` Gal Pressman [this message]
2023-01-23 16:52     ` Vadim Fedorenko
2023-01-24  2:03     ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8537aa82-8ac9-3f76-c8ae-395a60ccddf8@nvidia.com \
    --to=gal@nvidia.com \
    --cc=ayal@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@nvidia.com \
    --cc=vadfed@meta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.