On 4 February 2015 at 14:49, Andy Zhou <az...@nicira.com> wrote: > Added a eBPF program loader in ofproto-dpif layer. It only loades > the OVS programs. > > Signed-off-by: Andy Zhou <az...@nicira.com> > ---
A little more precise: It only loads BPF programs with sections that begin with the 'ovs' prefix. There's a few scattered OVS style things like using ovs_scan(), removing commented lines. > +#define BPF_UNIXCTL_CHECK(conn) \ > + if (bpf_unixctl_check_enable(conn) == -1) return It seems unusual for OVS code to skimp on some "if(foo()) return" logic by using a macro. > +static int > +bpf_unixctl_check_enable(struct unixctl_conn *conn) Another minor style thing here, I think "check_enable" is ambiguous. It's actually checking for datapath support for the feature. (I realise there are other places in OVS that we do this, and I've been meaning to clean them up). > diff --git a/vswitchd/automake.mk b/vswitchd/automake.mk > index 80affe9..a94720b 100644 > --- a/vswitchd/automake.mk > +++ b/vswitchd/automake.mk > @@ -19,6 +19,11 @@ vswitchd_ovs_vswitchd_LDFLAGS = $(AM_LDFLAGS) > $(DPDK_vswitchd_LDFLAGS) > EXTRA_DIST += vswitchd/INTERNALS > MAN_ROOTS += vswitchd/ovs-vswitchd.8.in > > +if LINUX > +vswitchd_ovs_vswitchd_LDADD += lib/libbpf.la > +vswitchd_ovs_vswitchd_LDADD += -lelf > +endif > + Do we perform a check for the libelf dev headers and library anywhere in the build process? _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev