From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 32CAA1BE0 for ; Thu, 25 Jan 2018 02:11:50 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jan 2018 17:11:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,409,1511856000"; d="scan'208";a="198583315" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga006.fm.intel.com with ESMTP; 24 Jan 2018 17:11:49 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 24 Jan 2018 17:11:49 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.189]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.159]) with mapi id 14.03.0319.002; Thu, 25 Jan 2018 09:11:48 +0800 From: "Lu, Wenzhuo" To: Moti Haimovsky , "thomas@monjalon.net" CC: "dev@dpdk.org" Thread-Topic: [PATCH] app/testpmd: do not enable Rx offloads by default Thread-Index: AQHTlCHmHkwI5lrCGEy2y6PyHLPjFqODyh5w Date: Thu, 25 Jan 2018 01:11:47 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B715D7A@shsmsx102.ccr.corp.intel.com> References: <1516695081-178919-1-git-send-email-motih@mellanox.com> In-Reply-To: <1516695081-178919-1-git-send-email-motih@mellanox.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] 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: Thu, 25 Jan 2018 01:11:51 -0000 Hi Moti, > -----Original Message----- > From: Moti Haimovsky [mailto:motih@mellanox.com] > Sent: Tuesday, January 23, 2018 4:11 PM > To: Lu, Wenzhuo ; thomas@monjalon.net > Cc: dev@dpdk.org; Moti Haimovsky > Subject: [PATCH] app/testpmd: do not enable Rx offloads by default >=20 > Removed the hardcoded preconfigured Rx offload configuration from > testpmd. > Testers who wish to use these offloads will now have to explicitly write = them > in the command-line when running testpmd. >=20 > Motivation: > Some PMDs such at the mlx4 may not implement all the offloads. > After the offload API rework assuming no offload is enabled by default, > commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API") > commit cba7f53b717d ("ethdev: introduce Tx queue offloads API") trying = to > enable a not supported offload is clearly an error which will cause > configuration failing. >=20 > Considering that testpmd is an application to test the PMD, it should not= fail > on a configuration which was not explicitly requested. > The behavior of this test application is then turned to an opt-in model. >=20 > Signed-off-by: Moti Haimovsky > --- > app/test-pmd/testpmd.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) >=20 > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index > 5dc8cca..a082352 100644 > --- 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 fi= rst, then ignore the not supported functions with printing a warning but no= t block anything... > .ignore_offload_bitfield =3D 1, > }; >=20 > -- > 1.8.3.1