From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shahaf Shuler Subject: Re: [PATCH 14/39] examples/ip_reassembly: convert to new ethdev offloads API Date: Tue, 12 Dec 2017 06:30:43 +0000 Message-ID: References: <20171123121941.144335-1-shahafs@mellanox.com> <20171123121941.144335-5-shahafs@mellanox.com> <2601191342CEEE43887BDE71AB9772585FAC8030@irsmsx105.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable To: "Ananyev, Konstantin" , "dev@dpdk.org" , Radu Nicolau Return-path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0081.outbound.protection.outlook.com [104.47.1.81]) by dpdk.org (Postfix) with ESMTP id 7D7C7239 for ; Tue, 12 Dec 2017 07:30:45 +0100 (CET) In-Reply-To: <2601191342CEEE43887BDE71AB9772585FAC8030@irsmsx105.ger.corp.intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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; > > + } >=20 > Sort of generic question regarding most examples - wouldn't it be better = to > do rte_exit() if device doesn't support the offloads we expect instead of > masking off unsupported offloads and continue? > Konstantin We already started to discuss this question, see [1]. I agree that it is wrong approach to mask the not supported offloads and co= ntinue the application.=20 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. 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].=20 One example is ixgbe which expects to have CRC offload enabled with IPSEC b= ut don't report it on its caps.=20 So my current direction is to make the examples less strict, and give the o= ption for the PMD to fail those if not supported. Any objection?=20 [1] http://dpdk.org/ml/archives/dev/2017-December/083441.html