Add the logic of modify TCP source port. Signed-off-by: Chaoyong He <chaoyong...@corigine.com> Reviewed-by: Long Wu <long...@corigine.com> Reviewed-by: Peng Zhang <peng.zh...@corigine.com> --- drivers/net/nfp/flower/nfp_flower_flow.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/drivers/net/nfp/flower/nfp_flower_flow.c b/drivers/net/nfp/flower/nfp_flower_flow.c index afc2992e1f..904d60ab04 100644 --- a/drivers/net/nfp/flower/nfp_flower_flow.c +++ b/drivers/net/nfp/flower/nfp_flower_flow.c @@ -1216,6 +1216,8 @@ nfp_flow_field_id_dst_support(enum rte_flow_field_id field) case RTE_FLOW_FIELD_IPV6_SRC: /* FALLTHROUGH */ case RTE_FLOW_FIELD_IPV6_DST: + /* FALLTHROUGH */ + case RTE_FLOW_FIELD_TCP_PORT_SRC: return true; default: break; @@ -1244,6 +1246,8 @@ nfp_flow_field_width(enum rte_flow_field_id field, /* FALLTHROUGH */ case RTE_FLOW_FIELD_IPV6_DST: return 128; + case RTE_FLOW_FIELD_TCP_PORT_SRC: + return 16; case RTE_FLOW_FIELD_POINTER: /* FALLTHROUGH */ case RTE_FLOW_FIELD_VALUE: @@ -1296,6 +1300,8 @@ nfp_flow_action_calculate_modify_dispatch(struct nfp_action_calculate_param *par /* FALLTHROUGH */ case RTE_FLOW_FIELD_IPV6_DST: return nfp_flow_action_calculate_ipv6_addr(param); + case RTE_FLOW_FIELD_TCP_PORT_SRC: + return nfp_flow_action_calculate_tp(param); default: break; /* NOTREACHED */ } @@ -4259,6 +4265,8 @@ nfp_flow_action_compile_modify_dispatch(struct nfp_action_compile_param *param, return nfp_flow_action_compile_ipv6_src(param); case RTE_FLOW_FIELD_IPV6_DST: return nfp_flow_action_compile_ipv6_dst(param); + case RTE_FLOW_FIELD_TCP_PORT_SRC: + return nfp_flow_action_compile_tp_src(param); default: break; /* NOTREACHED */ } -- 2.39.1