From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot0-f193.google.com (mail-ot0-f193.google.com [74.125.82.193]) by dpdk.org (Postfix) with ESMTP id F05A371B3 for ; Thu, 11 Jan 2018 15:24:30 +0100 (CET) Received: by mail-ot0-f193.google.com with SMTP id p16so2226515otf.1 for ; Thu, 11 Jan 2018 06:24:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=QqYPmplaMZ516ye6ArAICQT9u8mO1oJ8IAzxLfIG2SM=; b=JkxlVmIpscLHxAOWN0Fv8upPq1a7DfNUYIR6mDeBIMgHRvYBGi82m5evWsuxei/Cef G1qZfrtxAqkT1F4aDtjuP4yDM7x9H6uwlluj8ApJZ6bfCCt3ibcgg5nJw44QNxUkNq1M 47yWD8ueAjD+iv8yiAR4PeQrKSppoPTxTsVkmqKU3GPePcAT3ulb7Pu3eV/Clvd5uLqO kYKghsSrikfLDBtc7jIWJqMRtI/xIcSgqLlDCNO7mImdh1MOpjvh3OQ3HgcyRpEFK378 7BctyDjf0/+bLFaorboMHIy/ZPlD/cDpcnHPtO0qI1ACmrrPjGvUR4v3IRjgt20zOu7S MFvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=QqYPmplaMZ516ye6ArAICQT9u8mO1oJ8IAzxLfIG2SM=; b=g6aFCr2yyHL57TMYo8Y5nVI61MaXGOXu3zzZTKdvfNfNcA7f9QL6OruwSCrK6ek8FW 5btQDKcA/6puYgTMzmkRdKptzAzrKXXux3F1xSMe/rgBY4HE+rhpHVLjyXIW6VAYz6ZS mvXaOLK8P2M9LzJN9Craoqlp3u6IFbPI7zvy3I9o9Mh7/ml58W95sbKTMs2bVbV8EzEL MtE4SmLAByPJd4apxTU5q+lzFau0JWU/gWPvN0oaobgA3XmuLp151dD0w88i/ycF6xC1 g3/K/39sBow9I6SvEGHaMFjGLRLupl/CZuKSJvtv0Cf4YuImXkQaud3kCw4QJVc7vqpP Z79Q== X-Gm-Message-State: AKwxyteXyLSPxsKlvuGJKmaq0R6q6slDmbrrU5B1u2BbVdzsy58ObrnZ f0rzflAivet8/1JtRkfR3ZPQivQyceSvYSj8V+k= X-Google-Smtp-Source: ACJfBovMRh62X7XzZSZVFSLXKTd1u3aslWMKBFLN03gVcvKqs5P/j7GbbcFY8tCPH4mP9HaPVIIaP1qC6oyaD3ZG7OQ= X-Received: by 10.157.26.52 with SMTP id a49mr12072411ote.238.1515680670094; Thu, 11 Jan 2018 06:24:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.74.151.65 with HTTP; Thu, 11 Jan 2018 06:24:29 -0800 (PST) In-Reply-To: <94479800C636CB44BD422CB454846E013208AC48@SHSMSX101.ccr.corp.intel.com> References: <1515161439-4792-1-git-send-email-xiangxia.m.yue@gmail.com> <94479800C636CB44BD422CB454846E013208AC48@SHSMSX101.ccr.corp.intel.com> From: Tonghao Zhang Date: Thu, 11 Jan 2018 22:24:29 +0800 Message-ID: To: "Xing, Beilei" Cc: "dev@dpdk.org" Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH 1/5] net/ixgbevf: unregister irq handler when other interrupts not allowed. 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: Thu, 11 Jan 2018 14:24:31 -0000 On Thu, Jan 11, 2018 at 2:55 PM, Xing, Beilei wrote: > > >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Tonghao Zhang >> Sent: Friday, January 5, 2018 10:11 PM >> To: dev@dpdk.org >> Cc: Tonghao Zhang >> Subject: [dpdk-dev] [PATCH 1/5] net/ixgbevf: unregister irq handler when >> other interrupts not allowed. >> >> When we bind the ixgbe VF (e.g 82599 card) to igb_uio and enable the rx- >> interrupt, there will be more than one epoll_wait on intr_handle.fd. >> One is in "eal-intr-thread" thread, and the others are in the thread which call >> the "rte_epoll_wait". The problem is that sometiems "eal-intr-thread" >> thread will process the rx interrupt, and then rte_epoll_wait can't get the >> event any more, and the packets may be lost. >> >> We should unregister the status interrupt handler in "eal-intr-thread" >> thread and the ixgbe pf is in the same case. >> >> Signed-off-by: Tonghao Zhang > > The patch looks OK for me, the commit log can be reworded, for example, "we" can be removed. Yes > Apart from that: > Acked-by: Beilei Xing Thanks for your reviews. I will repost v2 > >> --- >> drivers/net/ixgbe/ixgbe_ethdev.c | 15 +++++++++++++++ >> 1 file changed, 15 insertions(+) >> >> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c >> b/drivers/net/ixgbe/ixgbe_ethdev.c >> index 43e0132..e67389f 100644 >> --- a/drivers/net/ixgbe/ixgbe_ethdev.c >> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c >> @@ -5049,6 +5049,15 @@ static int >> ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev, >> } >> ixgbevf_configure_msix(dev); >> >> + if (!rte_intr_allow_others(intr_handle)) { >> + rte_intr_callback_unregister(intr_handle, >> + ixgbevf_dev_interrupt_handler, >> + dev); >> + if (dev->data->dev_conf.intr_conf.lsc != 0) >> + PMD_INIT_LOG(INFO, "lsc won't enable because of" >> + " no intr multiplex"); >> + } >> + >> /* When a VF port is bound to VFIO-PCI, only miscellaneous interrupt >> * is mapped to VFIO vector 0 in eth_ixgbevf_dev_init( ). >> * If previous VFIO interrupt mapping setting in >> eth_ixgbevf_dev_init( ) @@ -5091,6 +5100,12 @@ static int >> ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev, >> >> ixgbe_dev_clear_queues(dev); >> >> + if (!rte_intr_allow_others(intr_handle)) >> + /* resume to the default handler */ >> + rte_intr_callback_register(intr_handle, >> + ixgbevf_dev_interrupt_handler, >> + (void *)dev); >> + >> /* Clean datapath event and queue/vec mapping */ >> rte_intr_efd_disable(intr_handle); >> if (intr_handle->intr_vec != NULL) { >> -- >> 1.8.3.1 >