mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Furong Xu <0x1207@gmail.com>
Cc: <netdev@vger.kernel.org>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, "Simon Horman" <horms@kernel.org>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Jose Abreu <joabreu@synopsys.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"Maxime Coquelin" <mcoquelin.stm32@gmail.com>, <xfr@outlook.com>
Subject: Re: [PATCH net-next v1] net: stmmac: Drop useless code related to ethtool rx-copybreak
Date: Wed, 18 Dec 2024 16:48:38 +0100	[thread overview]
Message-ID: <b2ae6b80-83e3-4b22-8301-c91569c89494@intel.com> (raw)
In-Reply-To: <20241218083407.390509-1-0x1207@gmail.com>

From: Furong Xu <0x1207@gmail.com>
Date: Wed, 18 Dec 2024 16:34:07 +0800

> After commit 2af6106ae949 ("net: stmmac: Introducing support for Page
> Pool"), the driver always copies frames to get a better performance,
> zero-copy for RX frames is no more, then these code turned to be
> useless and users of ethtool may get confused about the unhandled
> rx-copybreak parameter.
> 
> This patch mostly reverts
> commit 22ad38381547 ("stmmac: do not perform zero-copy for rx frames")
> 
> Signed-off-by: Furong Xu <0x1207@gmail.com>

The patch itself is fine, *but*

> ---
>  drivers/net/ethernet/stmicro/stmmac/stmmac.h  |  2 -
>  .../ethernet/stmicro/stmmac/stmmac_ethtool.c  | 39 -------------------
>  .../net/ethernet/stmicro/stmmac/stmmac_main.c |  5 ---
>  3 files changed, 46 deletions(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
> index 1d86439b8a14..b8d631e559c0 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
> @@ -126,7 +126,6 @@ struct stmmac_rx_queue {
>  	unsigned int cur_rx;
>  	unsigned int dirty_rx;
>  	unsigned int buf_alloc_num;
> -	u32 rx_zeroc_thresh;
>  	dma_addr_t dma_rx_phy;

If sizeof(dma_addr_t) == 8, you're clearly introducing a 4-byte hole
here. Perhaps you could reshuffle the struct a bit to avoid this.

It's always good to inspect the .kos with pahole after modifying
structures to make sure there are no regressions.

>  	u32 rx_tail_addr;
>  	unsigned int state_saved;

Thanks,
Olek

  reply	other threads:[~2024-12-18 15:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-18  8:34 Furong Xu
2024-12-18 15:48 ` Alexander Lobakin [this message]
2024-12-19  0:42   ` Jakub Kicinski
2024-12-19 14:20     ` Alexander Lobakin
2024-12-20  3:30 ` patchwork-bot+netdevbpf

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=b2ae6b80-83e3-4b22-8301-c91569c89494@intel.com \
    --to=aleksander.lobakin@intel.com \
    --cc=0x1207@gmail.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=joabreu@synopsys.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=xfr@outlook.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

all inboxes | Powered by JetHome®