netlink-socket: Slightly improve logging of Generic Netlink messages.
[sliver-openvswitch.git] / datapath / vport.h
index f49ecc8..5f6e745 100644 (file)
@@ -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
@@ -44,9 +44,6 @@ int vport_del(struct vport *);
 
 struct vport *vport_locate(const char *name);
 
-int vport_attach(struct vport *);
-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 rtnl_link_stats64 *);
@@ -66,6 +63,7 @@ int vport_get_ifindex(const struct vport *);
 int vport_get_iflink(const struct vport *);
 
 int vport_get_mtu(const struct vport *);
+void vport_get_config(const struct vport *, void *);
 
 int vport_send(struct vport *, struct sk_buff *);
 
@@ -118,7 +116,7 @@ struct vport {
        struct hlist_node hash_node;
        const struct vport_ops *ops;
 
-       struct vport_percpu_stats *percpu_stats;
+       struct vport_percpu_stats __percpu *percpu_stats;
 
        spinlock_t stats_lock;
        struct vport_err_stats err_stats;
@@ -165,18 +163,12 @@ struct vport_parms {
  * a new vport allocated with vport_alloc(), otherwise an ERR_PTR() value.
  * @modify: Modify the configuration of an existing vport.  May be null if
  * modification is not supported.
- * @destroy: Destroy and free a vport using vport_free().  Prior to destruction
- * @detach will be called followed by synchronize_rcu().
- * @attach: Attach a previously created vport to a datapath.  After attachment
- * packets may be sent and received.  Prior to attachment any packets may be
- * silently discarded.  May be null if not needed.
- * @detach: Detach a vport from a datapath.  May be null if not needed.
+ * @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.
  * @get_kobj: Get the kobj associated with the device (may return null).
  * @get_stats: Fill in the transmit/receive stats.  May be null if stats are
  * not supported or if generic stats are in use.  If defined and
@@ -206,16 +198,13 @@ struct vport_ops {
        int (*modify)(struct vport *, struct odp_port *);
        int (*destroy)(struct vport *);
 
-       int (*attach)(struct vport *);
-       int (*detach)(struct vport *);
-
        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 *);
        const unsigned char *(*get_addr)(const struct vport *);
+       void (*get_config)(const struct vport *, void *);
        struct kobject *(*get_kobj)(const struct vport *);
        int (*get_stats)(const struct vport *, struct rtnl_link_stats64 *);