From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id D11EA1B7A9 for ; Tue, 15 May 2018 15:49:35 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id j4-v6so1193997wme.1 for ; Tue, 15 May 2018 06:49:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=rr4/Zp6oBQG61vwjR7nbXg1HLGnA3tt9MgGvSUYnmx8=; b=qVtiM1dBszq5REhap37Em9sjGht06/kfXVnKLTMK7S9xuqt02Ym9NmbaUXHtJEP16X 4IksMcT44RGiVhENXSPonU9bcHmYTRIEYgyuNbVsGwpRk0SZfAM5byE6a6v64SuVw3Lz qOC5rPPOt5XvWtou8xvAA7XWqobNoUaXHOtAb+ELwXMb592FlFgk5L43IwrkltxrETBi 8Z3N+NYqpZ+NXrh440tyaX0oHCcQM4rMjazTBj3FPaZ+Ba/vHxVecid8mP4JgW4KUFTo 1YfXoPE+Hr3avJ22vnnmMncdE4dORegXF/WAteYFcS5JnQ7AtJ3Ny5vwHwhvSY1xWSgH DZ5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=rr4/Zp6oBQG61vwjR7nbXg1HLGnA3tt9MgGvSUYnmx8=; b=DF7y8WW4oaad+AbjINgPpAtNpUuC9Aggnyu5SlWotZLgn3QjawZ+2fpNM/vSgeK4zB nF5+P7KPczJ2LOC8wK0GcX82osWWdoxl3TCZfyuakLOBZhKPUAgwfewh/m+HnhwOTvzc F34cROlKkU5KNj6aRTc7iLhf0fBXbEK/LMvmEQZUEYI2q7lyeZtIRSUZ5W4zVJI05x+C /GmNfO7zFJMJsfFXzIDPTx44hMChFSgD5TpJuIHUzzHHOCJTHdnfET9P5wJgMLXpCeyC hkICzlVanA6/8NS26dVVVajT4H+Z1jo8zE5Ny48PHdkfGlpJqeEj3Px6p1N4w0NOeC6I 7ogg== X-Gm-Message-State: ALKqPwdV7JEcI8BjQLJydicr7PSdK+xFrEn1ojk0TXgOjm+crf5jU4wg 0tbF2JJKf+2LAKGmLV6oEGVT7FpUheE= X-Google-Smtp-Source: AB8JxZr4n7ZvvcFLgOobWx7WYFK/xb+aRWBVM4u2KWR/BBRbIwaUh34sDCxIJAROOPT8moct0XFweA== X-Received: by 2002:a1c:8d8a:: with SMTP id p132-v6mr7783682wmd.49.1526392175560; Tue, 15 May 2018 06:49:35 -0700 (PDT) Received: from localhost (slip139-92-244-193.lon.uk.prserv.net. [139.92.244.193]) by smtp.gmail.com with ESMTPSA id s5-v6sm129754wra.48.2018.05.15.06.49.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 May 2018 06:49:34 -0700 (PDT) From: luca.boccassi@gmail.com To: Matan Azrad Cc: Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Stephen Hemminger , dpdk stable Date: Tue, 15 May 2018 14:47:19 +0100 Message-Id: <20180515134731.9337-68-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180515134731.9337-1-luca.boccassi@gmail.com> References: <20180503110612.12146-2-luca.boccassi@gmail.com> <20180515134731.9337-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'ethdev: fix port removal notification timing' has been queued to stable release 18.02.2 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: Tue, 15 May 2018 13:49:35 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/16/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From aa0eb1b25c376c01c186a31056fcb84e414082bc Mon Sep 17 00:00:00 2001 From: Matan Azrad Date: Fri, 11 May 2018 01:58:36 +0200 Subject: [PATCH] ethdev: fix port removal notification timing [ upstream commit bafa9aa0d7bb07f78cdad518647a61c808945f4e ] When an ethdev port is released, a destroy event is triggered to notify the users about the released port. A bit before the destroy event is triggered, the port becomes invalid by changing its state to UNUSED and cleaning its data. Therefore, the port is invalid for the destroy event callback process and the users may get a wrong information of the port. Move the destroy event emitting to be called before the port invalidation. Fixes: 133b54779aa1 ("ethdev: fix port data reset timing") Fixes: 29aa41e36de7 ("ethdev: add notifications for probing and removal") Signed-off-by: Matan Azrad Acked-by: Thomas Monjalon Reviewed-by: Ferruh Yigit Reviewed-by: Andrew Rybchenko Reviewed-by: Stephen Hemminger --- lib/librte_ether/rte_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index e7f2b809c..25fd3bc46 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -358,6 +358,8 @@ rte_eth_dev_release_port(struct rte_eth_dev *eth_dev) rte_eth_dev_shared_data_prepare(); + _rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_DESTROY, NULL); + rte_spinlock_lock(&rte_eth_dev_shared_data->ownership_lock); eth_dev->state = RTE_ETH_DEV_UNUSED; @@ -366,8 +368,6 @@ rte_eth_dev_release_port(struct rte_eth_dev *eth_dev) rte_spinlock_unlock(&rte_eth_dev_shared_data->ownership_lock); - _rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_DESTROY, NULL); - return 0; } -- 2.14.2