[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20211118190012.dvmdrw7upisna2na@skbuf>
Date: Thu, 18 Nov 2021 19:00:13 +0000
From: Vladimir Oltean <vladimir.oltean@....com>
To: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Claudiu Manoil <claudiu.manoil@....com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
"UNGLinuxDriver@...rochip.com" <UNGLinuxDriver@...rochip.com>,
Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Xiaoliang Yang <xiaoliang.yang_1@....com>
Subject: Re: [PATCH net-next] net: dsa: felix: enable cut-through forwarding
between ports by default
On Thu, Nov 18, 2021 at 08:53:52PM +0200, Vladimir Oltean wrote:
> The VSC9959 switch embedded within NXP LS1028A (and that version of
> Ocelot switches only) supports cut-through forwarding - meaning it can
> start the process of looking up the destination ports for a packet, and
> forward towards those ports, before the entire packet has been received
> (as opposed to the store-and-forward mode).
>
> The up side is having lower forwarding latency for large packets. The
> down side is that frames with FCS errors are forwarded instead of being
> dropped. However, erroneous frames do not result in incorrect updates of
> the FDB or incorrect policer updates, since these are processes are
> deferred inside the switch to the end of frame. Since the switch starts
> the cut-through forwarding process after all packet headers (including
> IP, if any) have been processed, packets with large headers and small
> payload do not see the benefit of lower forwarding latency.
>
> There are two cases that need special attention.
>
> The first is when a packet is multicast (or flooded) to multiple
> destinations, one of which doesn't have cut-through forwarding enabled.
> The switch deals with this automatically by disabling cut-through
> forwarding for the frame towards all destination ports.
>
> The second is when a packet is forwarded from a port of lower link speed
> towards a port of higher link speed. This is not handled by the hardware
> and needs software intervention.
>
> Enabling cut-through forwarding is done per {egress port, traffic class}.
> I don't see any reason why this would be a configurable option as long
> as it works without issues, and there doesn't appear to be any user
> space configuration tool to toggle this on/off, so this patch enables
> cut-through forwarding on all eligible ports and traffic classes.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
> ---
I forgot to mark this as such, but please treat it as RFC (aka do not
apply just yet).
Powered by blists - more mailing lists