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 49370 Build 46260: arc lint + arc unit
Event Timeline
A first pass.
sys/dev/netmap/netmap.c | ||
---|---|---|
2259 ↗ | (On Diff #114440) | if_name() or if_getdname() ? |
2872 ↗ | (On Diff #114440) | This is not ifnet stuff, so it should not be touched. |
3976 ↗ | (On Diff #114440) | Yep, we need a way to grab the if_input method. Can DRVAPI expose that? |
sys/dev/netmap/netmap_freebsd.c | ||
358 ↗ | (On Diff #114440) | So a if_getinputfn() maybe? |
391 ↗ | (On Diff #114440) | What about a if_gettransmitfn()? |
sys/dev/netmap/netmap_generic.c | ||
110 ↗ | (On Diff #114440) | You can ignore this, it is Linux specific. |
sys/dev/netmap/netmap_mem2.c | ||
2125 ↗ | (On Diff #114440) | You can drop all of these. Not related to struct ifnet. |
2143 ↗ | (On Diff #114440) | Drop. |
2155–2156 ↗ | (On Diff #114440) | Drop. |
2169 ↗ | (On Diff #114440) | Drop. |
2796 ↗ | (On Diff #114440) | Drop |
2804 ↗ | (On Diff #114440) | Drop |
sys/dev/netmap/if_ptnet.c | ||
---|---|---|
520 ↗ | (On Diff #116146) | This must be wrongly changed by tools ;) |
764 ↗ | (On Diff #116146) | Is this removal intended ? |
sys/dev/netmap/netmap.c | ||
2264 ↗ | (On Diff #116146) | if_getdname(), is this intended ? |
2259 ↗ | (On Diff #114440) |
I think this should be if_name(). sys/net/if.c const char * if_name(if_t ifp) { return ((struct ifnet *)ifp)->if_xname; } |
sys/dev/netmap/netmap_freebsd.c | ||
621 ↗ | (On Diff #116146) | @vmaffione |
sys/dev/netmap/netmap_kern.h | ||
1723 ↗ | (On Diff #116146) | Style(9). |
2030 ↗ | (On Diff #116146) | Small nits, align member np_ifp |
sys/dev/netmap/netmap_vale.c | ||
414 ↗ | (On Diff #116146) | Must be wrongly changed by tools ;) |
1387 ↗ | (On Diff #116146) | @vmaffione |
sys/dev/netmap/if_ptnet.c | ||
---|---|---|
520 ↗ | (On Diff #116146) | 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 ↗ | (On Diff #116146) | Not at all. |
sys/dev/netmap/netmap.c | ||
2259 ↗ | (On Diff #114440) | if_name() gets ifp->if_xname, so it's a literal conversion. |
3976 ↗ | (On Diff #114440) | Yeah, I'll need to add an accessor for it. |
sys/dev/netmap/netmap_freebsd.c | ||
358 ↗ | (On Diff #114440) | Good enough a name as any. |
Still some changes to be done.
sys/dev/netmap/if_ptnet.c | ||
---|---|---|
444 ↗ | (On Diff #116704) | You have a typo here, since this is a multi line assignment |
1877 ↗ | (On Diff #116704) | Why the comment? |
sys/dev/netmap/netmap.c | ||
2272 ↗ | (On Diff #116704) | this should be if_name |
2264 ↗ | (On Diff #116146) | This should be the interface name, so if_name looks good to me |
2872 ↗ | (On Diff #114440) | please drop the comment |
sys/dev/netmap/netmap_freebsd.c | ||
621 ↗ | (On Diff #116146) | That's right, thanks. I dropped that line in the src main branch. |
sys/dev/netmap/netmap_generic.c | ||
1118 ↗ | (On Diff #116704) | Please drop the comments. |
sys/dev/netmap/netmap_mem2.c | ||
2520 ↗ | (On Diff #116704) | This should be if_name(ptif->ifp) |
2560 ↗ | (On Diff #116704) | This should be if_name(curr->ifp) |
2125 ↗ | (On Diff #114440) | Please drop also the space added at the end of the lines. |
sys/dev/netmap/netmap_vale.c | ||
1387 ↗ | (On Diff #116146) | Yes, if_name is correct. |
I don't know how any of the issues you pointed out compiled in the first place. No errors on them. Will post an updated diff shortly.
sys/dev/netmap/if_ptnet.c | ||
---|---|---|
444 ↗ | (On Diff #116704) | No idea at all how this was not caught by the compiler; pretty embarassing. |
1877 ↗ | (On Diff #116704) | It shouldn't be there, thought I removed them all. |
sys/dev/netmap/if_ptnet.c | ||
---|---|---|
444 ↗ | (On Diff #116704) | no worries, it's just unsettling if not catched by a compiler :) |
Looks good to me.
sys/dev/netmap/netmap_mem2.c | ||
---|---|---|
2121 ↗ | (On Diff #116934) | Drop spaces at the end of the lines. |