[PATCH net-next 5/5] net: enetc: add support for flow control

Claudiu Manoil claudiu.manoil at nxp.com
Mon Apr 19 10:07:23 BST 2021



>-----Original Message-----
>From: Vladimir Oltean <olteanv at gmail.com>
>Sent: Saturday, April 17, 2021 2:42 AM
>To: Jakub Kicinski <kuba at kernel.org>; David S. Miller
><davem at davemloft.net>; netdev at vger.kernel.org; Po Liu
><po.liu at nxp.com>
>Cc: Claudiu Manoil <claudiu.manoil at nxp.com>; Alexandru Marginean
><alexandru.marginean at nxp.com>; Rob Herring <robh+dt at kernel.org>;
>Shawn Guo <shawnguo at kernel.org>; linux-arm-kernel at lists.infradead.org;
>devicetree at vger.kernel.org; Russell King - ARM Linux admin
><linux at armlinux.org.uk>; Andrew Lunn <andrew at lunn.ch>; Michael Walle
><michael at walle.cc>; Vladimir Oltean <vladimir.oltean at nxp.com>
>Subject: [PATCH net-next 5/5] net: enetc: add support for flow control
>
>From: Vladimir Oltean <vladimir.oltean at nxp.com>
>
>In the ENETC receive path, a frame received by the MAC is first stored
>in a 256KB 'FIFO' memory, then transferred to DRAM when enqueuing it to
>the RX ring. The FIFO is a shared resource for all ENETC ports, but
>every port keeps track of its own memory utilization, on RX and on TX.
>
>There is a setting for RX rings through which they can either operate in
>'lossy' mode (where the lack of a free buffer causes an immediate
>discard of the frame) or in 'lossless' mode (where the lack of a free
>buffer in the ring makes the frame stay longer in the FIFO).
>
>In turn, when the memory utilization of the FIFO exceeds a certain
>margin, the MAC can be configured to emit PAUSE frames.
>
>There is enough FIFO memory to buffer up to 3 MTU-sized frames per RX
>port while not jeopardizing the other use cases (jumbo frames), and
>also not consume bytes from the port TX allocations. Also, 3 MTU-sized
>frames worth of memory is enough to ensure zero loss for 64 byte packets
>at 1G line rate.
>
>Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>

Reviewed-by: Claudiu Manoil <claudiu.manoil at nxp.com>



More information about the linux-arm-kernel mailing list