[v2,6/6] net/nfp: fix the set IPv4/v6 DSCP flow action
Checks
Commit Message
The former logic of set IPv4/v6 DSCP flow action don't consider the
mask filed of control message passed to the firmware.
This caused the firmware skip the set action logic, and the offloaded
packets don't have the right IPv4/v6 DSCP as expected.
Fixes: 9c665d70f7a7 ("net/nfp: support IPv4 DSCP flow action")
Fixes: 3202b003bec1 ("net/nfp: support IPv6 DSCP flow action")
Cc: stable@dpdk.org
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
drivers/net/nfp/nfp_flow.c | 2 ++
1 file changed, 2 insertions(+)
@@ -2300,6 +2300,7 @@ nfp_flow_action_set_tos(char *act_data,
tos_conf = (const struct rte_flow_action_set_dscp *)action->conf;
ttl_tos->ipv4_tos = tos_conf->dscp;
+ ttl_tos->ipv4_tos_mask = 0xff;
ttl_tos->reserved = 0;
}
@@ -2323,6 +2324,7 @@ nfp_flow_action_set_tc(char *act_data,
tos_conf = (const struct rte_flow_action_set_dscp *)action->conf;
tc_hl->ipv6_tc = tos_conf->dscp;
+ tc_hl->ipv6_tc_mask = 0xff;
tc_hl->reserved = 0;
}