From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0084.outbound.protection.outlook.com [104.47.0.84]) by dpdk.org (Postfix) with ESMTP id 94F0B1B3B1 for ; Tue, 25 Sep 2018 16:38:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JymLQkmq6SuKOQ69SipgSYjpG0CzcrTEaZQvDRguaJA=; b=nT1hM4ky83LXfVhKAOyB9MvBJ2CGNuaNUJjastmaxFNdS1EGZJp9JViMDvi5x8/Uzcg7XfAYDctMSc0likC2G56fr7o4OtFS8PrZP1pdB+zTN0nO/WlOxr8VGte5vk8HpyHEzddTO/Duy3kc5Kwjl5/i7SGZkTSwT4kmvCbFJO0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=jackmin@mellanox.com; Received: from dev-r630-08.mtbc.labs.mlnx (118.201.220.138) by AM5PR0501MB2020.eurprd05.prod.outlook.com (2603:10a6:203:1a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.22; Tue, 25 Sep 2018 14:38:33 +0000 From: Xiaoyu Min To: ferruh.yigit@intel.com, Shahaf Shuler , Yongseok Koh Cc: dev@dpdk.org Date: Tue, 25 Sep 2018 22:37:19 +0800 Message-Id: <20180925143719.23339-4-jackmin@mellanox.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180925143719.23339-1-jackmin@mellanox.com> References: <20180925134718.18945-1-jackmin@mellanox.com> <20180925143719.23339-1-jackmin@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [118.201.220.138] X-ClientProxiedBy: HK2PR04CA0045.apcprd04.prod.outlook.com (2603:1096:202:14::13) To AM5PR0501MB2020.eurprd05.prod.outlook.com (2603:10a6:203:1a::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 244f9a85-0e3b-4073-d35f-08d622f49372 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM5PR0501MB2020; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2020; 3:c60rsdiAgKFSuJOIcENXhtoWp0gsyekcSDYj2gVRunBVYDkJ4agf5KZd5hBSbOdE8mXnYIFjhZ9PWzF6iNq9PhK82dFio1Wdaq6QsFAXUa/1GaYFwZml6NtGpc7x0AwiGwjUTH3vOzLfFnKwijucGBcFMSfJlmW5vnAL0wse44hlWbB1Al9WJx5hpL/dLLVgZ/Zgi9nMt4ZKakRUBbBbMlLrO6n1R3QLcztvWZW5/zt17J7ZSRD7NWn0oH4AXpz3; 25:/ztJir9zRF7vnC9KzM0VskCOgfcHl2VY5a0/0vWxBWGgjtkz6Tp1gihy7sX7OgwakPQWn7jOhIxqMoGuzjC9xUALU1LBXPR9nBTUT0fE03kFexe+aEkD4uMF1mw2oenLzdLG1RJRIgARxtE2AMV7g6fCgKoXcJsOr0IfVV09yZHovF/PrWVMIuwiluQTcx6hsdXnPK6MpyacM6lAPmOV3w/kwTbMxbTGVmvHbwRY1P3y427Ritr+oG8o+OVIXuBy2ZK68DwTu9Ac3A089/UddwWyBg1tWh68q3swluFfP20Bliv1jT3ZHP9Z7xLyYElT3JhTvxeNQLiX2vJaSDr4gg==; 31:ZxsHlU2/qDniSCCfJUcyQp7YnRmrGSFChwmVfkiusJEW8RGSorGhOOMsg0sElwIe7EI62ALy3wSFvdzLdqObdSPHYWTkrMIX/tbONukalMmtGNa2QsbD88qtYByeJ4WTMYU/Ts/nWijp3Ep4wB5JJY2iAWnxh982bMEhQ1mzDZSW7bRMQPhJxKeXcKWhLIAs3J1A/+MoWD0Xo0BTcH+EqWzWTXfaONpOAvD4wfACxr4= X-MS-TrafficTypeDiagnostic: AM5PR0501MB2020: X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2020; 20:wLcARC2+pWvNXuSuG2LL3aVojR18iRIbbAIvGi9TIHNrIeqX1ezaoF6P/4nL9vQwjXe/K9M85Ys8VNb52C5KWRBBc4axYg4ERBipdHNLd/6Z2PAGDJYrJxugUblv9y1o5qsEg01ayZpsVldqrGYuSOEQ5lhNDCgieNjMMXUUXKRXCPH3WhDBIl9mHNAU74+O5QkBZnhJ1HdjBu82LiXrZoALHY4mNt/MnUv8bs5U8IAMxr/Y+6+Q1Ek2uy21laY1tlddFabAE9golWCRkCH29ZZ5fkwQ9DGfQ79o6hiQ3XBh3vAr8NHMiAtDObrWgLNLKD4vAls0wGb4d3217IKuGs6WatvLKvWLXKEVubqJOq0H4479QW1Fgc7BMYFtYLdYTJG9Enis5h7lkn7VlpSieTV2pALU+gXO5rTyx5VfXjGDAicpqOeioXg/SNKNpVHRWHd6bxIz5PfZco47pHGzr0MdTZCA6u6HQiiLEDcxccCso4X8QoChYPHpbbFValH8; 4:L2EW4JIJkJJVq2SGDQg5xjimgLF2SONMJXXi8kkuay39xTR9kk912h6J+vIJsLtRuvYeSNuEkidYGH9D5fHHY0tnla4vvtJsUGVbRp1YimKvEAn7h2EOuT6xJX59mlLJpzHn3bQwRJak1OrADTyq8kxpLwtWDORm28hZDGHN2TFcfocGY+dYQIcGMbjU/Xh0Ku06evhBnC7iIAdhfMApkrpJWl4tO0ECQZSxFZxrjIr+mtmcq29KLsk5eujL/mdNOy/KJ+mWVvn+ssyOhya8zQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(3231355)(944501410)(52105095)(6055026)(149066)(150027)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(201708071742011)(7699051); SRVR:AM5PR0501MB2020; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0501MB2020; X-Forefront-PRVS: 08062C429B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(39860400002)(346002)(396003)(136003)(366004)(189003)(199004)(6512007)(478600001)(48376002)(14444005)(6486002)(476003)(50226002)(6116002)(486006)(2616005)(3846002)(956004)(53936002)(68736007)(8936002)(16586007)(97736004)(110136005)(386003)(305945005)(81156014)(4326008)(1076002)(25786009)(6506007)(16526019)(186003)(36756003)(2906002)(26005)(316002)(7736002)(81166006)(47776003)(76176011)(11346002)(575784001)(51416003)(86362001)(52116002)(446003)(66066001)(6666003)(6636002)(50466002)(105586002)(8676002)(5660300001)(106356001)(34290500001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0501MB2020; H:dev-r630-08.mtbc.labs.mlnx; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0501MB2020; 23:MTQAvnRuYE764mjMaFuWpcSiBjo4a8n0EkE81JQ?= =?us-ascii?Q?Lh/T7vRuH5rhdJcFNgHlLGkk0PRORMZar0XNU8eMwtFiy3YARrYb79aYp3Qj?= =?us-ascii?Q?/FoJZs4riEYkzwzkt/w2kKRE/tAPvFViqLexX/KjCKxVAELYRM2xjqmwe4Z+?= =?us-ascii?Q?6wlGQU4wdDTC/v/Kix14w/6qBDYK+ENaLtt8BOmSYYHJi2v6F7kAfxX0iY0y?= =?us-ascii?Q?Znmcu3UJIqM/J5VxFPpH/9Z/0HedjpxDr8rJ0xrEIp3PkNHkmHbg2F/JGZfN?= =?us-ascii?Q?x0a2IprzVCgYoZP3G5siAm1bwV4SQ64Dz9jv1lW/tp2SDTaO8yCTHjoijqyA?= =?us-ascii?Q?O7HmceFqih4YZUQLAMt7o/30wY6NdA3E/eylIjSgMH0KqTwtVC//isWD0eLI?= =?us-ascii?Q?zfh6rjJelTBSDltfyOmHjXarZLk334qVXXa1oSae/EfuoS08BKt5LQOzIXjg?= =?us-ascii?Q?zy8TrulmSadMzsOVY40AHwR/i0cphwWTDQdwLN4OYcpYJYdHteqxoB7AKUiz?= =?us-ascii?Q?YzXr/JNJ/SJ99d72ROiu60Mo6OtFAZwossob5SEfkLrWXouuDd9tarOMRYbf?= =?us-ascii?Q?tzIuPB8RnVQWcrPhURqgSFe90cdCkba++igwDu+Cavte/FWFnFalUl5gWJrF?= =?us-ascii?Q?1F7EoPx/4Hvx3zJ/9dx3BW9BKyqhSIY685kEloBdVYcM9pyBG6tPp/2WMI4p?= =?us-ascii?Q?bvJFdRnNQWV7WlynLjInB+MboKYPincl2ax0CoDr60+ERLH/3Qmh6iGEZ9Uc?= =?us-ascii?Q?LmE9cOBRN5GfM5/fQJ7EkhBv2N1c2Qkj4o/WYPjDeu5ClMpLA94RowfxMblo?= =?us-ascii?Q?2KM3g72DWZEFWmhBJB+UGgw0deNDXwF6ER0VR6pKp6zb/OIDrxWLHNigNtrX?= =?us-ascii?Q?PC2esYEFwKj8Ei6/eOhDclOg9xUyNqv65YLe3EWXM+6InNbxjXuCAbduhWfC?= =?us-ascii?Q?ui5AcflIrRPFJOWYSOaw2RRuzN9NfM1lM8tGuDu9wNa5ejbmeKmhCSVJGzcn?= =?us-ascii?Q?YhrqKhyMyY5kiuiNzyXxesyWLuj6/E0X6Qq8tlo6ZFXJpeueyR57yXuKKzPD?= =?us-ascii?Q?qDao3y42+k4D4RTGstmCoEB5zs3MBXWPCsXujkrQBPVu/4+Jt3yOXqHwkOQ3?= =?us-ascii?Q?bfwRitMLbsC4afyAzXorcRQ2WuPTLolQhctU7G9WJM8uNSNHFix+sRNMgfRC?= =?us-ascii?Q?/6Ok2Q1QpxPAt1f/cnVn0WYs4xfxbMBcqCdQf3i8adr4dWWrtwuCoN+cttQj?= =?us-ascii?Q?d235GRe2+V76Bok+CDovNef0VitlMy18N5visRLYq?= X-Microsoft-Antispam-Message-Info: NnQ2BPS7oecWopaNHkzdJHeQ7Cji8rdI7eAgVMAVjxJbuU+n5O3Bq0F8/3TUYWsxYwQ/5TZsZueCFlo8TzFvdjELJyiKMIkiDzCHiyii893DZnKWCyh5FvVnMCMINdxhTzEitPGSe9GyBum5fupdM6zwk3fPzHq5HPfC6u6iHbi6CBN+SzzE90LX+hUHja+9FmNnmUFXPs37TMPhFhPAPyvCcsT5b7tzB8GVmZC343CYOw/xk+KA95GPM+CJwOmlN6jcmBqHg86vDGkaa9J4+UfAJBxZplUgPbAARY79EB5phMnDFzrVPPbCDI5lVBcpJ5jV7Kxhgr1GYFyTSthTwd+Wi3Qu3tY1lYdxrdBu7uY= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2020; 6:dDfCM+dCMNoXwpxk04VXKDCV0JEEZ8gyodYdJB8isWKgYLN3gSqewX8kfDfZfdNLNM0sMycJ+J5eSv7vKEAubQhxGKlggorl++L51trCQHfs0/XWMWJbIGvZT9a/9eUzESX39Im2owribWnZcKhJFgLVX28lplaOygne17PUJhttXzGibGawhAbfD7uEgvQSt6FUyQmKPtCP/1oZE3ZNrbbgEvSbD7mdJMZWYZis239FOVtMm9oJgjQwGSA8Lt/otsmzDISVh35TyaE0pkuMbUTGQYNc9PWfEYxe5LHpkbjkcikFU7J8i90/L8AeQs/LCMLVq0o6JYyDBP0bb3kc2bKJPEP8XAy/5a8s4nbt4a9kitQNJX+OP5nU27mV1LwesDErtyjq/P8nJeF0FCUQT7TlApPijfIFJq11wCVbZFCsOmEKEKEJH8BY+uqNZYMCmw9zhltabb5f26iBjKz1EA==; 5:ZD48J7ccspAHSprwtEWCDvL5BblDjKR8mO2CeQ11cTd23Pq/Q+erzoxQO/K6iBVxgXn8gFJu0Y73MYry26s3OlPcv/ZfLgwvOjQYHqmA4IGoY2neMI0sFX56gcoKOkf3GKN4+fzMl5cLa7BZbGKGnzUJW1X+DDGloVlOjes2BXc=; 7:kHu9ZsrtRfv81/JO4IxN8BnXXo/F8sflAhO1P7hZZp/p8gGxTWTqH4gxf5rrpfR0QyeFYfQOlcjRChqDy6pT8NoyUTpLcTThofGTfELMOV01sCgpbFQ1aZVY2ZHRqVUu2aGrLyf39pRHu+kvdSGGRlM9dq3USU16TovhTYWMojlDKz9O4SY0sNhX6eNrb9mYrq+PSv+OXQr56+Mesr2MZuLCS7a3ut8xkUtZ95YxKqaEzjh9eTOaGkPNxEKUImL/ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2018 14:38:33.9997 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 244f9a85-0e3b-4073-d35f-08d622f49372 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0501MB2020 Subject: [dpdk-dev] [PATCH v2 3/3] net/mlx5: eswitch-modify TTL actions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Sep 2018 14:38:37 -0000 Offload following modify TTL actions to E-Switch via TC-Flower driver - RTE_FLOW_ACTION_TYPE_SET_TTL - RTE_FLOW_ACTION_TYPE_DEC_TTL The corresponding IP protocol rte_flow_item_ipv[4|6] must be present in rte_flow pattern otherwith PMD return error Signed-off-by: Xiaoyu Min --- drivers/net/mlx5/mlx5_flow.h | 2 + drivers/net/mlx5/mlx5_flow_tcf.c | 74 +++++++++++++++++++++++++++++++- 2 files changed, 74 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index be182a643..5237e31dd 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -93,6 +93,8 @@ #define MLX5_ACTION_SET_IPV6_DST (1u << 14) #define MLX5_ACTION_SET_TP_SRC (1u << 15) #define MLX5_ACTION_SET_TP_DST (1u << 16) +#define MLX5_ACTION_SET_TTL (1u << 17) +#define MLX5_ACTION_DEC_TTL (1u << 18) /* possible L3 layers protocols filtering. */ #define MLX5_IP_PROTOCOL_TCP 6 diff --git a/drivers/net/mlx5/mlx5_flow_tcf.c b/drivers/net/mlx5/mlx5_flow_tcf.c index 85c92f369..af88c4a0d 100644 --- a/drivers/net/mlx5/mlx5_flow_tcf.c +++ b/drivers/net/mlx5/mlx5_flow_tcf.c @@ -217,6 +217,10 @@ struct tc_pedit_sel { #define TP_PORT_LEN 2 /* Transport Port (UDP/TCP) Length */ #endif +#ifndef TTL_LEN +#define TTL_LEN 1 +#endif + /** Empty masks for known item types. */ static const union { struct rte_flow_item_port_id port_id; @@ -297,7 +301,9 @@ struct flow_tcf_ptoi { (act) == RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC || \ (act) == RTE_FLOW_ACTION_TYPE_SET_IPV6_DST || \ (act) == RTE_FLOW_ACTION_TYPE_SET_TP_SRC || \ - (act) == RTE_FLOW_ACTION_TYPE_SET_TP_DST) ? \ + (act) == RTE_FLOW_ACTION_TYPE_SET_TP_DST || \ + (act) == RTE_FLOW_ACTION_TYPE_SET_TTL || \ + (act) == RTE_FLOW_ACTION_TYPE_DEC_TTL) ? \ 1 : 0; }) #define MAX_PEDIT_KEYS (128) #define SZ_PEDIT_KEY_VAL (4) @@ -321,6 +327,34 @@ flow_tcf_calc_pedit_keys(const uint64_t size) return keys; } +static void +flow_tcf_pedit_key_set_dec_ttl(const struct rte_flow_action *actions, + struct pedit_parser *p_parser, + uint64_t item_flags) +{ + int idx = p_parser->sel.nkeys; + + p_parser->keys[idx].mask = 0xFFFFFF00; + if (item_flags & MLX5_FLOW_LAYER_OUTER_L3_IPV4) { + p_parser->keys_ex[idx].htype = TCA_PEDIT_KEY_EX_HDR_TYPE_IP4; + p_parser->keys[idx].off = 8; /* IPv4 TTL Offset */ + } + if (item_flags & MLX5_FLOW_LAYER_OUTER_L3_IPV6) { + p_parser->keys_ex[idx].htype = TCA_PEDIT_KEY_EX_HDR_TYPE_IP6; + p_parser->keys[idx].off = 7; /* IPv6 HopLimit Offset */ + } + if (actions->type == RTE_FLOW_ACTION_TYPE_DEC_TTL) { + p_parser->keys_ex[idx].cmd = TCA_PEDIT_KEY_EX_CMD_ADD; + p_parser->keys[idx].val = 0xFF; + } else { + p_parser->keys_ex[idx].cmd = TCA_PEDIT_KEY_EX_CMD_SET; + p_parser->keys[idx].val = + ((const struct rte_flow_action_set_ttl *) + actions->conf)->ttl_value; + } + p_parser->sel.nkeys = (++idx); +} + static void flow_tcf_pedit_key_set_tp_port(const struct rte_flow_action *actions, struct pedit_parser *p_parser, @@ -408,6 +442,11 @@ flow_tcf_create_pedit_mnl_msg(struct nlmsghdr *nl, flow_tcf_pedit_key_set_tp_port(*actions, &p_parser, item_flags); break; + case RTE_FLOW_ACTION_TYPE_SET_TTL: + case RTE_FLOW_ACTION_TYPE_DEC_TTL: + flow_tcf_pedit_key_set_dec_ttl(*actions, + &p_parser, item_flags); + break; default: goto pedit_mnl_msg_done; } @@ -488,6 +527,14 @@ flow_tcf_get_pedit_actions_size(const struct rte_flow_action **actions, keys += flow_tcf_calc_pedit_keys(TP_PORT_LEN); flags |= MLX5_ACTION_SET_TP_DST; break; + case RTE_FLOW_ACTION_TYPE_SET_TTL: + keys += flow_tcf_calc_pedit_keys(TTL_LEN); + flags |= MLX5_ACTION_SET_TTL; + break; + case RTE_FLOW_ACTION_TYPE_DEC_TTL: + keys += flow_tcf_calc_pedit_keys(TTL_LEN); + flags |= MLX5_ACTION_DEC_TTL; + break; default: goto get_pedit_action_size_done; } @@ -988,13 +1035,20 @@ flow_tcf_validate(struct rte_eth_dev *dev, case RTE_FLOW_ACTION_TYPE_SET_TP_DST: action_flags |= MLX5_ACTION_SET_TP_DST; break; + case RTE_FLOW_ACTION_TYPE_SET_TTL: + action_flags |= MLX5_ACTION_SET_TTL; + break; + case RTE_FLOW_ACTION_TYPE_DEC_TTL: + action_flags |= MLX5_ACTION_DEC_TTL; + break; default: return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, actions, "action not supported"); } - if (IS_MODIFY_ACTION(actions->type)) { + if (IS_MODIFY_ACTION(actions->type) && + actions->type != RTE_FLOW_ACTION_TYPE_DEC_TTL) { if (!actions->conf) return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION_CONF, @@ -1029,6 +1083,16 @@ flow_tcf_validate(struct rte_eth_dev *dev, "no TCP/UDP item found in" " pattern"); } + if (action_flags & + (MLX5_ACTION_SET_TTL | MLX5_ACTION_DEC_TTL)) { + if (!(item_flags & + (MLX5_FLOW_LAYER_OUTER_L3_IPV4 | + MLX5_FLOW_LAYER_OUTER_L3_IPV6))) + return rte_flow_error_set(error, ENOTSUP, + RTE_FLOW_ERROR_TYPE_ACTION, + actions, + "no IP found in pattern"); + } return 0; } @@ -1178,6 +1242,8 @@ flow_tcf_get_actions_and_size(const struct rte_flow_action actions[], case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST: case RTE_FLOW_ACTION_TYPE_SET_TP_SRC: case RTE_FLOW_ACTION_TYPE_SET_TP_DST: + case RTE_FLOW_ACTION_TYPE_SET_TTL: + case RTE_FLOW_ACTION_TYPE_DEC_TTL: size += flow_tcf_get_pedit_actions_size(&actions, &flags); break; @@ -1451,6 +1517,7 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow, RTE_BE16(0x0fff))); break; case RTE_FLOW_ITEM_TYPE_IPV4: + item_flags |= MLX5_FLOW_LAYER_OUTER_L3_IPV4; mask.ipv4 = flow_tcf_item_mask (items, &rte_flow_item_ipv4_mask, &flow_tcf_mask_supported.ipv4, @@ -1490,6 +1557,7 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow, } break; case RTE_FLOW_ITEM_TYPE_IPV6: + item_flags |= MLX5_FLOW_LAYER_OUTER_L3_IPV6; mask.ipv6 = flow_tcf_item_mask (items, &rte_flow_item_ipv6_mask, &flow_tcf_mask_supported.ipv6, @@ -1718,6 +1786,8 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow, case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST: case RTE_FLOW_ACTION_TYPE_SET_TP_SRC: case RTE_FLOW_ACTION_TYPE_SET_TP_DST: + case RTE_FLOW_ACTION_TYPE_SET_TTL: + case RTE_FLOW_ACTION_TYPE_DEC_TTL: na_act_index = mnl_attr_nest_start(nlh, na_act_index_cur++); flow_tcf_create_pedit_mnl_msg(nlh, -- 2.17.1