[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CO1PR11MB4771248BAF7FF5EF4331F688D5459@CO1PR11MB4771.namprd11.prod.outlook.com>
Date: Fri, 23 Apr 2021 22:03:58 +0000
From: "Ismail, Mohammad Athari" <mohammad.athari.ismail@...el.com>
To: Vladimir Oltean <olteanv@...il.com>
CC: Alexandre Torgue <alexandre.torgue@...com>,
Jose Abreu <joabreu@...opsys.com>,
"David S . Miller" <davem@...emloft.net>,
"Jakub Kicinski" <kuba@...nel.org>, Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"Ong, Boon Leong" <boon.leong.ong@...el.com>,
"Voon, Weifeng" <weifeng.voon@...el.com>,
"Wong, Vee Khee" <vee.khee.wong@...el.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2 net-next] net: pcs: Enable pre-emption packet for
10/100Mbps
Hi Vladimir,
> -----Original Message-----
> From: Vladimir Oltean <olteanv@...il.com>
> Sent: Saturday, April 24, 2021 2:12 AM
> To: Ismail, Mohammad Athari <mohammad.athari.ismail@...el.com>
> Cc: Alexandre Torgue <alexandre.torgue@...com>; Jose Abreu
> <joabreu@...opsys.com>; David S . Miller <davem@...emloft.net>; Jakub
> Kicinski <kuba@...nel.org>; Andrew Lunn <andrew@...n.ch>; Heiner Kallweit
> <hkallweit1@...il.com>; Russell King <linux@...linux.org.uk>; Ong, Boon
> Leong <boon.leong.ong@...el.com>; Voon, Weifeng
> <weifeng.voon@...el.com>; Wong, Vee Khee <vee.khee.wong@...el.com>;
> netdev@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH v2 net-next] net: pcs: Enable pre-emption packet for
> 10/100Mbps
>
> On Fri, Apr 23, 2021 at 09:30:07AM +0000, Ismail, Mohammad Athari wrote:
> > Hi Vladimir,
> >
> > > -----Original Message-----
> > > From: Vladimir Oltean <olteanv@...il.com>
> > > Sent: Friday, April 23, 2021 8:53 AM
> > > To: Ismail, Mohammad Athari <mohammad.athari.ismail@...el.com>
> > > Cc: Alexandre Torgue <alexandre.torgue@...com>; Jose Abreu
> > > <joabreu@...opsys.com>; David S . Miller <davem@...emloft.net>;
> > > Jakub Kicinski <kuba@...nel.org>; Andrew Lunn <andrew@...n.ch>;
> > > Heiner Kallweit <hkallweit1@...il.com>; Russell King
> > > <linux@...linux.org.uk>; Ong, Boon Leong <boon.leong.ong@...el.com>;
> > > Voon, Weifeng <weifeng.voon@...el.com>; Wong, Vee Khee
> > > <vee.khee.wong@...el.com>; netdev@...r.kernel.org;
> > > linux-kernel@...r.kernel.org
> > > Subject: Re: [PATCH v2 net-next] net: pcs: Enable pre-emption packet
> > > for 10/100Mbps
> > >
> > > On Fri, Apr 23, 2021 at 12:45:25AM +0000, Ismail, Mohammad Athari wrote:
> > > > Hi Vladimir,
> > > >
> > > > > -----Original Message-----
> > > > > From: Vladimir Oltean <olteanv@...il.com>
> > > > > Sent: Friday, April 23, 2021 7:53 AM
> > > > > To: Ismail, Mohammad Athari <mohammad.athari.ismail@...el.com>
> > > > > Cc: Alexandre Torgue <alexandre.torgue@...com>; Jose Abreu
> > > > > <joabreu@...opsys.com>; David S . Miller <davem@...emloft.net>;
> > > > > Jakub Kicinski <kuba@...nel.org>; Andrew Lunn <andrew@...n.ch>;
> > > > > Heiner Kallweit <hkallweit1@...il.com>; Russell King
> > > > > <linux@...linux.org.uk>; Ong, Boon Leong
> > > > > <boon.leong.ong@...el.com>; Voon, Weifeng
> > > > > <weifeng.voon@...el.com>; Wong, Vee Khee
> > > > > <vee.khee.wong@...el.com>; netdev@...r.kernel.org;
> > > > > linux-kernel@...r.kernel.org
> > > > > Subject: Re: [PATCH v2 net-next] net: pcs: Enable pre-emption
> > > > > packet for 10/100Mbps
> > > > >
> > > > > Hi Mohammad,
> > > > >
> > > > > On Fri, Apr 23, 2021 at 07:06:45AM +0800,
> > > > > mohammad.athari.ismail@...el.com
> > > > > wrote:
> > > > > > From: Mohammad Athari Bin Ismail
> > > > > > <mohammad.athari.ismail@...el.com>
> > > > > >
> > > > > > Set VR_MII_DIG_CTRL1 bit-6(PRE_EMP) to enable pre-emption
> > > > > > packet for 10/100Mbps by default. This setting doesn`t impact
> > > > > > pre-emption capability for other speeds.
> > > > > >
> > > > > > Signed-off-by: Mohammad Athari Bin Ismail
> > > > > > <mohammad.athari.ismail@...el.com>
> > > > > > ---
> > > > >
> > > > > What is a "pre-emption packet"?
> > > >
> > > > In IEEE 802.1 Qbu (Frame Preemption), pre-emption packet is used
> > > > to differentiate between MAC Frame packet, Express Packet,
> > > > Non-fragmented Normal Frame Packet, First Fragment of Preemptable
> > > > Packet, Intermediate Fragment of Preemptable Packet and Last
> > > > Fragment of Preemptable Packet.
> > >
> > > Citation needed, which clause are you referring to?
> >
> > Cited from IEEE802.3-2018 Clause 99.3.
>
> Aha, you know that what you just said is not what's in the "MAC Merge sublayer"
> clause, right? There is no such thing as "pre-emption packet"
> in the standard, this is a made-up name, maybe preemptable packets, but the
> definition of preemptable packets is not that, hence my question.
>
Thank you for the knowledge sharing. My guess, this "pre-emption packet" might be referring to "preamble" byte in Ethernet frame.
> > >
> > > >
> > > > This bit "VR_MII_DIG_CTRL1 bit-6(PRE_EMP)" defined in DesignWare
> > > > Cores Ethernet PCS Databook is to allow the IP to properly
> > > > receive/transmit pre-emption packets in SGMII 10M/100M Modes.
> > >
> > > Shouldn't everything be handled at the MAC merge sublayer? What
> > > business does the PCS have in frame preemption?
> >
> > There is no further detail explained in the databook w.r.t to
> > VR_MII_DIG_CTRL1 bit-6(PRE_EMP). The only statement it mentions is
> > "This bit should be set to 1 to allow the DWC_xpcs to properly
> > receive/transmit pre-emption packets in SGMII 10M/100M Modes".
>
> Correct, I see this too. I asked our hardware design team, and at least on NXP
> LS1028A (no Synopsys PCS), the PCS layer has nothing to do with frame
> preemption, as mentioned.
>
> But indeed, I do see this obscure bit in the Digital Control 1 register too, I've no
> idea what it does. I'll ask around. Odd anyway. If you have to set it, you have to
> set it, I guess. But it is interesting to see why is it even a configurable bit, why it
> is not enabled by default, what is the drawback of enabling it?!
The databook states that the default value is 0. We don`t see any drawback of enabling it. As the databook mentions that, enabling the bit will allow SGMII 10/100M to receive/transmit preamble properly, so I think it is recommended to enable it for IP that support SGMII 10/100M speed.
>
> > >
> > > Also, I know it's easy to forget, but Vinicius' patch series for
> > > supporting frame preemption via ethtool wasn't accepted yet. How are you
> testing this?
> >
> > For stmmac Kernel driver, frame pre-emption capability is already
> > supported. For iproute2 (tc command), we are using custom patch based
> > on Vinicius patch.
>
> Don't you want to help contributing the ethtool netlink support to the mainline
> kernel though? :)
We are working with Vinicius to have ethtool support for frame pre-emption.
Powered by blists - more mailing lists