mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
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>
This commit is contained in:
parent
9b996e544a
commit
1b760fb9a8
@ -611,7 +611,6 @@ static int ovs_key_from_nlattrs(struct sw_flow_match *match, u64 attrs,
|
|||||||
const struct nlattr **a, bool is_mask)
|
const struct nlattr **a, bool is_mask)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
u64 orig_attrs = attrs;
|
|
||||||
|
|
||||||
err = metadata_from_nlattrs(match, &attrs, a, is_mask);
|
err = metadata_from_nlattrs(match, &attrs, a, is_mask);
|
||||||
if (err)
|
if (err)
|
||||||
@ -764,15 +763,9 @@ static int ovs_key_from_nlattrs(struct sw_flow_match *match, u64 attrs,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (attrs & (1 << OVS_KEY_ATTR_TCP_FLAGS)) {
|
if (attrs & (1 << OVS_KEY_ATTR_TCP_FLAGS)) {
|
||||||
if (orig_attrs & (1 << OVS_KEY_ATTR_IPV4)) {
|
SW_FLOW_KEY_PUT(match, tp.flags,
|
||||||
SW_FLOW_KEY_PUT(match, tp.flags,
|
nla_get_be16(a[OVS_KEY_ATTR_TCP_FLAGS]),
|
||||||
nla_get_be16(a[OVS_KEY_ATTR_TCP_FLAGS]),
|
is_mask);
|
||||||
is_mask);
|
|
||||||
} else {
|
|
||||||
SW_FLOW_KEY_PUT(match, tp.flags,
|
|
||||||
nla_get_be16(a[OVS_KEY_ATTR_TCP_FLAGS]),
|
|
||||||
is_mask);
|
|
||||||
}
|
|
||||||
attrs &= ~(1 << OVS_KEY_ATTR_TCP_FLAGS);
|
attrs &= ~(1 << OVS_KEY_ATTR_TCP_FLAGS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user