X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=datapath%2Fflow.h;h=997692c58df77cbff59ea48e890be580936a2bc6;hb=a7844aaf5ebccf1a8762f68bcbb62e463fc3809b;hp=1d75a0188a19039c1483a452816d28c3fb9adba3;hpb=b2fda3effc787f265b5ad5dfa967ac00627bd075;p=openvswitch diff --git a/datapath/flow.h b/datapath/flow.h index 1d75a018..997692c5 100644 --- a/datapath/flow.h +++ b/datapath/flow.h @@ -40,8 +40,8 @@ struct sw_flow_key { __be16 type; /* Ethernet frame type. */ } eth; struct { - u8 nw_proto; /* IP protocol or lower 8 bits of ARP opcode. */ - u8 nw_tos; /* IP ToS (DSCP field, 6 bits). */ + u8 proto; /* IP protocol or lower 8 bits of ARP opcode. */ + u8 tos; /* IP ToS (DSCP field, 6 bits). */ } ip; union { struct { @@ -136,14 +136,14 @@ int flow_cmp(const struct tbl_node *, void *target, int len); * * struct pad nl hdr total * ------ --- ------ ----- - * ODP_KEY_ATTR_TUN_ID 8 -- 4 12 - * ODP_KEY_ATTR_IN_PORT 4 -- 4 8 - * ODP_KEY_ATTR_ETHERNET 12 -- 4 16 - * ODP_KEY_ATTR_8021Q 4 -- 4 8 - * ODP_KEY_ATTR_ETHERTYPE 2 2 4 8 - * ODP_KEY_ATTR_IPV6 34 2 4 40 - * ODP_KEY_ATTR_ICMPV6 2 2 4 8 - * ODP_KEY_ATTR_ND 28 -- 4 32 + * OVS_KEY_ATTR_TUN_ID 8 -- 4 12 + * OVS_KEY_ATTR_IN_PORT 4 -- 4 8 + * OVS_KEY_ATTR_ETHERNET 12 -- 4 16 + * OVS_KEY_ATTR_8021Q 4 -- 4 8 + * OVS_KEY_ATTR_ETHERTYPE 2 2 4 8 + * OVS_KEY_ATTR_IPV6 34 2 4 40 + * OVS_KEY_ATTR_ICMPV6 2 2 4 8 + * OVS_KEY_ATTR_ND 28 -- 4 32 * ------------------------------------------------- * total 132 */ @@ -152,6 +152,8 @@ int flow_cmp(const struct tbl_node *, void *target, int len); int flow_to_nlattrs(const struct sw_flow_key *, struct sk_buff *); int flow_from_nlattrs(struct sw_flow_key *swkey, int *key_lenp, const struct nlattr *); +int flow_metadata_from_nlattrs(u16 *in_port, __be64 *tun_id, + const struct nlattr *); static inline struct sw_flow *flow_cast(const struct tbl_node *node) {