packaging: Fix Xen and RH packaging error that was introduced with ovs-test utility
[sliver-openvswitch.git] / datapath / vport-patch.c
index 1ec3a4c..55b8cec 100644 (file)
@@ -1,9 +1,19 @@
 /*
- * Copyright (c) 2010, 2011 Nicira Networks.
- * Distributed under the terms of the GNU GPL version 2.
+ * Copyright (c) 2007-2011 Nicira Networks.
  *
- * Significant portions of this file may be copied from parts of the Linux
- * kernel, by Linus Torvalds and others.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA
  */
 
 #include <linux/dcache.h>
@@ -41,7 +51,7 @@ static struct hlist_head *peer_table;
 
 static void update_peers(const char *name, struct vport *);
 
-static inline struct patch_vport *patch_vport_priv(const struct vport *vport)
+static struct patch_vport *patch_vport_priv(const struct vport *vport)
 {
        return vport_priv(vport);
 }
@@ -127,7 +137,8 @@ static struct vport *patch_create(const struct vport_parms *parms)
        struct patch_config *patchconf;
        int err;
 
-       vport = vport_alloc(sizeof(struct patch_vport), &patch_vport_ops, parms);
+       vport = vport_alloc(sizeof(struct patch_vport),
+                           &patch_vport_ops, parms);
        if (IS_ERR(vport)) {
                err = PTR_ERR(vport);
                goto error;
@@ -147,7 +158,7 @@ static struct vport *patch_create(const struct vport_parms *parms)
        if (err)
                goto error_free_patchconf;
 
-       vport_gen_rand_ether_addr(patchconf->eth_addr);
+       random_ether_addr(patchconf->eth_addr);
 
        rcu_assign_pointer(patch_vport->patchconf, patchconf);
 
@@ -287,7 +298,6 @@ static int patch_send(struct vport *vport, struct sk_buff *skb)
 
 const struct vport_ops patch_vport_ops = {
        .type           = OVS_VPORT_TYPE_PATCH,
-       .flags          = VPORT_F_GEN_STATS,
        .init           = patch_init,
        .exit           = patch_exit,
        .create         = patch_create,