Add the logic of modify MAC dest address. 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 9ccdf499e7..0d5d26f22b 100644 --- a/drivers/net/nfp/flower/nfp_flower_flow.c +++ b/drivers/net/nfp/flower/nfp_flower_flow.c @@ -1230,6 +1230,8 @@ nfp_flow_field_id_dst_support(enum rte_flow_field_id field) case RTE_FLOW_FIELD_IPV6_HOPLIMIT: /* FALLTHROUGH */ case RTE_FLOW_FIELD_MAC_SRC: + /* FALLTHROUGH */ + case RTE_FLOW_FIELD_MAC_DST: return true; default: break; @@ -1271,6 +1273,8 @@ nfp_flow_field_width(enum rte_flow_field_id field, case RTE_FLOW_FIELD_IPV6_HOPLIMIT: return 8; case RTE_FLOW_FIELD_MAC_SRC: + /* FALLTHROUGH */ + case RTE_FLOW_FIELD_MAC_DST: return 48; case RTE_FLOW_FIELD_POINTER: /* FALLTHROUGH */ @@ -1337,6 +1341,8 @@ nfp_flow_action_calculate_modify_dispatch(struct nfp_action_calculate_param *par case RTE_FLOW_FIELD_IPV6_HOPLIMIT: return nfp_flow_action_calculate_ttl(param); case RTE_FLOW_FIELD_MAC_SRC: + /* FALLTHROUGH */ + case RTE_FLOW_FIELD_MAC_DST: return nfp_flow_action_calculate_mac(param); default: break; /* NOTREACHED */ @@ -4315,6 +4321,8 @@ nfp_flow_action_compile_modify_dispatch(struct nfp_action_compile_param *param, return nfp_flow_action_compile_ttl(param); case RTE_FLOW_FIELD_MAC_SRC: return nfp_flow_action_compile_mac_src(param); + case RTE_FLOW_FIELD_MAC_DST: + return nfp_flow_action_compile_mac_dst(param); default: break; /* NOTREACHED */ } -- 2.39.1