Netdev List
 help / color / mirror / Atom feed
From: Michael Opdenacker <michael.opdenacker@rootcommit.com>
To: Vivian Wang <wangruikang@iscas.ac.cn>,
	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>,
	Yixun Lan <dlan@gentoo.org>,
	Maxime Chevallier <maxime.chevallier@bootlin.com>,
	Vadim Fedorenko <vadim.fedorenko@linux.dev>,
	Troy Mitchell <troy.mitchell@linux.spacemit.com>
Cc: michael.opdenacker@rootcommit.com, netdev@vger.kernel.org,
	linux-riscv@lists.infradead.org, spacemit@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: spacemit: Implement emac_set_pauseparam properly
Date: Thu, 30 Oct 2025 20:30:42 +0000 (UTC)	[thread overview]
Message-ID: <b0624cd1-c223-459b-81dd-ddfe05ea23bf@rootcommit.com> (raw)
In-Reply-To: <20251030-k1-ethernet-fix-autoneg-v1-1-baa572607ccc@iscas.ac.cn>


On 10/30/25 15:31, Vivian Wang wrote:
> emac_set_pauseparam (the set_pauseparam callback) didn't properly update
> phydev->advertising. Fix it by changing it to call phy_set_asym_pause.
>
> Also simplify/reorganize related code around this.
>
> Fixes: bfec6d7f2001 ("net: spacemit: Add K1 Ethernet MAC")
> Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
> ---
>   drivers/net/ethernet/spacemit/k1_emac.c | 48 ++++++++++++++-------------------
>   1 file changed, 20 insertions(+), 28 deletions(-)


Tested on OrangePi RV2 through performance tests, on 
https://github.com/spacemit-com/linux/commits/for-next. No regressions 
found:

root@orangepi-rv2-mainline:~# iperf3 -c 172.24.0.1
Connecting to host 172.24.0.1, port 5201
[  5] local 172.24.0.2 port 49948 connected to 172.24.0.1 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   113 MBytes   946 Mbits/sec    0    339 KBytes
[  5]   1.00-2.00   sec   112 MBytes   943 Mbits/sec    0    447 KBytes
[  5]   2.00-3.00   sec   113 MBytes   948 Mbits/sec    0    447 KBytes
[  5]   3.00-4.00   sec   112 MBytes   941 Mbits/sec    0    475 KBytes
[  5]   4.00-5.00   sec   112 MBytes   940 Mbits/sec    0    505 KBytes
[  5]   5.00-6.00   sec   112 MBytes   944 Mbits/sec    0    567 KBytes
[  5]   6.00-7.00   sec   113 MBytes   949 Mbits/sec    0    600 KBytes
[  5]   7.00-8.00   sec   112 MBytes   939 Mbits/sec    0    600 KBytes
[  5]   8.00-9.00   sec   112 MBytes   936 Mbits/sec    0    600 KBytes
[  5]   9.00-10.01  sec   113 MBytes   940 Mbits/sec    0    600 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.01  sec  1.10 GBytes   943 Mbits/sec    0   sender
[  5]   0.00-10.02  sec  1.10 GBytes   940 Mbits/sec     receiver

iperf Done.
root@orangepi-rv2-mainline:~# iperf3 -s
-----------------------------------------------------------
Server listening on 5201 (test #1)
-----------------------------------------------------------
Accepted connection from 172.24.0.1, port 47834
[  5] local 172.24.0.2 port 5201 connected to 172.24.0.1 port 47840
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec   112 MBytes   934 Mbits/sec
[  5]   1.00-2.00   sec   112 MBytes   941 Mbits/sec
[  5]   2.00-3.00   sec   112 MBytes   942 Mbits/sec
[  5]   3.00-4.00   sec   112 MBytes   942 Mbits/sec
[  5]   4.00-5.00   sec   112 MBytes   942 Mbits/sec
[  5]   5.00-6.00   sec   112 MBytes   942 Mbits/sec
[  5]   6.00-7.00   sec   112 MBytes   942 Mbits/sec
[  5]   7.00-8.00   sec   112 MBytes   942 Mbits/sec
[  5]   8.00-9.00   sec   112 MBytes   941 Mbits/sec
[  5]   9.00-10.00  sec   112 MBytes   942 Mbits/sec
[  5]  10.00-10.01  sec   640 KBytes  1.04 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.01  sec  1.10 GBytes   941 Mbits/sec     receiver
-----------------------------------------------------------
Server listening on 5201 (test #2)
-----------------------------------------------------------

Tested-by: Michael Opdenacker <michael.opdenacker@rootcommit.com>
Thanks!
Michael.

-- 
Michael Opdenacker
Root Commit
Yocto Project and OpenEmbedded Training course - Learn by doing:
https://rootcommit.com/training/yocto/


  reply	other threads:[~2025-10-30 20:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-30 14:31 [PATCH net] net: spacemit: Implement emac_set_pauseparam properly Vivian Wang
2025-10-30 20:30 ` Michael Opdenacker [this message]
2025-10-30 21:32 ` Andrew Lunn
2025-10-31  7:22   ` Vivian Wang
2025-10-31 12:43     ` Andrew Lunn
2025-10-31 13:29       ` Vivian Wang

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=b0624cd1-c223-459b-81dd-ddfe05ea23bf@rootcommit.com \
    --to=michael.opdenacker@rootcommit.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dlan@gentoo.org \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=spacemit@lists.linux.dev \
    --cc=troy.mitchell@linux.spacemit.com \
    --cc=vadim.fedorenko@linux.dev \
    --cc=wangruikang@iscas.ac.cn \
    /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