Date: Tue, 19 Nov 2019 21:29:50 +0000 (UTC) From: Vincenzo Maffione <vmaffione@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r354867 - head/sys/net Message-ID: <201911192129.xAJLTo3e003048@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911192129.xAJLTo3e003048>