From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <wenzhuo.lu@intel.com>
Received: from mga06.intel.com (mga06.intel.com [134.134.136.31])
 by dpdk.org (Postfix) with ESMTP id 788521B355
 for <dev@dpdk.org>; Fri, 26 Jan 2018 08:30:51 +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 orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 25 Jan 2018 23:30:50 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.46,415,1511856000"; d="scan'208";a="12749358"
Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206])
 by orsmga007.jf.intel.com with ESMTP; 25 Jan 2018 23:30:50 -0800
Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by
 FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS)
 id 14.3.319.2; Thu, 25 Jan 2018 23:30:49 -0800
Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by
 fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS)
 id 14.3.319.2; Thu, 25 Jan 2018 23:30:49 -0800
Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.124]) by
 SHSMSX152.ccr.corp.intel.com ([169.254.6.130]) with mapi id 14.03.0319.002;
 Fri, 26 Jan 2018 15:30:48 +0800
From: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>
CC: Moti Haimovsky <motih@mellanox.com>, "dev@dpdk.org" <dev@dpdk.org>,
 "shahafs@mellanox.com" <shahafs@mellanox.com>, "Yigit, Ferruh"
 <ferruh.yigit@intel.com>
Thread-Topic: [PATCH] app/testpmd: do not enable Rx offloads by default
Thread-Index: AQHTlCHmHkwI5lrCGEy2y6PyHLPjFqODyh5w///+b4CAAfzD4A==
Date: Fri, 26 Jan 2018 07:30:47 +0000
Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B721CA4@shsmsx102.ccr.corp.intel.com>
References: <1516695081-178919-1-git-send-email-motih@mellanox.com>
 <6A0DE07E22DDAD4C9103DF62FEBC09093B715D7A@shsmsx102.ccr.corp.intel.com>
 <60691740.PPs9Gye6m2@xps>
In-Reply-To: <60691740.PPs9Gye6m2@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 <dev.dpdk.org>
List-Unsubscribe: <https://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: <https://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 26 Jan 2018 07:30:52 -0000

Hi Thomas,

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Thursday, January 25, 2018 5:04 PM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>
> Cc: Moti Haimovsky <motih@mellanox.com>; dev@dpdk.org;
> shahafs@mellanox.com; Yigit, Ferruh <ferruh.yigit@intel.com>
> Subject: Re: [PATCH] app/testpmd: do not enable Rx offloads by default
>=20
> 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 offl=
oad
> could be a good reference. Get the capability and check what's supported
> first, then ignore the not supported functions with printing a warning bu=
t
> not block anything...
>=20
> I agree that we should check the capabilities before requesting an offloa=
d.
> But I disagree on another point: we should not enable an offload if the u=
ser
> did not request it explicitly. It makes things unclear.
> This is a testing tool, it should be close to the ethdev API behavior.
>=20
> Why these offload flags are silently enabled?
I don't think it's silently. It's a global configuration. In this case, tes=
tpmd is the user, it does request it explicitly. If it's not so explicit, m=
aybe we can consider moving all the configuration to a specific configure f=
ile.
Talking about why it's enabled by default. Hard to figure out the history. =
To my opinion, the original designer wants to simulate the common case.