netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Meghana Malladi <m-malladi@ti.com>
Cc: namcao@linutronix.de, vadim.fedorenko@linux.dev,
	jacob.e.keller@intel.com, christian.koenig@amd.com,
	sumit.semwal@linaro.org, sdf@fomichev.me,
	john.fastabend@gmail.com, hawk@kernel.org, daniel@iogearbox.net,
	ast@kernel.org, pabeni@redhat.com, kuba@kernel.org,
	edumazet@google.com, davem@davemloft.net, andrew+netdev@lunn.ch,
	linaro-mm-sig@lists.linaro.org, dri-devel@lists.freedesktop.org,
	linux-media@vger.kernel.org, bpf@vger.kernel.org,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, srk@ti.com,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Roger Quadros <rogerq@kernel.org>,
	danishanwar@ti.com
Subject: Re: [PATCH net-next v5 5/6] net: ti: icssg-prueth: Add AF_XDP zero copy for RX
Date: Fri, 14 Nov 2025 10:33:19 +0000	[thread overview]
Message-ID: <aRcFb-vsoLw24MbU@horms.kernel.org> (raw)
In-Reply-To: <20251111101523.3160680-6-m-malladi@ti.com>

On Tue, Nov 11, 2025 at 03:45:22PM +0530, Meghana Malladi wrote:

...

> diff --git a/drivers/net/ethernet/ti/icssg/icssg_common.c b/drivers/net/ethernet/ti/icssg/icssg_common.c

...

> +static int prueth_dma_rx_push_mapped_zc(struct prueth_emac *emac,
> +					struct prueth_rx_chn *rx_chn,
> +					struct xdp_buff *xdp)
> +{
> +	struct net_device *ndev = emac->ndev;
> +	struct cppi5_host_desc_t *desc_rx;
> +	struct prueth_swdata *swdata;
> +	dma_addr_t desc_dma;
> +	dma_addr_t buf_dma;
> +	int buf_len;
> +
> +	buf_dma = xsk_buff_xdp_get_dma(xdp);
> +	desc_rx = k3_cppi_desc_pool_alloc(rx_chn->desc_pool);
> +	if (!desc_rx) {
> +		netdev_err(ndev, "rx push: failed to allocate descriptor\n");
> +		return -ENOMEM;
> +	}
> +	desc_dma = k3_cppi_desc_pool_virt2dma(rx_chn->desc_pool, desc_rx);
> +
> +	cppi5_hdesc_init(desc_rx, CPPI5_INFO0_HDESC_EPIB_PRESENT,
> +			 PRUETH_NAV_PS_DATA_SIZE);
> +	k3_udma_glue_rx_dma_to_cppi5_addr(rx_chn->rx_chn, &buf_dma);
> +	buf_len = xsk_pool_get_rx_frame_size(rx_chn->xsk_pool);
> +	cppi5_hdesc_attach_buf(desc_rx, buf_dma, buf_len, buf_dma, buf_len);
> +	swdata = cppi5_hdesc_get_swdata(desc_rx);
> +	swdata->type = PRUETH_SWDATA_XSK;
> +	swdata->data.xdp = xdp;
> +
> +	return k3_udma_glue_push_rx_chn(rx_chn->rx_chn, PRUETH_RX_FLOW_DATA,
> +					desc_rx, desc_dma);
> +
> +	return 0;

nit: The line above is dead code.

> +}

...

  reply	other threads:[~2025-11-14 10:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-11 10:15 [PATCH net-next v5 0/6] Add AF_XDP zero copy support Meghana Malladi
2025-11-11 10:15 ` [PATCH net-next v5 1/6] net: ti: icssg-prueth: Add functions to create and destroy Rx/Tx queues Meghana Malladi
2025-11-14 10:36   ` Simon Horman
2025-11-14 11:13     ` Meghana Malladi
2025-11-11 10:15 ` [PATCH net-next v5 2/6] net: ti: icssg-prueth: Add XSK pool helpers Meghana Malladi
2025-11-11 10:15 ` [PATCH net-next v5 3/6] net: ti: icssg-prueth: Add AF_XDP zero copy for TX Meghana Malladi
2025-11-11 10:15 ` [PATCH net-next v5 4/6] net: ti: icssg-prueth: Make emac_run_xdp function independent of page Meghana Malladi
2025-11-11 10:15 ` [PATCH net-next v5 5/6] net: ti: icssg-prueth: Add AF_XDP zero copy for RX Meghana Malladi
2025-11-14 10:33   ` Simon Horman [this message]
2025-11-17  9:19     ` Meghana Malladi
2025-11-11 10:15 ` [PATCH net-next v5 6/6] net: ti: icssg-prueth: Enable zero copy in XDP features Meghana Malladi

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=aRcFb-vsoLw24MbU@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=christian.koenig@amd.com \
    --cc=daniel@iogearbox.net \
    --cc=danishanwar@ti.com \
    --cc=davem@davemloft.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m-malladi@ti.com \
    --cc=namcao@linutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rogerq@kernel.org \
    --cc=sdf@fomichev.me \
    --cc=srk@ti.com \
    --cc=sumit.semwal@linaro.org \
    --cc=vadim.fedorenko@linux.dev \
    --cc=vigneshr@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).