From 3a242c1379ab315e0abae289f8e30bcdc5d1cdea Mon Sep 17 00:00:00 2001 From: wenchengji <58921247+wenchengji159357@users.noreply.github.com> Date: Thu, 23 May 2024 14:52:25 +0000 Subject: [PATCH 1/3] For f-stack to support QAT accelerator cards. --- freebsd/kern/kern_event.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/freebsd/kern/kern_event.c b/freebsd/kern/kern_event.c index 5185723b8..e2eb2c63a 100644 --- a/freebsd/kern/kern_event.c +++ b/freebsd/kern/kern_event.c @@ -2221,7 +2221,11 @@ kqueue_wakeup(struct kqueue *kq) kq->kq_state &= ~KQ_SEL; } if (!knlist_empty(&kq->kq_sel.si_note)) - kqueue_schedtask(kq); +#ifndef FSTACK + kqueue_schedtask(kq); +#else + KNOTE_UNLOCKED(&kq->kq_sel.si_note, 0); +#endif if ((kq->kq_state & KQ_ASYNC) == KQ_ASYNC) { pgsigio(&kq->kq_sigio, SIGIO, 0); } From 880fddc3244bde951f738a25f281e6f069d51074 Mon Sep 17 00:00:00 2001 From: wenchengji <58921247+wenchengji159357@users.noreply.github.com> Date: Thu, 23 May 2024 23:03:49 +0800 Subject: [PATCH 2/3] Update kern_event.c Change the code style guide. --- freebsd/kern/kern_event.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freebsd/kern/kern_event.c b/freebsd/kern/kern_event.c index e2eb2c63a..aaf49d81b 100644 --- a/freebsd/kern/kern_event.c +++ b/freebsd/kern/kern_event.c @@ -2222,9 +2222,9 @@ kqueue_wakeup(struct kqueue *kq) } if (!knlist_empty(&kq->kq_sel.si_note)) #ifndef FSTACK - kqueue_schedtask(kq); + kqueue_schedtask(kq); #else - KNOTE_UNLOCKED(&kq->kq_sel.si_note, 0); + KNOTE_UNLOCKED(&kq->kq_sel.si_note, 0); #endif if ((kq->kq_state & KQ_ASYNC) == KQ_ASYNC) { pgsigio(&kq->kq_sigio, SIGIO, 0); From 306b685796e28fbf131b4d017cb2052d53e98481 Mon Sep 17 00:00:00 2001 From: wenchengji <58921247+wenchengji159357@users.noreply.github.com> Date: Thu, 30 May 2024 23:37:56 +0800 Subject: [PATCH 3/3] Update kern_event.c modify gcc build error --- freebsd/kern/kern_event.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/freebsd/kern/kern_event.c b/freebsd/kern/kern_event.c index aaf49d81b..05ab99785 100644 --- a/freebsd/kern/kern_event.c +++ b/freebsd/kern/kern_event.c @@ -1672,6 +1672,7 @@ kqueue_release(struct kqueue *kq, int locked) KQ_UNLOCK(kq); } +#ifndef FSTACK static void kqueue_schedtask(struct kqueue *kq) { @@ -1685,6 +1686,7 @@ kqueue_schedtask(struct kqueue *kq) kq->kq_state |= KQ_TASKSCHED; } } +#endif /* * Expand the kq to make sure we have storage for fops/ident pair.