linux/drivers/net
AKASHI Takahiro ec897f7524 igc: fix the validation logic for taprio's gate list
[ Upstream commit 2b4cc3d3f4 ]

The check introduced in the commit a5fd39464a ("igc: Lift TAPRIO schedule
restriction") can detect a false positive error in some corner case.
For instance,
    tc qdisc replace ... taprio num_tc 4
	...
	sched-entry S 0x01 100000	# slot#1
	sched-entry S 0x03 100000	# slot#2
	sched-entry S 0x04 100000	# slot#3
	sched-entry S 0x08 200000	# slot#4
	flags 0x02			# hardware offload

Here the queue#0 (the first queue) is on at the slot#1 and #2,
and off at the slot#3 and #4. Under the current logic, when the slot#4
is examined, validate_schedule() returns *false* since the enablement
count for the queue#0 is two and it is already off at the previous slot
(i.e. #3). But this definition is truely correct.

Let's fix the logic to enforce a strict validation for consecutively-opened
slots.

Fixes: a5fd39464a ("igc: Lift TAPRIO schedule restriction")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-30 12:49:03 +02:00
..
appletalk
arcnet
bonding bonding: restore bond's IFF_SLAVE flag if a non-eth dev enslave fails 2023-03-22 13:33:51 +01:00
caif
can
dsa net: dsa: microchip: fix RGMII delay configuration on KSZ8765/KSZ8794/KSZ8795 2023-03-22 13:33:51 +01:00
ethernet igc: fix the validation logic for taprio's gate list 2023-03-30 12:49:03 +02:00
fddi
fjes
hamradio
hippi
hyperv
ieee802154
ipa
ipvlan ipvlan: Make skb->skb_iif track skb->dev for l3s mode 2023-03-22 13:33:44 +01:00
mctp
mdio net: dsa: seville: ignore mscc-miim read errors from Lynx PCS 2023-03-11 13:55:28 +01:00
netdevsim
pcs
phy net: phy: nxp-c45-tja11xx: fix MII_BASIC_CONFIG_REV bit 2023-03-22 13:34:04 +01:00
plip
ppp
pse-pd
slip
team
usb net: usb: smsc75xx: Move packet length check to prevent kernel panic in skb_pull 2023-03-22 13:33:50 +01:00
vmxnet3
vxlan
wan
wireguard
wireless
wwan
xen-netback
amt.c
bareudp.c
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c
macvlan.c
macvtap.c
Makefile
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c
veth.c veth: Fix use after free in XDP_REDIRECT 2023-03-22 13:33:49 +01:00
virtio_net.c
vrf.c
vsockmon.c
xen-netfront.c