svn commit: r357233 - head/sys/net

Kristof Provost kp at FreeBSD.org
Wed Feb 5 05:00:47 UTC 2020


On 4 Feb 2020, at 11:32, Gleb Smirnoff wrote:
> On Sat, Feb 01, 2020 at 07:26:48PM +0000, Kristof Provost wrote:
> K> > K> -/* The below interface used only by epair(4). */
> K> > K> +/* The below interfaces are used only by epair(4). */
> K> > K> +void	if_clone_addif(struct if_clone *, struct ifnet *);
> K> > K>  int	if_clone_destroyif(struct if_clone *, struct ifnet *);
> K> >
> K> > IMHO, makes sense to move all these declaration into if_epair.c
> K> > itself.
> K> >
> K> Yeah, that does make sense.
> K>
> K> One minor issue is that it turns out that if_clone_destroyif() 
> isn’t
> K> just used by if_epair, but also by the wifi code.
> K>
> K> How does this look?
>
> Yes, that's what I suggested. However, now given that net80211 also
> uses one of these methods, I'm not sure if isolating is a right move.
>
> In general, we consider if_clone KPI an internal one, don't we? I
> mean we don't expect 3rd party device drivers to use it. So may be
> it is fine that if_clone.h exposes those functions?
It’s been this way for a long time, so .. yeah, I’m inclined to just 
leave it this way.

Arguably we should change the if_clone API to be able to cope with the 
requirements of if_epair and net80211 as well, but that’s a far bigger 
project, if there’s even a sensible way to do so.

Regards,
Kristof


More information about the svn-src-all mailing list