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:
committed by
Ben Pfaff
parent
04f01c24b5
commit
ff14eb7ac9
@@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user