diff options
author | Pravin B Shelar <pshelar@ovn.org> | 2016-05-17 17:35:28 -0700 |
---|---|---|
committer | Pravin B Shelar <pshelar@ovn.org> | 2016-05-18 19:39:18 -0700 |
commit | 1bc3f0ed2615aa2475e4c92339253a6092746ad4 (patch) | |
tree | ee1beb41b3919466a114e45b8c81804208af1888 /ofproto | |
parent | 66525ef3b8d604e47ca0bd1a7510b1ae9f3eb5ba (diff) | |
download | openvswitch-1bc3f0ed2615aa2475e4c92339253a6092746ad4.tar.gz |
tunnel: Add IP ECN related functions.
Set and get functions for IP explicit congestion notification flag.
These function would be used by STT reassembly code.
Signed-off-by: Pravin B Shelar <pshelar@ovn.org>
Acked-by: Jesse Gross <jesse@kernel.org>
Diffstat (limited to 'ofproto')
-rw-r--r-- | ofproto/tunnel.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ofproto/tunnel.c b/ofproto/tunnel.c index 18297b212..e65a2e41f 100644 --- a/ofproto/tunnel.c +++ b/ofproto/tunnel.c @@ -342,7 +342,7 @@ tnl_process_ecn(struct flow *flow) return true; } - if (is_ip_any(flow) && (flow->tunnel.ip_tos & IP_ECN_MASK) == IP_ECN_CE) { + if (is_ip_any(flow) && IP_ECN_is_ce(flow->tunnel.ip_tos)) { if ((flow->nw_tos & IP_ECN_MASK) == IP_ECN_NOT_ECT) { VLOG_WARN_RL(&rl, "dropping tunnel packet marked ECN CE" " but is not ECN capable"); @@ -382,7 +382,7 @@ tnl_wc_init(struct flow *flow, struct flow_wildcards *wc) memset(&wc->masks.pkt_mark, 0xff, sizeof wc->masks.pkt_mark); if (is_ip_any(flow) - && (flow->tunnel.ip_tos & IP_ECN_MASK) == IP_ECN_CE) { + && IP_ECN_is_ce(flow->tunnel.ip_tos)) { wc->masks.nw_tos |= IP_ECN_MASK; } } @@ -455,7 +455,7 @@ tnl_port_send(const struct ofport_dpif *ofport, struct flow *flow, if (is_ip_any(flow)) { wc->masks.nw_tos |= IP_ECN_MASK; - if ((flow->nw_tos & IP_ECN_MASK) == IP_ECN_CE) { + if (IP_ECN_is_ce(flow->nw_tos)) { flow->tunnel.ip_tos |= IP_ECN_ECT_0; } else { flow->tunnel.ip_tos |= flow->nw_tos & IP_ECN_MASK; |