mbox series

[net,0/3] Fix dropping of oversize preemptible frames with felix DSA driver

Message ID 20230705104422.49025-1-vladimir.oltean@nxp.com (mailing list archive)
Headers show
Series Fix dropping of oversize preemptible frames with felix DSA driver | expand

Message

Vladimir Oltean July 5, 2023, 10:44 a.m. UTC
It has been reported that preemptible traffic doesn't completely behave
as expected. Namely, large packets should be able to be squeezed
(through fragmentation) through taprio time slots smaller than the
transmission time of the full frame. That does not happen due to logic
in the driver (for oversize frame dropping with taprio) that was not
updated in order for this use case to work.

I am not sure whether it qualifies as "net" material, because some
structural changes are involved, and it is a "never worked" scenario.
OTOH, this is a complaint coming from users for a v6.4 kernel.
It's up to maintainers to decide whether this series can be considered;
I've submitted it as non-RFC in the optimistic case that it will be :)

Demo script illustrating the issue below.

#!/bin/bash

add_taprio()
{
	local ifname=$1

	echo "Creating root taprio"
	tc qdisc replace dev $ifname handle 8001: parent root stab overhead 24 taprio \
		num_tc 8 \
		map 0 1 2 3 4 5 6 7 \
		queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 \
		base-time 0 \
		sched-entry S 01 1216 \
		sched-entry S fe 12368 \
		fp P E E E E E E E \
		flags 0x2
}

remove_taprio()
{
	local ifname=$1

	echo "Removing taprio"
	tc qdisc del dev $ifname root
}

ip netns add ns0
ip link set eno0 netns ns0 && ip -n ns0 link set eno0 up && ip -n ns0 addr add 192.168.100.1/24 dev eno0
ip addr add 192.168.100.2/24 dev swp0 && ip link set swp0 up
ip netns exec ns0 ethtool --set-mm eno0 pmac-enabled on verify-enabled off tx-enabled on
ethtool --set-mm swp0 pmac-enabled on verify-enabled off tx-enabled on
add_taprio swp0

ping 192.168.100.1 -s 1000 -c 5 # sent through TC0
ethtool -I --show-mm swp0 | grep MACMergeFragCountTx # should increase

ip addr flush swp0 && ip link set swp0 down
remove_taprio swp0
ethtool --set-mm swp0 pmac-enabled off verify-enabled off tx-enabled off
ip netns exec ns0 ethtool --set-mm eno0 pmac-enabled off verify-enabled off tx-enabled off
ip netns del ns0

Vladimir Oltean (3):
  net: mscc: ocelot: extend ocelot->fwd_domain_lock to cover
    ocelot->tas_lock
  net: dsa: felix: make vsc9959_tas_guard_bands_update() visible to
    ocelot->ops
  net: mscc: ocelot: fix oversize frame dropping for preemptible TCs

 drivers/net/dsa/ocelot/felix.c         |  9 ++--
 drivers/net/dsa/ocelot/felix.h         |  1 -
 drivers/net/dsa/ocelot/felix_vsc9959.c | 59 +++++++++++++++++---------
 drivers/net/ethernet/mscc/ocelot.c     |  1 -
 drivers/net/ethernet/mscc/ocelot_mm.c  | 14 +++---
 include/soc/mscc/ocelot.h              |  9 ++--
 6 files changed, 56 insertions(+), 37 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org July 7, 2023, 2:20 a.m. UTC | #1
Hello:

This series was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed,  5 Jul 2023 13:44:19 +0300 you wrote:
> It has been reported that preemptible traffic doesn't completely behave
> as expected. Namely, large packets should be able to be squeezed
> (through fragmentation) through taprio time slots smaller than the
> transmission time of the full frame. That does not happen due to logic
> in the driver (for oversize frame dropping with taprio) that was not
> updated in order for this use case to work.
> 
> [...]

Here is the summary with links:
  - [net,1/3] net: mscc: ocelot: extend ocelot->fwd_domain_lock to cover ocelot->tas_lock
    https://git.kernel.org/netdev/net/c/009d30f1a777
  - [net,2/3] net: dsa: felix: make vsc9959_tas_guard_bands_update() visible to ocelot->ops
    https://git.kernel.org/netdev/net/c/c60819149b63
  - [net,3/3] net: mscc: ocelot: fix oversize frame dropping for preemptible TCs
    https://git.kernel.org/netdev/net/c/c6efb4ae387c

You are awesome, thank you!