On Fri, Oct 13, 2023 at 1:52 PM Gangurde, Abhijit <abhijit.gangu...@amd.com> wrote: > > > > > > +/** > > > > > + * Map the CDX device resources in user space virtual memory address. > > > > > + * > > > > > + * Note that driver should not call this function when flag > > > > > + * RTE_CDX_DRV_NEED_MAPPING is set, as EAL will do that for > > > > > + * you when it's on. > > > > > > > > Why should we export this function in the application ABI, if it is > > > > only used by drivers? > > > > > > This can be called from an application as well if this flag is not set > > > hence, we > > need to export this function. > > > > What kind of applications / in which usecase, one would need to map > > the device resources? > > Except a driver? > > I understand that it is probably not the ideal use case, but some of the > customers > are using a single application which also registers itself as driver. > Probably such > applications need to use internal APIs instead of making these APIs external. > Will analyze it further and send another rev of this patch.
External drivers should be supported with current code. DPDK must be built with enable_driver_sdk option, and the external driver code can include bus_cdx_driver.h. Possibly compiling this code with -DENABLE_INTERNAL_API cflag will be necessary. -- David Marchand