[PATCH net-next 1/2] net: airoha: Add the capability to consume out-of-order DMA tx descriptors
Lorenzo Bianconi
lorenzo at kernel.org
Wed Nov 5 00:18:27 PST 2025
On Nov 04, Jakub Kicinski wrote:
> On Mon, 03 Nov 2025 11:27:55 +0100 Lorenzo Bianconi wrote:
> > + __list_del_entry(&e->list);
> > + list_add_tail(&e->list, &tx_list);
>
> list_move_tail()
ack, I will fix it in v2.
>
> > + e->skb = i ? NULL : skb;
> > + e->dma_addr = addr;
> > + e->dma_len = len;
> > +
> > + e = list_first_entry(&q->tx_list, struct airoha_queue_entry,
> > + list);
> > + index = e - q->entry;
> >
> > val = FIELD_PREP(QDMA_DESC_LEN_MASK, len);
> > if (i < nr_frags - 1)
>
> > @@ -2029,10 +2020,14 @@ static netdev_tx_t airoha_dev_xmit(struct sk_buff *skb,
> > return NETDEV_TX_OK;
> >
> > error_unmap:
> > - for (i--; i >= 0; i--) {
> > - index = (q->head + i) % q->ndesc;
> > - dma_unmap_single(dev->dev.parent, q->entry[index].dma_addr,
> > - q->entry[index].dma_len, DMA_TO_DEVICE);
> > + while (!list_empty(&tx_list)) {
> > + e = list_first_entry(&tx_list, struct airoha_queue_entry,
> > + list);
> > + __list_del_entry(&e->list);
> > + dma_unmap_single(dev->dev.parent, e->dma_addr, e->dma_len,
> > + DMA_TO_DEVICE);
> > + e->dma_addr = 0;
> > + list_add_tail(&e->list, &q->tx_list);
>
> and here
ack, I will fix it in v2.
Regards,
Lorenzo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20251105/91a9a632/attachment.sig>
More information about the linux-arm-kernel
mailing list