diff options
author | Ben Pfaff <blp@nicira.com> | 2010-11-09 13:48:57 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2010-11-09 13:48:57 -0800 |
commit | ec61a01cd8ed73b13ffe042ddff4baf41f6b63e7 (patch) | |
tree | 2d61330480404956d3a6110bb79ba1d506d9d7a5 /datapath/vport.h | |
parent | 55b663b616c8e364bf49b945687c1c4fe4dd3cae (diff) |
datapath: Use "struct rtnl_link_stats64" instead of "struct odp_vport_stats".
Linux 2.6.35 added struct rtnl_link_stats64, which as a set of 64-bit
network device counters is what the OVS datapath needs. We might as well
use it instead of our own.
This commit moves the if_link.h compat header from datapath/ into the
top-level include/ directory so that it is visible both to kernel and
userspace code.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'datapath/vport.h')
-rw-r--r-- | datapath/vport.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/datapath/vport.h b/datapath/vport.h index 30b0cc6b..186d6bf7 100644 --- a/datapath/vport.h +++ b/datapath/vport.h @@ -56,7 +56,7 @@ int vport_detach(struct vport *); int vport_set_mtu(struct vport *, int mtu); int vport_set_addr(struct vport *, const unsigned char *); -int vport_set_stats(struct vport *, struct odp_vport_stats *); +int vport_set_stats(struct vport *, struct rtnl_link_stats64 *); const char *vport_get_name(const struct vport *); const char *vport_get_type(const struct vport *); @@ -64,7 +64,7 @@ const unsigned char *vport_get_addr(const struct vport *); struct dp_port *vport_get_dp_port(const struct vport *); struct kobject *vport_get_kobj(const struct vport *); -int vport_get_stats(struct vport *, struct odp_vport_stats *); +int vport_get_stats(struct vport *, struct rtnl_link_stats64 *); unsigned vport_get_flags(const struct vport *); int vport_is_running(const struct vport *); @@ -107,7 +107,7 @@ struct vport { spinlock_t stats_lock; struct vport_err_stats err_stats; - struct odp_vport_stats offset_stats; + struct rtnl_link_stats64 offset_stats; }; #define VPORT_F_REQUIRED (1 << 0) /* If init fails, module loading fails. */ @@ -177,13 +177,13 @@ 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 odp_vport_stats *); + 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 *); const unsigned char *(*get_addr)(const struct vport *); struct kobject *(*get_kobj)(const struct vport *); - int (*get_stats)(const struct vport *, struct odp_vport_stats *); + int (*get_stats)(const struct vport *, struct rtnl_link_stats64 *); unsigned (*get_dev_flags)(const struct vport *); int (*is_running)(const struct vport *); |