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
| ||
|
Message-ID: <ZN9gvGTV4qXnFs3c@vergenet.net> Date: Fri, 18 Aug 2023 14:14:52 +0200 From: Simon Horman <horms@...nel.org> To: Vladimir Oltean <vladimir.oltean@....com> Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Xiaoliang Yang <xiaoliang.yang_1@....com>, Claudiu Manoil <claudiu.manoil@....com>, Alexandre Belloni <alexandre.belloni@...tlin.com>, UNGLinuxDriver@...rochip.com, Andrew Lunn <andrew@...n.ch>, Florian Fainelli <f.fainelli@...il.com>, Michael Walle <michael@...le.cc>, Richie Pearn <richard.pearn@....com>, linux-kernel@...r.kernel.org Subject: Re: [PATCH net] net: dsa: felix: fix oversize frame dropping for always closed tc-taprio gates On Thu, Aug 17, 2023 at 03:01:11PM +0300, Vladimir Oltean wrote: > The blamed commit resolved a bug where frames would still get stuck at > egress, even though they're smaller than the maxSDU[tc], because the > driver did not take into account the extra 33 ns that the queue system > needs for scheduling the frame. > > It now takes that into account, but the arithmetic that we perform in > vsc9959_tas_remaining_gate_len_ps() is buggy, because we operate on > 64-bit unsigned integers, so gate_len_ns - VSC9959_TAS_MIN_GATE_LEN_NS > may become a very large integer if gate_len_ns < 33 ns. > > In practice, this means that we've introduced a regression where all > traffic class gates which are permanently closed will not get detected > by the driver, and we won't enable oversize frame dropping for them. > > Before: > mscc_felix 0000:00:00.5: port 0: max frame size 1526 needs 12400000 ps, 1152000 ps for mPackets at speed 1000 > mscc_felix 0000:00:00.5: port 0 tc 0 min gate len 1000000, sending all frames > mscc_felix 0000:00:00.5: port 0 tc 1 min gate len 0, sending all frames > mscc_felix 0000:00:00.5: port 0 tc 2 min gate len 0, sending all frames > mscc_felix 0000:00:00.5: port 0 tc 3 min gate len 0, sending all frames > mscc_felix 0000:00:00.5: port 0 tc 4 min gate len 0, sending all frames > mscc_felix 0000:00:00.5: port 0 tc 5 min gate len 0, sending all frames > mscc_felix 0000:00:00.5: port 0 tc 6 min gate len 0, sending all frames > mscc_felix 0000:00:00.5: port 0 tc 7 min gate length 5120 ns not enough for max frame size 1526 at 1000 Mbps, dropping frames over 615 octets including FCS > > After: > mscc_felix 0000:00:00.5: port 0: max frame size 1526 needs 12400000 ps, 1152000 ps for mPackets at speed 1000 > mscc_felix 0000:00:00.5: port 0 tc 0 min gate len 1000000, sending all frames > mscc_felix 0000:00:00.5: port 0 tc 1 min gate length 0 ns not enough for max frame size 1526 at 1000 Mbps, dropping frames over 1 octets including FCS > mscc_felix 0000:00:00.5: port 0 tc 2 min gate length 0 ns not enough for max frame size 1526 at 1000 Mbps, dropping frames over 1 octets including FCS > mscc_felix 0000:00:00.5: port 0 tc 3 min gate length 0 ns not enough for max frame size 1526 at 1000 Mbps, dropping frames over 1 octets including FCS > mscc_felix 0000:00:00.5: port 0 tc 4 min gate length 0 ns not enough for max frame size 1526 at 1000 Mbps, dropping frames over 1 octets including FCS > mscc_felix 0000:00:00.5: port 0 tc 5 min gate length 0 ns not enough for max frame size 1526 at 1000 Mbps, dropping frames over 1 octets including FCS > mscc_felix 0000:00:00.5: port 0 tc 6 min gate length 0 ns not enough for max frame size 1526 at 1000 Mbps, dropping frames over 1 octets including FCS > mscc_felix 0000:00:00.5: port 0 tc 7 min gate length 5120 ns not enough for max frame size 1526 at 1000 Mbps, dropping frames over 615 octets including FCS > > Fixes: 11afdc6526de ("net: dsa: felix: tc-taprio intervals smaller than MTU should send at least one packet") > Signed-off-by: Vladimir Oltean <vladimir.oltean@....com> Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists