odp-util: Use PRIu8 instead of PRId8 when printing ip_proto.
[openvswitch] / datapath / vport.h
index 61da4399611699ce81638ce5d2d33f19faeb121c..3dbc68fcba635b2d5ccf10cf3bbea2ab988e3d82 100644 (file)
 #define VPORT_H 1
 
 #include <linux/list.h>
+#include <linux/openvswitch.h>
 #include <linux/seqlock.h>
 #include <linux/skbuff.h>
 #include <linux/spinlock.h>
 
 #include "datapath.h"
-#include "openvswitch/datapath-protocol.h"
 
 struct vport;
 struct vport_parms;
@@ -32,22 +32,8 @@ struct vport *vport_locate(const char *name);
 
 int vport_set_addr(struct vport *, const unsigned char *);
 void vport_set_stats(struct vport *, struct ovs_vport_stats *);
-
-const char *vport_get_name(const struct vport *);
-enum ovs_vport_type vport_get_type(const struct vport *);
-const unsigned char *vport_get_addr(const struct vport *);
-
-struct kobject *vport_get_kobj(const struct vport *);
 void vport_get_stats(struct vport *, struct ovs_vport_stats *);
 
-unsigned vport_get_flags(const struct vport *);
-int vport_is_running(const struct vport *);
-unsigned char vport_get_operstate(const struct vport *);
-
-int vport_get_ifindex(const struct vport *);
-
-int vport_get_mtu(const struct vport *);
-
 int vport_set_options(struct vport *, struct nlattr *options);
 int vport_get_options(const struct vport *, struct sk_buff *);
 
@@ -80,8 +66,6 @@ struct vport_err_stats {
  * &struct vport.  (We keep this around so that we can delete it if the
  * device gets renamed.)  Set to the null string when no link exists.
  * @node: Element in @dp's @port_list.
- * @sflow_pool: Number of packets that were candidates for sFlow sampling,
- * regardless of whether they were actually chosen and sent down to userspace.
  * @upcall_pid: The Netlink port to use for packets received on this port that
  * miss the flow table.
  * @hash_node: Element in @dev_table hash table in vport.c.
@@ -99,7 +83,6 @@ struct vport {
        struct kobject kobj;
        char linkname[IFNAMSIZ];
        struct list_head node;
-       atomic_t sflow_pool;
        u32 upcall_pid;
 
        struct hlist_node hash_node;
@@ -167,7 +150,8 @@ struct vport_parms {
  * @get_ifindex: Get the system interface index associated with the device.
  * May be null if the device does not have an ifindex.
  * @get_mtu: Get the device's MTU.  May be %NULL if the device does not have an
- * MTU (as e.g. some tunnels do not).
+ * MTU (as e.g. some tunnels do not).  Must be implemented if @get_ifindex is
+ * implemented.
  * @send: Send a packet on the device.  Returns the length of the packet sent.
  */
 struct vport_ops {
@@ -211,7 +195,8 @@ enum vport_err_type {
        VPORT_E_TX_ERROR,
 };
 
-struct vport *vport_alloc(int priv_size, const struct vport_ops *, const struct vport_parms *);
+struct vport *vport_alloc(int priv_size, const struct vport_ops *,
+                         const struct vport_parms *);
 void vport_free(struct vport *);
 
 #define VPORT_ALIGN 8