From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============6239979631412122861==" MIME-Version: 1.0 From: Dave Jiang Subject: [Accel-config] Re: [PATCH] accel-config: Replicate driver error codes in idxd.h in library Date: Mon, 19 Jul 2021 13:00:46 -0700 Message-ID: <00c7d036-9825-f080-50cb-cde50e3383e3@intel.com> In-Reply-To: BYAPR11MB253532E85DCCB66990E337ADEDE19@BYAPR11MB2535.namprd11.prod.outlook.com To: accel-config@lists.01.org List-ID: --===============6239979631412122861== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 7/19/2021 12:35 PM, Thomas, Ramesh wrote: > On Mon, Jul 19, 2021 at 10:50:09AM -0700, Dave Jiang wrote: >> On 7/19/2021 10:34 AM, Thomas, Ramesh wrote: >>> I think copying will have the problem of compiler picking different >>> ones. Library may use the copied version while the app may get the one >>> in /usr/include. Do you think defining new constants would be safer? >> I think instead of pulling the /usr/include version we just depend on >> the copied version exclusively. Then we will have 1 less dependency and >> compile correctly always. > I was also concerned about user apps including the /user/include idxd.h. > Even in libaccel we would need to make assumptions that the constants > used will not diverge from the one driver is using. Since the issue is > only about some constants like the sw cmd_status which is not available > in older idxd.h, I think it is better to define them separately and > privately for the library. > User ABI is considered constant for Linux and if we are changing it, = there would be ways to provide backward compatibility. I think making = copy of header should be safe. That is why ndctl does that. > --===============6239979631412122861==--