From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0067.outbound.protection.outlook.com [104.47.42.67]) by dpdk.org (Postfix) with ESMTP id 551E5239 for ; Mon, 27 Nov 2017 08:34:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=DPWLHumsUTrrdIaalMLbb95tv93sOSpYTLDW2VeS0ss=; b=AZgzIZr8wy7dfw6LLDw2+XAtV80DsvHMAIJ5axL28ecmxWot4f9jGhVY+somqjR8IvGofRTe2UTK5e7yy36+3idSFh+7S1rW5AcG1BSnnXn3kvE0nhj36H7X50wDMPlsKpol2P+OPpaV3iELh+6RZ0ctt0SZ8NZ4NqQa4t5fOdg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (122.167.83.58) by BN3PR07MB2513.namprd07.prod.outlook.com (10.167.4.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.260.4; Mon, 27 Nov 2017 07:34:00 +0000 Date: Mon, 27 Nov 2017 13:03:47 +0530 From: Jerin Jacob To: Shahaf Shuler Cc: Andrew Rybchenko , "dev@dpdk.org" Message-ID: <20171127073346.GA20702@jerin> References: <20171123121419.144132-1-shahafs@mellanox.com> <20171123121419.144132-2-shahafs@mellanox.com> <7229daf4-fffd-764c-ec0f-b30e8be39af3@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-Originating-IP: [122.167.83.58] X-ClientProxiedBy: BM1PR01CA0098.INDPRD01.PROD.OUTLOOK.COM (10.174.208.14) To BN3PR07MB2513.namprd07.prod.outlook.com (10.167.4.138) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3b2c9c54-bb4c-4fb6-34f2-08d535693b30 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603199); SRVR:BN3PR07MB2513; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2513; 3:QAiS0k64QYayHoi1y1xi1CBh1KQyiwru13QDiot+/BtpQ5hhaF79tTSL5kpfoKw85Wf8CSMLBz/KkxdQQMwxLZ2TKmfxxQsD5Tk3mE03YrRCFGl6E8dhQFcNjA18h8UzMGoMGAIqxUtQVPoLQUbX8mrnzfHQNv2OHFnGfKUAibz91JB/KTIx16zufvLXeYPTYkIVgc5GZNVtSR16CUumy0iYuwkSi3ALvID3GAEI/3NEe2Xf/Q8Tx4qE9QhCEVgk; 25:jdWfVq/INqdkTZuCeG6YOI6oWa5JngNVJ7lUNDl3rLq476CzZozIK/wvQ2dHQzi4xjDnTo3XQsYhvNjeXVUlkc01CTZqmH57t/QpC9yYi8GyxZEvzNaSxzOyvqVv4rKqrSHYBkvScc9ggNVeIG0pBWIsNhNJw83IyrrV6tXo5N/AAXrDEzh14fBhbG8Wh1524DokhcTMX9EGAyhOre6lgojI+NNMyE2mygzWi4FYOr7yqa1qsw7bJs+7jjFTCtz6Vorlqm2hqGQKhxiu9/0llKnRBNPGiwjNomnLI1h3S7E2nM267XIZAR0rQSH2Fo5uQfKe48nd1YZwFOAqehGv/w==; 31:ARi8L24c8NO7zfFVNSjnKteYvtY/V0KFWnO11l+JEmHKv7Cb2c+J8AWUYRZvjjTXOoLGdi6wNGYtKhrJlXA5RzzGZWWWvPZg3jvurY9dcx0OUVR+fe1OczGSTvGXyYdha189hPfA1AAubM9rhof6HErO+MUcaYxcxqHKtZUAZDKwBHIHaKYYJWuz/jK94dOykvyoHZ+Ts+5gdmsGGBfxA1WvdLonHcUbda62vqY9Q24= X-MS-TrafficTypeDiagnostic: BN3PR07MB2513: X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2513; 20:yO7HMRYsAd9RMWu/ErBX5Q0eJdm5bcw2jE9H3DF6Upq6ZL7/c1EYV23VXl1Y89tOxcEPqEduaA7/s/SLEN6bZpj7N1+Poyq5fWI4z3RlJbSAksxhKPbZYzdmI1um9oHs/TRns+mIes6glNZAb1ND1kb9AndezUJ7dKZpFSFUi+TRGQrKBZfKnzepLp9inGBhMowR9qgBSeo3DQki4tw3rkkfA8LiTRY3F+RyHgmmr9ajgRibIM8ZH1GOyHV1U8lIRW8LMx0McaAkSpRc38X3O1GWsyM0YuLFOpLf76ayv+uXd5x9ulTz/rpHqdcUme+6Jx1duEjktOAOf33/a6DTSRuN0PZpSlxcN24EjZm1lSznY5Db5bVF8zYcpRwnSmCKOlU4IljTZ0+BRdDyhkkxYRyPa6P5dcoPgpfn35WFWm57GudyMbkavqoCaNXeA45hGVXMX3qDV48v32fF3NCCWlfObu8MBNsDRzn6lwKDgK+r8DkMQtOWyVv7qaULbzZW5jB/UJV+F1HOOpctoACbuFAAeKDfUZr+xA9XQfNoRErI88ngOlSzM1zvDi3X0exFmCpn8VWhoX828UvCMMw/dhchH2smJIBvfXKedXx0/v8=; 4:467nLJzszYf4m6NRBuWj0QoQmokL4pjvf27cwKvbqKazhNMzr2F0SEuoGCaXcTut8YwYO7U612b5LK7HponFirw/8brffbhcIRxkUR7TunydPIm2GWtexF2B9m/d6I/P8QKXKt0PKc83Tsc0ajQQTLfq6oE6N2pa79ZpUm5+YMO6pypu7py/6BxCVOhADBcGb5f19dvSrO9VHSNw7zwE7a8x5R/52LDeILmqm7bhSd2hb32VZRoil4rG1KM7NwdPbHhv9SWWO6yf18WYCTBPGdTjmSZLwbTz5ijP5pZzq30yvDTee2mPj0w5OAu38UNI X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(278428928389397); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(93006095)(10201501046)(3231022)(3002001)(6041248)(20161123560025)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(6072148)(201708071742011); SRVR:BN3PR07MB2513; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BN3PR07MB2513; X-Forefront-PRVS: 0504F29D72 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(366004)(346002)(376002)(24454002)(199003)(13464003)(76104003)(189002)(50986999)(76176999)(54356999)(72206003)(7736002)(305945005)(8676002)(33656002)(97736004)(81166006)(81156014)(4326008)(105586002)(53936002)(101416001)(68736007)(6246003)(66066001)(47776003)(6116002)(3846002)(33716001)(16526018)(1076002)(5660300001)(53546010)(6666003)(55016002)(316002)(93886005)(83506002)(54906003)(50466002)(189998001)(8936002)(58126008)(23676004)(52146003)(2486003)(52116002)(2870700001)(106356001)(25786009)(2906002)(229853002)(6916009)(478600001)(9686003)(2950100002)(42882006)(6496006)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR07MB2513; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjNQUjA3TUIyNTEzOzIzOkpHdDJqZWkyOWlTUldWUGJVL0JGRThUWklx?= =?utf-8?B?a0loeTRJYXdIOGVqTlZ3R3RZaVZJc3BhbzBKdFhCY1lRTFA3TkI5b1BKMGhP?= =?utf-8?B?N01XOTlHV29uTVV4MVlOTDR4TFBvdnFOcHozSy9jRGpsbHRwdGVEWmd0NnNu?= =?utf-8?B?R2xiM2lYNG9iMXl4WVFwaUpWbTF6K1U3MVVhMG0zS0xQSGl4eUVydE9WS2hY?= =?utf-8?B?NVlINjNDbjZKbzFZVk41SWxYRmw2T1JESlllNkRObFNRTGNaVThrdXhQQmhv?= =?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y/Vxx9j0SUpfYiFG2LamAyv7/QDk8AEhzEyJAZfZ06dVmXPYLaQ9Apfhtjw8Hg2Nz7iM/yZIh4oUfDQHeld6U0vUpz4KQbTOGk0k1gzmFhu5buATU4tIlScSqg+UTcYkty50knAtEzb2rhSlA66Iu3Adm9ZdUyqx7XRqdvHuLoyMWC2M7/o=; 5:vcx6ZhD4PzBhci6q43F38B3R0QSE80vSRLHZ1cFVHnPBgwpnoXwUvVID9mSJFiOXIrfnG4Sq8zJRHwPzNpuiKPczCCsZEkY/eXpyxFctSLmC7VlQn8JpTUIRW4D9SE8Gr9YMbBobQWi2u/9oNed0CnSJx53wBFH4WbWzAsdvN3k=; 24:24jwcjRAAp6ggU7nB3D2cf67vp2j9qX4AXi9NYWFfuvnM/gHPDu5xH/J2jRBNbq7yACEB7eJ1bT5uFI8ehACOFdeGM4A7du3Ihg8fJT3B0k=; 7:DrJbg8fB/4ew1BpI12KVYcnVppcXZE8pp6o/q9+pthP5VYSiyHk8sK2fVtmH2DXUerV/23wIKes5MQSTPT3gtynV1s9lY3xg/RNXfjTvW6fQ01mTzOU+Go4ZnfLXEXnVGlpXlo2uTd8hFPa8KjDin+kozvz0hHzrxj53rha5tbey4JSEB7Qz+ZlVBDD6YJyrpuynYlCMDjGaDRlZALA08euc1oYkdcQgADfGUz6luewPEh3aIURHMB7WwUnzxANv SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Nov 2017 07:34:00.9896 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3b2c9c54-bb4c-4fb6-34f2-08d535693b30 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2513 Subject: Re: [dpdk-dev] [PATCH 01/39] examples/l2fwd: 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: Mon, 27 Nov 2017 07:34:05 -0000 -----Original Message----- > Date: Mon, 27 Nov 2017 07:03:54 +0000 > From: Shahaf Shuler > To: Andrew Rybchenko , "dev@dpdk.org" > > Subject: Re: [dpdk-dev] [PATCH 01/39] examples/l2fwd: convert to new ethdev > offloads API > > Monday, November 27, 2017 8:35 AM, Andrew Rybchenko: > > Yes this is right. Not exposing the CRC offload flag means the device don’t support CRC strip toggling, however it does not explicitly say if device always strip/not. > I guess device that has such limitation should specify it on the “Limitation” section of the PMD guide. > > If it is interpreted in such way it sounds like loss of functionality. > Don't think it is a good way to rely on documentation here. It should > be more reliable way. PMD still can check if offload is not enabled and > complain, but there is no way to say that it is strictly required. > As I understand similar things are covered with so-called fixed offloads > in Linux. > > Can you elaborate which functionality is being lost here? > If your suggestion is for the PMD to force the CRC STRIP offload in case it is not supporting *not* to strip CRC then I am OK with that. > > Yes it is. > With the new Tx offloads API the application can choose the Tx offloads it wants to use according to its needs. > For l2fwd case – it doesn’t use any of them. Any default txq flag the PMD set there is irrelevant. > What I tried to do is not to preserve the entire old behavior rather to evolve the examples/applications while keeping the same functionality (i.e. the offloads which the application use are set, the rest are not). > > That's true for checksum and VLAN offloads, but false for fast-free. > As I understand l2fwd and many other examples meet fast-free > requirements and if PMD supports it, it should be used since it will > show better performance results. > > I agree about the Fast free offload. However IMO such optimization can be introduced on other series which further more optimize the performance of such applications, what do you think? If Fast free offload is meeting the l2fwd or l3fwd example application requirements, Why not to add it now? > > --Shahaf > > From: Andrew Rybchenko [mailto:arybchenko@solarflare.com] > Sent: Monday, November 27, 2017 8:35 AM > To: Shahaf Shuler ; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 01/39] examples/l2fwd: convert to new ethdev offloads API > > On 11/26/2017 10:41 AM, Shahaf Shuler wrote: > > >>+ .ignore_offload_bitfield = 1, > > >>+ .offloads = DEV_RX_OFFLOAD_CRC_STRIP, > > > >It is not directly related to the patch. > >May be I miss something, but it looks like there is no way to say that > >"I always strip CRC and cannot preserve it". > > Yes this is right. Not exposing the CRC offload flag means the device don’t support CRC strip toggling, however it does not explicitly say if device always strip/not. > I guess device that has such limitation should specify it on the “Limitation” section of the PMD guide. > > If it is interpreted in such way it sounds like loss of functionality. > Don't think it is a good way to rely on documentation here. It should > be more reliable way. PMD still can check if offload is not enabled and > complain, but there is no way to say that it is strictly required. > As I understand similar things are covered with so-called fixed offloads > in Linux. > > > > >>+ txq_conf = dev_info.default_txconf; > > >>+ txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE; > > >>+ txq_conf.offloads = port_conf.txmode.offloads; > > > >It looks like it is not 100% equivalent. As far as I can see dev_info get does > >not convert txq_flags to offloads in default_txconf and in any case txq_conf.offloads > >are overwritten here. So, if PMD provides default txq_flags, it is lost. > >If it is intentionally, it should be highlighted and explained. > > Yes it is. > With the new Tx offloads API the application can choose the Tx offloads it wants to use according to its needs. > For l2fwd case – it doesn’t use any of them. Any default txq flag the PMD set there is irrelevant. > What I tried to do is not to preserve the entire old behavior rather to evolve the examples/applications while keeping the same functionality (i.e. the offloads which the application use are set, the rest are not). > > That's true for checksum and VLAN offloads, but false for fast-free. > As I understand l2fwd and many other examples meet fast-free > requirements and if PMD supports it, it should be used since it will > show better performance results. > > > Moreover – it is a wrong approach, IMO, that the PMD set default offloads flags to the application. It has no knowledge to do so. I think this mechanism was initially created since the Tx offloads were all set by default, so it provided a mean to have good OOB configuration. Now when all offloads are set, I am not sure such API is needed anymore. > Will be happy to hear more opinion on that. > > I agree that blindly using PMD default offloads is a wrong approach.