X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fopenvswitch%2Fdatapath-protocol.h;h=ab7eb9e39b3cb60f2857300292307632cee95bc3;hb=c3e3d2a1e72f2fec8580e7974f809846788bc8ff;hp=9b601a3cf091564273c2e6d9399d657f6ae43802;hpb=f1aa2072c80dc8d4fb7a776801537172a656dbdd;p=openvswitch diff --git a/include/openvswitch/datapath-protocol.h b/include/openvswitch/datapath-protocol.h index 9b601a3c..ab7eb9e3 100644 --- a/include/openvswitch/datapath-protocol.h +++ b/include/openvswitch/datapath-protocol.h @@ -37,7 +37,7 @@ * ---------------------------------------------------------------------- */ -/* Protocol between secchan and datapath. */ +/* Protocol between userspace and kernel datapath. */ #ifndef OPENVSWITCH_DATAPATH_PROTOCOL_H #define OPENVSWITCH_DATAPATH_PROTOCOL_H 1 @@ -70,13 +70,12 @@ #define ODP_PORT_GROUP_GET _IOWR('O', 12, struct odp_port_group) #define ODP_FLOW_GET _IOWR('O', 13, struct odp_flow) +#define ODP_FLOW_PUT _IOWR('O', 14, struct odp_flow) #define ODP_FLOW_LIST _IOWR('O', 15, struct odp_flowvec) - #define ODP_FLOW_FLUSH _IO('O', 16) -#define ODP_FLOW_PUT _IOWR('O', 17, struct odp_flow) -#define ODP_FLOW_DEL _IOWR('O', 18, struct odp_flow) +#define ODP_FLOW_DEL _IOWR('O', 17, struct odp_flow) -#define ODP_EXECUTE _IOR('O', 19, struct odp_execute) +#define ODP_EXECUTE _IOR('O', 18, struct odp_execute) struct odp_stats { /* Flows. */ @@ -152,24 +151,29 @@ struct odp_flow_stats { }; struct odp_flow_key { - __be32 nw_src; /* IP source address. */ - __be32 nw_dst; /* IP destination address. */ - __u16 in_port; /* Input switch port. */ - __be16 dl_vlan; /* Input VLAN. */ - __be16 dl_type; /* Ethernet frame type. */ - __be16 tp_src; /* TCP/UDP source port. */ - __be16 tp_dst; /* TCP/UDP destination port. */ - __u8 dl_src[ETH_ALEN]; /* Ethernet source address. */ - __u8 dl_dst[ETH_ALEN]; /* Ethernet destination address. */ - __u8 nw_proto; /* IP protocol. */ - __u8 reserved; /* Pad to 64 bits. */ + __be32 nw_src; /* IP source address. */ + __be32 nw_dst; /* IP destination address. */ + __u16 in_port; /* Input switch port. */ + __be16 dl_vlan; /* Input VLAN. */ + __be16 dl_type; /* Ethernet frame type. */ + __be16 tp_src; /* TCP/UDP source port. */ + __be16 tp_dst; /* TCP/UDP destination port. */ + __u8 dl_src[ETH_ALEN]; /* Ethernet source address. */ + __u8 dl_dst[ETH_ALEN]; /* Ethernet destination address. */ + __u8 nw_proto; /* IP protocol or lower 8 bits of + ARP opcode. */ + __u8 reserved; /* Pad to 64 bits. */ }; +/* Flags for ODP_FLOW. */ +#define ODPFF_ZERO_TCP_FLAGS (1 << 0) /* Zero the TCP flags. */ + struct odp_flow { struct odp_flow_stats stats; struct odp_flow_key key; union odp_action *actions; __u32 n_actions; + __u32 flags; }; /* Flags for ODP_FLOW_PUT. */