diff options
author | Joe Stringer <joestringer@nicira.com> | 2014-09-08 01:11:08 -0400 |
---|---|---|
committer | Pravin B Shelar <pshelar@nicira.com> | 2014-11-06 02:52:34 -0500 |
commit | 1b760fb9a8a8c0babc15f886ee5740cb33744168 (patch) | |
tree | 69662104f13eacf4c5fdef317c9b2db9ad36b983 /net/openvswitch/flow_netlink.c | |
parent | 9b996e544a6bc7d201060fdcbdb5d4a9b734aa1b (diff) |
openvswitch: Remove redundant tcp_flags code.
These two cases used to be treated differently for IPv4/IPv6,
but they are now identical.
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Diffstat (limited to 'net/openvswitch/flow_netlink.c')
-rw-r--r-- | net/openvswitch/flow_netlink.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c index 569309c49cc0..5a91d792505d 100644 --- a/net/openvswitch/flow_netlink.c +++ b/net/openvswitch/flow_netlink.c | |||
@@ -611,7 +611,6 @@ static int ovs_key_from_nlattrs(struct sw_flow_match *match, u64 attrs, | |||
611 | const struct nlattr **a, bool is_mask) | 611 | const struct nlattr **a, bool is_mask) |
612 | { | 612 | { |
613 | int err; | 613 | int err; |
614 | u64 orig_attrs = attrs; | ||
615 | 614 | ||
616 | err = metadata_from_nlattrs(match, &attrs, a, is_mask); | 615 | err = metadata_from_nlattrs(match, &attrs, a, is_mask); |
617 | if (err) | 616 | if (err) |
@@ -764,15 +763,9 @@ static int ovs_key_from_nlattrs(struct sw_flow_match *match, u64 attrs, | |||
764 | } | 763 | } |
765 | 764 | ||
766 | if (attrs & (1 << OVS_KEY_ATTR_TCP_FLAGS)) { | 765 | if (attrs & (1 << OVS_KEY_ATTR_TCP_FLAGS)) { |
767 | if (orig_attrs & (1 << OVS_KEY_ATTR_IPV4)) { | 766 | SW_FLOW_KEY_PUT(match, tp.flags, |
768 | SW_FLOW_KEY_PUT(match, tp.flags, | 767 | nla_get_be16(a[OVS_KEY_ATTR_TCP_FLAGS]), |
769 | nla_get_be16(a[OVS_KEY_ATTR_TCP_FLAGS]), | 768 | is_mask); |
770 | is_mask); | ||
771 | } else { | ||
772 | SW_FLOW_KEY_PUT(match, tp.flags, | ||
773 | nla_get_be16(a[OVS_KEY_ATTR_TCP_FLAGS]), | ||
774 | is_mask); | ||
775 | } | ||
776 | attrs &= ~(1 << OVS_KEY_ATTR_TCP_FLAGS); | 769 | attrs &= ~(1 << OVS_KEY_ATTR_TCP_FLAGS); |
777 | } | 770 | } |
778 | 771 | ||