Details
- Reviewers
vmaffione zlei - Commits
- rGe330262f34fc: Mechanically convert netmap(4) to IfAPI
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 49371 Build 46261: arc lint + arc unit
Event Timeline
A first pass.
sys/dev/netmap/netmap.c | ||
---|---|---|
2259 | if_name() or if_getdname() ? | |
2872 | This is not ifnet stuff, so it should not be touched. | |
3976 | Yep, we need a way to grab the if_input method. Can DRVAPI expose that? | |
sys/dev/netmap/netmap_freebsd.c | ||
354–356 | So a if_getinputfn() maybe? | |
389–390 | What about a if_gettransmitfn()? | |
sys/dev/netmap/netmap_generic.c | ||
110 | You can ignore this, it is Linux specific. | |
sys/dev/netmap/netmap_mem2.c | ||
2125 | You can drop all of these. Not related to struct ifnet. | |
2143 | Drop. | |
2155–2156 | Drop. | |
2170 | Drop. | |
2796 | Drop | |
2804 | Drop |
sys/dev/netmap/if_ptnet.c | ||
---|---|---|
520 | This must be wrongly changed by tools ;) | |
764 | Is this removal intended ? | |
sys/dev/netmap/netmap.c | ||
2259 |
I think this should be if_name(). sys/net/if.c const char * if_name(if_t ifp) { return ((struct ifnet *)ifp)->if_xname; } | |
2264 | if_getdname(), is this intended ? | |
sys/dev/netmap/netmap_freebsd.c | ||
621 | @vmaffione | |
sys/dev/netmap/netmap_kern.h | ||
1723 | Style(9). | |
2030 | Small nits, align member np_ifp | |
sys/dev/netmap/netmap_vale.c | ||
414 | Must be wrongly changed by tools ;) | |
1387 | @vmaffione |
sys/dev/netmap/if_ptnet.c | ||
---|---|---|
520 | And somehow this didn't get caught even in a LINT build. The script is rather naive, so I've had to do a lot of these fixes, caught by build failures. | |
764 | Not at all. | |
sys/dev/netmap/netmap.c | ||
2259 | if_name() gets ifp->if_xname, so it's a literal conversion. | |
3976 | Yeah, I'll need to add an accessor for it. | |
sys/dev/netmap/netmap_freebsd.c | ||
354–356 | Good enough a name as any. |
Still some changes to be done.
sys/dev/netmap/if_ptnet.c | ||
---|---|---|
444 | You have a typo here, since this is a multi line assignment | |
1877 | Why the comment? | |
sys/dev/netmap/netmap.c | ||
2264 | This should be the interface name, so if_name looks good to me | |
2272 | this should be if_name | |
2872 | please drop the comment | |
sys/dev/netmap/netmap_freebsd.c | ||
621 | That's right, thanks. I dropped that line in the src main branch. | |
sys/dev/netmap/netmap_generic.c | ||
1118 | Please drop the comments. | |
sys/dev/netmap/netmap_mem2.c | ||
2125 | Please drop also the space added at the end of the lines. | |
2520 | This should be if_name(ptif->ifp) | |
2560 | This should be if_name(curr->ifp) | |
sys/dev/netmap/netmap_vale.c | ||
1387 | Yes, if_name is correct. |
sys/dev/netmap/if_ptnet.c | ||
---|---|---|
444 | no worries, it's just unsettling if not catched by a compiler :) |
Looks good to me.
sys/dev/netmap/netmap_mem2.c | ||
---|---|---|
2121 | Drop spaces at the end of the lines. |