From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 0F4968E78 for ; Mon, 12 Oct 2015 11:07:01 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 12 Oct 2015 02:07:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,671,1437462000"; d="scan'208";a="824581467" Received: from irsmsx153.ger.corp.intel.com ([163.33.192.75]) by orsmga002.jf.intel.com with ESMTP; 12 Oct 2015 02:07:00 -0700 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.139]) by IRSMSX153.ger.corp.intel.com ([169.254.9.191]) with mapi id 14.03.0248.002; Mon, 12 Oct 2015 10:05:34 +0100 From: "Jastrzebski, MichalX K" To: Tetsuya Mukawa , "Kulasek, TomaszX" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCHv4 4/9] null: virtual dynamic rss configuration Thread-Index: AQHQvyPBTRlDYX0BMkmNLt9EnFRODp5TLP6AgBTuSnA= Date: Mon, 12 Oct 2015 09:05:33 +0000 Message-ID: <60ABE07DBB3A454EB7FAD707B4BB1582139C31AF@IRSMSX109.ger.corp.intel.com> References: <1435589444-1988-1-git-send-email-tomaszx.kulasek@intel.com> <1436981189-3320-1-git-send-email-tomaszx.kulasek@intel.com> <1436981189-3320-5-git-send-email-tomaszx.kulasek@intel.com> <5609F673.80405@igel.co.jp> In-Reply-To: <5609F673.80405@igel.co.jp> Accept-Language: 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 Subject: Re: [dpdk-dev] [PATCHv4 4/9] null: virtual dynamic rss configuration 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, 12 Oct 2015 09:07:02 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Tetsuya Mukawa > Sent: Tuesday, September 29, 2015 4:25 AM > To: Kulasek, TomaszX; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCHv4 4/9] null: virtual dynamic rss configura= tion >=20 > On 2015/07/16 2:26, Tomasz Kulasek wrote: > > This implementation allows to set and read RSS configuration for null > > device, and is used to validate right values propagation over the slave= s, > > in test units for dynamic RSS configuration for bonding. > > > > Signed-off-by: Tomasz Kulasek > > --- > > drivers/net/null/rte_eth_null.c | 116 > +++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 116 insertions(+) > > > > diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth= _null.c > > index 39ffcde..f393422 100644 > > --- a/drivers/net/null/rte_eth_null.c > > +++ b/drivers/net/null/rte_eth_null.c > > +static int > > +eth_rss_hash_update(struct rte_eth_dev *dev, struct rte_eth_rss_conf > *rss_conf) > > +{ > > + struct pmd_internals *internal =3D dev->data->dev_private; > > + > > + rte_spinlock_lock(&internal->rss_lock); > > + > > + if ((rss_conf->rss_hf & internal->flow_type_rss_offloads) !=3D 0) > > + dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf =3D > > + rss_conf->rss_hf & internal- > >flow_type_rss_offloads; > > + > > + if (rss_conf->rss_key) > > + memcpy(internal->rss_key, rss_conf->rss_key, 40); > > + > > + rte_spinlock_unlock(&internal->rss_lock); > > + > > + return 0; > > +} > > + > > +static int > > +eth_rss_hash_conf_get(struct rte_eth_dev *dev, > > + struct rte_eth_rss_conf *rss_conf) > > +{ > > + struct pmd_internals *internal =3D dev->data->dev_private; > > + > > + rte_spinlock_lock(&internal->rss_lock); > > + > > + rss_conf->rss_hf =3D dev->data- > >dev_conf.rx_adv_conf.rss_conf.rss_hf; > > + if (rss_conf->rss_key) > > + memcpy(rss_conf->rss_key, internal->rss_key, 40); > > + > > + rte_spinlock_unlock(&internal->rss_lock); > > + > > + return 0; > > +} > > + > > static const struct eth_dev_ops ops =3D { > > .dev_start =3D eth_dev_start, > > .dev_stop =3D eth_dev_stop, > > @@ -436,6 +547,11 @@ eth_dev_null_create(const char *name, > > internals->packet_copy =3D packet_copy; > > internals->numa_node =3D numa_node; > > > > + internals->flow_type_rss_offloads =3D ETH_RSS_PROTO_MASK; > > + internals->reta_size =3D RTE_DIM(internals->reta_conf) * > RTE_RETA_GROUP_SIZE; > > + > > + memcpy(internals->rss_key, default_rss_key, 40); > > + > > eth_drv->pci_drv.name =3D drivername; > > > > pci_dev->numa_node =3D numa_node; >=20 > Hi Thomasz, >=20 > I am just curious. Is it possible to use rte_memcpy instead of memcpy? > if we can, rte_memcpy may be faster. >=20 > Tetsuya Hi Tetsuya, Could You please review v5 that Tomasz sent and if You agree with this impl= ementation could You also ACK this patch-set?