From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 0C7CB1B38F for ; Fri, 26 Jan 2018 09:06:59 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jan 2018 00:06:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,415,1511856000"; d="scan'208";a="12756145" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga007.jf.intel.com with ESMTP; 26 Jan 2018 00:06:58 -0800 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 26 Jan 2018 00:06:58 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 26 Jan 2018 00:06:57 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.124]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.192]) with mapi id 14.03.0319.002; Fri, 26 Jan 2018 16:06:56 +0800 From: "Lu, Wenzhuo" To: Thomas Monjalon CC: Moti Haimovsky , "dev@dpdk.org" , "shahafs@mellanox.com" , "Yigit, Ferruh" Thread-Topic: [PATCH] app/testpmd: do not enable Rx offloads by default Thread-Index: AQHTlCHmHkwI5lrCGEy2y6PyHLPjFqODyh5w///+b4CAAfzD4P//gFaAgACJ6tA= Date: Fri, 26 Jan 2018 08:06:55 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B721D05@shsmsx102.ccr.corp.intel.com> References: <1516695081-178919-1-git-send-email-motih@mellanox.com> <60691740.PPs9Gye6m2@xps> <6A0DE07E22DDAD4C9103DF62FEBC09093B721CA4@shsmsx102.ccr.corp.intel.com> <6183373.cbWzoGE1aT@xps> In-Reply-To: <6183373.cbWzoGE1aT@xps> 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] app/testpmd: do not enable Rx offloads by default X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jan 2018 08:07:00 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Friday, January 26, 2018 3:48 PM > To: Lu, Wenzhuo > Cc: Moti Haimovsky ; dev@dpdk.org; > shahafs@mellanox.com; Yigit, Ferruh > Subject: Re: [PATCH] app/testpmd: do not enable Rx offloads by default >=20 > 26/01/2018 08:30, Lu, Wenzhuo: > > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > > 25/01/2018 02:11, Lu, Wenzhuo: > > > > > --- a/app/test-pmd/testpmd.c > > > > > +++ b/app/test-pmd/testpmd.c > > > > > @@ -305,9 +305,7 @@ struct fwd_engine * fwd_engines[] =3D { > > > > > */ > > > > > struct rte_eth_rxmode rx_mode =3D { > > > > > .max_rx_pkt_len =3D ETHER_MAX_LEN, /**< Default maximum > frame > > > > > length. */ > > > > > - .offloads =3D (DEV_RX_OFFLOAD_VLAN_FILTER | > > > > > - DEV_RX_OFFLOAD_VLAN_STRIP | > > > > > - DEV_RX_OFFLOAD_CRC_STRIP), > > > > > + .offloads =3D 0, > > > > > > > > Change the default behavior may trigger other problems. I think TX > > > > offload > > > could be a good reference. Get the capability and check what's > > > supported first, then ignore the not supported functions with > > > printing a warning but not block anything... > > > > > > I agree that we should check the capabilities before requesting an of= fload. > > > But I disagree on another point: we should not enable an offload if > > > the user did not request it explicitly. It makes things unclear. > > > This is a testing tool, it should be close to the ethdev API behavior= . > > > > > > Why these offload flags are silently enabled? > > > > I don't think it's silently. It's a global configuration. In this case,= testpmd is > the user, it does request it explicitly. If it's not so explicit, maybe w= e can > consider moving all the configuration to a specific configure file. > > Talking about why it's enabled by default. Hard to figure out the histo= ry. > To my opinion, the original designer wants to simulate the common case. >=20 > Please do not justify a design mistake by history. >=20 > This is a test tool, so we don't care about the common case. > A test tool should not try to guess the best configuration. > Only the user should decide the configuration to apply, and the default > should be empty, as the API is. I see the divergence. You think testpmd is a tool, so it should be white pa= per as the tool users may suppose it is. I think testpmd is an example to let the APP developers know how to use DPD= K. So any pre-configuration is acceptable.