From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0040.outbound.protection.outlook.com [104.47.0.40]) by dpdk.org (Postfix) with ESMTP id C86251E2B for ; Tue, 5 Dec 2017 10:38:07 +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=z2KLPjtCxhGBD7xIJ3tvkBSAM4jVToR3eG2itr3Fupc=; b=ZjJ+4Exu2EuumeY3bmCz9db5Y4YNP+6Kxkmfqp/XMNO0wrgsodMJXnPVtrDAmlvpTR4fUwiy2R2NoyOKkh1S4KDzLkVKuyUstsuthUCVzjp8dUFkhctu8Jtgx5x1x/Ol/QC4oy1NbyPgYwZ1XZTJq8/r6WLKiZu9PvgEwupwwGA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=rasland@mellanox.com; Received: from mellanox.com (37.142.13.130) by HE1PR05MB1228.eurprd05.prod.outlook.com (2a01:111:e400:50a5::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Tue, 5 Dec 2017 09:38:04 +0000 From: Raslan Darawsheh To: dev@dpdk.org Cc: shahafs@mellanox.com Date: Tue, 5 Dec 2017 11:37:50 +0200 Message-Id: <1512466670-19229-1-git-send-email-rasland@mellanox.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: HE1PR0102CA0023.eurprd01.prod.exchangelabs.com (2603:10a6:7:14::36) To HE1PR05MB1228.eurprd05.prod.outlook.com (2a01:111:e400:50a5::26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: a1298161-7e5f-4d14-183b-08d53bc3e2cc X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603286); SRVR:HE1PR05MB1228; X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB1228; 3:UmhGfKs5/h93b9DmQqV5pt5mMMmoE21Pr+Bmu8OzbdoRamMd9KdczQ1XBh3b/rPYAeJnXmNfaiH+UdvPNOd6Q1x0FCgcQTwRqJVeuc6qSCtn3Y/Zk1XIlc5OSjsJyr4mF/7pcJy35lbqyVa3QRTXwqBl3F0J5uNHKkV65/fHHq5sFRRDW28GV4xG1p8cSq+e1CPWVVE3qhE8PXIfZ93u16PlPCho0NYalAUJaeN4KGLKRLMLTWqpyirFPVWQuQGo; 25:AjFNkKpFYUBJ2Zpqr0vNAITEqm85OqTTI8xFNuB2kZcw3hPWBVPkWVyEUWMKLyopNLgqrw19PeCF0Y2ApsCCrBxSkR/0DCpyE3y/OISu9433q0nANHlpvz8B6OM6Gp9ym1jA8kefFvpvjPP/DwtCotbbwZSFPq15vCTdnKwSnj68dlVP4l9gmt1n1PiQITXwgAu0dcjHU6bQWhQHDzTFC8O4xh2gA3UpcnBhkwiMPDc7R336+LIlVuD+01n8e5lrqvZFxNszk1D+Qm5J0/SVZXDRJP4unTWzYEqpTUb7fWLOEU9yl/bIBrZT0Fn1qRL4VaHmi/BNKDVcdw+4XqJGcA==; 31:+7giHgyEyDjQFjbKLmr//TRPYU22nC2SHeO115eMwAsfZqAHJ1cRc06CcmCkDy8hhgnPH5XfedM+uTDB9uFcJ0zumR1+1mWBxTLZToEA54IoTyH9uatzy8X3+1RJ7F2YaShsLVEqjSBgVlnOaX2cnGGEv86IqtWZxeS04NNZ4qIQb29ZPs6nkFfkU5/RPrnnG0FWcTCZeOjobA5IPXSOEwcNCM4/TNBYE8ZmoYqOv6I= X-MS-TrafficTypeDiagnostic: HE1PR05MB1228: X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB1228; 20:JY/al6SnnD4HTG+omT0WwwC3biuaDSOn4qo5bZKUTXmwbWJ5LBuX55i5Jvf0U1jp+o9IxaO4d6pGsEiGCIFsQ+hvdY9vH2H0KKZKo9oCSP7i8PxPYRCoKUsmzMH10xIIUg+LVUpo4InMXpk74Zp05BZCncWyuXjKix9xUUfIt8CWyyy8P+i5zrJCFGy5u5L8OIWTz2KWCMat2tZm8p50aSSeEZ082Ee7uVUj6ZI8oODBImJNuo1fpVJfw+WSDoi1LnUSOVrNre5VNJzdBAiaonrTDtXePifXF69TnztAczyyIaJpD2UWeSu9IXNu1YEkbTjJLt2bQwYGIl4BjYH1JfcNt7rG6k6YfaqEYGTFNKLsRQtBJm7iUyN4Ky/e3fb1XH541Y1gkOEGOZ2MJ86s3P/6NWSiuZnTcsLIfISX+L2h9MSlzt/cVsPBcs1rnB0iCDOLnNh33rOrILMPdoxzgusXXNp8xJ2rjc/8UI6Z6hlrPadY+Ha3BNdIqw8gjyyw; 4:sFJ9qKd31hgFSG+5FNM/1RVZ5U3ozxEvpejV28dh01uTApFOHpNtUpuHiMqj2qIc5HCDwnWBNTDfqhJ59WqOKYXLvCEEmWX0ttrQpeZT//RqEzGXdaz/NSeYVbehzcxOqoY/HMY5aF3NNoeCmqvpz8i59H76+bqWFL/Ov3lzTE4UgSS4fsY0wIfKCQLCFuzHPJ88xa8s6ffTGOWD/SWglzfAHDgZc6ICRxEFfoKJrxbk03aE008k+l0lVE+k6Oj9qO9wMav2seyvokP2VOhCOQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(3231022)(10201501046)(6055026)(6041248)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(20161123555025)(6072148)(201708071742011); SRVR:HE1PR05MB1228; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:HE1PR05MB1228; X-Forefront-PRVS: 0512CC5201 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(366004)(346002)(376002)(189002)(199003)(478600001)(316002)(21086003)(189998001)(33026002)(33646002)(69596002)(3846002)(7696005)(25786009)(16586007)(6116002)(16526018)(52116002)(51416003)(68736007)(8676002)(4326008)(106356001)(97736004)(2361001)(101416001)(8936002)(50226002)(2351001)(36756003)(305945005)(50466002)(6666003)(6916009)(5660300001)(47776003)(53936002)(66066001)(2906002)(81156014)(105586002)(7736002)(81166006)(86362001)(55016002)(48376002)(107886003); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR05MB1228; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; HE1PR05MB1228; 23:ow/XEkJOBmcm6rsIjq/+SD8KAs0fUdgJJ810A2K/L?= =?us-ascii?Q?UJiBT7Yl5l2mow6R2pmjgowXMI5hFlsluUT2icVgMroBn8ZzbBD7zypvLEoP?= =?us-ascii?Q?ZO56DmrbRUod3pdHNc81OU4g2gWlKviTOspboGFUh+IqFqbfex94bVglS4IG?= =?us-ascii?Q?YfNbIVvY5N794loiyDkkTOFmtQqILEDNEdFBN9woxfU9wizXT/7rbUqxpFIP?= =?us-ascii?Q?FSMCoOK7/CoZdYs+JW5mCxs36i2uZvyLCTeCEtIGLRhVhwMRDgC480h848AK?= =?us-ascii?Q?UUSabWyThH6fR+pdon2o0NhfzU/74kG8sMbORuKPng/dK1npQqNN3hkjFW66?= =?us-ascii?Q?DE7NN5mRm6xYokCkTzpGOnfiANG5Olj9txAjreLNyRK/dSLDvrioMVf+w4Re?= =?us-ascii?Q?jh/paIo2pgMQUa2hXlWxZ6NcajskJiPqbYLdLHqdzHdCYxSqB/5X9cF0MWLX?= =?us-ascii?Q?Xlw8F6jYqhT3M7/e0NUrLA3wsnjEJYA6zv0Qvvs7L0WQQazsJniXXhPeuRtI?= =?us-ascii?Q?Ytoz+DA022UpKzhJfApnvYI/rn4hDFYPk7LPOiQqoKBBVNIPz5kxNiYXQls9?= =?us-ascii?Q?oeigGTE6E2dqpJfvMhG1liZCC5n/ddC9FPkR4cxM8G8fTkbvWkQ1p9JOsnPk?= =?us-ascii?Q?ltjWNR8Gpb49Vn0QfMBtbpoRZgFmNr9oJgpgdUo1TePK0DElRH908scyu5TB?= =?us-ascii?Q?Gip/OCOAhGc1WKnhO36J4TbQtlVHhayZvfSP6yu/dl4GdwzPlXNBi7cTJvcb?= =?us-ascii?Q?MkI2P2bUxzPwzr0+0zNjiKvpimjmp0NRochhA1U8O4WepznK6o3WvdMWHfAq?= =?us-ascii?Q?C4xWl3Fy+1lvsnXpTcmD+VHMW9FB09EFKF9w7g37hJ7Jnk78ZkBZnS1FYvBU?= =?us-ascii?Q?/v1elgoONITEIkSUtn36OcbmMILqDuO9xjHMWEBTQFFC/4Vt5+M0evUnAKo2?= =?us-ascii?Q?tvfFfqKf2uUbSHr242usgQKV5HrIsNygpXI5w2qA5MHluuiAC9qjHZoaq99y?= =?us-ascii?Q?MzuZKFE3K7tlRA7qU4SuTi50ALbUmyRUrX614uvoJXDvQJeDuyJedcYM1Bb9?= =?us-ascii?Q?fm+vkV3h5laeQtga49S42NZsaXiwnX/j4sQd4tYOZ3NMuFqejg526eJSzYur?= =?us-ascii?Q?yVECFeWskAaRGZhAnzcnVyame4IpXa4b+YIB9/buTQoTG//8gTUsA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB1228; 6:KYUc2znfeLP6lagZZweO3+PlqNBIAFtDK589ToTBkAFnjxuzr/W1CsFRtMbEBGHrkUIMyidBESEGO5FKTYC/zDeVunnRAe2nYHOgmJzmZ0z3tApelV9q+EsjdhQrDGss1/2lX3CKuquIEd8IngQoPTZX1/baZa/ITyUmL5VEhk1O6iH+mxuySrd0Ie+7YLwJgbN8WwmVc6Ja1LYFjUmkt8ATspFVbwf8FKlXGd+VTeDrdH+xa5LJfLtYx8N9QBnuYy6LI4Taij80t1+dg/dm+KlG0Ah62Jjm8ZI1h7xhqcVgXbSajSAIWLxgluZt6NlPuP3YSrHustAVVKjYuyrl06MTS1G9uIAy2ZXIevQcNow=; 5:Jnu9lhI6rdEBV9G174/79SPYFGWkA79fgh/IltYOZA8KCyn/RgJhmu2UqbhDdfujmzzgyf9IWVTqzC9ep0wTLHbyeOFemFFpE9wZDYD77nTVEXvpioA+6VhVYSZMZbb66YBsrAraT0xE1N1I8nifgK986m4816nBOEQdbBxB4+A=; 24:8161rjyDu/4Bf3QSYrldUnbyixrP1tfO0Z1KQ3lkD4/St015ETW26rin048+96tMWnhxNOjRu7gH1bOTXgz0lftjD6xGdaAFoUcUiCworpQ=; 7:3mlozUOphIAQ3ArunxyMedR+BORnun85NbocVmDHZo00++L0OhGjcFy6vp6BJEu+Ju+gEDmxDQ7RNZY8HqVJQvJWjxyHv0Wm0d3lc/mFLHV27X5rwuXKAv1Nkci/SASWYHQeL06j9ucBh3zLNEk99yAIULRkucT81yRf1/ThWWeG59igGYaYoy76AOUV14aBacd+4dpMUihI2R/rqwiSW7dOYbCvqlXLBTGoWekJIBjweLc0Sl91aIRw4+HpjGiF SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2017 09:38:04.7168 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a1298161-7e5f-4d14-183b-08d53bc3e2cc X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR05MB1228 Subject: [dpdk-dev] [PATCH v1] net/mlx5: fix flow type for allmulti rules 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, 05 Dec 2017 09:38:08 -0000 Chnaged ibv_flow_attr type for allmulti rule to IBV_FLOW_ATTR_MC_DEFAULT instead of IBV_FLOW_ATTR_NORMAL, in case allmulti was enabled. Fixes: 272733b5 ("net/mlx5: use flow to enable unicast traffic") Signed-off-by: Raslan Darawsheh --- drivers/net/mlx5/mlx5_flow.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 1eda836..eaa53e2 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -429,6 +429,7 @@ static const struct mlx5_flow_items mlx5_flow_items[] = { /** Structure to pass to the conversion function. */ struct mlx5_flow_parse { uint32_t inner; /**< Set once VXLAN is encountered. */ + uint8_t allmulti:1; /** Set once allmulti dst MAC is encountered. */ uint32_t create:1; /**< Whether resources should remain after a validate. */ uint32_t drop:1; /**< Target is a drop queue. */ @@ -1165,6 +1166,17 @@ priv_flow_convert(struct priv *priv, } } } + if (parser->allmulti && + parser->layer == HASH_RXQ_ETH) { + for (i = 0; i != hash_rxq_init_n; ++i) { + if (!parser->queue[i].ibv_attr) + continue; + if (parser->queue[i].ibv_attr->num_of_specs != 1) + break; + parser->queue[i].ibv_attr->type = + IBV_FLOW_ATTR_MC_DEFAULT; + } + } return ret; exit_enomem: for (i = 0; i != hash_rxq_init_n; ++i) { @@ -1262,6 +1274,7 @@ mlx5_flow_create_eth(const struct rte_flow_item *item, eth.val.ether_type &= eth.mask.ether_type; } mlx5_flow_create_copy(parser, ð, eth_size); + parser->allmulti = eth.val.dst_mac[0] & 1; return 0; } -- 2.7.4