From: Kurt Kanzenbach <kurt@linutronix.de> Date: 2021-08-25 13:58:47
Hi,
while using TAPRIO offloading on the Hirschmann hellcreek switch, I've noticed
two issues in the current implementation:
1. The gate control list is incorrectly programmed
2. The admin base time is not set properly
Fix it.
Thanks,
Kurt
Kurt Kanzenbach (2):
net: dsa: hellcreek: Fix incorrect setting of GCL
net: dsa: hellcreek: Adjust schedule look ahead window
drivers/net/dsa/hirschmann/hellcreek.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--
2.30.2
From: Kurt Kanzenbach <kurt@linutronix.de> Date: 2021-08-25 13:58:45
Traffic schedules can only be started up to eight seconds within the
future. Therefore, the driver periodically checks every two seconds whether the
admin base time provided by the user is inside that window. If so the schedule
is started. Otherwise the check is deferred.
However, according to the programming manual the look ahead window size should
be four - not eight - seconds. By using the proposed value of four seconds
starting a schedule at a specified admin base time actually works as expected.
Fixes: 24dfc6eb39b2 ("net: dsa: hellcreek: Add TAPRIO offloading support")
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
---
drivers/net/dsa/hirschmann/hellcreek.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -1550,7 +1550,7 @@ static bool hellcreek_schedule_startable(struct hellcreek *hellcreek, int port)/* Calculate difference to admin base time */base_time_ns=ktime_to_ns(hellcreek_port->current_schedule->base_time);-returnbase_time_ns-current_ns<(s64)8*NSEC_PER_SEC;+returnbase_time_ns-current_ns<(s64)4*NSEC_PER_SEC;}staticvoidhellcreek_start_schedule(structhellcreek*hellcreek,intport)
From: Kurt Kanzenbach <kurt@linutronix.de> Date: 2021-08-25 13:58:48
Currently the gate control list which is programmed into the hardware is
incorrect resulting in wrong traffic schedules. The problem is the loop
variables are incremented before they are referenced. Therefore, move the
increment to the end of the loop.
Fixes: 24dfc6eb39b2 ("net: dsa: hellcreek: Add TAPRIO offloading support")
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
---
drivers/net/dsa/hirschmann/hellcreek.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Currently the gate control list which is programmed into the hardware is
incorrect resulting in wrong traffic schedules. The problem is the loop
variables are incremented before they are referenced. Therefore, move the
increment to the end of the loop.
Fixes: 24dfc6eb39b2 ("net: dsa: hellcreek: Add TAPRIO offloading support")
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Traffic schedules can only be started up to eight seconds within the
future. Therefore, the driver periodically checks every two seconds whether the
admin base time provided by the user is inside that window. If so the schedule
is started. Otherwise the check is deferred.
Uber nit: this probably ought to be just one sentence starting from
"Therefore" and ending at deferred.
However, according to the programming manual the look ahead window size should
be four - not eight - seconds. By using the proposed value of four seconds
starting a schedule at a specified admin base time actually works as expected.
Fixes: 24dfc6eb39b2 ("net: dsa: hellcreek: Add TAPRIO offloading support")
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Hello:
This series was applied to netdev/net.git (refs/heads/master):
On Wed, 25 Aug 2021 15:58:11 +0200 you wrote:
Hi,
while using TAPRIO offloading on the Hirschmann hellcreek switch, I've noticed
two issues in the current implementation:
1. The gate control list is incorrectly programmed
2. The admin base time is not set properly
[...]