[PATCH net-next v5 5/6] net: ti: icssg-prueth: Add AF_XDP zero copy for RX
Meghana Malladi
m-malladi at ti.com
Mon Nov 17 01:19:07 PST 2025
Hi Simon,
On 11/14/25 16:03, Simon Horman wrote:
> 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.
>
Yes, this is a silly miss. Thanks for pointing this out. Will fix it for
v6. Thanks.
>> +}
>
> ...
More information about the linux-arm-kernel
mailing list