From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 2562BFF4; Mon, 8 May 2017 13:49:21 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 May 2017 04:49:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,309,1491289200"; d="scan'208";a="854180248" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by FMSMGA003.fm.intel.com with ESMTP; 08 May 2017 04:49:20 -0700 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 8 May 2017 04:49:20 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 8 May 2017 04:49:20 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.193]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.224]) with mapi id 14.03.0319.002; Mon, 8 May 2017 19:49:16 +0800 From: "Liu, Yu Y" To: Thomas Monjalon CC: "dev@dpdk.org" , "stable@dpdk.org" , "Zhang, Qi Z" , "Zhang, Helin" , "Lu, Wenzhuo" , "Liu, Yuanhan" Thread-Topic: [dpdk-dev] [PATCH] net/ixgbe: fix LSC interrupt issue Thread-Index: AQHSx+raPn5y4emOckSsT7isfaAX0aHqSxwQ Date: Mon, 8 May 2017 11:49:16 +0000 Message-ID: References: <1494215853-3328-1-git-send-email-qi.z.zhang@intel.com> In-Reply-To: <1494215853-3328-1-git-send-email-qi.z.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZGFmMmEwYzYtYTY4NC00ZGYxLWJmYTctYzU2OGNmZGVjMDZlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkxNbndLMnZ4Q0xyRnFFS3hjaDFxOUNadzNjdktRZmtuUCt4dFcyTzlZMnc9In0= dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/ixgbe: fix LSC interrupt issue 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, 08 May 2017 11:49:23 -0000 Hi Thomas, This is fix for critical issues exposed by Gaetan Rivet's commit(8ea656f8c3= 00175ac84f3cbe1117f5ef11ffc4eb) to enable LSC.=20 This fix two issues. One is "VF testpmd can't set up successfully on Nianti= c nic.", another is " kernel VF sometimes can't link up successfully when t= est DPDK PF+kernel VF". The fix is verified and code review show it is low risk. It would be great if it can be released with DPDK 17.05. Thanks & Regards, Yu Liu -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Qi Zhang Sent: Monday, May 8, 2017 11:58 AM To: Zhang, Helin ; Lu, Wenzhuo Cc: dev@dpdk.org; Zhang, Qi Z ; stable@dpdk.org Subject: [dpdk-dev] [PATCH] net/ixgbe: fix LSC interrupt issue There is a bug in previous fix for lsc interrupt. lsc interrupt is not disabled before delayed handler, that cause the delaye= d handler be re-entered. Fixes: 9b667210700e ("net/ixgbe: fix blocked interrupts") Cc: stable@dpdk.org Signed-off-by: Qi Zhang --- drivers/net/ixgbe/ixgbe_ethdev.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_eth= dev.c index ec667d8..c680aab 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -4107,14 +4107,15 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev *dev, timeout =3D IXGBE_LINK_DOWN_CHECK_TIMEOUT; =20 ixgbe_dev_link_status_print(dev); - intr->mask_original =3D intr->mask; - /* only disable lsc interrupt */ - intr->mask &=3D ~IXGBE_EIMS_LSC; if (rte_eal_alarm_set(timeout * 1000, ixgbe_dev_interrupt_delayed_handler, (void *)dev) < 0) PMD_DRV_LOG(ERR, "Error setting alarm"); - else - intr->mask =3D intr->mask_original; + else { + /* remember orignal mask */ + intr->mask_original =3D intr->mask; + /* only disable lsc interrupt */ + intr->mask &=3D ~IXGBE_EIMS_LSC; + } } =20 PMD_DRV_LOG(DEBUG, "enable intr immediately"); -- 2.7.4