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 856CC2BF3 for ; Thu, 17 May 2018 15:47:05 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 May 2018 06:47:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,410,1520924400"; d="scan'208";a="40695817" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga008.fm.intel.com with ESMTP; 17 May 2018 06:47:03 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 17 May 2018 06:47:03 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 17 May 2018 06:47:02 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.210]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.40]) with mapi id 14.03.0319.002; Thu, 17 May 2018 21:47:01 +0800 From: "Zhang, Qi Z" To: "Lu, Wenzhuo" , "dev@dpdk.org" CC: "Lu, Wenzhuo" , "Luo, Michael" Thread-Topic: [dpdk-dev] [PATCH] net/ixgbe: fix too many interrupts Thread-Index: AQHT7aBfsv6NkFOKqEGkbnD4PdErDaQz738g Date: Thu, 17 May 2018 13:47:01 +0000 Message-ID: <039ED4275CED7440929022BC67E70611531B4173@SHSMSX103.ccr.corp.intel.com> References: <1526535249-101287-1-git-send-email-wenzhuo.lu@intel.com> In-Reply-To: <1526535249-101287-1-git-send-email-wenzhuo.lu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTZlN2M2NjQtNTBkMC00Yjg4LTg2ZWYtZDQ4N2FiYTBjNjA3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiIySlhkK2dKR1FIT3BzdUtVUjJsbkV5WjlBazVPcHZDRlpPZzZWV0hIUGFWSDJrbXlrWnNLSDdNNzFLNENqZWNnIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 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-dev] [PATCH] net/ixgbe: fix too many interrupts 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, 17 May 2018 13:47:06 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wenzhuo Lu > Sent: Thursday, May 17, 2018 1:34 PM > To: dev@dpdk.org > Cc: Lu, Wenzhuo ; Luo, Michael > > Subject: [dpdk-dev] [PATCH] net/ixgbe: fix too many interrupts >=20 > To support kernel VF, PBA bit is always set. But it may cause the too man= y > interrupts issue on specific Linux kernel, like 4.4.0-116. > PF host should set the atuo clean, mask and throttling as we always set t= he > register for kernel VF. >=20 > Fixes: 6b75183ac4d0 ("net/ixgbe: fix wrong PBA setting") >=20 > Signed-off-by: Michael Luo > Signed-off-by: Wenzhuo Lu Reviewed-by: Qi Zhang > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 49 > +++++++++++++++++++++++----------------- > 1 file changed, 28 insertions(+), 21 deletions(-) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > b/drivers/net/ixgbe/ixgbe_ethdev.c > index f5006bc..7219f02 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -5800,8 +5800,12 @@ static void ixgbevf_set_vfta_all(struct rte_eth_de= v > *dev, bool on) >=20 > /* won't configure msix register if no mapping is done > * between intr vector and event fd > + * but if misx has been enabled already, need to configure > + * auto clean, auto mask and throttling. > */ > - if (!rte_intr_dp_is_en(intr_handle)) > + gpie =3D IXGBE_READ_REG(hw, IXGBE_GPIE); > + if (!rte_intr_dp_is_en(intr_handle) && > + !(gpie & (IXGBE_GPIE_MSIX_MODE | IXGBE_GPIE_PBA_SUPPORT))) > return; >=20 > if (rte_intr_allow_others(intr_handle)) > @@ -5825,27 +5829,30 @@ static void ixgbevf_set_vfta_all(struct rte_eth_d= ev > *dev, bool on) > /* Populate the IVAR table and set the ITR values to the > * corresponding register. > */ > - for (queue_id =3D 0; queue_id < dev->data->nb_rx_queues; > - queue_id++) { > - /* by default, 1:1 mapping */ > - ixgbe_set_ivar_map(hw, 0, queue_id, vec); > - intr_handle->intr_vec[queue_id] =3D vec; > - if (vec < base + intr_handle->nb_efd - 1) > - vec++; > - } > + if (rte_intr_dp_is_en(intr_handle)) { > + for (queue_id =3D 0; queue_id < dev->data->nb_rx_queues; > + queue_id++) { > + /* by default, 1:1 mapping */ > + ixgbe_set_ivar_map(hw, 0, queue_id, vec); > + intr_handle->intr_vec[queue_id] =3D vec; > + if (vec < base + intr_handle->nb_efd - 1) > + vec++; > + } >=20 > - switch (hw->mac.type) { > - case ixgbe_mac_82598EB: > - ixgbe_set_ivar_map(hw, -1, IXGBE_IVAR_OTHER_CAUSES_INDEX, > - IXGBE_MISC_VEC_ID); > - break; > - case ixgbe_mac_82599EB: > - case ixgbe_mac_X540: > - case ixgbe_mac_X550: > - ixgbe_set_ivar_map(hw, -1, 1, IXGBE_MISC_VEC_ID); > - break; > - default: > - break; > + switch (hw->mac.type) { > + case ixgbe_mac_82598EB: > + ixgbe_set_ivar_map(hw, -1, > + IXGBE_IVAR_OTHER_CAUSES_INDEX, > + IXGBE_MISC_VEC_ID); > + break; > + case ixgbe_mac_82599EB: > + case ixgbe_mac_X540: > + case ixgbe_mac_X550: > + ixgbe_set_ivar_map(hw, -1, 1, IXGBE_MISC_VEC_ID); > + break; > + default: > + break; > + } > } > IXGBE_WRITE_REG(hw, IXGBE_EITR(IXGBE_MISC_VEC_ID), >=20 > IXGBE_EITR_INTERVAL_US(IXGBE_QUEUE_ITR_INTERVAL_DEFAULT) > -- > 1.9.3