From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 96896FE5 for ; Wed, 27 Apr 2016 17:01:19 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP; 27 Apr 2016 08:01:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,542,1455004800"; d="scan'208";a="963888474" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga002.jf.intel.com with ESMTP; 27 Apr 2016 08:01:18 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 27 Apr 2016 08:01:17 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 27 Apr 2016 08:01:16 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.136]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.184]) with mapi id 14.03.0248.002; Wed, 27 Apr 2016 23:01:15 +0800 From: "Xing, Beilei" To: Julien Meunier , "Wu, Jingjing" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] i40e: configure MTU Thread-Index: AQHRnVL7a8iNd/DSY0avE1z0yDjjOZ+dM1eAgAC6gJA= Date: Wed, 27 Apr 2016 15:01:14 +0000 Message-ID: <94479800C636CB44BD422CB454846E0134B974@SHSMSX101.ccr.corp.intel.com> References: <1461410769-16942-1-git-send-email-beilei.xing@intel.com> <5720A5EF.7000206@6wind.com> In-Reply-To: <5720A5EF.7000206@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZGEzYTM4Y2MtYTVhMS00YmUyLTliMTEtM2RmZDcxZGRmM2VjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkorZ2lVY2tiakoxeEZlWkY5MjY1MWgwcmE3cjI3bjloMWZZaVwvVkpBR213PSJ9 x-ctpclassification: CTP_IC 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] i40e: configure MTU 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, 27 Apr 2016 15:01:20 -0000 > -----Original Message----- > From: Julien Meunier [mailto:julien.meunier@6wind.com] > Sent: Wednesday, April 27, 2016 7:44 PM > To: Xing, Beilei ; Wu, Jingjing > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] i40e: configure MTU >=20 > Hello, >=20 > On 04/23/2016 01:26 PM, Beilei Xing wrote: > [...] > > + /* mtu setting is forbidden if port is start */ > > + if (dev_data->dev_started) { > > + PMD_DRV_LOG(ERR, > > + "port %d must be stopped before configuration\n", > > + dev_data->port_id); > > + return -EBUSY; > > + } >=20 > According to rte_ethdev.h, only 4 return codes are supported for > rte_eth_dev_set_mtu: >=20 > * - (0) if successful. > * - (-ENOTSUP) if operation is not supported. > * - (-ENODEV) if *port_id* invalid. > * - (-EINVAL) if *mtu* invalid. >=20 > EBUSY should not be returned. Hi Meunier, Thanks for your comments, it shouldn't be EBUSY here. >=20 > > + for (i =3D 0; i < dev_data->nb_rx_queues; i++) { > > + rxq =3D dev_data->rx_queues[i]; > > + if (!rxq || !rxq->q_set) > > + continue; > > + > > + dev_data->dev_conf.rxmode.max_rx_pkt_len =3D frame_size; > > + len =3D hw->func_caps.rx_buf_chain_len * rxq->rx_buf_len; > > + rxq->max_pkt_len =3D RTE_MIN(len, frame_size); > > + } > > + > > + ret =3D i40e_dev_rx_init(pf); > > + > > + return ret; > > +} > > >=20 > Why do want to reconfigure rxq here ? All these operations are already do= ne > when you call i40e_dev_rx_init. > i40e_dev_rx_init =3D> i40e_rx_queue_init (for each queue) =3D> > i40e_rx_queue_config =3D> redefine rxq->max_pkt_len >=20 > Moreover, you should move dev_data->dev_conf.rxmode.max_rx_pkt_len out > of the loop. frame_size is the same for all rx_queues. Yes, you're right, needn't reconfigure rxq->max_pkt_len here, I just need r= econfigure dev_data->dev_conf.rxmode.max_rx_pkt_len cause i40e_dev_rx_init = will cover all.=20 Thanks very much. Beilei >=20 > -- > Julien MEUNIER > 6WIND