projects
/
cascardo
/
ovs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tunnel: Geneve TLV handling support for OpenFlow.
[cascardo/ovs.git]
/
lib
/
flow.c
diff --git
a/lib/flow.c
b/lib/flow.c
index
3e99d5e
..
7350a17
100644
(file)
--- a/
lib/flow.c
+++ b/
lib/flow.c
@@
-123,7
+123,7
@@
struct mf_ctx {
* away. Some GCC versions gave warnings on ALWAYS_INLINE, so these are
* defined as macros. */
* away. Some GCC versions gave warnings on ALWAYS_INLINE, so these are
* defined as macros. */
-#if (FLOW_WC_SEQ != 3
1
)
+#if (FLOW_WC_SEQ != 3
2
)
#define MINIFLOW_ASSERT(X) ovs_assert(X)
BUILD_MESSAGE("FLOW_WC_SEQ changed: miniflow_extract() will have runtime "
"assertions enabled. Consider updating FLOW_WC_SEQ after "
#define MINIFLOW_ASSERT(X) ovs_assert(X)
BUILD_MESSAGE("FLOW_WC_SEQ changed: miniflow_extract() will have runtime "
"assertions enabled. Consider updating FLOW_WC_SEQ after "
@@
-766,7
+766,7
@@
flow_get_metadata(const struct flow *flow, struct match *flow_metadata)
{
int i;
{
int i;
- BUILD_ASSERT_DECL(FLOW_WC_SEQ == 3
1
);
+ BUILD_ASSERT_DECL(FLOW_WC_SEQ == 3
2
);
match_init_catchall(flow_metadata);
if (flow->tunnel.tun_id != htonll(0)) {
match_init_catchall(flow_metadata);
if (flow->tunnel.tun_id != htonll(0)) {
@@
-784,6
+784,7
@@
flow_get_metadata(const struct flow *flow, struct match *flow_metadata)
if (flow->tunnel.gbp_flags) {
match_set_tun_gbp_flags(flow_metadata, flow->tunnel.gbp_flags);
}
if (flow->tunnel.gbp_flags) {
match_set_tun_gbp_flags(flow_metadata, flow->tunnel.gbp_flags);
}
+ tun_metadata_get_fmd(&flow->tunnel.metadata, flow_metadata);
if (flow->metadata != htonll(0)) {
match_set_metadata(flow_metadata, flow->metadata);
}
if (flow->metadata != htonll(0)) {
match_set_metadata(flow_metadata, flow->metadata);
}
@@
-942,7
+943,7
@@
void flow_wildcards_init_for_packet(struct flow_wildcards *wc,
memset(&wc->masks, 0x0, sizeof wc->masks);
/* Update this function whenever struct flow changes. */
memset(&wc->masks, 0x0, sizeof wc->masks);
/* Update this function whenever struct flow changes. */
- BUILD_ASSERT_DECL(FLOW_WC_SEQ == 3
1
);
+ BUILD_ASSERT_DECL(FLOW_WC_SEQ == 3
2
);
if (flow->tunnel.ip_dst) {
if (flow->tunnel.flags & FLOW_TNL_F_KEY) {
if (flow->tunnel.ip_dst) {
if (flow->tunnel.flags & FLOW_TNL_F_KEY) {
@@
-957,6
+958,11
@@
void flow_wildcards_init_for_packet(struct flow_wildcards *wc,
WC_MASK_FIELD(wc, tunnel.tp_dst);
WC_MASK_FIELD(wc, tunnel.gbp_id);
WC_MASK_FIELD(wc, tunnel.gbp_flags);
WC_MASK_FIELD(wc, tunnel.tp_dst);
WC_MASK_FIELD(wc, tunnel.gbp_id);
WC_MASK_FIELD(wc, tunnel.gbp_flags);
+
+ if (flow->tunnel.metadata.opt_map) {
+ wc->masks.tunnel.metadata.opt_map = flow->tunnel.metadata.opt_map;
+ WC_MASK_FIELD(wc, tunnel.metadata.opts);
+ }
} else if (flow->tunnel.tun_id) {
WC_MASK_FIELD(wc, tunnel.tun_id);
}
} else if (flow->tunnel.tun_id) {
WC_MASK_FIELD(wc, tunnel.tun_id);
}
@@
-1041,7
+1047,7
@@
uint64_t
flow_wc_map(const struct flow *flow)
{
/* Update this function whenever struct flow changes. */
flow_wc_map(const struct flow *flow)
{
/* Update this function whenever struct flow changes. */
- BUILD_ASSERT_DECL(FLOW_WC_SEQ == 3
1
);
+ BUILD_ASSERT_DECL(FLOW_WC_SEQ == 3
2
);
uint64_t map = (flow->tunnel.ip_dst) ? MINIFLOW_MAP(tunnel) : 0;
uint64_t map = (flow->tunnel.ip_dst) ? MINIFLOW_MAP(tunnel) : 0;
@@
-1093,7
+1099,7
@@
void
flow_wildcards_clear_non_packet_fields(struct flow_wildcards *wc)
{
/* Update this function whenever struct flow changes. */
flow_wildcards_clear_non_packet_fields(struct flow_wildcards *wc)
{
/* Update this function whenever struct flow changes. */
- BUILD_ASSERT_DECL(FLOW_WC_SEQ == 3
1
);
+ BUILD_ASSERT_DECL(FLOW_WC_SEQ == 3
2
);
memset(&wc->masks.metadata, 0, sizeof wc->masks.metadata);
memset(&wc->masks.regs, 0, sizeof wc->masks.regs);
memset(&wc->masks.metadata, 0, sizeof wc->masks.metadata);
memset(&wc->masks.regs, 0, sizeof wc->masks.regs);
@@
-1648,7
+1654,7
@@
flow_push_mpls(struct flow *flow, int n, ovs_be16 mpls_eth_type,
flow->mpls_lse[0] = set_mpls_lse_values(ttl, tc, 1, htonl(label));
/* Clear all L3 and L4 fields and dp_hash. */
flow->mpls_lse[0] = set_mpls_lse_values(ttl, tc, 1, htonl(label));
/* Clear all L3 and L4 fields and dp_hash. */
- BUILD_ASSERT(FLOW_WC_SEQ == 3
1
);
+ BUILD_ASSERT(FLOW_WC_SEQ == 3
2
);
memset((char *) flow + FLOW_SEGMENT_2_ENDS_AT, 0,
sizeof(struct flow) - FLOW_SEGMENT_2_ENDS_AT);
flow->dp_hash = 0;
memset((char *) flow + FLOW_SEGMENT_2_ENDS_AT, 0,
sizeof(struct flow) - FLOW_SEGMENT_2_ENDS_AT);
flow->dp_hash = 0;