[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <05efdc9a-8704-476e-8179-1a9fc0ada749@redhat.com>
Date: Tue, 28 Oct 2025 11:57:47 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Meghana Malladi <m-malladi@...com>, horms@...nel.org,
namcao@...utronix.de, vadim.fedorenko@...ux.dev, jacob.e.keller@...el.com,
christian.koenig@....com, sumit.semwal@...aro.org, sdf@...ichev.me,
john.fastabend@...il.com, hawk@...nel.org, daniel@...earbox.net,
ast@...nel.org, kuba@...nel.org, edumazet@...gle.com, davem@...emloft.net,
andrew+netdev@...n.ch
Cc: linaro-mm-sig@...ts.linaro.org, dri-devel@...ts.freedesktop.org,
linux-media@...r.kernel.org, bpf@...r.kernel.org,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, srk@...com,
Vignesh Raghavendra <vigneshr@...com>, Roger Quadros <rogerq@...nel.org>,
danishanwar@...com
Subject: Re: [PATCH net-next v4 2/6] net: ti: icssg-prueth: Add XSK pool
helpers
On 10/23/25 11:39 AM, Meghana Malladi wrote:
> @@ -1200,6 +1218,109 @@ static int emac_xdp_setup(struct prueth_emac *emac, struct netdev_bpf *bpf)
> return 0;
> }
>
> +static int prueth_xsk_pool_enable(struct prueth_emac *emac,
> + struct xsk_buff_pool *pool, u16 queue_id)
> +{
> + struct prueth_rx_chn *rx_chn = &emac->rx_chns;
> + u32 frame_size;
> + int ret;
> +
> + if (queue_id >= PRUETH_MAX_RX_FLOWS ||
> + queue_id >= emac->tx_ch_num) {
> + netdev_err(emac->ndev, "Invalid XSK queue ID %d\n", queue_id);
> + return -EINVAL;
> + }
> +
> + frame_size = xsk_pool_get_rx_frame_size(pool);
> + if (frame_size < PRUETH_MAX_PKT_SIZE)
> + return -EOPNOTSUPP;
> +
> + ret = xsk_pool_dma_map(pool, rx_chn->dma_dev, PRUETH_RX_DMA_ATTR);
> + if (ret) {
> + netdev_err(emac->ndev, "Failed to map XSK pool: %d\n", ret);
> + return ret;
> + }
> +
> + if (netif_running(emac->ndev)) {
> + /* stop packets from wire for graceful teardown */
> + ret = icssg_set_port_state(emac, ICSSG_EMAC_PORT_DISABLE);
> + if (ret)
> + return ret;
> + prueth_destroy_rxq(emac);
> + }
> +
> + emac->xsk_qid = queue_id;
> + prueth_set_xsk_pool(emac, queue_id);
> +
> + if (netif_running(emac->ndev)) {
> + ret = prueth_create_rxq(emac);
It looks like this falls short of Jakub's request on v2:
https://lore.kernel.org/netdev/20250903174847.5d8d1c9f@kernel.org/
about not freeing the rx queue for reconfig.
I think you should:
- stop the H/W from processing incoming packets,
- spool all the pending packets
- attach/detach the xsk_pool
- refill the ring
- re-enable the H/W
/P
Powered by blists - more mailing lists