-----Original Message----- From: lng-odp [mailto:[email protected]] On Behalf Of Honnappa Nagarahalli Sent: Friday, June 16, 2017 12:51 AM To: Bala Manoharan <[email protected]> Cc: lng-odp-forward <[email protected]> Subject: Re: [lng-odp] Mem pool creation in Cavium/NXP implementations
On 15 June 2017 at 13:02, Bala Manoharan <[email protected]> wrote: > > > Regards, > Bala > > On 15 June 2017 at 23:20, Honnappa Nagarahalli > <[email protected]> wrote: >> >> On 15 June 2017 at 10:58, Bala Manoharan <[email protected]> >> wrote: >> > On 15 June 2017 at 20:00, Francois Ozog <[email protected]> >> > wrote: >> > >> >> I wonder then how packet receive in HW driven packet buffers is >> >> handled, may be with device memory.... >> >> >> >> Can you explain the cases of packet receive with ODP application >> >> supplied (through packetio open) mempools? >> >> >> > >> > There needs to be atleast one pool linked to a pktio interface and there >> > can be more than one if application wants to configure different pools >> > for >> > different flows. The configuration of the pool is given by the >> > application >> > so that any traffic burst in a single flow does not overload the entire >> > system processing for other flows. >> > >> > So when application configures a packet pool we allocate internal shared >> > memory and pool allocator and link it to the pktio interface. When >> > packet >> > is received in the pktio interface the packet is allocated from the >> > linked >> > pool. >> >> When you say 'internal shared memory', do you mean the memory is >> shared between the CPU cores and the hardware accelerators? I did not >> understand the 'pool allocator'. My understanding from your earlier >> email is that the pool is created (and all the packet buffers >> instantiated) when odp_pool_create API is called and pool is linked to >> the pktio in odp_pktio_open call. > > > 'pool allocator' is a HW module which basically holds list of pointers from > a memory location and provides pointers when someone calls alloc from the > pool. > pool is created when you call odp_pool_create(). > pktio is created with odp_pktio_open() which takes pool as an input > argument. > pool is linked to the pktio when you call odp_pktio_start() > Hope its clear. > Thanks Bala. That is clear. Is the internal memory shared between CPUs and pktio device? Yes. Pool is the interface between them. Whoever needs buffer(pktio or CPU), will ask buffer pool to provide a buffer. > Regards, > Bala >> >> >> > >> > Does this answer your question? >> > >> > Regards, >> > Bala >> > >> >> >> >> FF >> >> >> >> On 15 June 2017 at 15:42, Bala Manoharan <[email protected]> >> >> wrote: >> >> >> >>> Add on. It is also possible that the pool might not be linked to any >> >>> pktio >> >>> eg buffer pools, hence in implementation we can not wait for the pool >> >>> to >> >>> be >> >>> linked to pktio. >> >>> >> >>> Regards, >> >>> Bala >> >>> >> >>> On 15 June 2017 at 18:11, Bill Fischofer <[email protected]> >> >>> wrote: >> >>> >> >>> > A pool may be associated with a pktio at open time, but this >> >>> > association is not exclusive. In theory an ODP implementation could >> >>> > defer actual pool creation until it was first used, but such an >> >>> > approach would be unlikely to yield any real benefits while creating >> >>> > a >> >>> > lot of complications along the way since odp_pool_create() is the >> >>> > only >> >>> > opportunity the implementation has to fail the pool creation in a >> >>> > defined manner. >> >>> > >> >>> > On Thu, Jun 15, 2017 at 2:29 AM, Bala Manoharan >> >>> > <[email protected]> wrote: >> >>> > > Same here. Pool is created during odp_pool_create API. >> >>> > > >> >>> > > >> >>> > > Regards, >> >>> > > Bala >> >>> > > >> >>> > > On 15 June 2017 at 12:36, Nikhil Agarwal <[email protected]> >> >>> wrote: >> >>> > > >> >>> > >> Pool is created at odp_pool_create only. You can allocate packets >> >>> form >> >>> > it >> >>> > >> even before pktio_open. >> >>> > >> >> >>> > >> Regards >> >>> > >> Nikhil >> >>> > >> >> >>> > >> -----Original Message----- >> >>> > >> From: lng-odp [mailto:[email protected]] On Behalf >> >>> > >> Of >> >>> > >> Honnappa Nagarahalli >> >>> > >> Sent: Thursday, June 15, 2017 9:27 AM >> >>> > >> To: lng-odp-forward <[email protected]> >> >>> > >> Subject: [lng-odp] Mem pool creation in Cavium/NXP >> >>> > >> implementations >> >>> > >> >> >>> > >> Hi Bala/Nikhil, >> >>> > >> I was wondering when is the memory pool created in your >> >>> > implementation >> >>> > >> of ODP? The programming model is that the application creates the >> >>> memory >> >>> > >> pool and passes that pool to the pkt I/O during packet I/O open >> >>> call. Do >> >>> > >> you actually create the pool when the application calls >> >>> > odp_pool_create? Or >> >>> > >> is the pool created during packet I/O open? >> >>> > >> >> >>> > >> Appreciate your answers. >> >>> > >> >> >>> > >> Thank you, >> >>> > >> Honnappa >> >>> > >> >> >>> > >> >>> >> >> >> >> >> >> >> >> -- >> >> [image: Linaro] <http://www.linaro.org/> >> >> François-Frédéric Ozog | *Director Linaro Networking Group* >> >> T: +33.67221.6485 >> >> [email protected] | Skype: ffozog >> >> >> >> > >
