summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/pensando
diff options
context:
space:
mode:
authorShannon Nelson <shannon.nelson@amd.com>2024-06-19 02:32:55 +0200
committerJakub Kicinski <kuba@kernel.org>2024-06-20 03:31:48 +0200
commit55a3982ec721dabd5a4c2f16bfb03deb032e45c2 (patch)
tree5c1aa74e005a04a04a07c8b98c1a8f7546ac351b /drivers/net/ethernet/pensando
parentionic: add per-queue napi_schedule for doorbell check (diff)
downloadlinux-55a3982ec721dabd5a4c2f16bfb03deb032e45c2.tar.xz
linux-55a3982ec721dabd5a4c2f16bfb03deb032e45c2.zip
ionic: check for queue deadline in doorbell_napi_work
Check the deadline against the last time run and only schedule a new napi if we haven't been run recently. Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Link: https://lore.kernel.org/r/20240619003257.6138-7-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/pensando')
-rw-r--r--drivers/net/ethernet/pensando/ionic/ionic_dev.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_dev.c b/drivers/net/ethernet/pensando/ionic/ionic_dev.c
index 56e7c120d492..ec36ace6d010 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_dev.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_dev.c
@@ -58,7 +58,14 @@ void ionic_doorbell_napi_work(struct work_struct *work)
{
struct ionic_qcq *qcq = container_of(work, struct ionic_qcq,
doorbell_napi_work);
- ionic_napi_schedule_do_softirq(&qcq->napi);
+ unsigned long now, then, dif;
+
+ now = READ_ONCE(jiffies);
+ then = qcq->q.dbell_jiffies;
+ dif = now - then;
+
+ if (dif > qcq->q.dbell_deadline)
+ ionic_napi_schedule_do_softirq(&qcq->napi);
}
static int ionic_get_preferred_cpu(struct ionic *ionic,