All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Suman Ghosh <sumang@marvell.com>
Cc: sgoutham@marvell.com, gakula@marvell.com, sbhatta@marvell.com,
	hkelam@marvell.com, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, lcherian@marvell.com,
	jerinj@marvell.com, john.fastabend@gmail.com,
	bbhushan2@marvell.com, hawk@kernel.org, andrew+netdev@lunn.ch,
	ast@kernel.org, daniel@iogearbox.net, bpf@vger.kernel.org
Subject: Re: [net-next PATCH v2 3/6] octeontx2-pf: Add AF_XDP zero copy support for rx side
Date: Thu, 9 Jan 2025 16:14:00 +0000	[thread overview]
Message-ID: <20250109161400.GK7706@kernel.org> (raw)
In-Reply-To: <20250108183329.2207738-4-sumang@marvell.com>

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@marvell.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.

...

  reply	other threads:[~2025-01-09 16:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-08 18:33 [net-next PATCH v2 0/6] Add af_xdp support for cn10k Suman Ghosh
2025-01-08 18:33 ` [net-next PATCH v2 1/6] octeontx2-pf: Add AF_XDP non-zero copy support Suman Ghosh
2025-01-09 16:08   ` Simon Horman
2025-01-10  9:34     ` [EXTERNAL] " Suman Ghosh
2025-01-08 18:33 ` [net-next PATCH v2 2/6] octeontx2-pf: Don't unmap page pool buffer used by XDP Suman Ghosh
2025-01-08 18:33 ` [net-next PATCH v2 3/6] octeontx2-pf: Add AF_XDP zero copy support for rx side Suman Ghosh
2025-01-09 16:14   ` Simon Horman [this message]
2025-01-10  9:34     ` [EXTERNAL] " Suman Ghosh
2025-01-08 18:33 ` [net-next PATCH v2 4/6] octeontx2-pf: Reconfigure RSS table after enabling AF_XDP zerocopy on rx queue Suman Ghosh
2025-01-08 18:33 ` [net-next PATCH v2 5/6] Octeontx2-pf: Prepare for AF_XDP Suman Ghosh
2025-01-08 18:33 ` [net-next PATCH v2 6/6] octeontx2-pf: AF_XDP zero copy transmit support Suman Ghosh
  -- strict thread matches above, loose matches on Subject: below --
2025-01-08 18:29 [net-next PATCH v2 0/6] Add af_xdp support for cn10k Suman Ghosh
2025-01-08 18:29 ` [net-next PATCH v2 3/6] octeontx2-pf: Add AF_XDP zero copy support for rx side Suman Ghosh

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=20250109161400.GK7706@kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=ast@kernel.org \
    --cc=bbhushan2@marvell.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hawk@kernel.org \
    --cc=hkelam@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=lcherian@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.com \
    --cc=sumang@marvell.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.