From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0089.outbound.protection.outlook.com [104.47.1.89]) by dpdk.org (Postfix) with ESMTP id 4AB5B1B016; Tue, 16 Jan 2018 10:18:31 +0100 (CET) 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; bh=3wPq7d+C+ehQj6HBdg3pw00SVyPpGzmi/mWGTY9BByg=; b=ZsUQ42FB65MEAAgrk+5zakOnZEq2+fJ2lQFvnVaRJPBTa33yCRUD1MAbi3Ld53raNhLWhR17C3AsLadIfd0Ol5uEbZDiGRB2mfZwLGubJxM4XwmWZY1qj59zvhqF1IQtKyDUy3gxgjtmXgXXhq8lQ9HDGCTeJKjuqNsVrz1HQNg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (82.166.227.17) by AM4PR05MB3137.eurprd05.prod.outlook.com (2603:10a6:205:3::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Tue, 16 Jan 2018 09:18:28 +0000 From: Shahaf Shuler To: olivier.matz@6wind.com, stephen@networkplumber.org, yskoh@mellanox.com, nelio.laranjeiro@6wind.com, adrien.mazarguil@6wind.com Cc: dev@dpdk.org, Shachar Beiser , stable@dpdk.org Date: Tue, 16 Jan 2018 11:17:52 +0200 Message-Id: <68c1b4a1e1c53716343359a65bb216468ef5c735.1516093981.git.shahafs@mellanox.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <07cfe9a606927b551c3530a2b910ef88547d9118.1514705637.git.shacharbe@mellanox.com> References: <07cfe9a606927b551c3530a2b910ef88547d9118.1514705637.git.shacharbe@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [82.166.227.17] X-ClientProxiedBy: DB6PR0301CA0055.eurprd03.prod.outlook.com (2603:10a6:4:54::23) To AM4PR05MB3137.eurprd05.prod.outlook.com (2603:10a6:205:3::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f14b5076-0eda-40fa-4ce8-08d55cc21b57 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(48565401081)(2017052603307)(7153060)(7193020); SRVR:AM4PR05MB3137; X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3137; 3:bBwcPxsNY2r9x5J8nyD8b+gqlR1bcK8M1FKkK3ymmUyJW9/5KD0AVsuCH4hy1aiicDR08FrE4HiGKt5hcZr34fDnC1YCnjsLJbUD3KBhOW1AGUffBU7mmNDUXRGxi12RlVqJbb2Wo6GKjcgLXD+CPPcdnunZqoA08jkD8coRBaRWgz5MdoLf6prOuqjq5+SfXQD8jQADxAMmS6mXFFEkAotjhSPcZgP+oo4hFu4Pql1ZNuP3cmT/s/RPy4vqQMqQ; 25:OqMkxu/RQP5svmIAjUJCPIiA7QONMKZVy0oHXidx4sperWU3CmubN9EmP3jkQ0f1Hu9CwdBtxxrdeSFgdloMLPMLsWugQNj1EvwwB7cUuxrJcJHnfc7evtBmRAW8hV8TZFTlTTvwQ4FIPLvk/I27yAlavVVhRprGwslwdjYHgOuYvxfKoMNoth+0UzHAAUKTfwTC5gVr2aeSwHT3HAwdyJ/FKLjb+ps2to7JrH+X070FAvZgegZc4VJ6chKFHgCTUTCPjAaRfUOR6E+Q9CvZE5lSaa6/+k9zQ44x98xKBjYY5676QA8L63ONpA8ib4TAfpppcbm6MzEES2SktSml6Q==; 31:qHa9M/L+yvsI/oAlB9xgtk7Wr1FBvauUwLiyWZ/4Hk/Y8HYW8Myc7wJMsMCWQNLoJOKhlt/m9/3v8ij9Sffy7NjJT50rmdBXbPPr8uOm/HICKiV9SHLaatNUQu5WRSFDuyc2TC/CjdppiQUsfTyBTC7PDQycB41nL6ymNicaJkRMuSTjW7Go0yIYwYvhJlE2vkf3XglSkM1wPVL5qgQDzcm5lflYJLfLo8OemLQeGzs= X-MS-TrafficTypeDiagnostic: AM4PR05MB3137: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3137; 20:IRyJ3qVzXqg+3RmLt+gxB14CVZLfZW/npbS6Ej7HEsGxMTWbI5PF9YYnuoVG+iawby7f5P5hXz6bEOAf1+wPFTAtIvaa0ZllmnikdmajN6cq0Evk5Udm240f8DOP0ZhIfCPk6LUPLeWjKwPDFnCSt+12y4HQcDh3gTWx1OdduS71SF+KbaKAeWSI2v7uCx0bj3pMKgivkpAHYswvDJCD6UUfvAKgH51qFGmHUNrVSuJeLGr1j5C39odgFnPYVP6iZd18pOWq8AMhHQA95NdhgHO6nR1+gukZvCcl2ulOEm6mYq0yYk06UAK2nuILrBxKToUZ+7+2A5Q48EbRGkcuI8gE2yus/ZKRATBxyG8153Jvrg3e+Z6hVz27JZRg1ziExLQfcisjQNN09Q39+osrGnZfPcKphbCXnk3w/lEniIEjVlCHWG5ACRNeBVi7ctbP2xCxkOiH297LavV93+JBDytDy96qqzNcqjlwIdJViXca8U6GLPwkh9XUG7apbYje; 4:5pKegiztzxCqZoxPMHNsTfXa02x9XajhN0tF0QDZcGQ/vBM3vHy8j+ChV7JK1pr1xlWsprLVXFZnL3iUzejOqIOEM/VQ4H2q6JEWgwqKAamYRqlWu8+Y7EIVSVSEUArnqrzUjHtJN3ed2x+IA+X/w7KQZu9lHnlpsSpo1/0ylGgfK7MF3fWWAwlUa4gERQ2gA007uBkHNcckUB6l6DruFpqEJH/WNBnWxUYOvThEAK2I/xRCvAYRR7/NJ/OgDP/OvIdc5F5OIJCGl5/TTKPjww== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231023)(944501161)(6055026)(6041268)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011); SRVR:AM4PR05MB3137; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:AM4PR05MB3137; X-Forefront-PRVS: 0554B1F54F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(366004)(39860400002)(39380400002)(376002)(396003)(199004)(189003)(316002)(106356001)(86362001)(36756003)(66066001)(33026002)(50226002)(8936002)(7736002)(305945005)(16526018)(69596002)(47776003)(8676002)(16586007)(118296001)(50466002)(48376002)(105586002)(81166006)(81156014)(21086003)(97736004)(2950100002)(59450400001)(4326008)(25786009)(478600001)(53936002)(5660300001)(76176011)(51416003)(52116002)(7696005)(2906002)(55016002)(6116002)(3846002)(6666003)(68736007)(386003)(26005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3137; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM4PR05MB3137; 23:8R6qr0nB6UDXsR2KkSEktPf2jO0x6dz2prPKnNr6M?= =?us-ascii?Q?a3M9IfwxuIu+Oh5FDyHVZO6caeJ+sX33QiIWT3thm3fI1lgIQ58zJuCqRpCY?= =?us-ascii?Q?NOesnM10R57JdSEmBECG3s/Mt21D12af3RUy67b5NWqKQW3gZEyQME3ADien?= =?us-ascii?Q?9dmNieLuV8J6Bt2fFypzq6EUkeQRmr6/CG6x/u4Jap0/npqpZXSlRv+abbvE?= =?us-ascii?Q?dTecJCQuKsVoZwE7RGDDikzW/w4dh1m4YZJ4LKAsbeCu8Nfp26dneDR7yr1g?= =?us-ascii?Q?3ZY88ifkcWFhqQng480/NyI01yfpEj3W4qsiIAf6EMRq11+xRR8hu/porRKu?= =?us-ascii?Q?QfLdlnznfJHasYmWrZi6aDh6y/HHAYE01tWmJadReercxKB2tijPrYsSUoFZ?= =?us-ascii?Q?3P/IZ2FHZA5ptauW0OLIB54g2qjDmn6pkuJHzRiVOGjmC6vOA2+SF0hDrABe?= =?us-ascii?Q?Hhb8M2tkultjPRuyK2oPaWw4+VwebtSGcwlhpuYjmcJSPxrlRsEy3eEb1I/D?= =?us-ascii?Q?GLr5dTHMWSY30hOPqSoZIAGcnHDx9a+oUNx81VgkuxtDqgnDI/+9lzdFOcut?= =?us-ascii?Q?GnFC47cVvXuun7GOFi38jnvXdWUa09C6/+4exZ8KZ0SIIGWO5fHz5sUhDpPR?= =?us-ascii?Q?LG45DOzfjN0oeQWX4ZeZalu6v0syji9jbXBiZCaHZSRqAyU2Kvr8+M9awpYC?= =?us-ascii?Q?EA3M4mgSWed70jAyJ1DhXgdSQHgtmiMtEXkuOyrbHOd2jtEfuy0yaltUwgAF?= =?us-ascii?Q?lG/NuEcqf5Y478i4n6RMlBgWH6SdpOC3+PM+PDBtJwQvNjx1zR+x8da4pQgt?= =?us-ascii?Q?U5jzENUS4K3mk5+aIBiCT0Rlv5bCCWNcshnXl/uxpnWBJXsrybc6VyWJaf79?= =?us-ascii?Q?fuOwSHhjDN1ej0uQNEPT7Y++kxQ3jMmNGlIcO52SALicuzPGF8aLriyTWpdI?= =?us-ascii?Q?RivwmaThijAWiI2iyRAUghi3faTR59nTHHoqHw6BQ+y9mzcQw97Vykga52Ws?= =?us-ascii?Q?iHJMpsCMUVPwuHYZSJFF0czuRa03t4sgcQdFczAgybVmaEZs/j8ybj9S9KBp?= =?us-ascii?Q?GDgw0gp1Bv/JqlpnDeT+5Ocdsgv1zXk9MQMmI+wr4LPITS8g4Irf0nckNqwv?= =?us-ascii?Q?GMjmwQxPtOUXknI3En22QhDppXxRiXUhwGp8yFUFcJW47WwCEy/pQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; AM4PR05MB3137; 6:r72/4N5gpxkspej3rED3fYS3YV+VyDVLVHiqilUSuGKk1ULIvamnglnGX0pRQ0JvR9VH24SU+Dv5StdNouMwTw7nqfFwoL+f08iHQ3wwjUGohOBmiAfEL8F+O9qWk/B4Nyo4PXD24OjjtgvmDqrHBmy4+mZYsR0iiJJMQQ3aV50qymgO4LV9oH5YL7N6rro/IBIG4iNtRtx+56LrHsi6N8HpqoYyFHYPGT+sYyI9Gca9gTO+e0RP7MOF5pjxhG1vJnrsyTKQdCvVwjhSbxhUpJ2Zbnv+MYsSFaHeO+IWxc1HCm6b1QB59PmGXtPkfLVy2IVZK9zYODP/m6RwrLLGiufxgaZ8EZN8cHAfJaXb+us=; 5:UIsJwbGqgVXx0nFK9syWw65qaZwIq+ZegatzitTElYvnsUFyNRUF0n5vioEQizlRSQfUewsGA2b/yM7Z06DfhqBEMt/5v2Gr3XHFEof04r7G9pCzzry0LO+87/eEZsE7army9LZTv14HeFrOgz2NPRhcluNjcSKlC5H3QN0ppvc=; 24:gz7ZsIG91xwBx7hmUZwTtGJZOsSmdc11wY1TbWiD02Pm5mA0jgpiDk2clTUCEL4+tZRUTDxg2Jio+RIfQwpu8l+zHPeLlWxIUe1AyGAqJOs=; 7:PSUoZtWQ9t31hkast/I1XFXWa2a8veGZxY8+2iuiO34LhYgcAX4Dmrd4sGZGP1Mj2Pa9IU61KAhepw+J1N+sZbtamxLPtOWGApAUI8FKbRjz4Ju6G1AVRb2WrtMDfxfCvqzuuqk+lRd2MUEUhl3cniJV1CVKXbBkqNtRJ+CacjfWSxCHZxA5uL9bJ+Su1qIGqXOgeYolTGvsnWxgo8eZBo+WAeRQMriUJEt62+JWtwLuxN9VNN7BwuYNArVNxTUQ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2018 09:18:28.3347 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f14b5076-0eda-40fa-4ce8-08d55cc21b57 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3137 Subject: [dpdk-dev] [PATCH v2 2/2] net/mlx5: fix IPv6 header fields 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, 16 Jan 2018 09:18:31 -0000 From: Shachar Beiser There are parameters that are not copy from spec to verbs structure in the vtc_label Fixes: 43e9d97 ("net/mlx5: support upstream rdma-core") Cc: stable@dpdk.org Signed-off-by: Shachar Beiser Acked-by: Yongseok Koh --- Sending on behalf of Shachar. On v2: - No changes. --- drivers/net/mlx5/mlx5_flow.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index ff9fd78d5..4396ea852 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -48,6 +48,7 @@ #include #include #include +#include #include "mlx5.h" #include "mlx5_defs.h" @@ -1410,6 +1411,8 @@ mlx5_flow_create_ipv6(const struct rte_flow_item *item, parser->layer = HASH_RXQ_IPV6; if (spec) { unsigned int i; + uint32_t vtc_flow_val; + uint32_t vtc_flow_mask; if (!mask) mask = default_mask; @@ -1421,7 +1424,20 @@ mlx5_flow_create_ipv6(const struct rte_flow_item *item, RTE_DIM(ipv6.mask.src_ip)); memcpy(&ipv6.mask.dst_ip, mask->hdr.dst_addr, RTE_DIM(ipv6.mask.dst_ip)); - ipv6.mask.flow_label = mask->hdr.vtc_flow; + vtc_flow_val = rte_be_to_cpu_32(spec->hdr.vtc_flow); + vtc_flow_mask = rte_be_to_cpu_32(mask->hdr.vtc_flow); + ipv6.val.flow_label = + rte_cpu_to_be_32((vtc_flow_val & IPV6_HDR_FL_MASK) >> + IPV6_HDR_FL_SHIFT); + ipv6.val.traffic_class = (vtc_flow_val & IPV6_HDR_TC_MASK) >> + IPV6_HDR_TC_SHIFT; + ipv6.val.next_hdr = spec->hdr.proto; + ipv6.val.hop_limit = spec->hdr.hop_limits; + ipv6.mask.flow_label = + rte_cpu_to_be_32((vtc_flow_mask & IPV6_HDR_FL_MASK) >> + IPV6_HDR_FL_SHIFT); + ipv6.mask.traffic_class = (vtc_flow_mask & IPV6_HDR_TC_MASK) >> + IPV6_HDR_TC_SHIFT; ipv6.mask.next_hdr = mask->hdr.proto; ipv6.mask.hop_limit = mask->hdr.hop_limits; /* Remove unwanted bits from values. */ @@ -1430,6 +1446,7 @@ mlx5_flow_create_ipv6(const struct rte_flow_item *item, ipv6.val.dst_ip[i] &= ipv6.mask.dst_ip[i]; } ipv6.val.flow_label &= ipv6.mask.flow_label; + ipv6.val.traffic_class &= ipv6.mask.traffic_class; ipv6.val.next_hdr &= ipv6.mask.next_hdr; ipv6.val.hop_limit &= ipv6.mask.hop_limit; } -- 2.12.0