From: Andrew Lunn <andrew@lunn.ch>
To: Wei Fang <wei.fang@nxp.com>
Cc: Alexander Lobakin <alexandr.lobakin@intel.com>,
Shenwei Wang <shenwei.wang@nxp.com>,
Clark Wang <xiaoning.wang@nxp.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"simon.horman@corigine.com" <simon.horman@corigine.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
dl-linux-imx <linux-imx@nxp.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V2 net-next] net: fec: add CBS offload support
Date: Sat, 18 Feb 2023 02:15:51 +0100 [thread overview]
Message-ID: <Y/Amx27oh9Z1uMSp@lunn.ch> (raw)
In-Reply-To: <DB9PR04MB810629C2CEB106787D6A2B8C88A09@DB9PR04MB8106.eurprd04.prod.outlook.com>
> I have tested the pure software CBS today. And below are the test steps and results.
> Link speed 100Mbps.
> Queue 0: Non-CBS queue, 100Mbps traffic.
> Queue 1: CBS queue, 7Mbps bandwidth and 8Mbps traffic.
> Queue 2: CBS queue, 5Mbps bandwidth and 6Mbps traffic.
> Results: queue 0 egress rate is 86Mbps, queue 1 egress rate is 6Mbps, and queue 2
> egress rate is 4Mbps.
> Then change the link speed to 10Mbps, queue 0 egress rate is 4Mbps, queue 1 egress
> rate is 4Mbps, and queue 2 egress rate is 3Mbps.
>
> Beside the test results, I also checked the CBS codes. Unlike hardware implementation,
> the pure software method is more flexible, it has four parameters: idleslope, sendslope,
> locredit and hicredit. And it can detect the change of link speed and do some adjust.
> However, for hardware we only use the idleslope parameter. It's hard for us to make
> the hardware behave as the pure software when the link speed changes.
> So for the question: Should the hardware just give up and go back to default behaviour,
> or should it continue to do some CBS?
If you give up on hardware CBS, does the software version take over?
The idea of hardware offload is that the user should not care, nor
really notice. You want the software and hardware behaviour to be
similar.
> I think that we can refer to the behaviors of stmmac and enetc drivers, just keep the
> bandwidth ratio constant when the link rate changes. In addition, the link speed change
> is a corner case, there is no need to spend any more effort to discuss this matter.
It is a corner case, but it is an important one. You need it to do
something sensible. Giving up all together is not sensible. Falling
back to software CBS would be sensible, or supporting something
similar to the software CBS.
Andrew
next prev parent reply other threads:[~2023-02-18 1:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 9:29 [PATCH V2 net-next] net: fec: add CBS offload support wei.fang
2023-02-13 13:32 ` Andrew Lunn
2023-02-14 8:02 ` Wei Fang
2023-02-13 16:04 ` Alexander Lobakin
2023-02-13 16:21 ` Andrew Lunn
2023-02-13 17:44 ` Alexander Lobakin
2023-02-13 18:07 ` Andrew Lunn
2023-02-14 13:22 ` Wei Fang
2023-02-14 14:28 ` Andrew Lunn
2023-02-16 12:43 ` Wei Fang
2023-02-18 1:15 ` Andrew Lunn [this message]
2023-02-18 1:59 ` Wei Fang
2023-02-21 2:25 ` Andrew Lunn
2023-02-14 9:34 ` Wei Fang
2023-02-14 13:49 ` Andrew Lunn
2023-02-14 16:49 ` Alexander Lobakin
2023-02-16 13:03 ` Wei Fang
2023-02-16 15:28 ` Alexander Lobakin
2023-02-17 2:18 ` Wei Fang
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=Y/Amx27oh9Z1uMSp@lunn.ch \
--to=andrew@lunn.ch \
--cc=alexandr.lobakin@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shenwei.wang@nxp.com \
--cc=simon.horman@corigine.com \
--cc=wei.fang@nxp.com \
--cc=xiaoning.wang@nxp.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).