netmap: restore commit a56e6334d1

The fix in a56e6334d1
was accidentally reverted by commit 45c67e8f6b.
This commit is contained in:
Vincenzo Maffione 2021-04-02 10:43:19 +00:00
parent 37c3241a43
commit 9bad2638cc

View File

@ -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) {