mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Charles Perry <charles.perry@microchip.com>
To: Vineeth Karumanchi <vineeth.karumanchi@amd.com>
Cc: Charles Perry <charles.perry@microchip.com>,
	<theo.lebrun@bootlin.com>, <conor.dooley@microchip.com>,
	<andrew+netdev@lunn.ch>, <davem@davemloft.net>,
	<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
	<git@amd.com>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <Arya.Zahed@microchip.com>
Subject: Re: [PATCH net-next v2 4/4] net: macb: Add TSN CBS TC offload support
Date: Thu, 12 Nov 2026 09:21:05 -0500	[thread overview]
Message-ID: <avXLURArdsgp0dw9@MON-LT-C78453.mchp-main.com> (raw)
In-Reply-To: <14e6511e-3878-4e14-8c25-7db5c179db8e@amd.com>

On Thu, Nov 12, 2026 at 03:39:26PM +0530, Vineeth Karumanchi wrote:
> Hi Charles,
> 
> On 11/10/2026 8:29 PM, Charles Perry wrote:
> > Hello Vineeth, 
> > 
> > On Wed, Sep 09, 2026 at 07:50:56PM +0530, Vineeth Karumanchi wrote:
> >> +
> >> +	/* qopt->idleslope is in kbps; convert to the units the hardware
> >> +	 * register expects:
> >> +	 * - High-speed GEM: fraction of port bandwidth, scaled to the full
> >> +	 *   32-bit register range
> >> +	 * - Standard MACB: the register counts bytes/sec in 1G (8-bit GMII)
> >> +	 *   mode and nibbles/sec in 10/100 (4-bit MII) mode, so scale kbps
> >> +	 *   by 1000/8 (125) or 1000/4 (250) respectively
> >> +	 */
> >> +	if (bp->caps & MACB_CAPS_HIGH_SPEED)
> >> +		idleslope = DIV_ROUND_UP_ULL((u64)qopt->idleslope * U32_MAX, speed_kbps);
> >> +	else
> >> +		idleslope = (u32)qopt->idleslope * (kset.base.speed >= 1000 ?
> >> +					       MACB_CBS_PORT_RATE_1G : MACB_CBS_PORT_RATE_10_100M);
> >> +
> > 
> > PIC64-HPSC, which has MACB_CAPS_HIGH_SPEED, doesn't have the first idle
> > slope calculation method which scales to the full 32 bits register range.
> > It uses nibble/sec for 10/100M, byte/sec for 1G, 2.5bytes/sec for 2.5G,
> > 5bytes/sec for 5G and 10bytes/sec for 10G.
> > 
> > Is it possible that you have another design config bit for the "full 32
> > bits register range" method used here?
> > 
> 
> The Cadence GEM revision `r1p14f2` in our implementation uses linear
> scaling across the full 32-bit idleSlope register range, as confirmed by
> Cadence support. However, the register description specifies only the
> second, speed-dependent formula, which does not match our observations.

Ok, on my side, Arya (cced) who did the testing confirmed that the measured
bandwidth is off with the 32-bits method. I think he tested at 1G.

> 
> I couldn’t find a configuration bit that distinguishes between these
> behaviors. Which Cadence IP revision is used in PIC64-HPSC?

r1p14f2a

The revision register reads: 0x220c010e
DCFG1: 08108510
DCFG2: 7af13fff
DCFG3: 24000000
DCFG4: 00000000
DCFG5: 502e7344
DCFG6: 0f9300fe
DCFG7: 00000000
DCFG8: 10100820
DCFG9: 00000000
DCFG10: 24454444
DCFG11: 000000f6
DCFG12: 37770101
DCFG13: 00037640

> 
> I can follow up with Cadence support to determine how software can
> identify which encoding applies.

Cool! Thank you.

> 
> Thanks,
> -- 
> 🙏 Vineeth
> 

-- 
Thanks,
Charles

      reply	other threads:[~2026-11-12 14:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-09 14:20 [PATCH net-next v2 0/4] net: macb: Add TSN MQPRIO and CBS traffic-class offload Vineeth Karumanchi
2026-09-09 14:20 ` [PATCH net-next v2 1/4] net: macb: Rename MACB_CAPS_QBV to MACB_CAPS_TC Vineeth Karumanchi
2026-09-17  9:37   ` Théo Lebrun
2026-09-09 14:20 ` [PATCH net-next v2 2/4] net: macb: Move TC capability and PM checks to macb_setup_tc() Vineeth Karumanchi
2026-09-10 14:44   ` netdev-bot+sashiko
2026-09-15 13:40     ` Karumanchi, Vineeth
2026-09-09 14:20 ` [PATCH net-next v2 3/4] net: macb: Add MQPRIO qdisc hardware offload support Vineeth Karumanchi
2026-09-10 14:44   ` netdev-bot+sashiko
2026-09-17  9:22   ` Théo Lebrun
2026-09-17 13:57     ` Karumanchi, Vineeth
2026-09-09 14:20 ` [PATCH net-next v2 4/4] net: macb: Add TSN CBS TC " Vineeth Karumanchi
2026-09-10 14:44   ` netdev-bot+sashiko
2026-09-17  9:32   ` Théo Lebrun
2026-10-08 15:27     ` Karumanchi, Vineeth
2026-11-10 14:59   ` Charles Perry
2026-11-12 10:09     ` Vineeth Karumanchi
2026-11-12 14:21       ` Charles Perry [this message]

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=avXLURArdsgp0dw9@MON-LT-C78453.mchp-main.com \
    --to=charles.perry@microchip.com \
    --cc=Arya.Zahed@microchip.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=conor.dooley@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=git@amd.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=theo.lebrun@bootlin.com \
    --cc=vineeth.karumanchi@amd.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®