lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6whu7jzxigyqmnk5424ltu3tpdnlgetpqv6nvfbaxvlw2nseq4@y2vi3c56o3dd>
Date: Fri, 20 Dec 2024 21:47:05 +0530
From: Siddharth Vadapalli <s-vadapalli@...com>
To: Przemek Kitszel <przemyslaw.kitszel@...el.com>
CC: Siddharth Vadapalli <s-vadapalli@...com>, <stable@...r.kernel.org>,
        <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <andrew+netdev@...n.ch>, <davem@...emloft.net>, <edumazet@...gle.com>,
        <kuba@...nel.org>, <pabeni@...hat.com>, <rogerq@...nel.org>,
        <horms@...nel.org>, <dan.carpenter@...aro.org>, <c-vankar@...com>,
        <jpanis@...libre.com>, <npitre@...libre.com>,
        <linux-arm-kernel@...ts.infradead.org>, <vigneshr@...com>,
        <srk@...com>
Subject: Re: [PATCH net] net: ethernet: ti: am65-cpsw: default to round-robin
 for host port receive

On Fri, Dec 20, 2024 at 11:41:26AM +0100, Przemek Kitszel wrote:
> On 12/20/24 08:56, Siddharth Vadapalli wrote:
> > The Host Port (i.e. CPU facing port) of CPSW receives traffic from Linux
> > via TX DMA Channels which are Hardware Queues consisting of traffic
> > categorized according to their priority. The Host Port is configured to
> > dequeue traffic from these Hardware Queues on the basis of priority i.e.
> > as long as traffic exists on a Hardware Queue of a higher priority, the
> > traffic on Hardware Queues of lower priority isn't dequeued. An alternate
> > operation is also supported wherein traffic can be dequeued by the Host
> > Port in a Round-Robin manner.
> > 
> > Until [0], the am65-cpsw driver enabled a single TX DMA Channel, due to
> > which, unless modified by user via "ethtool", all traffic from Linux is
> > transmitted on DMA Channel 0. Therefore, configuring the Host Port for
> > priority based dequeuing or Round-Robin operation is identical since
> > there is a single DMA Channel.
> > 
> > Since [0], all 8 TX DMA Channels are enabled by default. Additionally,
> > the default "tc mapping" doesn't take into account the possibility of
> > different traffic profiles which various users might have. This results
> > in traffic starvation at the Host Port due to the priority based dequeuing
> > which has been enabled by default since the inception of the driver. The
> > traffic starvation triggers NETDEV WATCHDOG timeout for all TX DMA Channels
> > that haven't been serviced due to the presence of traffic on the higher
> > priority TX DMA Channels.
> 
> I get it right that the starving is caused by HW/DMA (not SW)

Yes. The CPSW Host Port in Hardware can be configured to dequeue packets
queued onto the DMA Channels by Linux in either a Priority-based manner
or Round-Robin manner. Linux is submitting the packets onto the TX DMA
Channels to be received by CPSW, with CPSW's Host Port dequeuing them
in one of the two modes (fixed priority or round-robin) that has been
programmed.

> 
> > 
> > Fix this by defaulting to Round-Robin dequeuing at the Host Port, which
> > shall ensure that traffic is dequeued from all TX DMA Channels irrespective
> > of the traffic profile. This will address the NETDEV WATCHDOG timeouts.
> > At the same time, users can still switch from Round-Robin to Priority
> > based dequeuing at the Host Port with the help of the "p0-rx-ptype-rrobin"
> 
> why the flag has rx in the name?

The "rx" corresponds to "receive" w.r.t. the Host Port (P0). As indicated
in the $subject of this patch, we are defaulting to "Round-Robin" (rrobin)
mode of operation of Host Port dequeuing i.e. packets received by the Host
Port from Linux are to be dequeued in a Round-Robin manner from each of the
TX DMA Channels (TX from Linux's perspective). As for the naming convention
being followed, it is based on the Techincal Reference Manual.

[...]

Regards,
Siddharth.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ