Page MenuHomeFreeBSD

netmap: set IFCAP_NETMAP in if_capabilities
ClosedPublic

Authored by vmaffione on Nov 14 2018, 4:09 PM.
Tags
None
Referenced Files
F106566726: D17987.diff
Wed, Jan 1, 11:00 PM
Unknown Object (File)
Oct 10 2024, 11:10 AM
Unknown Object (File)
Oct 2 2024, 1:28 PM
Unknown Object (File)
Sep 21 2024, 12:13 AM
Unknown Object (File)
Sep 9 2024, 12:10 AM
Unknown Object (File)
Sep 1 2024, 2:28 AM
Unknown Object (File)
Aug 19 2024, 2:48 PM
Unknown Object (File)
Aug 17 2024, 3:10 PM
Subscribers

Details

Summary

On netmap_attach(), we need to set the IFCAP_NETMAP flag in ifp->if_capabilities.
Also remove the redundant code in cxgbe(4) that does the same.

Test Plan

Integration tests and unit tests ran successfully.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

np requested changes to this revision.Nov 26 2018, 5:57 PM

The cxgbe part of this diff reverts r309725. The commit message for r309725 indicates the changes were made to catch up with r307394, which was the a netmap update. Can you confirm that various releases of netmap have had different behavior regarding if_capabilities? If netmap has finally settled on handling the caps this way then I have no objection to one last catch-up in the driver.

This revision now requires changes to proceed.Nov 26 2018, 5:57 PM

The truth is that netmap not setting the IFCAP_NETMAP flag in ifp->if_capabilities after r307394 is a mistake that we did not notice so far.
It got introduced by refactoring, 3 years ago (see https://github.com/luigirizzo/netmap/commit/5d0796f93a1107eb14422c7b8ea416f7fd750a2e).
Sorry for that, it was unintended.
I just happened to notice that and fix it.

In D17987#389775, @v.maffione_gmail.com wrote:

The truth is that netmap not setting the IFCAP_NETMAP flag in ifp->if_capabilities after r307394 is a mistake that we did not notice so far.
It got introduced by refactoring, 3 years ago (see https://github.com/luigirizzo/netmap/commit/5d0796f93a1107eb14422c7b8ea416f7fd750a2e).
Sorry for that, it was unintended.
I just happened to notice that and fix it.

Ok, in that case can you revert r309725 all by itself as a separate commit? I think that will leave a better trail in svn history.

This revision is now accepted and ready to land.Nov 27 2018, 8:11 PM

Sounds good, that's a better approach. I'll do it as soon as @gnn or @hrs approve.

I approve the plan laid out in the comments with np@

This revision was automatically updated to reflect the committed changes.