[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230123180343.0059622e@kernel.org>
Date: Mon, 23 Jan 2023 18:03:43 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Gal Pressman <gal@...dia.com>
Cc: Vadim Fedorenko <vadfed@...a.com>, Aya Levin <ayal@...dia.com>,
Saeed Mahameed <saeedm@...dia.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net 2/2] mlx5: fix skb leak while fifo resync
On Mon, 23 Jan 2023 14:38:35 +0200 Gal Pressman wrote:
> > 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..
We should pass the real budget in. The exact value does not matter,
but it could matter whether it's zero or not. Budget is zero when
NAPI gets polled from an IRQ context.
Powered by blists - more mailing lists