git: if_tun: Use pointer to ifnet in tun_softc struct

Aaron LI aly at aaronly.me
Thu Jul 19 21:13:56 PDT 2018


OK, thanks.

I'll keep looking at the net code, and can improve it later.


On Fri, 20 Jul 2018 12:07:00 +0800
Sepherosa Ziehau <sepherosa at gmail.com> wrote:

> Well, I don't think if_alloc makes sense for Dfly.  But if you have
> already changed some code, then let it be.
> 
> On Fri, Jul 20, 2018 at 11:19 AM, Aaron LI <aly at aaronly.me> wrote:
> > On Fri, 20 Jul 2018 10:43:16 +0800
> > Sepherosa Ziehau <sepherosa at gmail.com> wrote:
> >  
> >> On Fri, Jul 20, 2018 at 10:19 AM, Aaron LI <aly at aaronly.me> wrote:  
> >> > On Fri, 20 Jul 2018 09:40:21 +0800
> >> > Sepherosa Ziehau <sepherosa at gmail.com> wrote:
> >> >  
> >> >> I am not quite sure why we want to use if_alloc() in the first
> >> >> place?  
> >> >
> >> > Since our if_alloc() is very simple, so there is no big benefit to use
> >> > it over the direct kmalloc().  But if_alloc() is easier to use and more
> >> > intuitive.  
> >>
> >> I mean why allocate in the first place?  What's wrong w/ embedding?  
> >
> > There is nothing wrong with embedding ifnet inside tun_softc.
> >
> > So do you think is it better to embed or not embed the ifnet?  I'll follow
> > your advice.  Thanks.
> >

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.dragonflybsd.org/pipermail/commits/attachments/20180720/a3216bbe/attachment-0004.bin>


More information about the Commits mailing list