From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0091.outbound.protection.outlook.com [157.56.110.91]) by dpdk.org (Postfix) with ESMTP id 8FB7D2BE2 for ; Tue, 22 Mar 2016 18:41:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=FmhN/xT3hd/0AmEhPI+Fhw73L4AtrislRGDKgLTVrU4=; b=KaQ9TgdzzH82L/UVxbBW95Kiv0CyMvctAhQpe6/jc0+sqKyEEtP5WQSOK0L9pP0RfjCxRcGGNqaIKsx0aE2Qqug5J9z/3lOBHkW0esjeO9+R3rdXv++CciKO/tiJIoQkQKYUbY3bcV56z+AvD3yR2MueJxakMye3EohpldDrwe0= Authentication-Results: networkplumber.org; dkim=none (message not signed) header.d=none;networkplumber.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.localdomain (122.171.174.26) by BN3PR0701MB1720.namprd07.prod.outlook.com (10.163.39.19) with Microsoft SMTP Server (TLS) id 15.1.443.12; Tue, 22 Mar 2016 17:41:41 +0000 Date: Tue, 22 Mar 2016 23:11:17 +0530 From: Jerin Jacob To: Stephen Hemminger CC: Jay Rolette , Bruce Richardson , "Qiu, Michael" , Kyle Larose , Thomas Monjalon , "Zhang, Helin" , "dev@dpdk.org" Message-ID: <20160322174116.GA13074@localhost.localdomain> References: <20160318101611.2df26ef6@xeon-e3> <10753400.05iPBPOT6f@xps13> <29795767.yLuRT7a5hO@xps13> <20160321145249.GA16732@bricha3-MOBL3> <533710CFB86FA344BFBF2D6802E6028622F70D9D@SHSMSX101.ccr.corp.intel.com> <20160322101941.GB19268@bricha3-MOBL3> <20160322101721.4e6775fe@xeon-e3> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20160322101721.4e6775fe@xeon-e3> User-Agent: Mutt/1.5.23 (2014-03-12) X-Originating-IP: [122.171.174.26] X-ClientProxiedBy: MA1PR01CA0012.INDPRD01.PROD.OUTLOOK.COM (25.164.117.19) To BN3PR0701MB1720.namprd07.prod.outlook.com (25.163.39.19) X-MS-Office365-Filtering-Correlation-Id: edfeb812-a5f0-4da0-7450-08d352793c31 X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 2:PmAemsLofFH9E8PKKIwCx5BhHlpBGeZW5DtN46lOn/RKE8ZOCum/L3gPWE2RYdRmfkcIGPxH80htNrn0U1IBd/KgpHAbmiDhFv4hHCj3Ybh4uB68PpFU1tm8XqSPI4mYt7TSpUpMiojC7jD/YwImQoshtFDhWqPo8sQFGOdOcyfdPve5u7bmvqZjeAHJn8p5; 3:K5JbHxT5iS5sBKINVB1s3tke6eefe1fqXkIsrPiU0NhqkJcKL64FlH2zIHs4R3moGoCeZ2UNXw0Zw/eUMw577Bt6NJ56+mS9WPhv+NzgVezzDMjo4u78tGZTOMR/j5uV; 25:n1o/RRX/jsAJepfo0ZLi8Jhw6UEQGUb2JOcgr8imJpHnzYqo6SBjSE/eOb0C7etA2eBfsXSxbNB7zXPhfigMXeN68XzkMY9OR8zgwX5GvvbmidpcKC0uPuodkK1t7SVd0P1syTi9cDfaiSsfeFbHFuO8UeVX7xQqTGbyF+bDGVULvBq/OgRy6uvPwp2n4Yi6bJgILoZGW5MfYkM4JDEFp/EyxjCTQhoCmW9SSHbCOvdBvo9JPUs/dRuqvFGObjknEb4++JBGGV3Tjvq+EndhvyOJ5MgEbHPwkW0AJ2TCiJllMJ3the61GAZ6x5mRMg3Hri7RwODG5sWGFJ9X+XBqowslMtsed/ZAKzm1v2wgnhD+mAJQFpH6/w6Stl+IHE+csL2ge7gX9Tfv/ZYDtCEzXHWiPNPw7cjjEBlGx2jqHWowS1PbjOockBINts+6UrND3c5Ev0fawhmZedk/diYPzZ0R9jSk3U+Tzb7GYTcni+kYfq+R04ZCY8XGcaTKKtV6FPyCfE0HTqNmLu9OBawICeyOJxxTZuvvXFCBixTwsEQmsHNoGnpTqp+EsxNnVKpA7yX6uugbHiWIPD5OhVn67A== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0701MB1720; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 20:GXkg4SGToLVLtvLQm/9rC47ek4ZpaFcKh/ASPglXSFP4g0kphgksoU6OC04Aud+wTSb5iGKeniARSxDjg/0VQ7hP3ADb36Cok2xTwMigqgI9l33WkxqVPaF5VNnizLstigbgQ2CGSCP5h0f7L50v5Zd/Gq4kd/NAI9z6kVQAzZr4IAv/B7IOQPc36wkHxsTyBcaWEuEcBmIOo/hCgtHlHArnMB6zHzHlV6uFVIImKYbSbjl16KS5MPVXUzr14kFmFYYoE3S4t0HSgcaKg6lifhy5bvhz7xiMwH52z4Zv3bf5qsYiBimbPRJ1AptCEU3XJUriKDGU7iQTqr+gIxziF4wRwXu6kjUd8DzaVgkb1rR/y/3cRezPQ2ueuo6oNme9qcZ1Ar4ShiXn4AFOjeP9SkoYXc9cYzcItzj5NfMdefld29Wd93lLRCztRPattjBGoc1AAbG0TrISUSLe5882ztXxTyBqgqQsDL5cLksD4229f7N5t2QvWBDWJ4MkX4pZzzd5/b7ZtxQgS27rd84joDWMxQGAHacQAGAddro2FiBtfTTHHfOmLtB3WMg8e+/ig77iN2nOglf3zg1wzxAH8v1cjEmklZb3StdTITdmDnM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:BN3PR0701MB1720; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1720; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 4:yz3yJMUet6o9v0Nk9H0LlbF9Ahi24wuJiVf9oc4QEN26VMzLKpF3WAVcqq/0gr9qBxfnUQDVgxG7H6JBOdL8iBWsESbGIJer5o6nIXm79+2lpkwZZjGmJfhGwGnCUnEvTqFxyD2/BZY8rfjToYf500D6UWn7d5WsfCeAddimsR5OWFvO/Tztl9vSu0tsGr1jKiUXuAy7h7UoHBqtvTtwY7S9hig+Z/z0gJIwSopoVGO6h28YY9F4ESX7YgVkxFsxAtbWLN+3iBP2bLXVqWccnIRlf+eN7q9tnTXEIrP/nbscZMvbCyw3xVUvKm14VWf8PdUBdXVxTN3YLyRPMvc906hsqWFzejNaGeb7RuOhF4XYxnlpkCtZzuJNDO0Tn6MJ X-Forefront-PRVS: 08897B549D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(164054003)(24454002)(377454003)(66066001)(42186005)(93886004)(61506002)(110136002)(189998001)(5004730100002)(1096002)(5008740100001)(3846002)(1076002)(19580405001)(19580395003)(2950100001)(586003)(6116002)(77096005)(4001350100001)(23726003)(92566002)(83506001)(47776003)(33656002)(46406003)(86362001)(81166005)(50986999)(97756001)(76176999)(54356999)(50466002)(2906002)(4326007); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1720; H:localhost.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1720; 23:TuujuP++NPs5FEVbatnXfN/XrbyGoL12rZq4OMr?= =?us-ascii?Q?bpCR2CqINb4YX1w2/dc7J1vgnPLMXTP+rUiStO2h1rVEt4KdtZIk8GPsuHeI?= =?us-ascii?Q?OR3qLhK/tJ6kXnKRgGcMqoAYc4NWWvVAawclmknIZ5vAdxJQho8L2s1m9gN5?= =?us-ascii?Q?DvKhGTGkG2Vp7oTHQEI2alEDQJkCrI+SUt1UvhY4EJvBuVTJEWXRgkKxTU+r?= =?us-ascii?Q?iM6iJhQcSDx2ug6RcjRW6S6/WV9upAYVydvcuYxfC5JFcRi7+1ApMDh2/E9u?= =?us-ascii?Q?lSJPDV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XXXDHi0JHN1I3Nhj1wA==; 24:6LU/PHlRfCwpFHiMj4IbqSrvLYJX4B57eo5SBQUfw7rce1gZ+yJDkiapvJDCZKdtjeSmuwxNqKOuGxmgKsZvkVE7OAVMwgVFN89xPxoKtRA= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Mar 2016 17:41:41.4234 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1720 Subject: Re: [dpdk-dev] DPDK and HW offloads X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2016 17:41:46 -0000 On Tue, Mar 22, 2016 at 10:17:21AM -0700, Stephen Hemminger wrote: > On Tue, 22 Mar 2016 07:19:01 -0500 > Jay Rolette wrote: > > > On Tue, Mar 22, 2016 at 5:19 AM, Bruce Richardson < > > bruce.richardson@intel.com> wrote: > > > > > On Tue, Mar 22, 2016 at 05:50:28AM +0000, Qiu, Michael wrote: > > > > > > > > Why not to implement one simple API with variable arguments, just like > > > > syscall ioctl() does. And drivers implement it's specific hardware > > > > features with a feature bit param, and other needed variable arguments. > > > > > > > > Thanks, > > > > Michael > > > > > > A very much dislike that idea. > > > * It makes the code much harder to read as you have to closely examine all > > > the > > > parameters to work out what a function call is actually meant to do. > > > * It makes it much harder to see that you have an implicit dependency on a > > > specific device. Having to include a driver specific header file e.g. > > > i40e.h, > > > and call a function named e.g. i40e_do_magic_stuff(), makes it pretty > > > explicit > > > that you have a dependency on i40e-based hardware > > > * It prevents the compiler from doing type-checking on parameters and > > > informing > > > you of little inconsistencies. > > > > > > For all these reasons, I prefer the device-specific functions option. > > > However, > > > at the same time, we also need to ensure we have a reasonable set of > > > generic > > > APIs so that the cases where users are forced to drop down to the > > > lower-level > > > device-specific primitives are reduced. > > > > > > > +1 > > I prefer the OO model where there is a generic network interface that provides > a uniform set of features, and if a specific hw device provides a more efficient > implementation of a feature, that is hidden (inheritance?) such that there > is no difference API. > > The DPDK has been hardware vendor driven up until this point. > But from a software point of view, it is more important to provide good API than > use DPDK as a hardware POC environment. +1