[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250109161400.GK7706@kernel.org>
Date: Thu, 9 Jan 2025 16:14:00 +0000
From: Simon Horman <horms@...nel.org>
To: Suman Ghosh <sumang@...vell.com>
Cc: sgoutham@...vell.com, gakula@...vell.com, sbhatta@...vell.com,
hkelam@...vell.com, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, lcherian@...vell.com,
jerinj@...vell.com, john.fastabend@...il.com, bbhushan2@...vell.com,
hawk@...nel.org, andrew+netdev@...n.ch, ast@...nel.org,
daniel@...earbox.net, bpf@...r.kernel.org
Subject: Re: [net-next PATCH v2 3/6] octeontx2-pf: Add AF_XDP zero copy
support for rx side
On Thu, Jan 09, 2025 at 12:03:26AM +0530, Suman Ghosh wrote:
> This patch adds support to AF_XDP zero copy for CN10K.
> This patch specifically adds receive side support. In this approach once
> a xdp program with zero copy support on a specific rx queue is enabled,
> then that receive quse is disabled/detached from the existing kernel
> queue and re-assigned to the umem memory.
>
> Signed-off-by: Suman Ghosh <sumang@...vell.com>
...
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
...
> @@ -572,20 +575,31 @@ int otx2_napi_handler(struct napi_struct *napi, int budget)
> if (pfvf->flags & OTX2_FLAG_ADPTV_INT_COAL_ENABLED)
> otx2_adjust_adaptive_coalese(pfvf, cq_poll);
>
> + if (likely(cq))
> + pool = &pfvf->qset.pool[cq->cq_idx];
> +
Hi Suman,
FWIIW, Smatch is still concerned that cq may be used uninitialised here.
...
> @@ -1429,13 +1447,24 @@ static bool otx2_xdp_rcv_pkt_handler(struct otx2_nic *pfvf,
> unsigned char *hard_start;
> struct otx2_pool *pool;
> int qidx = cq->cq_idx;
> - struct xdp_buff xdp;
> + struct xdp_buff xdp, *xsk_buff = NULL;
> struct page *page;
> u64 iova, pa;
> u32 act;
> int err;
Please consider preserving reverse xmas tree order - longest line to
shortest - for local variable declarations.
...
Powered by blists - more mailing lists