From a6267f385ffe4a696c1087b00e37703f0499fd23 Mon Sep 17 00:00:00 2001 From: dlg Date: Mon, 12 Jun 2017 23:20:10 +0000 Subject: [PATCH] have the timeout call if qstart via the serialiser isntead of directly hfsc schedules a timeout to keep traffic moving if somethings has been delayed an no other tx activity has occurred. that timeout was calling (*ifp->if_qstart)(ifq) rather than ifq_start. the latter prevents concurrent calls to if_qstart. without this change bjorn ketelaars on misc@ was experiencing weird pauses in traffic and lockups because the tx ring was corrupted because re_start was run concurrently, once from the stack and once from hfsc. thanks to bjorn ketelaars for debugging, and mikeb@ for most of the legwork in diagnosing the problem. ok mikeb@ --- sys/net/hfsc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/hfsc.c b/sys/net/hfsc.c index 8fddbe5d933..795e42f7f2a 100644 --- a/sys/net/hfsc.c +++ b/sys/net/hfsc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hfsc.c,v 1.39 2017/05/08 11:30:53 mikeb Exp $ */ +/* $OpenBSD: hfsc.c,v 1.40 2017/06/12 23:20:10 dlg Exp $ */ /* * Copyright (c) 2012-2013 Henning Brauer @@ -817,7 +817,7 @@ hfsc_deferred(void *arg) KASSERT(HFSC_ENABLED(ifq)); if (!ifq_empty(ifq)) - (*ifp->if_qstart)(ifq); + ifq_start(ifq); hif = ifq->ifq_q; -- 2.20.1