From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70048.outbound.protection.outlook.com [40.107.7.48]) by dpdk.org (Postfix) with ESMTP id 100B81BE0C for ; Sat, 7 Jul 2018 01:23:43 +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=VTQqgvpzFYvkRo8k9lZKvysvdBP1YH71ANrBnIV3tRk=; b=fDPazk0h9ubKCd74GRTA2VXDVhYoJelADa0NdKAPZ+GrYtdCKtfQ/+3MqslqG4PaEg28RzRaPIs1Culg7XK/F9vvuTfXf/acuCp7dxZZjIHwFkBn0NSh2p2r8uNEQC9mK5df0eGdL7WzesYfwjtzA4bg+pWL0crfBBe9mW9iaQ4= Received: from yongseok-MBP.local (209.116.155.178) by AM5PR0501MB2036.eurprd05.prod.outlook.com (2603:10a6:203:1a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.19; Fri, 6 Jul 2018 23:23:39 +0000 Date: Fri, 6 Jul 2018 16:23:26 -0700 From: Yongseok Koh To: Nelio Laranjeiro Cc: dev@dpdk.org, Adrien Mazarguil Message-ID: <20180706232325.GB53779@yongseok-MBP.local> References: <5e9bb490cd3cccb660e11ea0c7ca256e0fd73cc7.1530111623.git.nelio.laranjeiro@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5e9bb490cd3cccb660e11ea0c7ca256e0fd73cc7.1530111623.git.nelio.laranjeiro@6wind.com> User-Agent: Mutt/1.9.3 (2018-01-21) X-Originating-IP: [209.116.155.178] X-ClientProxiedBy: BN6PR11CA0006.namprd11.prod.outlook.com (2603:10b6:405:2::16) To AM5PR0501MB2036.eurprd05.prod.outlook.com (2603:10a6:203:1a::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 83b6805a-52b9-4962-0e3f-08d5e3978236 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:AM5PR0501MB2036; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2036; 3:dCE7PuT8dpFvyCPYKIv/3hkLJQMKXSRw3HI/Z5LRRREq5uL9cRe1m6u0Yw0h6qowNo+jOwDUib54RVTv7f6LprenRpU32kDYrz/wlqifIWCpSdcvzlu7ABpTD2yuC+zBb4vjfPiWGQloc7oSYtMquAwvlbYgrqHIiR6nt2HrtRNbqpw/9t6ZFYqWrYbuV5GCueLBZMfsaYNDtyG/wljOMziiKZ0cMs0M/j5kUzZllLNlCtfRkcKgiX6WS7KTelLf; 25:Z3pZp0wwuWlx0Z273ppFS256O+xov+2jZte5xnP9E5WGJonGcYb1UUGkBM79TjxqIpqVbN1wSIHvoaG3tAEddOX1XghQhBVxbRV35/sXXUy5jJPg3wq/LwGI7u4sMfsT8JobhyTxu9PL3O8U7oqesfndgtQMpVHVk258GhAuLddeNQGeuEOFfjn6+QfpgoVpJukPbtZPJnmK1ogjJo8B44PWYJ8EIcPHfB75CkbEUGulPxKqJCczUaD4lEDdgeiQp5sATckAbDTkNfxkZc77Ah7hh6IxxEBZ1uUHSs4f8183FqNdugbyOLI0XdpUfIyfcIDUqjQGWarJBC/mdqOMNg==; 31:kNkJuPZh1guwmKOUBtkyV+WR4/lfyFLSn0yLA5cKJ7U8WgM5WuDf1CtCzemzjpUxOGhWFL/nVo+PJ+jbHmUaYwV6uvj1ntdFzvnmGEcPYfYrqc0OB2kGhjeRDeoOAt35cnoxU24qQW5jbtY0jgaYjXpN78YKgioHcT79hH/uY28sSJjc7wOuM/Ed+dLxeMTJAgZO07Jc341tnw6MIn+UYdOq18MwhKHu8iXgrUPjbYM= X-MS-TrafficTypeDiagnostic: AM5PR0501MB2036: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2036; 20:UtAi6ihNZJx9H5+dfp5uH4bn4EzuiXG2rQPPHGwREV9+p4YkjkelVYSeMqm+yubgyZ+CMhzOQiG/bLBPpcCHnEaHPNlfkmpQB0Bt99FuQ9roc+yXS4wyXzKgDVcWhat5POgLXQKKTNk2DYQK+htE3rpm3xsGhK3cRuErAmEHky/R0uO099tSzcUeo6l89KE6GbLR8/5APUf2kECtHRLjkMbGQnFqx4XNT9Rs31NiMi98ShLGnU3Dj1qqXa9PPEoTrklvr4QKB6qdUhvoQ/M+U61rqNs+1nvo0FAG5L5QFjeA+HaXBJgm5nAd2RmeAt+b9mGYJpMyTbP1W1rK+v0DYUyrC2stfZegIX6to+qkK/oqJyu26JG2g8eiyzZu4Lcd8TG95hvLSGQylQABCkdq/9FGDgkKO6mFL4HqtbOuEb1wF8WihIziP1G8s09e/KBhzBcF6nhxocfhRVKUB3jOLrCywYUkNX1PKbWv6tG6F1NrNzZQsOBV14KYAKNyHM3i; 4:SdJwQ4U3Q02tFVZeGn2ZNWCW0FaFKbOpf+Cp/BD9M2Bnl9OLSshWjCJjbcyL6bqOaNq9J1UMDJFRim6q/DHq+S5f5Ub+n2pa9KxyXCi+yGj8kv2iX229fIAKIlN1zWdwnP6B31su4Pe8zAvC0x3d10fgmnyYN2IZga15eHNvs/nRCButaHmMm0Z4W6uif17pBtHlJpTFdBEXjdYU70Z9KjbAzii7PilnmDM4vdKVaH2Xew8AdF5OX1eCpjPU6yR62oD2OAcm+8SvTtM8UriSgoBK2JXVksxNyfuw0vSO7NQ9gydXMHGyG2j+Uf4nWVrISVjVG+5MyWPKFqGU+tHDHKhD0OPUdroyQOfo9T2ckAo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(189930954265078)(45079756050767); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(3231291)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:AM5PR0501MB2036; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0501MB2036; X-Forefront-PRVS: 0725D9E8D0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(136003)(396003)(346002)(366004)(376002)(199004)(189003)(105586002)(305945005)(50466002)(7736002)(966005)(3846002)(16586007)(478600001)(55016002)(6666003)(6246003)(1076002)(4326008)(81166006)(81156014)(23726003)(58126008)(45080400002)(8936002)(86362001)(316002)(6116002)(25786009)(2906002)(53936002)(97736004)(14444005)(956004)(186003)(16526019)(76176011)(6306002)(98436002)(7696005)(52116002)(9686003)(8676002)(66066001)(26005)(47776003)(33656002)(229853002)(5660300001)(386003)(6916009)(106356001)(6506007)(11346002)(33896004)(68736007)(476003)(486006)(446003)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0501MB2036; H:yongseok-MBP.local; 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; AM5PR0501MB2036; 23:GZWgsr3A1+dZ/SDuZCcL8voWiDhSn9fub/6QJr8?= =?us-ascii?Q?hLxl5hM7yLRUUuvWAlE7EGpbxD6npMMgHnLc/sDpJ3gWtCwIb3UbKz0fXjpd?= =?us-ascii?Q?klUcScTgX5O6wkjfjbli5+WFwmoeJIkHC60Lwl03eJJll+g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JFFM4lSlU74Mc8u1xrfp7dKWnDTw1fAZffGMtEGDcyx4uox7ZKQYp7JeWCrrj2TwtXy8vYziSA64rlHbU2tfzrblwLvsL/DTM6Bn13zhxYxy6VF7bOo4cOiSIHSoKiNtfInPo0uHMGjCBsffOaqyEp2ubtDpuaGSsb6NrYIVUtFE8XOZpHK+D0CBYuBxibjTxjqK22a3kPS6NTmWfL82v+42FsvF/ADQ2D+WI4LVpTdzxrod4391xiVgzKWP+IDE34JX9Jg==; 5:+a+4/kcKfYeqZP3bzb5gSWr5UDCm6RpbFlitD6nbwLbM4tx80J/zduBz8W1y1wBeGiEBDFDaeATro5cksC+277E8Pz8+SxciYK77djwEC/1RXw8h1fTNr8Op19+i9Ft1Fevf+UkEv592zKv+JBz/fr1O/C5VEvNc4Zh8BqytJpc=; 24:/WofhxX1ZGaNVuoZVIJGgXCraQFPBTYy3kVXzIqvTx/EeOxg9I6CtGdnfJhr64yqW9Ifa/mILqjaATYxSC5l5wyiDBsBo3vflMsMMWuMBLU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2036; 7:YtSqtsKVpAHieXrdwHVEpWTRUQxmQ5BnO+6bJbmBrpjVATJ3/OjDkb4PvyzUsrFuivbOkmrc8iyyVzzwMKKYgPrAV67bXbmd+FVaay2pXhY1R1VjwcBhVOFMv9/U5VCJr2xXbydWLpqI2TP3U4DrGssdawpdDpHWNNXLOe+hXQVa8Jkroe+r9tTrr30gbyS1fchXIMhX1E+4b1UQY9rnNR8cALv6P1cSVcAr3l0Puy/iwcH+lgIHFpq9pkfmRSvz X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2018 23:23:39.8884 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 83b6805a-52b9-4962-0e3f-08d5e3978236 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0501MB2036 Subject: Re: [dpdk-dev] [PATCH v2 17/20] net/mlx5: add flow VXLAN-GPE item 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: Fri, 06 Jul 2018 23:23:43 -0000 On Wed, Jun 27, 2018 at 05:07:49PM +0200, Nelio Laranjeiro wrote: > Signed-off-by: Nelio Laranjeiro > --- > drivers/net/mlx5/mlx5_flow.c | 123 ++++++++++++++++++++++++++++++++++- > 1 file changed, 120 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c > index daf5b9b5a..47c55b426 100644 > --- a/drivers/net/mlx5/mlx5_flow.c > +++ b/drivers/net/mlx5/mlx5_flow.c > @@ -53,6 +53,7 @@ extern const struct eth_dev_ops mlx5_dev_ops_isolate; > > /* Pattern tunnel Layer bits. */ > #define MLX5_FLOW_LAYER_VXLAN (1u << 12) > +#define MLX5_FLOW_LAYER_VXLAN_GPE (1u << 13) > > /* Outer Masks. */ > #define MLX5_FLOW_LAYER_OUTER_L3 \ > @@ -64,7 +65,8 @@ extern const struct eth_dev_ops mlx5_dev_ops_isolate; > MLX5_FLOW_LAYER_OUTER_L4) > > /* Tunnel masks. */ > -#define MLX5_FLOW_LAYER_TUNNEL MLX5_FLOW_LAYER_VXLAN > +#define MLX5_FLOW_LAYER_TUNNEL \ > + (MLX5_FLOW_LAYER_VXLAN | MLX5_FLOW_LAYER_VXLAN_GPE) > > /* Inner Masks. */ > #define MLX5_FLOW_LAYER_INNER_L3 \ > @@ -1302,9 +1304,118 @@ mlx5_flow_item_vxlan(const struct rte_flow_item *item, struct rte_flow *flow, > return size; > } > > +/** > + * Validate VXLAN-GPE layer and possibly create the Verbs specification. > + * > + * @param dev > + * Pointer to Ethernet device. > + * @param item[in] > + * Item specification. > + * @param flow[in, out] > + * Pointer to flow structure. > + * @param flow_size[in] > + * Size in bytes of the available space for to store the flow information. > + * @param error > + * Pointer to error structure. > + * > + * @return > + * size in bytes necessary for the conversion, a negative errno value > + * otherwise and rte_errno is set. > + */ > +static int > +mlx5_flow_item_vxlan_gpe(struct rte_eth_dev *dev, > + const struct rte_flow_item *item, > + struct rte_flow *flow, const size_t flow_size, > + struct rte_flow_error *error) It is almost same as mlx5_flow_item_vxlan() except for checking priv->config.l3_vxlan_en. One more difference I noticed is that it doesn't check flow->exapnd on validation. Why is that? If that's a mistake, isn't it better to make the common code shareable? > +{ > + const struct rte_flow_item_vxlan_gpe *spec = item->spec; > + const struct rte_flow_item_vxlan_gpe *mask = item->mask; > + const uint32_t layers = mlx5_flow_layers(flow); > + unsigned int size = sizeof(struct ibv_flow_spec_tunnel); > + struct ibv_flow_spec_tunnel vxlan_gpe = { > + .type = IBV_FLOW_SPEC_VXLAN_TUNNEL, > + .size = size, > + }; > + int ret; > + union vni { > + uint32_t vlan_id; > + uint8_t vni[4]; > + } id = { .vlan_id = 0, }; > + > + if (!((struct priv *)dev->data->dev_private)->config.l3_vxlan_en) > + return rte_flow_error_set(error, ENOTSUP, > + RTE_FLOW_ERROR_TYPE_ITEM, > + item, > + "L3 VXLAN is not enabled by device" > + " parameter and/or not configured in" > + " firmware"); > + if (layers & MLX5_FLOW_LAYER_TUNNEL) > + return rte_flow_error_set(error, ENOTSUP, > + RTE_FLOW_ERROR_TYPE_ITEM, > + item, > + "a tunnel is already present"); > + /* > + * Verify only UDPv4 is present as defined in > + * https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftools.ietf.org%2Fhtml%2Frfc7348&data=02%7C01%7Cyskoh%40mellanox.com%7C15334e781d3e4dec8aec08d5dc3fbf72%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636657088715446919&sdata=LwT6lKV%2B59%2F839S8M2wZPFeQwzxSDr8cW3e6zBTX4TA%3D&reserved=0 > + */ > + if (!(layers & MLX5_FLOW_LAYER_OUTER_L4_UDP)) > + return rte_flow_error_set(error, ENOTSUP, > + RTE_FLOW_ERROR_TYPE_ITEM, > + item, > + "no outer UDP layer found"); > + if (!mask) > + mask = &rte_flow_item_vxlan_gpe_mask; > + ret = mlx5_flow_item_validate > + (item, (const uint8_t *)mask, > + (const uint8_t *)&rte_flow_item_vxlan_gpe_mask, > + sizeof(struct rte_flow_item_vxlan_gpe), error); > + if (ret < 0) > + return ret; > + if (spec) { > + memcpy(&id.vni[1], spec->vni, 3); > + vxlan_gpe.val.tunnel_id = id.vlan_id; > + memcpy(&id.vni[1], mask->vni, 3); > + vxlan_gpe.mask.tunnel_id = id.vlan_id; > + if (spec->protocol) > + return rte_flow_error_set > + (error, EINVAL, > + RTE_FLOW_ERROR_TYPE_ITEM, > + item, > + "VxLAN-GPE protocol not supported"); > + /* Remove unwanted bits from values. */ > + vxlan_gpe.val.tunnel_id &= vxlan_gpe.mask.tunnel_id; > + } > + /* > + * Tunnel id 0 is equivalent as not adding a VXLAN layer, if only this > + * layer is defined in the Verbs specification it is interpreted as > + * wildcard and all packets will match this rule, if it follows a full > + * stack layer (ex: eth / ipv4 / udp), all packets matching the layers > + * before will also match this rule. To avoid such situation, VNI 0 > + * is currently refused. > + */ > + if (!vxlan_gpe.val.tunnel_id) > + return rte_flow_error_set(error, EINVAL, > + RTE_FLOW_ERROR_TYPE_ITEM, > + item, > + "VXLAN-GPE vni cannot be 0"); > + if (!(layers & MLX5_FLOW_LAYER_OUTER)) > + return rte_flow_error_set(error, EINVAL, > + RTE_FLOW_ERROR_TYPE_ITEM, > + item, > + "VXLAN-GPE tunnel must be fully" > + " defined"); > + if (size <= flow_size) > + mlx5_flow_spec_verbs_add(flow, &vxlan_gpe, size); > + mlx5_flow_layers_update(flow, MLX5_FLOW_LAYER_VXLAN_GPE); > + flow->ptype = RTE_PTYPE_TUNNEL_VXLAN_GPE | RTE_PTYPE_L4_UDP; > + return size; > +} > + > /** > * Validate items provided by the user. > * > + * @param dev > + * Pointer to Ethernet device. > * @param items > * Pointer to flow items array. > * @param flow > @@ -1319,7 +1430,8 @@ mlx5_flow_item_vxlan(const struct rte_flow_item *item, struct rte_flow *flow, > * otherwise and rte_errno is set. > */ > static int > -mlx5_flow_items(const struct rte_flow_item items[], > +mlx5_flow_items(struct rte_eth_dev *dev, > + const struct rte_flow_item items[], > struct rte_flow *flow, const size_t flow_size, > struct rte_flow_error *error) > { > @@ -1353,6 +1465,10 @@ mlx5_flow_items(const struct rte_flow_item items[], > case RTE_FLOW_ITEM_TYPE_VXLAN: > ret = mlx5_flow_item_vxlan(items, flow, remain, error); > break; > + case RTE_FLOW_ITEM_TYPE_VXLAN_GPE: > + ret = mlx5_flow_item_vxlan_gpe(dev, items, flow, > + remain, error); > + break; > default: > return rte_flow_error_set(error, ENOTSUP, > RTE_FLOW_ERROR_TYPE_ITEM, > @@ -1962,7 +2078,8 @@ mlx5_flow_merge(struct rte_eth_dev *dev, struct rte_flow *flow, > (void *)(flow->cur_verbs->attr + 1); > } > ret = mlx5_flow_items > - ((const struct rte_flow_item *)buf->patterns[i], > + (dev, > + (const struct rte_flow_item *)buf->patterns[i], > flow, remain, error); > if (ret < 0) > goto error; > -- > 2.18.0 >