Page MenuHomeFreeBSD

netmap: Check if we already ran mmap before we attempt it
ClosedPublic

Authored by neel_neelc.org on Fri, Nov 15, 7:27 PM.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

neel_neelc.org created this revision.Fri, Nov 15, 7:27 PM
vmaffione added inline comments.Sun, Nov 17, 2:58 PM
head/sys/net/netmap_user.h
985

I would just return here. If done_mmap == 1, it means that somebody already went through the initializations a the end of this function.

1003

This can go away (see above).

Completely makes sense. New diff incorporates your recommended changes.

vmaffione accepted this revision.Mon, Nov 18, 8:32 PM

Just one question: did this change come from some usage scenario? In theory you should not call nm_mmap() more than once.

This revision is now accepted and ready to land.Mon, Nov 18, 8:32 PM
neel_neelc.org added a comment.EditedMon, Nov 18, 11:07 PM

I was just grepping through the source tree for TODO occurrences and make patches from them.

Also, how long would it take for the patch to land in HEAD?

I'll do it tonight.

This revision was automatically updated to reflect the committed changes.