From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <konstantin.ananyev@intel.com>
Received: from mga14.intel.com (mga14.intel.com [192.55.52.115])
 by dpdk.org (Postfix) with ESMTP id B46B09599
 for <dev@dpdk.org>; Wed, 21 Oct 2015 15:03:55 +0200 (CEST)
Received: from fmsmga003.fm.intel.com ([10.253.24.29])
 by fmsmga103.fm.intel.com with ESMTP; 21 Oct 2015 06:03:34 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.17,712,1437462000"; d="scan'208";a="585309594"
Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153])
 by FMSMGA003.fm.intel.com with ESMTP; 21 Oct 2015 06:03:31 -0700
Received: from irsmsx105.ger.corp.intel.com ([169.254.7.75]) by
 IRSMSX101.ger.corp.intel.com ([169.254.1.33]) with mapi id 14.03.0248.002;
 Wed, 21 Oct 2015 14:03:28 +0100
From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Thread-Topic: [dpdk-dev] [PATCH v6 10/13] ixgbe: support VMDq RSS in
 non-SRIOV environment
Thread-Index: AQHRDACWGtCKeoc9FkS6OkUKgBVLtp516VwA
Date: Wed, 21 Oct 2015 13:03:28 +0000
Message-ID: <2601191342CEEE43887BDE71AB97725836AB34A6@irsmsx105.ger.corp.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>
 <20151021130114.GI3115@yliu-dev.sh.intel.com>
In-Reply-To: <20151021130114.GI3115@yliu-dev.sh.intel.com>
Accept-Language: en-IE, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [163.33.239.182]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: "dev@dpdk.org" <dev@dpdk.org>, "marcel@redhat.com" <marcel@redhat.com>,
 "Michael S. Tsirkin" <mst@redhat.com>
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 <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 21 Oct 2015 13:03:56 -0000

Hi Yliu,

> -----Original Message-----
> From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com]
> Sent: Wednesday, October 21, 2015 2:01 PM
> To: Ananyev, Konstantin
> Cc: dev@dpdk.org; Michael S. Tsirkin; marcel@redhat.com
> Subject: Re: [dpdk-dev] [PATCH v6 10/13] ixgbe: support VMDq RSS in non-S=
RIOV environment
>=20
> > >  static int
> > > +ixgbe_config_vmdq_rss(struct rte_eth_dev *dev)
> > > +{
> > > +	struct ixgbe_hw *hw;
> > > +	uint32_t mrqc;
> > > +
> > > +	ixgbe_rss_configure(dev);
> > > +
> > > +	hw =3D IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
> > > +
> > > +	/* MRQC: enable VMDQ RSS */
> > > +	mrqc =3D IXGBE_READ_REG(hw, IXGBE_MRQC);
> > > +	mrqc &=3D ~IXGBE_MRQC_MRQE_MASK;
> > > +
> > > +	switch (RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool) {
> > > +	case 2:
> > > +		mrqc |=3D IXGBE_MRQC_VMDQRSS64EN;
> > > +		break;
> > > +
> > > +	case 4:
> > > +		mrqc |=3D IXGBE_MRQC_VMDQRSS32EN;
> > > +		break;
> > > +
> > > +	default:
> > > +		PMD_INIT_LOG(ERR, "Invalid pool number in non-IOV mode with VMDQ R=
SS");
> > > +		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_configur=
e() below.
> > Probably, it is better to move nb_q_per_pool value checking into rte_et=
h_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.
> >
>=20
> Hi,
>=20
> 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.

Ah sorry, didn't notice it - too many patches are flying around these days.

>=20
> 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.

That's ok by me.
Konstantin

>=20
> 	--yliu