From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 9A78A2C29 for ; Tue, 17 Jan 2017 03:16:24 +0100 (CET) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP; 16 Jan 2017 18:16:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,242,1477983600"; d="scan'208";a="53774368" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga005.jf.intel.com with ESMTP; 16 Jan 2017 18:16:23 -0800 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 16 Jan 2017 18:16:23 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 16 Jan 2017 18:16:23 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.204]) with mapi id 14.03.0248.002; Tue, 17 Jan 2017 10:16:20 +0800 From: "Zhang, Qi Z" To: "Zhang, Helin" , "Lu, Wenzhuo" CC: "dev@dpdk.org" Thread-Topic: [PATCH v2] net/ixgbe: fix interrupt block issue Thread-Index: AQHScF3rLB6P3j6uh0SG6z7bGAVB2qE7XAGAgACR7JA= Date: Tue, 17 Jan 2017 02:16:20 +0000 Message-ID: <039ED4275CED7440929022BC67E70611530525B3@SHSMSX103.ccr.corp.intel.com> References: <1484589732-13537-1-git-send-email-qi.z.zhang@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMDgxNzQ5ZTgtZTcwZi00Nzc2LTk3MzctNDU3NmYyOTk5ZDI5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IjFPM1I0bkw5UzRqTlRRRmU5a1FycnpxUzJFQWZkQVVxUDQ5RlJ3SjRUd0U9In0= x-ctpclassification: CTP_IC 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-dev] [PATCH v2] net/ixgbe: fix interrupt block issue 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: Tue, 17 Jan 2017 02:16:32 -0000 Hi Helin: > -----Original Message----- > From: Zhang, Helin > Sent: Tuesday, January 17, 2017 9:31 AM > To: Zhang, Qi Z ; Lu, Wenzhuo > > Cc: dev@dpdk.org > Subject: RE: [PATCH v2] net/ixgbe: fix interrupt block issue >=20 >=20 >=20 > > -----Original Message----- > > From: Zhang, Qi Z > > Sent: Tuesday, January 17, 2017 2:02 AM > > To: Lu, Wenzhuo; Zhang, Helin > > Cc: dev@dpdk.org; Zhang, Qi Z > > Subject: [PATCH v2] net/ixgbe: fix interrupt block issue > > > > When handle link status change interrupt, interrupt will be blocked > > until delayed handler finish, the duration is at least 1 second, this > > may cause following VF to PF mailbox traffic be blocked and sometimes > > PF can't ack to VF in time before VF think it's time out. > > This patch remove this limitation, interrupt will be enabled before > > interrupt handler finish, and a flag is used to prevent re-entering del= ayed > handler. > > > > Fixes: 0a45657a6794 ("pci: rework interrupt handling") > > > > Signed-off-by: Qi Zhang > > --- > > v2: > > - rebase to dpdk-next-net > > > > drivers/net/ixgbe/ixgbe_ethdev.c | 19 +++++++++---------- > > drivers/net/ixgbe/ixgbe_ethdev.h | 2 ++ > > 2 files changed, 11 insertions(+), 10 deletions(-) > > > > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > > b/drivers/net/ixgbe/ixgbe_ethdev.c > > index c66f432..f36ce89 100644 > > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > > @@ -3762,7 +3762,6 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev > > *dev, > > IXGBE_DEV_PRIVATE_TO_INTR(dev->data->dev_private); > > int64_t timeout; > > struct rte_eth_link link; > > - int intr_enable_delay =3D false; > > struct ixgbe_hw *hw =3D > > IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); > > > > @@ -3778,7 +3777,7 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev > > *dev, > > intr->flags &=3D ~IXGBE_FLAG_PHY_INTERRUPT; > > } > > > > - if (intr->flags & IXGBE_FLAG_NEED_LINK_UPDATE) { > > + if (intr->flags & IXGBE_FLAG_NEED_LINK_UPDATE && !intr->delay) { > > /* get the link status before link update, for predicting later */ > > memset(&link, 0, sizeof(link)); > > rte_ixgbe_dev_atomic_read_link_status(dev, &link); @@ - > > 3795,20 +3794,16 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev > *dev, > > timeout =3D IXGBE_LINK_DOWN_CHECK_TIMEOUT; > > > > ixgbe_dev_link_status_print(dev); > > + intr->delay =3D true; > > > > - intr_enable_delay =3D true; > > - } > > - > > - if (intr_enable_delay) { > > if (rte_eal_alarm_set(timeout * 1000, > > ixgbe_dev_interrupt_delayed_handler, > > (void *)dev) < 0) > > PMD_DRV_LOG(ERR, "Error setting alarm"); > > - } else { > > - PMD_DRV_LOG(DEBUG, "enable intr immediately"); > > - ixgbe_enable_intr(dev); > > - rte_intr_enable(intr_handle); > > } > > > > + PMD_DRV_LOG(DEBUG, "enable intr immediately"); > > + ixgbe_enable_intr(dev); > > + rte_intr_enable(intr_handle); > I think we should still disable LSC interrupt before the delayed handling= , to > avoid any chaos on potential too many interrupts being reported. > Of cause other interrupts can be enabled here, to fix the issue you found= . Agree, will add this in v3. >=20 > Thanks, > Helin