Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen/xen set rxreq_gntref to GRANT_INVALID_REF immed...



details:   https://anonhg.NetBSD.org/src/rev/ecec309a50fd
branches:  trunk
changeset: 970896:ecec309a50fd
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Mon Apr 06 08:26:32 2020 +0000

description:
set rxreq_gntref to GRANT_INVALID_REF immediately after revoking
access, so it's clear where it comes from

diffstat:

 sys/arch/xen/xen/if_xennet_xenbus.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r f2d820f79461 -r ecec309a50fd sys/arch/xen/xen/if_xennet_xenbus.c
--- a/sys/arch/xen/xen/if_xennet_xenbus.c       Mon Apr 06 08:20:05 2020 +0000
+++ b/sys/arch/xen/xen/if_xennet_xenbus.c       Mon Apr 06 08:26:32 2020 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: if_xennet_xenbus.c,v 1.99 2020/04/05 17:26:46 jdolecek Exp $      */
+/*      $NetBSD: if_xennet_xenbus.c,v 1.100 2020/04/06 08:26:32 jdolecek Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -81,7 +81,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.99 2020/04/05 17:26:46 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.100 2020/04/06 08:26:32 jdolecek Exp $");
 
 #include "opt_xen.h"
 #include "opt_nfs_boot.h"
@@ -796,8 +796,6 @@
         * ring needs more requests to be pushed in, allocate some
         * RX buffers to catch-up with backend's consumption
         */
-       req->rxreq_gntref = GRANT_INVALID_REF;
-
        if (sc->sc_free_rxreql >= (NET_RX_RING_SIZE * 4 / 5) &&
            __predict_true(sc->sc_backend_status == BEST_CONNECTED)) {
                xennet_alloc_rx_buffer(sc);
@@ -892,6 +890,7 @@
                KASSERT(req->rxreq_id == rx->id);
 
                xengnt_revoke_access(req->rxreq_gntref);
+               req->rxreq_gntref = GRANT_INVALID_REF;
 
                pa = req->rxreq_pa;
                va = req->rxreq_va;



Home | Main Index | Thread Index | Old Index