From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by dpdk.org (Postfix) with ESMTP id 388B91DB3 for ; Mon, 30 Apr 2018 16:08:17 +0200 (CEST) Received: by mail-wr0-f196.google.com with SMTP id o15-v6so8167592wro.11 for ; Mon, 30 Apr 2018 07:08:17 -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=hlpO1pqWX+gdYNr1Nw37B2rTLc+/B4aMoqSo2k7ftFI=; b=uivD8E9pHt6FRZdM78iy3cs+3DNPKOWkIK+s7yC2diRcoi6z1tHAC4Cc/XfBKx1B5D i9g24a57zpvUNnsNfloeEL/qHrSipn7jZfL5KtYk/QsAUV9Luez3839ifVcAVteUMvIm n0Dq5xVmGLWHmuHumYFw24XJ10joT4COTohEw079ZgFcfYcVXxxSGAY/qYzCIOFjusOs axFzxku5ivSKYfOhFON8mP6fcDd0Gyrq9L1JO8EJCahGME1CKCQzUSc1xE1mNSe6YpDi +ePH71VDY84mE6+5wQ6JpXqcqT5TRJ9geAEQtdLK+1Pn0axePcooS5w/tpp3oLOL2Cne SlSA== 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=hlpO1pqWX+gdYNr1Nw37B2rTLc+/B4aMoqSo2k7ftFI=; b=CfJd3D4pVIEUEC+4G4+nRqxS/4SkbkkIsTylhBje0PQEgR5kdTtBYHzgmd82cZPiGl rYkh45RPfn78d3w8V+x6nkEjWL00A45X2NR1NO/3ivgD++8N8QV0mpz/Xw/CI2FUJSKS gNCeY2Gc1je/8nRcF54rJzEHlLd4K0t6smMlAG6S7ApejQX1fdyl1zE0fzj7py7S9PdR 23YBD3RJvO0B3f4xp2HG5+GZ7MNqXZsrqDqtjUEksBsU0pGyoHhxKKmZ0PK/oRecr9iF CuyFNJ1wg13+XQ/KJxqBlloYiVZejuIzw7EJBxserQs2UQ3umuVok6ECj6N3uoaNjl0b 2qng== X-Gm-Message-State: ALQs6tB/gh0nscV/7b2ct/owM6INBY1RXn6/hS3TTaNaMN3UaTGvmIqm U2HwOeQsstMN7r/kHM55Og/gMrtWI/c= X-Google-Smtp-Source: AB8JxZreESovQu7Eqv7hyGjeWJSTRHWdM1nETiwvCQmIoMGVdiseFkjgqfUD4CApfiyB0XYoSmXwWA== X-Received: by 2002:adf:e642:: with SMTP id b2-v6mr8353957wrn.172.1525097296934; Mon, 30 Apr 2018 07:08:16 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id e202sm10663754wma.43.2018.04.30.07.08.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:08:16 -0700 (PDT) From: luca.boccassi@gmail.com To: Yunjian Wang Cc: Kirill Rybalchenko , Qi Zhang , dpdk stable Date: Mon, 30 Apr 2018 15:03:49 +0100 Message-Id: <20180430140606.4615-71-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430140606.4615-1-luca.boccassi@gmail.com> References: <20180430140606.4615-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/i40e: fix intr callback unregister by adding retry' 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: Mon, 30 Apr 2018 14:08:17 -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/02/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 0dec1711c350556d5d5fee8ab53b021c936c1d16 Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Tue, 20 Mar 2018 15:01:24 +0800 Subject: [PATCH] net/i40e: fix intr callback unregister by adding retry [ upstream commit 0264539dce2d40d8abaed474d4b1b526ca3ed2e4 ] The nic's interrupt source has some active callbacks, when the port hotplug. Add a retry to give more port's a chance to uninit before returning an error. Fixes: d42aaf30008b ("i40e: support port hotplug") Signed-off-by: Yunjian Wang Reviewed-by: Kirill Rybalchenko Acked-by: Qi Zhang --- drivers/net/i40e/i40e_ethdev.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 968249ed1..5671b64bf 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -1533,6 +1533,7 @@ eth_i40e_dev_uninit(struct rte_eth_dev *dev) struct rte_flow *p_flow; int ret; uint8_t aq_fail = 0; + int retries = 0; PMD_INIT_FUNC_TRACE(); @@ -1574,9 +1575,20 @@ eth_i40e_dev_uninit(struct rte_eth_dev *dev) /* disable uio intr before callback unregister */ rte_intr_disable(intr_handle); - /* register callback func to eal lib */ - rte_intr_callback_unregister(intr_handle, - i40e_dev_interrupt_handler, dev); + /* unregister callback func to eal lib */ + do { + ret = rte_intr_callback_unregister(intr_handle, + i40e_dev_interrupt_handler, dev); + if (ret >= 0) { + break; + } else if (ret != -EAGAIN) { + PMD_INIT_LOG(ERR, + "intr callback unregister failed: %d", + ret); + return ret; + } + i40e_msec_delay(500); + } while (retries++ < 5); i40e_rm_ethtype_filter_list(pf); i40e_rm_tunnel_filter_list(pf); -- 2.14.2