linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, netdev@vger.kernel.org,
	Xuegang Lu <xuegang.lu@airoha.com>
Subject: Re: [PATCH net-next 1/2] net: airoha: Add the capability to consume out-of-order DMA tx descriptors
Date: Wed, 5 Nov 2025 09:18:27 +0100	[thread overview]
Message-ID: <aQsIUzZOJxMV5UDP@lore-desk> (raw)
In-Reply-To: <20251104183028.7412aba6@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 1268 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2025-11-05  8:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-03 10:27 [PATCH net-next 0/2] net: airoha: Allow mapping out-of-order DMA tx descriptors Lorenzo Bianconi
2025-11-03 10:27 ` [PATCH net-next 1/2] net: airoha: Add the capability to consume " Lorenzo Bianconi
2025-11-03 23:32   ` Jacob Keller
2025-11-05  2:30   ` Jakub Kicinski
2025-11-05  8:18     ` Lorenzo Bianconi [this message]
2025-11-03 10:27 ` [PATCH net-next 2/2] net: airoha: Reorganize airoha_queue struct Lorenzo Bianconi
2025-11-03 23:36   ` Jacob Keller
2025-11-05  2:32   ` Jakub Kicinski
2025-11-05  7:53     ` Lorenzo Bianconi
2025-11-06  0:28       ` Jakub Kicinski
2025-11-06  8:27         ` Lorenzo Bianconi

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=aQsIUzZOJxMV5UDP@lore-desk \
    --to=lorenzo@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=xuegang.lu@airoha.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).