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 1B5E4271 for ; Tue, 12 Dec 2017 09:49:51 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Dec 2017 00:49:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,394,1508828400"; d="scan'208";a="1860749" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by fmsmga008.fm.intel.com with ESMTP; 12 Dec 2017 00:49:50 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.67]) by IRSMSX104.ger.corp.intel.com ([163.33.3.159]) with mapi id 14.03.0319.002; Tue, 12 Dec 2017 08:49:49 +0000 From: "Ananyev, Konstantin" To: Shahaf Shuler , "dev@dpdk.org" , "Nicolau, Radu" Thread-Topic: [dpdk-dev] [PATCH 14/39] examples/ip_reassembly: convert to new ethdev offloads API Thread-Index: AQHTZFWHcjeFvuv4p0OkxiHNRhi7bqM+WLHwgAEEHICAACaAUA== Date: Tue, 12 Dec 2017 08:49:48 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772585FAC8677@irsmsx105.ger.corp.intel.com> References: <20171123121941.144335-1-shahafs@mellanox.com> <20171123121941.144335-5-shahafs@mellanox.com> <2601191342CEEE43887BDE71AB9772585FAC8030@irsmsx105.ger.corp.intel.com> In-Reply-To: Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMDBlYzlmMTAtODMyMC00ZDhiLTk1ZjktM2MzZjVhMThhNWJiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IlVyeWtDMEpJTjYyaDY2aHFxVmdaVjhVWDN0WFRzK2F1YWthSnUwYVU4TE09In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action 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] [PATCH 14/39] examples/ip_reassembly: convert to new ethdev offloads API 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: Tue, 12 Dec 2017 08:49:52 -0000 > -----Original Message----- > From: Shahaf Shuler [mailto:shahafs@mellanox.com] > Sent: Tuesday, December 12, 2017 6:31 AM > To: Ananyev, Konstantin ; dev@dpdk.org; Nic= olau, Radu > Subject: RE: [dpdk-dev] [PATCH 14/39] examples/ip_reassembly: convert to = new ethdev offloads API >=20 > Monday, December 11, 2017 5:04 PM, Ananyev, Konstantin: > > > + if ((dev_info.tx_offload_capa & port_conf.txmode.offloads) > > !=3D > > > + port_conf.txmode.offloads) { > > > + printf("Some Tx offloads are not supported " > > > + "by port %d: requested 0x%lx supported > > 0x%lx\n", > > > + portid, port_conf.txmode.offloads, > > > + dev_info.tx_offload_capa); > > > + port_conf.txmode.offloads &=3D > > dev_info.tx_offload_capa; > > > + } > > > > Sort of generic question regarding most examples - wouldn't it be bette= r to > > do rte_exit() if device doesn't support the offloads we expect instead = of > > masking off unsupported offloads and continue? > > Konstantin >=20 > We already started to discuss this question, see [1]. >=20 > I agree that it is wrong approach to mask the not supported offloads and = continue the application. > So now I we have 2 options: > 1. report the warning and let the PMD to fail the device configuration. > 2. like you suggested, report the error and exit the application. >=20 > While it is wrong for application to set offloads which are not reported = by the device capabilities, the input I got from Radu is that there are > a lot of PMDs that will break with option 2, see [1]. > One example is ixgbe which expects to have CRC offload enabled with IPSEC= but don't report it on its caps. >=20 > So my current direction is to make the examples less strict, and give the= option for the PMD to fail those if not supported. > Any objection? So basically option #1 from the above? If so, none from me. >=20 > [1] http://dpdk.org/ml/archives/dev/2017-December/083441.html >=20