From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50058.outbound.protection.outlook.com [40.107.5.58]) by dpdk.org (Postfix) with ESMTP id D36FA2F4F for ; Sun, 6 May 2018 08:06:51 +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=JgIiSL5Orote8/KsD7yzb019des65JjAM6cELz9t7V0=; b=LQU6KJ4UHyoTFnBZ0+MIgD5NZAtzLVdF0Ncibc/1wcWKpJGMBtbMMvblx8ogpRGrv8HMtbMS1I/uIC6QymnkydYjg9wVkedY4Z8gaJIsDUHvF6HEc08Q1k3PDoKyakYupyJymeYjwronAhFfypz1+HFbUNka0637osrbTua+OBk= 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:50 +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:48 +0300 Message-Id: <35a4b8e79345d1018909d727b1d7c60ef7abf8a8.1525586526.git.shahafs@mellanox.com> X-Mailer: git-send-email 2.12.0 MIME-Version: 1.0 In-Reply-To: References: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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:rOjrvfU27rbPgXaz0+VrgUT/ZEH3FnSOEqLFGGxxs1Ztnklnt40+zij+Bm6PufhwGtq5c6s9ivo9loibQ6CE91oQwxu62J6UMlEknh7N9YdxXQeUi+zv/uwx1RIHZnVXNceu8yiNBL3cYodE2YEf0znRlCCGkJvglO3NuxwT10uHAnxChhI6kdkGQWX8dBYkYW8lbmaPrY5tuN4FONvCfRyCaYSzfjGxd3ulKLwSIaFG7Yll4xRxEuKToLJovEHE; 25:WXiK9UndGlTXP1TmgwZE4GUdXAH8zSKDBKDFMOl68iL/Z1x3TuLOvVKaTuZ/niQMK8LY7WZxIAopYkjML4T+sf4bWOYx3BYgO8Ki1RhI01tQna/OjtaHKlHSAi00LlzdK6ChzaOwmh7LCJoveSzEHj7jz2fPXrkSCDKlEfXIBblUVgaQl0Bbbgeih2O5NBcnkjII6ia8nL8GJt4sB0Kn0LIs1qxy6XkP4SOr8vtiDIzVGT/yd0Ly5rcNJk1MQDeRHe+9YLA8Dc2U7eOngtp+7erE4YC2bUDg3yhkft9MBJrjdEguVA8Xncq7GQoTa/r/DNr3Tmtj+KLoqd6tAmC2ug==; 31:9cUphwa8e3DxEQgRSoY6Bs245FZ349nbZXIw/P0C7WN/0gqsSHIa3AR1nHw9GFNIKWqMjSadiLqov0kRb/fxZNoWNmvoO8dJzR03h91wMa8I7bwKYVpS14K9Xk7PEwJFMn33E4mPL4t6Rf9fLVfy8t2SHiozu3GIeT8A8eARzesQznyGJaUBJtFW1PExBP+1TzceaWw2OA8M9KlzpaADQMf13kqo/i9TSMNqsUHlj3s= X-MS-TrafficTypeDiagnostic: AM6PR05MB4422: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4422; 20:gfWp5khsC524mJb8aokuFE6Os1oOC93Tr50/qjYCvq1qDV181J8AwEWrjMHdMAMQi61TofHsF6/9wPuH7PeAKfv7ouI25QHs2DlA36Y67zA5NoWSY1F/M+LqgJ+yLozGhh2ftGfzQGTUCm3WzW53Oxf0Se9TQ+ENWmQkXhYvwnWlgVdNMrcOMp9UW2pgD1IkQzP72ndagIzx+ZD9Qh+CWpO0WFVXAzxTjJWtTBDipbmBRzSIjm6nGNOQg4iIudAGBxUdON6rOHSv8kbgqn2PXKqCqV+bBgpHORMCaXF9Zjc/00yES5LlOae1nYrzhosnOhWBtJwlxuA6xFtSq5w5/G9MtYSMZFXOdtYxTSQ19hQ6rGh34egHc/YUasq3pKVgEbz/Uyllo77S9Ik1ynCa0ykWOz/ukleo9EqB0g6tjuwdvTKC36HkFoSkhYI67ClHhaPZo8c2LFDvKxqf39mOutw98vXWAU9p3nXiVhH+fjrmJnKvFuvFPQr8Hmto57cx; 4:NayUdUKbxdqcFJOj8UJVlGTRON7pjctYTG7rTB6sIRISw1QzVbnB42P3nw6GjhVF5hRbqK+KUcXiWwmb5AnblViXeluSYwEgy/rKHs1FGBA5tCBFEOHbX4CfJ3Wpu3dYV+us4UGr42ee75G0fRIy81ZlzDT2ny2yHWmaXz5gM0UkuVZtbVsSORrhSS0Naek3Ad0DZRd0ewrvL15FbEX1X8SnB9m74xmVijqJtXIG0kf0T03cZDxle4kZndk1d2mNn2f/E9kJ67J+o3yf4aAUcA== 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)(8936002)(316002)(2351001)(53936002)(86362001)(2361001)(6116002)(3846002)(106356001)(118296001)(66066001)(36756003)(47776003)(81156014)(55016002)(2906002)(2870700001)(50226002)(4326008)(68736007)(305945005)(7736002)(6306002)(81166006)(50466002)(25786009)(486006)(5660300001)(476003)(2616005)(69596002)(16526019)(26005)(59450400001)(386003)(97736004)(956004)(186003)(478600001)(7696005)(52116002)(23676004)(6916009)(966005)(21086003)(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: =?utf-8?B?MTtBTTZQUjA1TUI0NDIyOzIzOk1HbGdhYVluR3BmSDROam5zRWs4c0YrbFFW?= =?utf-8?B?QTNGWjcxbTVrUEZHMlJuc1RsKzFJUndBUlNKWi9YdzR3bUpRM0QvYVIxbW13?= =?utf-8?B?UHNrNHVhTng4Tk0wSDlFaWxYZko3N05QemdUR2d5cUhXS2s2dDhxWWR6U1Fq?= =?utf-8?B?SXZmRUp3QmtMNFA4eXQxeGI1ZllqVmZrMklpek1jM29PWHhpWlJiYkVMc1RG?= =?utf-8?B?Z2dXa3RvbmJUMlVVQzhTcTNPMW5YbnRYUGtWaWdEdUpiQzd4RWVZNGluT2pN?= =?utf-8?B?MUc3c3pvamZXWUFBK29mVTVOaDdUcGxtb3BoY1RweWxSMHhPOVlqZS9vWWFt?= =?utf-8?B?ZFBUN25qSlR4M0k1ZXd5TG53OFZSTmVBdnUrMXAwUW5FbEQ1MHVwNEtlSWxq?= =?utf-8?B?QzcydVQxdXIrZXNt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ezxE9RgXqmqMSrXqP6QholsdKM17S6iNkCV4/9qI1cIWbvvK2QTC/x/NeqsfmK5yFb5qPPL/cY8UOk9f8F+ZnZyabILIBZRtC7aNv6X+l83rQErkj5622biqBQvFTvOH6i4RG5zlfyMyx8693eidIDLN0hQTEu9jpndIKdtQJQoA==; 5:pMYuwWki3EqP9URl5KoceXCp4rkOELqQLMI/4HPm/Lh3LKLiXxVghKYB97ROdSnUY9Cw/nZotIOOYmB+IgjCxajhUht+Zo9FUmSgSm8WcSAnAagyYt8ZkUyaawjOAyFbVCYrT2Zel1CsJvZ0BsCZPUq57ifGloMV4/5Z3ElAAnU=; 24:CISV3HNz6n+Ik1+BJLkjiN3t4Ie+LvyfFqEXZjlM2fzf92U+aBLEe74vkrcdIDD61mWHB3B+gpkabAUzJytRMrSB2yaYH0sQWe+VawDM+1I= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4422; 7:2ABKWvdUHDLX4gQYR6xre0AubYwLLZXGrjzHX7napYv/cys9Fdgztx9EGnml2OI88lC1PG87JbCGFWnjHHY5OrKPTeiKhDd7g1qlfUJJqx6xC/ECzUhqpwdLBMHuCJEaabA3uqn8drxzjbQ74EL6fHbSKpotwllPKtK/5qSFLD2lAavK0d7QP2EXpl0Nulv8lRjfhFTPQi9OZnBWZDaR1oRss3pUofPldm4nS27XNIxBo8sFbYevw2m1rAKi6nwl X-MS-Office365-Filtering-Correlation-Id: 6bc8e91a-4782-4b7b-7794-08d5b3178eea X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2018 06:06:50.0674 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6bc8e91a-4782-4b7b-7794-08d5b3178eea 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 19/33] net/mlx5: fix link status behavior 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:52 -0000 From: NĂ©lio Laranjeiro [ backported from upstream commit 7ba5320baa3285bf8beca96cc025ff56b494060d ] This behavior is mixed between what should be handled by the application and what is under PMD responsibility. According to DPDK API: - link_update() should only query the link status [1] - link_set_{up,down}() should only set the link to the according status [1] - dev_{start,stop}() should enable/disable traffic reception/emission [2] On this PMD, the link status is retrieved from the net device associated owned by the Linux Kernel, it does not means that even when this interface is down, the PMD cannot send/receive traffic from the NIC those two information are unrelated, until the physical port is active and has a link, the PMD can receive/send traffic on the wire. According to DPDK API, calling the rte_eth_dev_start() even when the Linux interface link is down is then possible and allowed, as the traffic will flow between the DPDK application and the Physical port. This also means that a synchronization between the Linux interface and the DPDK application remains under the DPDK application responsibility. To handle such synchronization the application should behave as the following scheme, to start: rte_eth_get_link(port_id, &link); if (link.link_status == ETH_DOWN) rte_eth_dev_set_link_up(port_id); rte_eth_dev_start(port_id); Taking in account the possible returned values for each function. and to stop: rte_eth_dev_stop(port_id); rte_eth_dev_set_link_down(port_id); The application should also set the LSC interrupt callbacks to catch and behave accordingly when the administrator set the Linux device down/up. The same callbacks are called when the link on the medium falls/raise. [1] https://dpdk.org/browse/dpdk/tree/lib/librte_ether/rte_ethdev_core.h [2] https://dpdk.org/browse/dpdk/tree/lib/librte_ether/rte_ethdev.h#n1677 Fixes: c7bf62255edf ("net/mlx5: fix handling link status event") Fixes: e313ef4c2fe8 ("net/mlx5: fix link state on device start") Cc: stable@dpdk.org Signed-off-by: Nelio Laranjeiro Acked-by: Adrien Mazarguil Acked-by: Yongseok Koh --- drivers/net/mlx5/mlx5.c | 2 +- drivers/net/mlx5/mlx5_ethdev.c | 90 +----------------------------------- drivers/net/mlx5/mlx5_trigger.c | 14 ++++-- 3 files changed, 11 insertions(+), 95 deletions(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 4f776497cb..476bbb5a7f 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -929,7 +929,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, (void *)((uintptr_t)&alctr)); /* Bring Ethernet device up. */ DEBUG("forcing Ethernet interface up"); - mlx5_set_flags(eth_dev, ~IFF_UP, IFF_UP); + mlx5_set_link_up(eth_dev); /* Store device configuration on private structure. */ priv->config = config; continue; diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index 37b20c09a1..f5af5189f2 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -634,78 +634,6 @@ mlx5_link_update_unlocked_gs(struct rte_eth_dev *dev) } /** - * Enable receiving and transmitting traffic. - * - * @param dev - * Pointer to Ethernet device. - */ -static void -mlx5_link_start(struct rte_eth_dev *dev) -{ - struct priv *priv = dev->data->dev_private; - int ret; - - dev->tx_pkt_burst = mlx5_select_tx_function(dev); - dev->rx_pkt_burst = mlx5_select_rx_function(dev); - ret = mlx5_traffic_enable(dev); - if (ret) { - ERROR("%p: error occurred while configuring control flows: %s", - (void *)dev, strerror(rte_errno)); - return; - } - ret = mlx5_flow_start(dev, &priv->flows); - if (ret) { - ERROR("%p: error occurred while configuring flows: %s", - (void *)dev, strerror(rte_errno)); - } -} - -/** - * Disable receiving and transmitting traffic. - * - * @param dev - * Pointer to Ethernet device. - */ -static void -mlx5_link_stop(struct rte_eth_dev *dev) -{ - struct priv *priv = dev->data->dev_private; - - mlx5_flow_stop(dev, &priv->flows); - mlx5_traffic_disable(dev); - dev->rx_pkt_burst = removed_rx_burst; - dev->tx_pkt_burst = removed_tx_burst; -} - -/** - * Querying the link status till it changes to the desired state. - * Number of query attempts is bounded by MLX5_MAX_LINK_QUERY_ATTEMPTS. - * - * @param dev - * Pointer to Ethernet device. - * @param status - * Link desired status. - * - * @return - * 0 on success, a negative errno value otherwise and rte_errno is set. - */ -int -mlx5_force_link_status_change(struct rte_eth_dev *dev, int status) -{ - int try = 0; - - while (try < MLX5_MAX_LINK_QUERY_ATTEMPTS) { - mlx5_link_update(dev, 0); - if (dev->data->dev_link.link_status == status) - return 0; - try++; - sleep(1); - } - rte_errno = EAGAIN; - return -rte_errno; -} - -/** * DPDK callback to retrieve physical link information. * * @param dev @@ -720,26 +648,10 @@ int mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete __rte_unused) { int ret; - struct rte_eth_link dev_link = dev->data->dev_link; ret = mlx5_link_update_unlocked_gset(dev); - if (ret) { + if (ret) ret = mlx5_link_update_unlocked_gs(dev); - if (ret) - return ret; - } - /* If lsc interrupt is disabled, should always be ready for traffic. */ - if (!dev->data->dev_conf.intr_conf.lsc) { - mlx5_link_start(dev); - return 0; - } - /* Re-select burst callbacks only if link status has been changed. */ - if (!ret && dev_link.link_status != dev->data->dev_link.link_status) { - if (dev->data->dev_link.link_status == ETH_LINK_UP) - mlx5_link_start(dev); - else - mlx5_link_stop(dev); - } return 0; } diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c index 4e396b7f02..ecef88cdf6 100644 --- a/drivers/net/mlx5/mlx5_trigger.c +++ b/drivers/net/mlx5/mlx5_trigger.c @@ -175,15 +175,19 @@ mlx5_dev_start(struct rte_eth_dev *dev) goto error; } mlx5_xstats_init(dev); - /* Update link status and Tx/Rx callbacks for the first time. */ - memset(&dev->data->dev_link, 0, sizeof(struct rte_eth_link)); - INFO("Forcing port %u link to be up", dev->data->port_id); - ret = mlx5_force_link_status_change(dev, ETH_LINK_UP); + ret = mlx5_traffic_enable(dev); if (ret) { - DEBUG("Failed to set port %u link to be up", + DEBUG("port %u failed to set defaults flows", dev->data->port_id); goto error; } + ret = mlx5_flow_start(dev, &priv->flows); + if (ret) { + DEBUG("port %u failed to set flows", dev->data->port_id); + goto error; + } + dev->tx_pkt_burst = mlx5_select_tx_function(dev); + dev->rx_pkt_burst = mlx5_select_rx_function(dev); mlx5_dev_interrupt_handler_install(dev); return 0; error: -- 2.12.0