From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 10 May 2015 22:31:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,404,1427785200"; d="scan'208";a="569319303" Received: from shwdeisgchi017.ccr.corp.intel.com (HELO [10.239.66.47]) ([10.239.66.47]) by orsmga003.jf.intel.com with ESMTP; 10 May 2015 22:31:05 -0700 Message-ID: <55503E98.805@intel.com> Date: Mon, 11 May 2015 13:31:04 +0800 From: "Liang, Cunming" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Stephen Hemminger 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> In-Reply-To: <20150505113611.1359e2d8@urahara> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v7 08/10] ixgbe: enable rx queue interrupts for both PF and VF X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 05:31:08 -0000 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().