public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Valerio <pvalerio@redhat.com>
To: Nicolai Buchwitz <nb@tipi-net.de>
Cc: netdev@vger.kernel.org, Nicolai Buchwitz <nb@tipi-net.de>
Subject: Re: [PATCH v4 7/8] net: macb: add XDP support for gem
Date: Wed, 11 Mar 2026 17:51:22 +0100	[thread overview]
Message-ID: <87cy1acnsl.fsf@redhat.com> (raw)
In-Reply-To: <20260310232119.1254817-1-nb@tipi-net.de>

On 11 Mar 2026 at 12:21:19 AM, Nicolai Buchwitz <nb@tipi-net.de> wrote:

> Hi Paolo,
>
> Nice series! One issue I spotted that interacts with the EEE support
> that's currently in net-next:
>

Hi Nicolai,

>> +	spin_lock(&bp->lock);
>> +	macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(TSTART));
>> +	spin_unlock(&bp->lock);
>
> macb_xdp_submit_frame() writes TSTART without first waking the MAC
> from LPI. The regular TX path in macb_start_xmit() calls
> macb_tx_lpi_wake(bp) before TSTART for this reason -- the GEM MAC
> has no auto-wake mechanism, so when TXLPIEN is set in NCR, TX is
> blocked and frames will sit in the FIFO indefinitely.
>
> This affects XDP_TX, XDP_REDIRECT and ndo_xdp_xmit. The fix should
> be straightforward:
>
> 	spin_lock(&bp->lock);
> 	macb_tx_lpi_wake(bp);
> 	macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(TSTART));
> 	spin_unlock(&bp->lock);
>
> macb_tx_lpi_wake() is a no-op when EEE is not active, so there's no
> overhead in the non-EEE case.
>

good catch! I'll make sure to add it to the next version, thanks.


  reply	other threads:[~2026-03-11 16:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 14:43 [PATCH net-next v4 0/8] net: macb: Add XDP support and page pool integration Paolo Valerio
2026-03-09 14:43 ` [PATCH net-next v4 1/8] net: macb: move Rx buffers alloc from link up to open Paolo Valerio
2026-03-09 14:43 ` [PATCH net-next v4 2/8] net: macb: rename rx_skbuff into rx_buff Paolo Valerio
2026-03-09 14:43 ` [PATCH net-next v4 3/8] net: macb: Add page pool support handle multi-descriptor frame rx Paolo Valerio
2026-03-09 14:43 ` [PATCH net-next v4 4/8] net: macb: use the current queue number for stats Paolo Valerio
2026-03-09 14:43 ` [PATCH net-next v4 5/8] net: macb: make macb_tx_skb generic Paolo Valerio
2026-03-09 14:43 ` [PATCH net-next v4 6/8] net: macb: generalize tx buffer handling Paolo Valerio
2026-03-09 14:43 ` [PATCH net-next v4 7/8] net: macb: add XDP support for gem Paolo Valerio
2026-03-10 23:21   ` [PATCH " Nicolai Buchwitz
2026-03-11 16:51     ` Paolo Valerio [this message]
2026-03-09 14:43 ` [PATCH net-next v4 8/8] net: macb: introduce ndo_xdp_xmit support Paolo Valerio

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=87cy1acnsl.fsf@redhat.com \
    --to=pvalerio@redhat.com \
    --cc=nb@tipi-net.de \
    --cc=netdev@vger.kernel.org \
    /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