Page MenuHomeFreeBSD

netmap: set IFCAP_NETMAP in if_capabilities
ClosedPublic

Authored by vmaffione on Nov 14 2018, 4:09 PM.
Tags
None
Referenced Files
F80177016: D17987.diff
Thu, Mar 28, 9:43 PM
Unknown Object (File)
Jan 12 2024, 3:34 PM
Unknown Object (File)
Dec 20 2023, 1:21 AM
Unknown Object (File)
Nov 22 2023, 4:41 AM
Unknown Object (File)
Nov 7 2023, 4:09 AM
Unknown Object (File)
Oct 6 2023, 3:06 AM
Unknown Object (File)
Sep 30 2023, 3:05 AM
Unknown Object (File)
Aug 31 2023, 3:27 AM
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 Not Applicable
Unit
Tests Not Applicable

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.