[ovs-dev] RFC: the meaning of LINUX_DATAPATH and HAVE_IF_DL

Ben Pfaff blp at nicira.com
Fri Jan 24 00:18:09 UTC 2014


[adding the list back]

On Thu, Jan 23, 2014 at 04:15:06PM -0800, Luigi Rizzo wrote:
> On Thu, Jan 23, 2014 at 4:08 PM, Ben Pfaff <blp at nicira.com> wrote:
> 
> > On Thu, Jan 23, 2014 at 04:04:24PM -0800, Luigi Rizzo wrote:
> > > On Thu, Jan 23, 2014 at 3:39 PM, Ben Pfaff <blp at nicira.com> wrote:
> > >
> > ...
> >
> > > hmmm... I believe we should look for features, not assume
> > > their presence based on OS name. so I'd rather go for
> > > KERNEL_DATAPATH and HAVE_* rather than __linux__ or __FreeBSD__.
> >
> > Feature tests are always nice, but a lot of the stuff protected by
> > LINUX_DATAPATH is really Linux specific, like the structure of /proc.
> >
> 
> sure, and in fact that is one of the pieces where we did
> not use LINUX_DATAPATH or KERNEL_DATAPATH but another
> discriminant. But we found that LINUX_DATAPATH was for
> the most part used to check for KERNEL_DATAPATH.

I don't have a clear picture of what userspace code there is in common
between the Linux kernel datapath and the FreeBSD port.  I guess this
will become clear when I see the patches.

> > > Also, our porting approach (which we found very effective in
> > > many cases) remaps linux APIs into FreeBSD equivalent ones,
> > > and for the most part there is a 1-1 mapping with
> > > no significant performance hit at runtime.
> > >
> > > Using a handful of private, fine-grained HAVE_* names
> > > makes the porting simpler.
> > >
> > > Daniele can probably send our current diff to see what
> > > are the components involved.
> >
> > Why don't you just send along the patches and if they make sense we'll
> > apply them.
> >
> 
> sure, i asked him to send them because i only have the diffs
> for an older tree and so they would not apply directly
> (assuming he is still awake; he is in italy, i am in berkeley).

OK.



More information about the dev mailing list