2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

Add OF11 set IPv4 ECN action.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Jarno Rajahalme
2013-10-22 17:20:43 -07:00
committed by Ben Pfaff
parent 04f01c24b5
commit ff14eb7ac9
7 changed files with 101 additions and 2 deletions

View File

@@ -602,7 +602,7 @@ parse_named_action(enum ofputil_action_code code,
char *error = NULL;
uint16_t ethertype = 0;
uint16_t vid = 0;
uint8_t tos = 0;
uint8_t tos = 0, ecn;
uint8_t pcp = 0;
switch (code) {
@@ -700,6 +700,18 @@ parse_named_action(enum ofputil_action_code code,
ofpact_put_SET_IP_DSCP(ofpacts)->dscp = tos;
break;
case OFPUTIL_OFPAT11_SET_NW_ECN:
error = str_to_u8(arg, "ECN", &ecn);
if (error) {
return error;
}
if (ecn & ~IP_ECN_MASK) {
return xasprintf("%s: not a valid ECN", arg);
}
ofpact_put_SET_IP_ECN(ofpacts)->ecn = ecn;
break;
case OFPUTIL_OFPAT11_DEC_NW_TTL:
NOT_REACHED();