Hi,
following the port of the OVS kernel code to FreeBSD (most of it
done by Daniele Di Proietto), the varia that control feature
inclusion may benefit from some rediscussion.

At the moment ovs uses LINUX_DATAPATH for different purposes:

1. indicate that an in-kernel datapath is available
2. indicate the availability of certain linux features
   (rtnetlink, traffic control, vlandev, stats collection)
   that interact with the in-kernel datapath.

#1 and #2 are now decoupled (and #2 could be split even further at
some point), so in places where we want to check for #2 we added
an extra test on HAVE_IF_DL, which at the moment basically discriminates
between Linux and *BSD.
Case #2 occurs in openvswitch/lib/automake.mk, openvswitch/lib/vlandev.c
and openvswitch/vswitchd/system-stats.c whereas there are over 100
instances of LINUX_DATAPATH

Before submitting a patch we'd like to know which of the following
sounds more suitable:

a) use " #if defined(LINUX_DATAPATH) && !defined(HAVE_IF_DL)"
   to test for case 2.

b) define some other indentifiers for specific features to be used in
   case 2 (say HAVE_RTNETLINK ...), same as it is done for HAVE_IF_DL

We have (a) ready, but for readability maybe (b) would be preferable.

And as an orthogonal issue, it may make sense to rename LINUX_DATAPATH
into KERNEL_DATAPATH (though it would be just for aesthetic reasons,
and i am not sure if it is worthwhile considering the number
of files and places affected)

cheers
luigi
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to