Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci vioif(4): remove unnecessary lock release



details:   https://anonhg.NetBSD.org/src/rev/5b4114fba8e3
branches:  trunk
changeset: 373952:5b4114fba8e3
user:      yamaguchi <yamaguchi%NetBSD.org@localhost>
date:      Thu Mar 23 01:23:18 2023 +0000

description:
vioif(4): remove unnecessary lock release

if_percpuq_enqueue() can call with rxq->rxq_lock held because of per-cpu.

diffstat:

 sys/dev/pci/if_vioif.c |  9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diffs (31 lines):

diff -r 781abcfcfb99 -r 5b4114fba8e3 sys/dev/pci/if_vioif.c
--- a/sys/dev/pci/if_vioif.c    Wed Mar 22 21:14:46 2023 +0000
+++ b/sys/dev/pci/if_vioif.c    Thu Mar 23 01:23:18 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_vioif.c,v 1.82 2022/09/12 07:26:04 knakahara Exp $  */
+/*     $NetBSD: if_vioif.c,v 1.83 2023/03/23 01:23:18 yamaguchi Exp $  */
 
 /*
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.82 2022/09/12 07:26:04 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.83 2023/03/23 01:23:18 yamaguchi Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -1642,12 +1642,7 @@
                m_set_rcvif(m, ifp);
                m->m_len = m->m_pkthdr.len = len;
 
-               mutex_exit(rxq->rxq_lock);
                if_percpuq_enqueue(ifp->if_percpuq, m);
-               mutex_enter(rxq->rxq_lock);
-
-               if (rxq->rxq_stopping)
-                       break;
        }
 
        if (dequeued)



Home | Main Index | Thread Index | Old Index