From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk0-f53.google.com (mail-vk0-f53.google.com [209.85.213.53]) by dpdk.org (Postfix) with ESMTP id DF04E29C6 for ; Tue, 22 Mar 2016 13:19:01 +0100 (CET) Received: by mail-vk0-f53.google.com with SMTP id e6so251292531vkh.2 for ; Tue, 22 Mar 2016 05:19:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infinite-io.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=bkuZQf/4XwqU6YjotNCpkVxjayMfscHPFMs1akX5YJU=; b=YqU1FER4CkXX/nWp77f/QDfnWYWQhuRijCIVzCTOcbi8PN8j98kIt61gNqyEDb4Mmn 6i56iWtrg4pxNyydK+bseEgY0tRM0FrZwd+kY8lh1fq5fUeRLuLp4FnQ9hSYSBo7Ckxb tWKx3Ql5OZMzJHQ5ptSQ914pFPn67cWFmQ9I7SB/vPrUrHlMMdVH5KfruNFOUnnnwpZO bQhnnp67mwCT1SNzszfdMV8LcekdL8F1OCUwb9rz/U3O3YwfNfYk8Kz8trAWFifdQ16P Xi1FNUGkM6ckXwXXX3yZ2tXs9GXpYqyuff0uz8qR85suf59HwJSAoIHvrJJvlZitrcPE DE7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=bkuZQf/4XwqU6YjotNCpkVxjayMfscHPFMs1akX5YJU=; b=Sq1swXj61RkK0W1LK2bn1qfrh/JUX4EBeHTx3E0gNTXXLApDQ38vfAA9ktASAlUIBQ XOxAiXhB9oV9ptOrPmxUSsd5G4FJ3mvf78GcC8meTUjWeBl/H0jioY+nQCYP1M4B79zi g8QvNNnQwSSpN94y1HWWqb/704JAfZsPv199uAIZ0ke6azK1gCPKmezDBPLm+ZeTSjev 5hSGs6AzF3wEx8nwKjTVwSawrVyWTLwqRjGz7orp8fUOnYJBGpl932Wyopv2PEw2WzF3 tqC1T0wipqeWDRkFosIhAIMErDVQSKoiKkKItlHgOn4fPP9A15Ln1c9iWlr5haqKf02W jGyQ== X-Gm-Message-State: AD7BkJLolmjO8ZMP3EpAowvzSr7+RcALuls9qOJQVOyzPsr/86nh9HxfLaoufuewy00vcOjHkJdmq4pkVwREgw== MIME-Version: 1.0 X-Received: by 10.159.39.102 with SMTP id a93mr3876313uaa.57.1458649141456; Tue, 22 Mar 2016 05:19:01 -0700 (PDT) Received: by 10.103.86.10 with HTTP; Tue, 22 Mar 2016 05:19:01 -0700 (PDT) In-Reply-To: <20160322101941.GB19268@bricha3-MOBL3> 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> Date: Tue, 22 Mar 2016 07:19:01 -0500 Message-ID: From: Jay Rolette To: Bruce Richardson Cc: "Qiu, Michael" , Kyle Larose , Thomas Monjalon , "Zhang, Helin" , Stephen Hemminger , "dev@dpdk.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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 12:19:02 -0000 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 Jay