From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0068.outbound.protection.outlook.com [104.47.0.68]) by dpdk.org (Postfix) with ESMTP id 311FF2E81 for ; Sun, 6 May 2018 08:06:57 +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; bh=09WFvraO6NJPine98wpT4dcxTGf8Fh8t45lVIwU+FgE=; b=KogHAwxvueJhFq73cika6iQTyik4ZUn4QTymkwWiJ3cQqCCtnPeE8cBvVpUKlcnrqvw2PMB2Cf9Gk/3ZZrUrUn9boHOm4kUlXgn9eEgk2TeEh47we66j2d35PMwUfepRmjq9V0DUq5PH1osz8IY7UVgpTubpt68atiQA3sQ6lTE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (141.226.120.58) by AM6PR05MB4422.eurprd05.prod.outlook.com (2603:10a6:209:43::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.735.16; Sun, 6 May 2018 06:06:55 +0000 From: Shahaf Shuler To: bluca@debian.org Cc: stable@dpdk.org, nelio.laranjeiro@6wind.com, yskoh@mellanox.com, adrien.mazarguil@6wind.com Date: Sun, 6 May 2018 09:05:54 +0300 Message-Id: <9182a0c8c52a0059745f181741e418063cfca6f6.1525586526.git.shahafs@mellanox.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [141.226.120.58] X-ClientProxiedBy: LO2P265CA0008.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:62::20) To AM6PR05MB4422.eurprd05.prod.outlook.com (2603:10a6:209:43::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM6PR05MB4422; X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4422; 3:3X0hzCmLYERzVid9Nu8PfQBIpCTV0/7+5Kspg2OnDwPqTWPC421hfRnXqgyNmKRkLbnbjJActvr4p1GM2P3cll4wJz+/9+LFS5iYPBT1hiXo1ZSvIxMnhBbiere5jFCcw6xY05Ddw0hL1h9UVLR/VJpw7psYGCWsbuyWyNbD3EYMDH6rxhQiYhDT6jNCA9lo0y3twhf4AmAxPKNVL47Pl+QpvU6mskhXn7dQHomC4gI9G2nJ+3Bs9OzKPvykl146; 25:69k7MQlcC+1YZKP7ofa79H/B2hf7T9dyo6gPHdgppUCV6KUvDqJpvYdPQqQEpPzdX1ZT+IjdZDn4wmcxuszbU3Hc+8wW64i7WFD5JDAmp4SzTdtAssqIrAYb/0Z/jR5vX5/lLuhy3eOaZuEYTcRDMpFV9lY9LsLmd1dTP/Kbn9ZUZw8qp+h4dBskWHMfkYvANd4uLfFH2MOeQyQC0Dn4VmSr+r75Sgmeb5klWwGpuR9CLd88YQpQuwcoUFTeg5AikwbHPfF15OovnxygAr7q6fSnjWUJSk1jtZt46qVjDXnw7/43lgBErNiN5t7hgWLwr+gKTiAeZiY189F3MVk90w==; 31:NhvfamUWSZE7pVSX9su6RKlrpBEajANNOLfnsu2IOW31vQEcqiwsFx710srcDfvSFKOdIUqycY5ZD92cJbW3m7kB7xXIsO4/5ZsRZOi8Tn8nSTmbIf3DsUk0i9hv8OjOQ4Y2OuD/dK4LKaLXsfrMHdyn8mCtMGI/JY7ni3scFFeQ9IHyvf/7TUuYruen7bFoPMvtKmif/R/PukSMHJHBTtTnZ4JUjbAJv8i8h/c5JUw= X-MS-TrafficTypeDiagnostic: AM6PR05MB4422: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4422; 20:AMMXZPtVsd+qtZ2KBTx/dQQGDQ6lQycK5DfIhXADKs/hRR+9lsYTdimxQaN7ROemCehp7mHvaWlWNK2cDWx7HjtxD3thRY0VeWFlznhxtTNkOMdmcu2dv2Bv5IhX3BjYCH5iwXO+kcW5sFITQ0guabJWsrtoAzk+B0hQ/+2R5jgXl3IuXGNSeKDowwoOuzzGlYfB9Z4C5mhUBkXUWrVoYIok73FitP75eW0VP1yM6zYA0Owu/eoNSnuVDz9JJSICyEhP1jxtWLNgEQwjliMf1+/5cG9fHFHudoKQ2uJ8E4COgiKx38kPOeIVZ7TUwXLgA5GZW9EI0BLdZb6Yp+r6V7DWOSzS0w4Qb7HP62ii0okQG8+BgJRznt5nU7UfkBKKUWbUGhszYN1AiB7hEKcslFC8ahbKaNHox9eTJ8z2UOMWY62uHDi9JOq7gfQA5GPq/OGCrZrBKOwWjQ9XQ0wsuNvUjtM9BsulDklsaNkjMYUwP6dJoC/JP6Fu93iuMuGy; 4:eyiYVcYtL7qLeAkyCanECXkWrqALpnaWY6We8OO0KychFl7QIl9GVJoDbfKdSj4nWIZvzrsQPmOs29WbbDRFh+7E73V8bQW7+VNko8oGd06MnAQ4pSQTJjtQM7jRiOK7n3peJWD6wMA2TlMJpQahq6ot6QW/lIIiYuTisOQJTbwOoJgoQRBaI2NR5ZqQL18ixwNQOzWcke5wGdiFEGeWJA1VtNoC97Mt6Kbfhldg0MEzsFSQxctLVKuFRglr2bMFk7zVm6Mf4UF6MSD3JweaEg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231254)(944501410)(52105095)(93006095)(93001095)(6055026)(6041310)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011); SRVR:AM6PR05MB4422; BCL:0; PCL:0; RULEID:; SRVR:AM6PR05MB4422; X-Forefront-PRVS: 06640999CA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(376002)(39380400002)(396003)(346002)(39860400002)(189003)(199004)(105586002)(8676002)(16586007)(8936002)(316002)(2351001)(53936002)(86362001)(575784001)(2361001)(6116002)(3846002)(106356001)(118296001)(66066001)(36756003)(47776003)(81156014)(55016002)(2906002)(50226002)(4326008)(68736007)(305945005)(7736002)(81166006)(50466002)(25786009)(486006)(5660300001)(476003)(2616005)(48376002)(69596002)(16526019)(26005)(59450400001)(386003)(97736004)(956004)(186003)(478600001)(7696005)(52116002)(6916009)(21086003)(51416003)(446003)(11346002)(76176011); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB4422; H:mellanox.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM6PR05MB4422; 23:WFprpRK//pJGIy0OiS1L7tchzjj8IYtKnYsbpJqHj?= =?us-ascii?Q?XCvsQYaoOh5BKuva/akDOBfX1RnjFbHQyAKnjt9WxaOKWoRws2aTPnQNTC2e?= =?us-ascii?Q?5r3Gjhu3Af3whYCguDkSSsqyPFxzCdwtONmQ+/aoKhYhhL6xNGu4DI2HcjK5?= =?us-ascii?Q?vJnITlVfU5ztB76Evz8o4x1xvL6KLVbuEiTGm2SaVV9DvtcUx8ffZQpLrUuv?= =?us-ascii?Q?0gtoYoDfyYh5nGc31rF+uri4D0GsfDwk2Jd6zKcM8VoI1uuYCSasJlhAd/r7?= =?us-ascii?Q?BjLQ/ascoK4UgYdWE+0rPzRAA55+EsMG50tDrVupLqHS0nhMAYv30AHSkkaw?= =?us-ascii?Q?LLpzjn3C3JQ6oXp8edhoajGQutvffNTsr8pV/1a3iv1i0G/pmR2UzxMyHg9G?= =?us-ascii?Q?OeYo16/QofCT1ngs1aGQ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xgUrNaPNsjKlvfmlaz?= =?us-ascii?B?QT09?= X-Microsoft-Antispam-Message-Info: xXNCb2XLqrGFCpxqxbVDnVdsuFT89iIcfXffHVSW3wRsVma5ZztrPq2Mf11Qbpudyeh4dE1PTaN/dCCr7SPTWaxuyYLHEDDn2i8L5INzIK3N5jT88FcDOHxBYXogUoR+M+eL22JB2GFtFIRbeGMkZKwMxdyLG6A1W5fOzM0Ud5dwms0bBGaTcfyABqrbE0Lc X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4422; 6:8t8/3hWc0CSsIP5e46m7ctOvjJ57d8EmDquz2iaTmo3Xkxp68Bc5XEWUqyaX7KPl1GWppARvt2DOsEhTO24CfVm3PVIfCQ4G+fPTwjczB9jB22OJ4E3nkHoioLqZevzw+Or3nXVnYakNg6xkAuJTg8j8wx0cB0yV/gwpJ6VrckxPUMW/6EP3GiLj63NSDqEub0j/qrrxk+j67UtkQ7pZ3zmNaRAdxvKmp5fiPiuyvpHW83K+OU+3dArS662VkT3sV1+aNGOKwqz9PCf0nxKpVUuigHFX7hG4KwfRtzXtrc9TNaj8SoXxqr24kEjZecESuDKyPW0oXqU8lByiAhptk0EglGwCcUpSLewRA539lza01GWMszPw/Y0yZW5h5gQpBytj0aFgmEI+tWPXQ87zGzNKGYWuStu5v7IYoACYCMtHbl37SiEc8V9N/f8bMJh0MoQyJDfcgGz34gofcF/ilA==; 5:yM1E/RSDf+ELm750GPsyrWb2YkRpdUaHucZYBokmiW1Z+NBJafHupLzDEqBA4lVuj8rQ9VYMrf2ijuUjEKHcZ4G3fJK/kTTo9WbhI7Xk3iE0UYOpzRmV5QYSNAnkUCDEP9GDPZ1GWWm246R1ePXZcoCyBGpgE2NkZHXlipNzNGE=; 24:baxUmOuQagofd88NcoUiwJAcYOvUsEOfzo6UK4YoaBDMXO7gu0TV8Fc3+qfDT/A91Jt8+I04gEn6LbskpHG+WwVqk++SHmJeyyWs9mXqwLk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4422; 7:92mLWq9NNJPXd7h/2IRQ+Y1/fK9Q3asU0m9gYAoJv8DMkcHTUJpbyJGgi6VS0CE35GXFm/3OTINk8l/V+7kprJWAGz/8t7ydyA+Q08ZqyjC9NV4x4FkLVPkPlyqWvvpjQDPqelrAdTZNg7ofFVUvE9zHe4o4NXQtt3NzA7/VWNDGlBLUnkwucvnfLjbS/NWx3RvHG+XJTbXjp1FMor/LUDN7psXdNtw+1016XMSPJ5tQb7FEJkF3luC0SeznnTC/ X-MS-Office365-Filtering-Correlation-Id: 864364c6-073a-41d1-a220-08d5b317921e X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2018 06:06:55.4581 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 864364c6-073a-41d1-a220-08d5b317921e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4422 Subject: [dpdk-stable] [PATCH 25/33] net/mlx5: fix link status initialization X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 May 2018 06:06:57 -0000 [ upstream commit a85a606ca501296c81c4b3a5e6b359c7ad7e0a77 ] Following commit 7ba5320baa32 ("net/mlx5: fix link status behavior") The initial link status is no longer set as part of the port start. When LSC interrupts are enabled, ethdev layer reads the link status directly from the device data instead of using the PMD callback. This may cause application to query the link as down while in fact it was already up before the DPDK application start (and no interrupt to fix it). Fixes: 7ba5320baa32 ("net/mlx5: fix link status behavior") Cc: stable@dpdk.org Signed-off-by: Shahaf Shuler Acked-by: Yongseok Koh Acked-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index fc934b8018..fad367e850 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -928,6 +928,12 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, /* Bring Ethernet device up. */ DEBUG("forcing Ethernet interface up"); mlx5_set_link_up(eth_dev); + /* + * Even though the interrupt handler is not installed yet, + * interrupts will still trigger on the asyn_fd from + * Verbs context returned by ibv_open_device(). + */ + mlx5_link_update(eth_dev, 0); /* Store device configuration on private structure. */ priv->config = config; continue; -- 2.12.0