X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=datapath%2Fvport.h;h=0a6801d97efc0c1db472a9d459fee9bb94c58ec4;hb=431585099e82a88a23d5dec28138b5a3a8bb11da;hp=7a3d527ae00051dc0e49c6d52e3b1085050189aa;hpb=780e620781c5237ab6c26d5edbc7edb5b4953c70;p=openvswitch diff --git a/datapath/vport.h b/datapath/vport.h index 7a3d527a..0a6801d9 100644 --- a/datapath/vport.h +++ b/datapath/vport.h @@ -10,6 +10,7 @@ #define VPORT_H 1 #include +#include #include #include @@ -83,6 +84,7 @@ struct vport_percpu_stats { u64 rx_packets; u64 tx_bytes; u64 tx_packets; + seqcount_t seqlock; }; struct vport_err_stats { @@ -219,8 +221,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. */ -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); } @@ -235,8 +236,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. */ -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)); }