From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50041.outbound.protection.outlook.com [40.107.5.41]) by dpdk.org (Postfix) with ESMTP id BE2EF47CD; Mon, 13 Aug 2018 23:43:11 +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=ArWvqmLRkkMCe7+onw9ZqxlndscIOS/AcLHORYHkCWk=; b=o7jjiO4C2ulVrYTEH1aPjdRAMgYlQgdUWxAz/DMlpeIYpCzpLVTHhYWrLveyuzzvxLBdlJ7xhrOD3fbc6VuFnuh1bjMv81fFsccmxOmsx+ERyOLIgZPN2oZlK0h8AhLPmmuJUwmsE6fLgtFBi+zDDAcPYiVEjLp8rc7A5Nsck8M= Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com (52.134.72.27) by DB3PR0502MB4011.eurprd05.prod.outlook.com (52.134.72.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.18; Mon, 13 Aug 2018 21:43:10 +0000 Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::112:180c:634a:c61c]) by DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::112:180c:634a:c61c%2]) with mapi id 15.20.1017.022; Mon, 13 Aug 2018 21:43:10 +0000 From: Yongseok Koh To: Shahaf Shuler CC: "dev@dpdk.org" , dpdk stable , =?iso-8859-1?Q?N=E9lio_Laranjeiro?= , Ori Kam Thread-Topic: [PATCH] net/mlx5: fix RSS flow action hash type selection Thread-Index: AQHUMi3aKrd+VQd9fUS4e+8PKpbBEqS+OOSA Date: Mon, 13 Aug 2018 21:43:10 +0000 Message-ID: References: <20180812111441.149234-1-shahafs@mellanox.com> In-Reply-To: <20180812111441.149234-1-shahafs@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; x-originating-ip: [209.116.155.178] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB3PR0502MB4011; 6:8V95K5qG5ilzsPDf7RIxStP/yNJ+3XYxcDGk3UFHmndl5Qk5V2cau6aByaaNlehFfiX4UZ77V1bL16pYz0ntbkoVa1e1N1DDYpPOMWPgz0WhEYlsbmPGEFSN0vZ5zDSJ7INycaKB9ZE2mP8dmasm4v2tgiMaevydCVeMUz/lZ5X7q487x7wlvugsfRLP5CMNIQv12IjYdk7NiBh2NkhlRMeMyKNIl2fno++NUNb142+MG7N9uZCJAQkuBHwVmecXVbJvjhAvFxR+asCU/+Lw52fA0kkF+t+U6ByiYZZkXeQ8zh/BYuTpd4RkBnRo6iynXTfvPegA2yIhOzwrv0Ft5sRt/OadpQZuDbWVe9yNxKvYJdeaM0r93xXZLFb4a9wF85PW+ufwdTUhZ5iAIEy37kqddVB1jD0sur3NAwaS770hJo3Aw1YpwyGbysE3Wrpr63XhNcGukruYAbTPNhR2mQ==; 5:79bzzC/Vkp+eVSaRc4uCSyf24bZXsGv7y5hDyZWOFspFBJcX1VS2H9Z/wiG6ASOJTVhl43655HeTto8qgjEUG3spB8cxL7p+ERdLcwTQARSy41bWwRaySqg2GS3qbmDflJOPsoMylyuIXwJdZz1TU8fzDdDAlFat/pT+J5WjiOw=; 7:Ns13l2o4XeR8/rkX7+z3cgM8eievjFWG2kHDsGctOTKrbFACWRAuDeqZ2UYQsavptnTYCrMvnA8vDUVz6vj6mVXpxuDNoDScxYGTlBkIXvpeDzv4CV0Ua7Ohnc5H8Yf6pB1d65A9ESKsJFaYGmmQoSaZgh9WIIPRGiBJzGpi42ApvTmuO+gv0dkR2hBtptgSLqlN22/t4eMmpi5IJ0gdnC6wSAcwR8NM3AIHx0Fqr/e/Sw1LCAx3BzVtb02IKJpS x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 0c54eb8f-4a8c-467e-c9ea-08d60165c384 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB3PR0502MB4011; x-ms-traffictypediagnostic: DB3PR0502MB4011: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(95692535739014); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231311)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:DB3PR0502MB4011; BCL:0; PCL:0; RULEID:; SRVR:DB3PR0502MB4011; x-forefront-prvs: 07630F72AD x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(396003)(366004)(136003)(39860400002)(376002)(199004)(189003)(305945005)(476003)(76176011)(446003)(575784001)(99286004)(486006)(53546011)(106356001)(316002)(6506007)(14454004)(54906003)(25786009)(6116002)(86362001)(11346002)(3846002)(229853002)(37006003)(2616005)(6862004)(4326008)(36756003)(7736002)(8676002)(107886003)(81156014)(5250100002)(2906002)(83716003)(81166006)(82746002)(26005)(5660300001)(6436002)(66066001)(2900100001)(33656002)(6486002)(6636002)(105586002)(53936002)(256004)(14444005)(68736007)(6246003)(102836004)(97736004)(6512007)(8936002)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB4011; H:DB3PR0502MB3980.eurprd05.prod.outlook.com; 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-antispam-message-info: dddobLw6yCX1nwKqH5ql86w84ZI4oNzuW83oPTR9bPWwEJ3+Quodf4wb7y/JG3boAlOyVL3S4G4GoLP0YUmOm2RmifcH5hq48kjFMC5/hNDVoLwPtJxpUgDUvwcgMVL+bcfGJsWC8BSZ1whmiBCru1PFSZ+6e5/Nex5DhVLAXk16SO2aWEt+KnAO+ojo4UfOAar0JPJcQ6cxG5iU6CWI6pEqs4kDSlq65m8vJPdChifljB9HfjNCXZzfm4UQFFffW/bWkAcS5qn29waKmJRdMmO3v0Rtzl8rp18bpliTR1Pbb1HSv9fGuCJ2KYWyDW87YazPgfQj8JM02aWkKV9uIbsMIm+btFKLKPy+52FZLm4= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0c54eb8f-4a8c-467e-c9ea-08d60165c384 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Aug 2018 21:43:10.1787 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB4011 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix RSS flow action hash type selection 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: Mon, 13 Aug 2018 21:43:12 -0000 > On Aug 12, 2018, at 4:14 AM, Shahaf Shuler wrote: >=20 > On the code after the below commits, the criteria to select the IPV4 or > IPV6 hash functions was the existence of some ETH_RSS_IPV4 RSS types on > the flow rule. >=20 > The check is wrong. For example ETH_RSS_NONFRAG_IPV4_TCP will not select > the IPV4 hash which will cause the packet to be spread in a bad way. >=20 > Fix it by adding the corresponding types needed for each hash selection. >=20 > Fixes: 592f05b29a25 ("net/mlx5: add RSS flow action") > Fixes: fd0b70316bca ("net/mlx5: support inner RSS computation") > Cc: stable@dpdk.org > Cc: nelio.laranjeiro@6wind.com > Cc: orika@mellanox.com >=20 > Reported-by: Yaroslav Brustinov > Signed-off-by: Shahaf Shuler > --- >=20 > Few notes: > 1. this patch should be backported to 18.08 stable > 2. There is more work planned in 18.11 for the flow engine. > The work should be on top of this fix. >=20 > --- > drivers/net/mlx5/mlx5_flow.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c > index ca4625b699..da96932da5 100644 > --- a/drivers/net/mlx5/mlx5_flow.c > +++ b/drivers/net/mlx5/mlx5_flow.c > @@ -1053,6 +1053,8 @@ mlx5_flow_item_ipv4(const struct rte_flow_item *ite= m, struct rte_flow *flow, > mlx5_flow_verbs_hashfields_adjust > (flow, tunnel, > (ETH_RSS_IPV4 | ETH_RSS_FRAG_IPV4 | > + ETH_RSS_NONFRAG_IPV4_TCP | > + ETH_RSS_NONFRAG_IPV4_UDP | > ETH_RSS_NONFRAG_IPV4_OTHER), > (IBV_RX_HASH_SRC_IPV4 | IBV_RX_HASH_DST_IPV4)); > flow->cur_verbs->attr->priority =3D MLX5_PRIORITY_MAP_L3; > @@ -1188,7 +1190,11 @@ mlx5_flow_item_ipv6(const struct rte_flow_item *it= em, struct rte_flow *flow, > if (size <=3D flow_size) { > mlx5_flow_verbs_hashfields_adjust > (flow, tunnel, > - (ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_OTHER), > + (ETH_RSS_IPV6 | > + ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_NONFRAG_IPV6_UDP | > + ETH_RSS_NONFRAG_IPV6_OTHER | ETH_RSS_IPV6_EX | > + ETH_RSS_IPV6_TCP_EX | ETH_RSS_IPV6_UDP_EX | > + ETH_RSS_FRAG_IPV6 | ETH_RSS_NONFRAG_IPV6_OTHER), ETH_RSS_NONFRAG_IPV6_OTHER appears twice. And hope to see the same order as in rte_ethdev.h Thanks, Yongseok > (IBV_RX_HASH_SRC_IPV6 | IBV_RX_HASH_DST_IPV6)); > flow->cur_verbs->attr->priority =3D MLX5_PRIORITY_MAP_L3; > mlx5_flow_spec_verbs_add(flow, &ipv6, size); > --=20 > 2.12.0 >=20