From 3517d8bf8053d20d90d471d6f462fea5cd39bca0 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 22 Jan 2011 20:07:20 -0800 Subject: [PATCH] datapath: Remove unused ->set_stats() function from vport_ops. No vport implements this function and, as far as I can tell, no vport has ever implemented it. Signed-off-by: Ben Pfaff Acked-by: Jesse Gross --- datapath/vport.c | 4 +--- datapath/vport.h | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/datapath/vport.c b/datapath/vport.c index 1416ed0c..acb480bb 100644 --- a/datapath/vport.c +++ b/datapath/vport.c @@ -699,9 +699,7 @@ int vport_set_stats(struct vport *vport, struct rtnl_link_stats64 *stats) spin_unlock_bh(&vport->stats_lock); return 0; - } else if (vport->ops->set_stats) - return vport->ops->set_stats(vport, stats); - else + } else return -EOPNOTSUPP; } diff --git a/datapath/vport.h b/datapath/vport.h index 6ba7f2f5..5f6e7452 100644 --- a/datapath/vport.h +++ b/datapath/vport.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Nicira Networks. + * Copyright (c) 2010, 2011 Nicira Networks. * Distributed under the terms of the GNU GPL version 2. * * Significant portions of this file may be copied from parts of the Linux @@ -166,8 +166,6 @@ struct vport_parms { * @destroy: Detach and destroy a vport. * @set_mtu: Set the device's MTU. May be null if not supported. * @set_addr: Set the device's MAC address. May be null if not supported. - * @set_stats: Provides stats as an offset to be added to the device stats. - * May be null if not supported. * @get_name: Get the device's name. * @get_addr: Get the device's MAC address. * @get_config: Get the device's configuration. @@ -202,7 +200,6 @@ struct vport_ops { int (*set_mtu)(struct vport *, int mtu); int (*set_addr)(struct vport *, const unsigned char *); - int (*set_stats)(const struct vport *, struct rtnl_link_stats64 *); /* Called with rcu_read_lock or RTNL lock. */ const char *(*get_name)(const struct vport *); -- 2.30.2