Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Nov 2019 18:52:02 +0000 (UTC)
From:      Vincenzo Maffione <vmaffione@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r355133 - stable/12/sys/net
Message-ID:  <201911271852.xARIq2lD053228@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: vmaffione
Date: Wed Nov 27 18:52:01 2019
New Revision: 355133
URL: https://svnweb.freebsd.org/changeset/base/355133

Log:
  MFC r354867:
  
  netmap: check if we already ran mmap before we attempt it
  
  Submitted by:   neel@neelc.org
  Reviewed by:    vmaffione
  Differential Revision:  https://reviews.freebsd.org/D22390

Modified:
  stable/12/sys/net/netmap_user.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/net/netmap_user.h
==============================================================================
--- stable/12/sys/net/netmap_user.h	Wed Nov 27 16:52:46 2019	(r355132)
+++ stable/12/sys/net/netmap_user.h	Wed Nov 27 18:52:01 2019	(r355133)
@@ -981,7 +981,8 @@ nm_close(struct nm_desc *d)
 static int
 nm_mmap(struct nm_desc *d, const struct nm_desc *parent)
 {
-	//XXX TODO: check if mmap is already done
+	if (d->done_mmap)
+		return 0;
 
 	if (IS_NETMAP_DESC(parent) && parent->mem &&
 	    parent->req.nr_arg2 == d->req.nr_arg2) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911271852.xARIq2lD053228>