# Re: \[PATCH net-next\] net: dsa: felix: enable cut-through forwarding between ports by default

- From: Vladimir Oltean \<vladimir.oltean@nxp.com\>
- Date: 2021-11-18 19:00:16 
- List: netdev
- Page: https://ratatoskr.run/netdev/2021/11/11216482
- Thread: https://ratatoskr.run/netdev/2021/11/11216481/t.md

```text
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@nxp.com>
> ---

I forgot to mark this as such, but please treat it as RFC (aka do not
apply just yet).
```
