Module Name: src Committed By: knakahara Date: Mon Mar 1 04:49:11 UTC 2021
Modified Files: src/sys/dev/pci: if_wm.c Log Message: Remove extra unlock/lock processing around if_percpuq_enqueue(). This temporary unlock/lock processing was required for direct calling ifp->if_input. After r1.391, wm(4) uses if_percpuq_enqueue() and it does not hold any mutexes. To generate a diff of this commit: cvs rdiff -u -r1.699 -r1.700 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.699 src/sys/dev/pci/if_wm.c:1.700 --- src/sys/dev/pci/if_wm.c:1.699 Wed Feb 17 08:15:43 2021 +++ src/sys/dev/pci/if_wm.c Mon Mar 1 04:49:11 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.699 2021/02/17 08:15:43 knakahara Exp $ */ +/* $NetBSD: if_wm.c,v 1.700 2021/03/01 04:49:11 knakahara Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -82,7 +82,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.699 2021/02/17 08:15:43 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.700 2021/03/01 04:49:11 knakahara Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -9332,20 +9332,13 @@ wm_rxeof(struct wm_rxqueue *rxq, u_int l /* Set up checksum info for this packet. */ wm_rxdesc_ensure_checksum(rxq, status, errors, m); - /* - * Update the receive pointer holding rxq_lock consistent with - * increment counter. - */ + rxq->rxq_ptr = i; rxq->rxq_packets++; rxq->rxq_bytes += len; - mutex_exit(rxq->rxq_lock); - /* Pass it on. */ if_percpuq_enqueue(sc->sc_ipq, m); - mutex_enter(rxq->rxq_lock); - if (rxq->rxq_stopping) break; }