From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <wenzhuo.lu@intel.com>
Received: from mga17.intel.com (mga17.intel.com [192.55.52.151])
 by dpdk.org (Postfix) with ESMTP id 819AA683E
 for <dev@dpdk.org>; Thu,  6 Dec 2018 06:03:43 +0100 (CET)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga003.jf.intel.com ([10.7.209.27])
 by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 05 Dec 2018 21:03:42 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.56,321,1539673200"; d="scan'208";a="107698869"
Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205])
 by orsmga003.jf.intel.com with ESMTP; 05 Dec 2018 21:03:42 -0800
Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by
 fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS)
 id 14.3.408.0; Wed, 5 Dec 2018 21:03:42 -0800
Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by
 fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS)
 id 14.3.408.0; Wed, 5 Dec 2018 21:03:41 -0800
Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.182]) by
 SHSMSX151.ccr.corp.intel.com ([169.254.3.46]) with mapi id 14.03.0415.000;
 Thu, 6 Dec 2018 13:03:39 +0800
From: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>
To: "Varghese, Vipin" <vipin.varghese@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
CC: "Yang, Qiming" <qiming.yang@intel.com>, "Li, Xiaoyun"
 <xiaoyun.li@intel.com>, "Wu, Jingjing" <jingjing.wu@intel.com>
Thread-Topic: [dpdk-dev] [PATCH v2 03/20] net/ice: support device and queue ops
Thread-Index: AQHUitYvnvewVum/C0SwcC+JV3x3NaVtfrcAgAOtQxA=
Date: Thu, 6 Dec 2018 05:03:39 +0000
Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093FE11691@shsmsx102.ccr.corp.intel.com>
References: <1542956179-80951-1-git-send-email-wenzhuo.lu@intel.com>
 <1543820821-108122-1-git-send-email-wenzhuo.lu@intel.com>
 <1543820821-108122-4-git-send-email-wenzhuo.lu@intel.com>
 <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D2C4550@BGSMSX101.gar.corp.intel.com>
In-Reply-To: <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D2C4550@BGSMSX101.gar.corp.intel.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
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 v2 03/20] net/ice: support device and queue
 ops
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Thu, 06 Dec 2018 05:03:44 -0000

Hi Vipin,


> -----Original Message-----
> From: Varghese, Vipin
> Sent: Tuesday, December 4, 2018 12:53 PM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Yang, Qiming
> <qiming.yang@intel.com>; Li, Xiaoyun <xiaoyun.li@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>
> Subject: RE: [dpdk-dev] [PATCH v2 03/20] net/ice: support device and queu=
e
> ops
>=20
> snipped
> > +
> > +static int ice_init_rss(struct ice_pf *pf) {
> > +	struct ice_hw *hw =3D ICE_PF_TO_HW(pf);
> > +	struct ice_vsi *vsi =3D pf->main_vsi;
> > +	struct rte_eth_dev *dev =3D pf->adapter->eth_dev;
> > +	struct rte_eth_rss_conf *rss_conf;
> > +	struct ice_aqc_get_set_rss_keys key;
> > +	uint16_t i, nb_q;
> > +	int ret =3D 0;
> > +
> > +	rss_conf =3D &dev->data->dev_conf.rx_adv_conf.rss_conf;
> > +	nb_q =3D dev->data->nb_rx_queues;
> > +	vsi->rss_key_size =3D
> ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE;
> > +	vsi->rss_lut_size =3D hw->func_caps.common_cap.rss_table_size;
> > +
> > +	if (!vsi->rss_key)
> > +		vsi->rss_key =3D rte_zmalloc("rss_key",
> > +					   vsi->rss_key_size, 0);
> > +	if (!vsi->rss_lut)
> > +		vsi->rss_lut =3D rte_zmalloc("rss_lut",
> > +					   vsi->rss_lut_size, 0);
>=20
> 2 suggestions
> 1. should the name be macro?
Sorry, which name?

> 2. if there are multiple 810 NIC under DPDK, should not each rss be diffe=
rent
> like "rss_key-%u" where it is port number?
Sorry, don't understand the question.

>=20
> Snipped
>=20
> > +
> > +static int
> > +ice_dev_start(struct rte_eth_dev *dev) {
> > +	struct rte_eth_dev_data *data =3D dev->data;
> > +	struct ice_hw *hw =3D ICE_DEV_PRIVATE_TO_HW(dev->data-
> > >dev_private);
> > +	struct ice_pf *pf =3D ICE_DEV_PRIVATE_TO_PF(dev->data-
> >dev_private);
> > +	uint16_t nb_rxq =3D 0;
> > +	uint16_t nb_txq, i;
> > +	int ret;
> > +
> > +	ICE_PROC_SECONDARY_CHECK;
>=20
> Device start is not supported, but how is this differentiated from primar=
y
> configured device vs secondary configured device.
>=20
> Ie: primary uses black list '-b BB:DD:F' while secondary uses '-w BB:DD:F=
'. In
> this case since we are checking process type this will return without sta=
rt?
>=20
> Snipped
>=20
> > +
> > +static void
> > +ice_dev_stop(struct rte_eth_dev *dev) {
> > +	struct rte_eth_dev_data *data =3D dev->data;
> > +	struct ice_pf *pf =3D ICE_DEV_PRIVATE_TO_PF(dev->data-
> >dev_private);
> > +	uint16_t i;
> > +
> > +	/* avoid stopping again */
> > +	if (pf->adapter_stopped)
> > +		return;
> > +
> > +	ICE_PROC_SECONDARY_CHECK_NO_ERR;
>=20
> Same as above.
>=20
> snipped