From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 14A703772; Fri, 12 Jan 2018 03:29:37 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jan 2018 18:29:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,347,1511856000"; d="scan'208";a="9134509" Received: from pgsmsx104.gar.corp.intel.com ([10.221.44.91]) by fmsmga008.fm.intel.com with ESMTP; 11 Jan 2018 18:29:36 -0800 Received: from pgsmsx110.gar.corp.intel.com (10.221.44.111) by PGSMSX104.gar.corp.intel.com (10.221.44.91) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 12 Jan 2018 10:29:35 +0800 Received: from pgsmsx112.gar.corp.intel.com ([169.254.3.86]) by PGSMSX110.gar.corp.intel.com ([169.254.13.155]) with mapi id 14.03.0319.002; Fri, 12 Jan 2018 10:29:34 +0800 From: "Dai, Wei" To: "Zhang, Qi Z" , "Lu, Wenzhuo" CC: "dev@dpdk.org" , "Wang, Liang-min" , "stable@dpdk.org" Thread-Topic: [PATCH 1/2] net/ixgbe: fix mailbox interrupt handler Thread-Index: AQHTf4x1Ad0uO+V2Nk2kOE+LoAm2TqNYKJYQgBW4y4CAAbkVoA== Date: Fri, 12 Jan 2018 02:29:33 +0000 Message-ID: <49759EB36A64CF4892C1AFEC9231E8D66CF21986@PGSMSX112.gar.corp.intel.com> References: <1514406150-17517-1-git-send-email-qi.z.zhang@intel.com> <49759EB36A64CF4892C1AFEC9231E8D65156D94A@PGSMSX112.gar.corp.intel.com> <039ED4275CED7440929022BC67E706115312B29A@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <039ED4275CED7440929022BC67E706115312B29A@SHSMSX103.ccr.corp.intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjBhOTM2MjctMTkyNC00MDlhLWFiMGQtZGYyYjlkYTQ3ZDM4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IlZMdjVNR3hnRzdJcFhBK3g1NXNxZFRXWGl4eEl1SXJRYU1pVFpOYmthWmc9In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [172.30.20.206] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/2] net/ixgbe: fix mailbox interrupt handler 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: Fri, 12 Jan 2018 02:29:38 -0000 > -----Original Message----- > From: Zhang, Qi Z > Sent: Thursday, January 11, 2018 4:08 PM > To: Dai, Wei ; Lu, Wenzhuo > Cc: dev@dpdk.org; Wang, Liang-min ; > stable@dpdk.org > Subject: RE: [PATCH 1/2] net/ixgbe: fix mailbox interrupt handler >=20 >=20 >=20 > > -----Original Message----- > > From: Dai, Wei > > Sent: Thursday, December 28, 2017 12:39 PM > > To: Zhang, Qi Z ; Lu, Wenzhuo > > > > Cc: dev@dpdk.org; Wang, Liang-min ; > > stable@dpdk.org > > Subject: RE: [PATCH 1/2] net/ixgbe: fix mailbox interrupt handler > > > > According to step 7 & 8 in Table 7-74 PF-to-VF Messaging Flow in 82599 > > datasheet, The calling of ixgbe_read_mbx( ) can be replaced by > > following lines to avoid touching ->mbx.v2p_mailbox, > > IXGBE_WRITE_REG(hw, IXGBE_VFMAILBOX, IXGBE_VFMAILBOX_ACK); >=20 > Thanks for the suggestion. >=20 > I think the patch try to keep things unchanged when a PF reset happen, bu= t it > is not going to cover the case that PF reset interrupt and a foreground V= F to > PF request happen simultaneously which is an knowing issue Your suggestio= n > may help on that, but it is not a complete fix. I think it will be better= to have > a separate patch that focus on it. Agree with you. >=20 > Regards > Qi > > > > > -----Original Message----- > > > From: Zhang, Qi Z > > > Sent: Thursday, December 28, 2017 4:22 AM > > > To: Lu, Wenzhuo > > > Cc: dev@dpdk.org; Dai, Wei ; Wang, Liang-min > > > ; Zhang, Qi Z ; > > > stable@dpdk.org > > > Subject: [PATCH 1/2] net/ixgbe: fix mailbox interrupt handler > > > > > > Mailbox interrupt handler only take care of PF reset notification, > > > for other message ixgbe_read_mbx should not be called since it get > > > chance to break the foreground VF to PF communication. > > > This can be simply repeated by > > > testpmd>rx_vlan rm all 0 > > > > > > Fixes: 77234603fba0 ("net/ixgbe: support VF mailbox interrupt for > > > link > > > up/down") > > > Cc: stable@dpdk.org > > > > > > Signed-off-by: Qi Zhang Acked-by: Wei Dai > > > --- > > > drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++++++--- > > > 1 file changed, 7 insertions(+), 3 deletions(-) > > > > > > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > > > b/drivers/net/ixgbe/ixgbe_ethdev.c > > > index ff19a56..02121f4 100644 > > > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > > > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > > > @@ -8165,13 +8165,17 @@ static void ixgbevf_mbx_process(struct > > > rte_eth_dev *dev) > > > struct ixgbe_hw *hw =3D > > > IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); > > > u32 in_msg =3D 0; > > > > > > - if (ixgbe_read_mbx(hw, &in_msg, 1, 0)) > > > - return; > > > + /* peek the message first */ > > > + in_msg =3D IXGBE_READ_REG(hw, IXGBE_VFMBMEM); > > > > > > /* PF reset VF event */ > > > - if (in_msg =3D=3D IXGBE_PF_CONTROL_MSG) > > > + if (in_msg =3D=3D IXGBE_PF_CONTROL_MSG) { > > > + /* dummy mbx read to ack pf */ > > > + if (ixgbe_read_mbx(hw, &in_msg, 1, 0)) > > > + return; > > > _rte_eth_dev_callback_process(dev, > > > RTE_ETH_EVENT_INTR_RESET, > > > NULL, NULL); > > > + } > > > } > > > > > > static int > > > -- > > > 2.7.4