Add the logic of modify IPv6 source 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 c568e4ebaf..74f138a301 100644
--- a/drivers/net/nfp/flower/nfp_flower_flow.c
+++ b/drivers/net/nfp/flower/nfp_flower_flow.c
@@ -1212,6 +1212,8 @@ nfp_flow_field_id_dst_support(enum rte_flow_field_id 
field)
        case RTE_FLOW_FIELD_IPV4_SRC:
                /* FALLTHROUGH */
        case RTE_FLOW_FIELD_IPV4_DST:
+               /* FALLTHROUGH */
+       case RTE_FLOW_FIELD_IPV6_SRC:
                return true;
        default:
                break;
@@ -1236,6 +1238,8 @@ nfp_flow_field_width(enum rte_flow_field_id field,
                /* FALLTHROUGH */
        case RTE_FLOW_FIELD_IPV4_DST:
                return 32;
+       case RTE_FLOW_FIELD_IPV6_SRC:
+               return 128;
        case RTE_FLOW_FIELD_POINTER:
                /* FALLTHROUGH */
        case RTE_FLOW_FIELD_VALUE:
@@ -1284,6 +1288,8 @@ nfp_flow_action_calculate_modify_dispatch(struct 
nfp_action_calculate_param *par
                /* FALLTHROUGH */
        case RTE_FLOW_FIELD_IPV4_DST:
                return nfp_flow_action_calculate_ipv4_addr(param);
+       case RTE_FLOW_FIELD_IPV6_SRC:
+               return nfp_flow_action_calculate_ipv6_addr(param);
        default:
                break;    /* NOTREACHED */
        }
@@ -4243,6 +4249,8 @@ nfp_flow_action_compile_modify_dispatch(struct 
nfp_action_compile_param *param,
                return nfp_flow_action_compile_ipv4_src(param);
        case RTE_FLOW_FIELD_IPV4_DST:
                return nfp_flow_action_compile_ipv4_dst(param);
+       case RTE_FLOW_FIELD_IPV6_SRC:
+               return nfp_flow_action_compile_ipv6_src(param);
        default:
                break;    /* NOTREACHED */
        }
-- 
2.39.1

Reply via email to