From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id DFB6595A4 for ; Wed, 21 Oct 2015 15:01:04 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 21 Oct 2015 06:01:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,712,1437462000"; d="scan'208";a="816109718" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.66.49]) by fmsmga001.fm.intel.com with ESMTP; 21 Oct 2015 06:00:55 -0700 Date: Wed, 21 Oct 2015 21:01:14 +0800 From: Yuanhan Liu To: "Ananyev, Konstantin" Message-ID: <20151021130114.GI3115@yliu-dev.sh.intel.com> References: <1444369572-1157-1-git-send-email-yuanhan.liu@linux.intel.com> <1444369572-1157-11-git-send-email-yuanhan.liu@linux.intel.com> <2601191342CEEE43887BDE71AB97725836AB3299@irsmsx105.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2601191342CEEE43887BDE71AB97725836AB3299@irsmsx105.ger.corp.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "dev@dpdk.org" , "marcel@redhat.com" , "Michael S. Tsirkin" Subject: Re: [dpdk-dev] [PATCH v6 10/13] ixgbe: support VMDq RSS in non-SRIOV environment 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: Wed, 21 Oct 2015 13:01:08 -0000 > > static int > > +ixgbe_config_vmdq_rss(struct rte_eth_dev *dev) > > +{ > > + struct ixgbe_hw *hw; > > + uint32_t mrqc; > > + > > + ixgbe_rss_configure(dev); > > + > > + hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); > > + > > + /* MRQC: enable VMDQ RSS */ > > + mrqc = IXGBE_READ_REG(hw, IXGBE_MRQC); > > + mrqc &= ~IXGBE_MRQC_MRQE_MASK; > > + > > + switch (RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool) { > > + case 2: > > + mrqc |= IXGBE_MRQC_VMDQRSS64EN; > > + break; > > + > > + case 4: > > + mrqc |= IXGBE_MRQC_VMDQRSS32EN; > > + break; > > + > > + default: > > + PMD_INIT_LOG(ERR, "Invalid pool number in non-IOV mode with VMDQ RSS"); > > + return -EINVAL; > > + } > > + > > + IXGBE_WRITE_REG(hw, IXGBE_MRQC, mrqc); > > + > > + ixgbe_vmdq_pool_configure(dev); > > + > > + return 0; > > +} > > So ixgbe_config_vmdq_rss() checks nb_q_per_pool value, and might return an error if the value is invalid. > Though this return value seems just ignored by ixgbe_dev_mq_rx_configure() below. > Probably, it is better to move nb_q_per_pool value checking into rte_eth_dev_check_mq_mode(), > as is done for other modes? > I know it is no ideal, as it probably should be HW specific check, > but seems anyway better than just ignoring the error. > Hi, Thanks for the review. However, as you might have seen, I dropped this patch in the lastest version. This patch is for using the NIC VMDq feature to link with VM multiple queue to demonstrate the multiple queue feature. However, this introduces too much limitation. So, I dropped it. However, despite of above usage, if you think it's necessary to add such ability (support VMDq RSS in non-SRIOV), I could update this patch based on your comments, and sent it out as a standalone patch. Otherwise, I'll simply drop it. --yliu