projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
datapath: Add clean compat layer for dev_get_stats().
[openvswitch]
/
datapath
/
vport.h
diff --git
a/datapath/vport.h
b/datapath/vport.h
index 7a3d527ae00051dc0e49c6d52e3b1085050189aa..30b0cc6b36e6972386d7347d5f0efd96996d9102 100644
(file)
--- a/
datapath/vport.h
+++ b/
datapath/vport.h
@@
-10,6
+10,7
@@
#define VPORT_H 1
#include <linux/list.h>
#define VPORT_H 1
#include <linux/list.h>
+#include <linux/seqlock.h>
#include <linux/skbuff.h>
#include <linux/spinlock.h>
#include <linux/skbuff.h>
#include <linux/spinlock.h>
@@
-83,6
+84,7
@@
struct vport_percpu_stats {
u64 rx_packets;
u64 tx_bytes;
u64 tx_packets;
u64 rx_packets;
u64 tx_bytes;
u64 tx_packets;
+ seqcount_t seqlock;
};
struct vport_err_stats {
};
struct vport_err_stats {
@@
-110,7
+112,8
@@
struct vport {
#define VPORT_F_REQUIRED (1 << 0) /* If init fails, module loading fails. */
#define VPORT_F_GEN_STATS (1 << 1) /* Track stats at the generic layer. */
#define VPORT_F_REQUIRED (1 << 0) /* If init fails, module loading fails. */
#define VPORT_F_GEN_STATS (1 << 1) /* Track stats at the generic layer. */
-#define VPORT_F_TUN_ID (1 << 2) /* Sets OVS_CB(skb)->tun_id. */
+#define VPORT_F_FLOW (1 << 2) /* Sets OVS_CB(skb)->flow. */
+#define VPORT_F_TUN_ID (1 << 3) /* Sets OVS_CB(skb)->tun_id. */
/**
* struct vport_ops - definition of a type of virtual port
/**
* struct vport_ops - definition of a type of virtual port
@@
-219,8
+222,7
@@
void vport_free(struct vport *);
* area was allocated on creation. This allows that area to be accessed and
* used for any purpose needed by the vport implementer.
*/
* area was allocated on creation. This allows that area to be accessed and
* used for any purpose needed by the vport implementer.
*/
-static inline void *
-vport_priv(const struct vport *vport)
+static inline void *vport_priv(const struct vport *vport)
{
return (u8 *)vport + ALIGN(sizeof(struct vport), VPORT_ALIGN);
}
{
return (u8 *)vport + ALIGN(sizeof(struct vport), VPORT_ALIGN);
}
@@
-235,8
+237,7
@@
vport_priv(const struct vport *vport)
* the result of a hash table lookup. @priv must point to the start of the
* private data area.
*/
* the result of a hash table lookup. @priv must point to the start of the
* private data area.
*/
-static inline struct vport *
-vport_from_priv(const void *priv)
+static inline struct vport *vport_from_priv(const void *priv)
{
return (struct vport *)(priv - ALIGN(sizeof(struct vport), VPORT_ALIGN));
}
{
return (struct vport *)(priv - ALIGN(sizeof(struct vport), VPORT_ALIGN));
}
@@
-250,5
+251,6
@@
extern struct vport_ops netdev_vport_ops;
extern struct vport_ops internal_vport_ops;
extern struct vport_ops patch_vport_ops;
extern struct vport_ops gre_vport_ops;
extern struct vport_ops internal_vport_ops;
extern struct vport_ops patch_vport_ops;
extern struct vport_ops gre_vport_ops;
+extern struct vport_ops capwap_vport_ops;
#endif /* vport.h */
#endif /* vport.h */