The former logic of set TTL 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 TTL as expected.
Fixes: ac12e126c482 ("net/nfp: support TTL flow action") Cc: sta...@dpdk.org Signed-off-by: Chaoyong He <chaoyong...@corigine.com> Reviewed-by: Niklas Söderlund <niklas.soderl...@corigine.com> --- drivers/net/nfp/nfp_flow.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c index 5be4c4f18a..77f249e2b9 100644 --- a/drivers/net/nfp/nfp_flow.c +++ b/drivers/net/nfp/nfp_flow.c @@ -2252,6 +2252,7 @@ nfp_flow_action_set_ttl(char *act_data, ttl_conf = (const struct rte_flow_action_set_ttl *)action->conf; ttl_tos->ipv4_ttl = ttl_conf->ttl_value; + ttl_tos->ipv4_ttl_mask = 0xff; ttl_tos->reserved = 0; } @@ -2275,6 +2276,7 @@ nfp_flow_action_set_hl(char *act_data, ttl_conf = (const struct rte_flow_action_set_ttl *)action->conf; tc_hl->ipv6_hop_limit = ttl_conf->ttl_value; + tc_hl->ipv6_hop_limit_mask = 0xff; tc_hl->reserved = 0; } -- 2.29.3