On Mon, Mar 28, 2016 at 06:41:29PM +0300, Maxim Uvarov wrote: > Jerin, do you thin that we need both?
Both are requried. But not sure about invoking odp_pktio_socket_id() before odp_pktio_open is the correct approach or not ?(as mentioed earlier in the mail). How about other devices in the framework, queue, crypto etc? > > Maxim. > > On 03/24/16 14:10, Bill Fischofer wrote: > >Thanks, Jerin. So is an odp_cpu_socket_id() function not interesting to > >you and odp_pktio_socket_id() is what's wanted/needed? Or are you saying > >we should have both? > > > >On Thu, Mar 24, 2016 at 2:32 AM, Jerin Jacob > ><jerin.ja...@caviumnetworks.com <mailto:jerin.ja...@caviumnetworks.com>> > >wrote: > > > > On Thu, Mar 24, 2016 at 01:46:44AM +0200, Nikolay Nikolaev wrote: > > > On Thu, Mar 24, 2016 at 12:19 AM, Bill Fischofer > > > <bill.fischo...@linaro.org <mailto:bill.fischo...@linaro.org>> > > wrote: > > > > > > > > Add odp_cpu_socket_id() and odp_cpu_socket_id_cpu() routines > > > > > > I wonder how those are going to be implemented on non-NUMA systems > > > like ThunderX? > > > > I think you meant NUMA platform like ThunderX. > > > > From HW perspective, any resources which explicitly connected by ODP > > application (like passing odp_pool_t in odp_pktio_open) > > should be on the same node for the optimal performance. > > > > IMO, We should have "get socked id" function to know where the > > pktio is > > physically connected up and then connect the resource chain from the > > application. > > > > But the issue here is that application need to know the pktio > > socket id > > without opening it. > > > > something like below in HW perspective. > > > > socket_id = odp_pktio_socket_id() > > pool = odp_pool_create(socket_id...) > > pktio = odp_pktio_open(pool) > > > > and to make sure to run odp_pktin_recv() on the socket_id which > > was created earlier. > > > > Jerin > > > > > Jerin do you have any comments here? > > > > > > regards, > > > Nikolay Nikolaev > > > > > > > > > > > > > > > Signed-off-by: Bill Fischofer <bill.fischo...@linaro.org > > <mailto:bill.fischo...@linaro.org>> > > > > --- > > > > include/odp/api/spec/cpu.h | 25 +++++++++++++++++++++++++ > > > > 1 file changed, 25 insertions(+) > > > > > > > > diff --git a/include/odp/api/spec/cpu.h > > b/include/odp/api/spec/cpu.h > > > > index f0e20c4..d383c3b 100644 > > > > --- a/include/odp/api/spec/cpu.h > > > > +++ b/include/odp/api/spec/cpu.h > > > > @@ -36,6 +36,31 @@ extern "C" { > > > > int odp_cpu_id(void); > > > > > > > > /** > > > > + * CPU socket id > > > > + * > > > > + * Returns the socket id associated with the calling CPU on > > NUMA systems. > > > > + * Socket ID numbering is system specific. > > > > + * > > > > + * @return Socket ID of the calling CPU > > > > + * @retval ODP_SOCKET_ID_ANY If the caller is not running on > > a NUMA system. > > > > + */ > > > > +uint32_t odp_cpu_socket_id(void); > > > > + > > > > +/** > > > > + * CPU socket id of designated CPU > > > > + * > > > > + * Returns the socket id associated with a specific CPU on > > NUMA systems. > > > > + * Socket ID numbering is system specific. > > > > + * > > > > + * @param cpu_id ID of the CPU for which socket ID > > information is requested. > > > > + * > > > > + * @return Socket ID of the designated CPU > > > > + * @retval ODP_SOCKET_ID_ANY If the specified CPU is unknown > > or caller is > > > > + * not running on a NUMA system. > > > > + */ > > > > +uint32_t odp_cpu_socket_id_cpu(int cpu_id); > > > > + > > > > +/** > > > > * CPU count > > > > * > > > > * Report the number of CPU's available to this ODP program. > > > > -- > > > > 2.5.0 > > > > > > > > _______________________________________________ > > > > lng-odp mailing list > > > > lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org> > > > > https://lists.linaro.org/mailman/listinfo/lng-odp > > > > > > > > > >_______________________________________________ > >lng-odp mailing list > >lng-odp@lists.linaro.org > >https://lists.linaro.org/mailman/listinfo/lng-odp > _______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp