From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 6895A1B3AD for ; Wed, 24 Apr 2019 14:54:55 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Apr 2019 05:54:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,389,1549958400"; d="scan'208";a="145447064" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.108]) ([10.237.220.108]) by fmsmga007.fm.intel.com with ESMTP; 24 Apr 2019 05:54:52 -0700 To: Ray Kinsella , Bruce Richardson , Honnappa Nagarahalli Cc: "dev@dpdk.org" , Stephen Hemminger , "Ananyev, Konstantin" , "thomas@monjalon.net" , nd References: <20190417083637.GB1890@bricha3-MOBL.ger.corp.intel.com> <20190418102811.GB1817@bricha3-MOBL.ger.corp.intel.com> <2ec4da50-d874-865a-6bcc-916ac676be39@ashroe.eu> <43980ebb-ef8a-6e6d-c152-cf6160ace892@intel.com> <74f22653-c0e8-3b4d-20e3-5d30d5a693bb@ashroe.eu> From: "Burakov, Anatoly" Message-ID: <3cbef642-a6f5-760a-77b5-4d6fd19ef17a@intel.com> Date: Wed, 24 Apr 2019 13:54:51 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <74f22653-c0e8-3b4d-20e3-5d30d5a693bb@ashroe.eu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] ABI and inline functions 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: Wed, 24 Apr 2019 12:54:56 -0000 On 24-Apr-19 1:22 PM, Ray Kinsella wrote: > > On 24/04/2019 12:08, Burakov, Anatoly wrote: >> On 23-Apr-19 3:12 PM, Ray Kinsella wrote: >>> >>> >>> On 18/04/2019 11:28, Bruce Richardson wrote: >>>> On Thu, Apr 18, 2019 at 04:34:53AM +0000, Honnappa Nagarahalli wrote: >>>>>> >>>>>> On Wed, Apr 17, 2019 at 05:12:43AM +0000, Honnappa Nagarahalli wrote: >>>>>>> Hello, >>>>>>>     There was a conversation [1] in the context of RCU library. I >>>>>>> thought >>>>>>> it needs participation from broader audience. Summary for the context >>>>>>> (please look at [1] for full details) >>>>>>> >>>>>> >>>>>> Thanks for kicking off this discussion >>>>>> >>>>>>> 1) How do we provide ABI compatibility when the code base contains >>>>>> inline functions? Unless we freeze development in these inline >>>>>> functions and >>>>>> corresponding structures, it might not be possible to claim ABI >>>>>> compatibility. >>>>>> Application has to be recompiled. >>>>>> >>>>>> I agree that in some cases the application "might" need to be >>>>>> recompiled, >>>>>> but on the other hand I also think that there are many cases where ABI >>>>>> function versioning can still be used to mitigate things. For >>>>>> example, if we >>>>>> think of a couple of various scenarios: >>>>>> >>>>>> 1. If everything is inline and variables are allocated by app, e.g. >>>>>> spinlock on stack, then there is no issue as everything is application >>>>>> contained. >>>>> If there is a bug fix which requires the structure to change, the >>>>> application would need to recompile. I guess you are talking about a >>>>> scenario when nothing changed in the inline function/variables. >>>>> >>>> >>>> If the application wants the bugfix, then yes. However, if the app is >>>> unaffected by the bug, then it should have the option of updating DPDK >>>> without a recompile. >>> >>> I would also imagine that should be an extremely rare case, that a >>> bugfix would require a structure change ... perhaps for an alignment >>> issues? >> >> Multiprocess threading issues is one case i've had to do that more than >> once. > > Another reason to dislike multi process I guess. > >> >> >> >> >>> >>> The reality is that most other system libraries provide strong >>> guarantees ... to date we have provided very little. >>> >> >> To our credit, the libraries you're likely referring to aren't trying to >> reimplement the Linux kernel :) I don't think we do these API/ABI breaks >> just because we like doing them - DPDK is complex, and getting >> everything right the first time *and* allowing for future evolution is >> not a trivial undertaking. >> >> >> To me, part of the problem is that DPDK is an "everything and the >> kitchen sink" kind of library where there is a bunch of drivers, a whole >> quasi-OS layer of dealing with hardware in a cross-platform manner, a >> separate memory management system, a bunch of libraries such as hash/lpm >> tables, plus there's QOS, IP Pipeline, flow stuff, etc. - normally, "a >> library" would concentrate on doing one thing well. DPDK, on the other >> hand, tries to do *everything* well. The sheer breadth of DPDK's scope >> is, i think, contributing to the breakages. If you keep 99% of your >> libraries stable between version, but there's a small ABI tweak in an >> LPM library, the entire DPDK stability gets invalidated. > > Well I guess DPDK is no more complex than Java or .NET Framework in that > respect, as these also feature OS-layers, memory management systems, > application frameworks, primitives etc but do manage to give their > consumers strong guarantee's on API stability. Clearly ABI stability has > a no meaning when you always being JIT compiled. I was basing my response on your earlier comparisons of DPDK to GStreamer :) Comparing it to .NET Framework is perhaps a better fit, but then these frameworks generally go through much more rigorous development/design cycle than DPDK does - DPDK's API design process is pretty ad-hoc, while both Java and .NET have various kinds of procedures by which things get into the standard library. If we're prepared to do that - i'm all for it. What we can't have is stability *and* keep the same approach to design/development that we have now. -- Thanks, Anatoly From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 197F0A05D3 for ; Wed, 24 Apr 2019 14:54:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 786F71B4AB; Wed, 24 Apr 2019 14:54:57 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 6895A1B3AD for ; Wed, 24 Apr 2019 14:54:55 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Apr 2019 05:54:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,389,1549958400"; d="scan'208";a="145447064" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.108]) ([10.237.220.108]) by fmsmga007.fm.intel.com with ESMTP; 24 Apr 2019 05:54:52 -0700 To: Ray Kinsella , Bruce Richardson , Honnappa Nagarahalli Cc: "dev@dpdk.org" , Stephen Hemminger , "Ananyev, Konstantin" , "thomas@monjalon.net" , nd References: <20190417083637.GB1890@bricha3-MOBL.ger.corp.intel.com> <20190418102811.GB1817@bricha3-MOBL.ger.corp.intel.com> <2ec4da50-d874-865a-6bcc-916ac676be39@ashroe.eu> <43980ebb-ef8a-6e6d-c152-cf6160ace892@intel.com> <74f22653-c0e8-3b4d-20e3-5d30d5a693bb@ashroe.eu> From: "Burakov, Anatoly" Message-ID: <3cbef642-a6f5-760a-77b5-4d6fd19ef17a@intel.com> Date: Wed, 24 Apr 2019 13:54:51 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <74f22653-c0e8-3b4d-20e3-5d30d5a693bb@ashroe.eu> Content-Type: text/plain; charset="UTF-8"; format="flowed" Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] ABI and inline functions 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190424125451.PfTdEDVHAyhBwVj-UHzLmIOeWVlek34LDvLbUay3OZY@z> On 24-Apr-19 1:22 PM, Ray Kinsella wrote: > > On 24/04/2019 12:08, Burakov, Anatoly wrote: >> On 23-Apr-19 3:12 PM, Ray Kinsella wrote: >>> >>> >>> On 18/04/2019 11:28, Bruce Richardson wrote: >>>> On Thu, Apr 18, 2019 at 04:34:53AM +0000, Honnappa Nagarahalli wrote: >>>>>> >>>>>> On Wed, Apr 17, 2019 at 05:12:43AM +0000, Honnappa Nagarahalli wrote: >>>>>>> Hello, >>>>>>>     There was a conversation [1] in the context of RCU library. I >>>>>>> thought >>>>>>> it needs participation from broader audience. Summary for the context >>>>>>> (please look at [1] for full details) >>>>>>> >>>>>> >>>>>> Thanks for kicking off this discussion >>>>>> >>>>>>> 1) How do we provide ABI compatibility when the code base contains >>>>>> inline functions? Unless we freeze development in these inline >>>>>> functions and >>>>>> corresponding structures, it might not be possible to claim ABI >>>>>> compatibility. >>>>>> Application has to be recompiled. >>>>>> >>>>>> I agree that in some cases the application "might" need to be >>>>>> recompiled, >>>>>> but on the other hand I also think that there are many cases where ABI >>>>>> function versioning can still be used to mitigate things. For >>>>>> example, if we >>>>>> think of a couple of various scenarios: >>>>>> >>>>>> 1. If everything is inline and variables are allocated by app, e.g. >>>>>> spinlock on stack, then there is no issue as everything is application >>>>>> contained. >>>>> If there is a bug fix which requires the structure to change, the >>>>> application would need to recompile. I guess you are talking about a >>>>> scenario when nothing changed in the inline function/variables. >>>>> >>>> >>>> If the application wants the bugfix, then yes. However, if the app is >>>> unaffected by the bug, then it should have the option of updating DPDK >>>> without a recompile. >>> >>> I would also imagine that should be an extremely rare case, that a >>> bugfix would require a structure change ... perhaps for an alignment >>> issues? >> >> Multiprocess threading issues is one case i've had to do that more than >> once. > > Another reason to dislike multi process I guess. > >> >> >> >> >>> >>> The reality is that most other system libraries provide strong >>> guarantees ... to date we have provided very little. >>> >> >> To our credit, the libraries you're likely referring to aren't trying to >> reimplement the Linux kernel :) I don't think we do these API/ABI breaks >> just because we like doing them - DPDK is complex, and getting >> everything right the first time *and* allowing for future evolution is >> not a trivial undertaking. >> >> >> To me, part of the problem is that DPDK is an "everything and the >> kitchen sink" kind of library where there is a bunch of drivers, a whole >> quasi-OS layer of dealing with hardware in a cross-platform manner, a >> separate memory management system, a bunch of libraries such as hash/lpm >> tables, plus there's QOS, IP Pipeline, flow stuff, etc. - normally, "a >> library" would concentrate on doing one thing well. DPDK, on the other >> hand, tries to do *everything* well. The sheer breadth of DPDK's scope >> is, i think, contributing to the breakages. If you keep 99% of your >> libraries stable between version, but there's a small ABI tweak in an >> LPM library, the entire DPDK stability gets invalidated. > > Well I guess DPDK is no more complex than Java or .NET Framework in that > respect, as these also feature OS-layers, memory management systems, > application frameworks, primitives etc but do manage to give their > consumers strong guarantee's on API stability. Clearly ABI stability has > a no meaning when you always being JIT compiled. I was basing my response on your earlier comparisons of DPDK to GStreamer :) Comparing it to .NET Framework is perhaps a better fit, but then these frameworks generally go through much more rigorous development/design cycle than DPDK does - DPDK's API design process is pretty ad-hoc, while both Java and .NET have various kinds of procedures by which things get into the standard library. If we're prepared to do that - i'm all for it. What we can't have is stability *and* keep the same approach to design/development that we have now. -- Thanks, Anatoly