From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0060.outbound.protection.outlook.com [104.47.1.60]) by dpdk.org (Postfix) with ESMTP id 0CD071B1EA for ; Tue, 25 Sep 2018 15:48:03 +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=zhIRQIVlhySSTz2mzNzlMVAxBvbnj67XA/Xz+ha8J1k=; b=lWehFTBwONr3fT49do9Sc29zyKf/B6xlg2apHf6gCbPMC4UpSJH0G6FOwRpTOrQQzR0pCkDdhPSxXKXkGbp6TRC6Djjrv6QCnfCpfqBINIWaV8XhbqiVPBG8OTq6LoRjhiruo2TO48bx9zlTa49ufDI0C9ASvizLBNVt5+tw7qo= 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 DB6PR0501MB2023.eurprd05.prod.outlook.com (2603:10a6:4:6::17) 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 13:47:59 +0000 From: Xiaoyu Min To: ferruh.yigit@intel.com, Shahaf Shuler , Yongseok Koh Cc: dev@dpdk.org Date: Tue, 25 Sep 2018 21:47:18 +0800 Message-Id: <20180925134718.18945-4-jackmin@mellanox.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180925134718.18945-1-jackmin@mellanox.com> References: <20180925134718.18945-1-jackmin@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [118.201.220.138] X-ClientProxiedBy: HK0PR03CA0050.apcprd03.prod.outlook.com (2603:1096:203:52::14) To DB6PR0501MB2023.eurprd05.prod.outlook.com (2603:10a6:4:6::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cbf026f3-4bca-44b7-a141-08d622ed82e6 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:DB6PR0501MB2023; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2023; 3:xBNrnnGmIXhZdbo2yfMN/LDBw+lDryLu9jZfEleZw8fbEbrk/MnAhVp8Z5r/M8mjUlIPLw9WIrcxDUpqbyoxzVFAsC9nwnlcwHOm3Kkbkz+XBej6jjwn8oM+LWRG0kdI7YrgICHOtHTytS8leiIxDdT3Sc/dreNk2jQnj8IbgGtywtlEC0HA79261VAQx34jqHL1E+GFubrT2hC1ZI+POVhLkVxsBdTTVPlAJUbRnL+6i+TbyO0Bl7nHalQR7D8J; 25:eK7qKAdGBewv6O+nXLf442vTq/BioyyVCr7TC1PxnJ5FH+Vq2GIh9tkppmFa+7joiu4DR8a/ndxmhK/oE7SYueAhJXuCXv+3P4HTogmoaxd9cALdC08heiJFd1HFIhNyAYNlFbEthJXBks3h3NYI+r4XjeVgNC+PIH2LhoaCYomWhEshLMH7JGAI/qnWkPMXbPB4OB5Myed41uUp7Pp3aH4fYHRzEBiwdLCehAR9eZNJDAOSnOKnngeu8WlwNVb5Meo7t42xKyYbQ/ms3kCDHR3AVsJU4migidqSkQ005JW7AwPwfatQKuXMm2ufoxEsIfhqqLhlOmIiuH1i3XuZmw==; 31:rIj6YJAq/5PydVqT1eeLUm8PLEfWtmaRk2bLefkAgNuDwnKJkWBRwR+hOEroGOz/zDUpqiHwY+AQObmCrZdqGDKmkAr1iJRYI4R8yReFYwSwpdKgS1wGAHbEQO0aoycMeu5pFMdHKmCiK7G54cvI1mKvh8FtY20F0WR8wVccIYBuAoYGUW0oIh7G/Pg72QD+2WFg0A1SGmZAezjIaeppL10MX2+ZIMZSpVt+PqGPyYc= X-MS-TrafficTypeDiagnostic: DB6PR0501MB2023: X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2023; 20:th6S7HfQQUmKA0AEOfgNOTIAwTBn8WGEPLLlnnIq/b3iNVERT0CzSjGaxPUZb5867qMn5EXhcBCcAWOeMDlkZ29BKTmQYymCJqR2K7dBMR0/wG1Pb+5pkEkb5UkjdXg+ifgRsEEn7fEpJtujXIiDcSC2eeYqgrBrVz0TSoQ8RFddFTTm0dh3wVNsfpE9h0uyzQ2eIUn1dLrjicq+8K94OmubAKO9cEccuwe01xDdiwoW6QjA0HdvWRpGumwg/wjuH19GIlX47MOoL8rr76ZBp47PpBJbaYhEPqCxDKqvgWButmN91bn7G2NEqBPIAJEyKrTYvvYyncbV1wqjfSSlF+1gSuoTwr5bWQHEZhdEz2JZE5KUCR00ynpdy6Tg86AeDkTHCdaabq8dB4gV6yr3dKpZ011Ko5s212q36HlKaIHo/sOEJpYd703qbF4mG6OyWtjlVpC6hOM5daZTaEdNfvE1o/FfEn6jxlDmMMIr3Xc0uu5D+20GrW1neMZ2VQB0; 4:tuctpAWvvwH4enYA8TBB/Bi5CYu1vzop+EajtIGytKbSi4GGlSJNU3jdVmggxsK3gvjuqtksT7dXwol69FMlT2vBnvoHiVdP0mn2FJdnW1y0TvZ6Kh5mvxZa6bN05iQsbr0xoxHXHtYP031CyOZ794a0Lrrc+TwF19z/vJ+fJkH6LL5Sh8qJY64AFP9yPnzUGEcxIg/xwIBZW0YwzgQV1/5VTBX2dFAt1lKifRi2AaKK3QhqnZbk/sOyk2ctBb+18TdH0gGNHRblQGC+H4H81Q== 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)(8121501046)(5005006)(93006095)(93001095)(3231355)(944501410)(52105095)(10201501046)(3002001)(6055026)(149066)(150027)(6041310)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(201708071742011)(7699051); SRVR:DB6PR0501MB2023; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0501MB2023; X-Forefront-PRVS: 08062C429B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(366004)(136003)(396003)(39860400002)(376002)(199004)(189003)(6512007)(4326008)(446003)(68736007)(11346002)(476003)(486006)(86362001)(2616005)(575784001)(16586007)(956004)(3846002)(14444005)(5660300001)(25786009)(6506007)(316002)(6636002)(106356001)(26005)(110136005)(105586002)(6666003)(6116002)(386003)(1076002)(50226002)(186003)(16526019)(2906002)(36756003)(478600001)(81156014)(305945005)(7736002)(50466002)(52116002)(48376002)(81166006)(51416003)(8676002)(97736004)(76176011)(66066001)(53936002)(47776003)(6486002)(8936002)(34290500001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0501MB2023; H:dev-r630-08.mtbc.labs.mlnx; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR0501MB2023; 23:gnSm1Xv2WHuPIVemEMHPYYAlUnjltnEUHAgDcQX?= =?us-ascii?Q?CYTItJpAWd+e2sDyw/R/n3pCxt+HhuGZHWMHB76Lupke44MuYy8rrFBc6G1o?= =?us-ascii?Q?EQlFBAmmqqAh8Cz/+/l2Bcy7K6XWHw721IB7Fm6tBP6DHo3i/CzVi8ojkIcf?= =?us-ascii?Q?6Eog2322lIsiYBePUHMfk9JKBzB+CD0x5M5x/oErE23KnibRdazJ0u7421gS?= =?us-ascii?Q?qW4Cpu5PWBN91UXkqvVziMImd7WhwOWVZ7JUMwCp6bsBCVIfvtGhzyc0qORh?= =?us-ascii?Q?tA5WONIuMPors0V8o2G4L+PJ4HLcDQRhqPjklJ6EniMn8lXq7fTO7fvnBjMm?= =?us-ascii?Q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RyY94kZDyW8Rfjyj3iUze9nFzERr5cI6VNRSq/fJ6sjY2cWQI06ATcwaZ3lGSfGQuRxlM=; 7:sGPvleqH/fF7UKreA1XIka5Y2pzD74rQpky+5rtPQZHhn7jpMM4fxHJ2izIDYsGh+sLdn30O6rll+ojjtce/itRbyK4axdOYsccw7QRQtZQT61Ec8LxaBEWdC+uATux9ZXnfM/XJ4GgAQhsdlynnRCxqIuu6enyV5kqYBJZjQjb2oibChey9dO8ZET0+0Kscbjpmybqir7brkWXoa39LPdHtmk/FHzWIvagb1N01aEj6ohx5kV8pENM7XUhQ4L5g SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2018 13:47:59.5098 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cbf026f3-4bca-44b7-a141-08d622ed82e6 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0501MB2023 Subject: [dpdk-dev] [PATCH 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 13:48:03 -0000 Offload following modify TTL actions to E-Swtich 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