git: 9bad2638cc18 - main - netmap: restore commit a56e6334d1b7ed6e6faaa8b4612d948005ba74f5

Vincenzo Maffione vmaffione at FreeBSD.org
Fri Apr 2 10:45:53 UTC 2021


The branch main has been updated by vmaffione:

URL: https://cgit.FreeBSD.org/src/commit/?id=9bad2638cc1882b44adb29a1cb1234f79e5c29f1

commit 9bad2638cc1882b44adb29a1cb1234f79e5c29f1
Author:     Vincenzo Maffione <vmaffione at FreeBSD.org>
AuthorDate: 2021-04-02 10:43:19 +0000
Commit:     Vincenzo Maffione <vmaffione at FreeBSD.org>
CommitDate: 2021-04-02 10:45:47 +0000

    netmap: restore commit a56e6334d1b7ed6e6faaa8b4612d948005ba74f5
    
    The fix in a56e6334d1b7ed6e6faaa8b4612d948005ba74f5
    was accidentally reverted by commit 45c67e8f6b56b9744f01142747fadf291fe3fad2.
---
 sys/net/netmap_user.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/net/netmap_user.h b/sys/net/netmap_user.h
index 27f8592eed85..06b159d9bfe7 100644
--- a/sys/net/netmap_user.h
+++ b/sys/net/netmap_user.h
@@ -995,7 +995,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 dev-commits-src-all mailing list