[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250819171505.4ebbac36@kernel.org>
Date: Tue, 19 Aug 2025 17:15:05 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Dragos Tatulea <dtatulea@...dia.com>
Cc: cpaasch@...nai.com, Saeed Mahameed <saeedm@...dia.com>, Leon Romanovsky
<leon@...nel.org>, Tariq Toukan <tariqt@...dia.com>, Mark Bloch
<mbloch@...dia.com>, Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
<pabeni@...hat.com>, Alexander Lobakin <aleksander.lobakin@...el.com>, Gal
Pressman <gal@...dia.com>, linux-rdma@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2 2/2] net/mlx5: Avoid copying payload to the
skb's linear part
On Tue, 19 Aug 2025 09:58:54 +0000 Dragos Tatulea wrote:
> > @@ -2009,10 +2040,14 @@ mlx5e_skb_from_cqe_mpwrq_nonlinear(struct mlx5e_rq *rq, struct mlx5e_mpw_info *w
> > u32 linear_frame_sz;
> > u16 linear_data_len;
> > u16 linear_hr;
> > + u16 headlen;
> > void *va;
> >
> > prog = rcu_dereference(rq->xdp_prog);
> >
> > + headlen = min3(mlx5e_cqe_estimate_hdr_len(cqe), cqe_bcnt,
> > + (u16)MLX5E_RX_MAX_HEAD);
> > +
> How about keeping the old calculation for XDP and do this one for
> non-xdp in the following if/else block?
>
> This way XDP perf will not be impacted by the extra call to
> mlx5e_cqe_estimate_hdr_len().
Perhaps move it further down for XDP?
Ideally attaching a program which returns XDP_PASS shouldn't impact
normal TCP perf.
Powered by blists - more mailing lists