openvswitch: check CONFIG_OPENVSWITCH_GRE in makefile
authorCong Wang <amwang@redhat.com>
Tue, 20 Aug 2013 17:48:15 +0000 (10:48 -0700)
committerJesse Gross <jesse@nicira.com>
Fri, 23 Aug 2013 23:43:07 +0000 (16:43 -0700)
Cc: Jesse Gross <jesse@nicira.com>
Cc: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
net/openvswitch/Makefile
net/openvswitch/vport-gre.c

index 82e4ee54a44b4ad5039018a2862b039afaa7f4b1..ea36e99089af57246c28f68a8e007d8e55c726ba 100644 (file)
@@ -10,10 +10,13 @@ openvswitch-y := \
        dp_notify.o \
        flow.o \
        vport.o \
-       vport-gre.o \
        vport-internal_dev.o \
        vport-netdev.o
 
 ifneq ($(CONFIG_OPENVSWITCH_VXLAN),)
 openvswitch-y += vport-vxlan.o
 endif
+
+ifneq ($(CONFIG_OPENVSWITCH_GRE),)
+openvswitch-y += vport-gre.o
+endif
index 493e9775dcdadb90ea383a26403d8bd11fc6face..21d5073e148e11005e9dfe9ca9411e1001ec0ab6 100644 (file)
@@ -16,7 +16,6 @@
  * 02110-1301, USA
  */
 
-#ifdef CONFIG_OPENVSWITCH_GRE
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/if.h>
@@ -271,5 +270,3 @@ const struct vport_ops ovs_gre_vport_ops = {
        .get_name       = gre_get_name,
        .send           = gre_tnl_send,
 };
-
-#endif /* OPENVSWITCH_GRE */