Details
- Reviewers
np mav - Group Reviewers
network - Commits
- rG954712e8f622: Mechanically convert cxgb(4) and cxgbe(4) to IfAPI
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 50084 Build 46976: arc lint + arc unit
Event Timeline
Was this done with some coccinelle type script or something similar? I have a bunch of code that is not upstream yet and it is not ifAPI style. If there's a script I could run pre-commit to make sure any new code is ifAPI clean it would be quite useful.
Not coccinelle, but there's a script that'll get "most of the way" at tools/ifnet/convert_ifapi.sh . Coccinelle would probably be better, less error-prone, but I don't know enough, and the script has been in the tree since 2014 (as convert_drvapi.sh)
I'm done looking at the cxgb part, will look at cxgbe next.
cxgb is missing some 'struct ifnet *' to 'if_t' substitutions
2 in cxgb/common/cxgb_ctl_defs.h.
3 in cxgb/cxgb_adapter.h
And I've added some inline comments with minor stuff.
sys/dev/cxgb/cxgb_main.c | ||
---|---|---|
1051–1054 | Unneeded parantheses around the 3rd argument in both of these. | |
1735–1736 | This pair can be combined into one call? if_setdrvflagbits(ifp, IFF_DRV_RUNNING, IFF_DRV_OACTIVE); | |
1830–1831 | Excessive parentheses here too. | |
1963 | Extra parentheses. | |
1975 | Extra parentheses. |
sys/dev/cxgbe/adapter.h | ||
---|---|---|
606 | Do the comments line up vertically with the rest after this conversion? I can't always tell while looking at phab. Please fix if needed. This applies to other similar changes too. | |
1464–1465 | This is gone. Please rebase to latest main. | |
sys/dev/cxgbe/t4_main.c | ||
2861 | Extra parentheses. | |
2873 | Extra parentheses. | |
6394 | I'll add an inline function for this in the driver otherwise the test here and in in the location it was copied from might diverge. This is my action item. |