svn commit: r354867 - head/sys/net
Vincenzo Maffione
vmaffione at FreeBSD.org
Tue Nov 19 21:29:50 UTC 2019
Author: vmaffione
Date: Tue Nov 19 21:29:49 2019
New Revision: 354867
URL: https://svnweb.freebsd.org/changeset/base/354867
Log:
netmap: check if we already ran mmap before we attempt it
Submitted by: neel at neelc.org
Reviewed by: vmaffione
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D22390
Modified:
head/sys/net/netmap_user.h
Modified: head/sys/net/netmap_user.h
==============================================================================
--- head/sys/net/netmap_user.h Tue Nov 19 21:15:12 2019 (r354866)
+++ head/sys/net/netmap_user.h Tue Nov 19 21:29:49 2019 (r354867)
@@ -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) {
More information about the svn-src-all
mailing list