Page MenuHomeFreeBSD

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

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

Diff Detail

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

Event Timeline created this revision.Fri, Nov 15, 7:27 PM
vmaffione added inline comments.Sun, Nov 17, 2:58 PM

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


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 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.