2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

meta-flow: Reduce redundant transport set/get code

Signed-off-by: Joe Stringer <joe@wand.net.nz>
Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Joe Stringer
2012-07-12 11:07:15 +12:00
committed by Ben Pfaff
parent d285965980
commit 71baec0655

View File

@@ -998,17 +998,11 @@ mf_get_value(const struct mf_field *mf, const struct flow *flow,
break;
case MFF_TCP_SRC:
value->be16 = flow->tp_src;
break;
case MFF_TCP_DST:
value->be16 = flow->tp_dst;
break;
case MFF_UDP_SRC:
value->be16 = flow->tp_src;
break;
case MFF_TCP_DST:
case MFF_UDP_DST:
value->be16 = flow->tp_dst;
break;
@@ -1143,17 +1137,11 @@ mf_set_value(const struct mf_field *mf,
break;
case MFF_TCP_SRC:
cls_rule_set_tp_src(rule, value->be16);
break;
case MFF_TCP_DST:
cls_rule_set_tp_dst(rule, value->be16);
break;
case MFF_UDP_SRC:
cls_rule_set_tp_src(rule, value->be16);
break;
case MFF_TCP_DST:
case MFF_UDP_DST:
cls_rule_set_tp_dst(rule, value->be16);
break;