X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fopenvswitch%2Fdatapath-protocol.h;h=8ed1c7f413a554b5d42a912669bb571eef52ab81;hb=f613a0d72c521ca3a4eeb2c29ac523f6fdf72667;hp=535aab3ccd962ad2d727382cd4bcd688842bed76;hpb=df2c07f4338faac04f4969f243fe4e8083b309ac;p=sliver-openvswitch.git diff --git a/include/openvswitch/datapath-protocol.h b/include/openvswitch/datapath-protocol.h index 535aab3cc..8ed1c7f41 100644 --- a/include/openvswitch/datapath-protocol.h +++ b/include/openvswitch/datapath-protocol.h @@ -51,7 +51,6 @@ #include #endif -#include #include /* datapaths. */ @@ -136,6 +135,17 @@ struct ovs_dp_stats { uint64_t n_flows; /* Number of flows present */ }; +struct ovs_vport_stats { + uint64_t rx_packets; /* total packets received */ + uint64_t tx_packets; /* total packets transmitted */ + uint64_t rx_bytes; /* total bytes received */ + uint64_t tx_bytes; /* total bytes transmitted */ + uint64_t rx_errors; /* bad packets received */ + uint64_t tx_errors; /* packet transmit problems */ + uint64_t rx_dropped; /* no space in linux buffers */ + int64_t tx_dropped; /* no space available in linux */ +}; + /* Logical ports. */ #define OVSP_LOCAL ((uint16_t)0) @@ -219,14 +229,10 @@ enum ovs_vport_cmd { * @OVS_VPORT_ATTR_NAME: Name of vport. For a vport based on a network device * this is the name of the network device. Maximum length %IFNAMSIZ-1 bytes * plus a null terminator. - * @OVS_VPORT_ATTR_STATS: A &struct rtnl_link_stats64 giving statistics for + * @OVS_VPORT_ATTR_STATS: A &struct ovs_vport_stats giving statistics for * packets sent or received through the vport. * @OVS_VPORT_ATTR_ADDRESS: A 6-byte Ethernet address for the vport. - * @OVS_VPORT_ATTR_MTU: MTU for the vport. Omitted if the vport does not have - * an MTU as, e.g., some tunnels do not. * @OVS_VPORT_ATTR_IFINDEX: ifindex of the underlying network device, if any. - * @OVS_VPORT_ATTR_IFLINK: ifindex of the device on which packets are sent (for - * tunnels), if any. * * These attributes follow the &struct ovs_header within the Generic Netlink * payload for %OVS_VPORT_* commands. @@ -239,8 +245,8 @@ enum ovs_vport_cmd { * %OVS_VPORT_ATTR_NAME attributes are required. %OVS_VPORT_ATTR_PORT_NO is * optional; if not specified a free port number is automatically selected. * Whether %OVS_VPORT_ATTR_OPTIONS is required or optional depends on the type - * of vport. %OVS_VPORT_ATTR_STATS, %OVS_VPORT_ATTR_ADDRESS, and - * %OVS_VPORT_ATTR_MTU are optional, and other attributes are ignored. + * of vport. %OVS_VPORT_ATTR_STATS and %OVS_VPORT_ATTR_ADDRESS are optional, + * and other attributes are ignored. * * For other requests, if %OVS_VPORT_ATTR_NAME is specified then it is used to * look up the vport to operate on; otherwise dp_idx from the &struct @@ -251,12 +257,10 @@ enum ovs_vport_attr { OVS_VPORT_ATTR_PORT_NO, /* port number within datapath */ OVS_VPORT_ATTR_TYPE, /* 32-bit OVS_VPORT_TYPE_* constant. */ OVS_VPORT_ATTR_NAME, /* string name, up to IFNAMSIZ bytes long */ - OVS_VPORT_ATTR_STATS, /* struct rtnl_link_stats64 */ + OVS_VPORT_ATTR_STATS, /* struct ovs_vport_stats */ OVS_VPORT_ATTR_ADDRESS, /* hardware address */ - OVS_VPORT_ATTR_MTU, /* 32-bit maximum transmission unit */ OVS_VPORT_ATTR_OPTIONS, /* nested attributes, varies by vport type */ OVS_VPORT_ATTR_IFINDEX, /* 32-bit ifindex of backing netdev */ - OVS_VPORT_ATTR_IFLINK, /* 32-bit ifindex on which packets are sent */ __OVS_VPORT_ATTR_MAX }; @@ -412,8 +416,8 @@ enum ovs_action_type { OVS_ACTION_ATTR_UNSPEC, OVS_ACTION_ATTR_OUTPUT, /* Output to switch port. */ OVS_ACTION_ATTR_USERSPACE, /* Send copy to userspace. */ - OVS_ACTION_ATTR_SET_DL_TCI, /* Set the 802.1q TCI value. */ - OVS_ACTION_ATTR_STRIP_VLAN, /* Strip the 802.1q header. */ + OVS_ACTION_ATTR_PUSH_VLAN, /* Set the 802.1q TCI value. */ + OVS_ACTION_ATTR_POP_VLAN, /* Strip the 802.1q header. */ OVS_ACTION_ATTR_SET_DL_SRC, /* Ethernet source address. */ OVS_ACTION_ATTR_SET_DL_DST, /* Ethernet destination address. */ OVS_ACTION_ATTR_SET_NW_SRC, /* IPv4 source address. */