From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Liang, Cunming" Subject: Re: [PATCH v7 08/10] ixgbe: enable rx queue interrupts for both PF and VF Date: Mon, 11 May 2015 13:31:04 +0800 Message-ID: <55503E98.805@intel.com> References: <1425012976-10173-1-git-send-email-cunming.liang@intel.com> <1430804386-28949-1-git-send-email-cunming.liang@intel.com> <1430804386-28949-9-git-send-email-cunming.liang@intel.com> <20150505113611.1359e2d8@urahara> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Stephen Hemminger Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id D5BD8C3CA for ; Mon, 11 May 2015 07:31:07 +0200 (CEST) In-Reply-To: <20150505113611.1359e2d8@urahara> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 5/6/2015 2:36 AM, Stephen Hemminger wrote: > On Tue, 5 May 2015 13:39:44 +0800 > Cunming Liang wrote: > >> >> + /* set max interrupt vfio request */ >> + if (pci_dev->intr_handle.vec_en) { >> + pci_dev->intr_handle.max_intr = hw->mac.max_rx_queues + >> + IXGBEVF_MAX_OTHER_INTR; >> + pci_dev->intr_handle.intr_vec = >> + rte_zmalloc("intr_vec", >> + hw->mac.max_rx_queues * sizeof(int), 0); >> + > Since MSI-X vectors are limited on many hardware platforms, this whole API > should be changed so that max_intr is based on number of rx_queues actually > used by the application. That means the setup needs to move from init to configure. [LCM] When MSI-X is not used, intr_vec and set max_intr are useless. It doesn't matter to non MSI-X mode. As it allows the sequence "dev_stop->dev_reconfig->dev_start", the real used number of queue may change. So allocation only on dev_init and release only on dev_close, just make it simple. During configure_msix, it do use the real useful queue number to set queue/vector mapping, refer xxx_configure_msix().