https://bugs.linaro.org/show_bug.cgi?id=2494
--- Comment #6 from Maciej Czekaj <maciej.cze...@caviumnetworks.com> --- (In reply to Bala Manoharan from comment #5) > Application portability across multiple platforms can not be done without > any modifications. However I do not have an issue is adding the minimal pool > size as capability in the capability struct but in the point 2 of your > initial suggestion states that pool size be given by the implementation > based on the buffer requirements, since the pools are actually created by > the implementation and the application gives buffer count and pool type > can't this be internally handled by the implementation without the > additional API. > > If we are on agreement here I can send a proposal to modify the capability > struct. Yes, application specifies and creates a pool, so user needs to manually account for increased pool consumption. Also, it is important that the buffer consumption depends on number of internal queues specified in pktio capability struct. For most drivers it is nb_rx_queues*(rx_queue_depth+alloc_queue_depth) + nb_tx_queues*tx_queue_depth. In case of ThunderX the formula is (nb_rx_queues+nb_tx_queues)*1024 + ceil(nb_rx_queues/8)*8192 Now the challenge is that the buffer consumption has to be known before odp_pktio_open() since that call consumes the buffer pool... but there is no call to be made on pktio before odp_pktio_open() because this is a factory function for pktio objects. The best way would be to: 1.create pktio object without a pool 2.config the number of queues 3.ask about capabilities , including buffer needs 4.create the pool with application specified size + internal consumption size taken from capability 5.start the interface Adding the pool in the first call to pktio complicates the whole thing, as it is not possible to alter the pool size later and it is not possible to query the pktio pool consumption before odp_pktio_open(). > > The real question I would like to understand is the expectation of this > minimal buffer size lets say if the application requires 1024 > packets/buffers in a pktio interface and the minimal buffer size is 512 then > should be pool be configured with (1024 + 512) buffers and can the 512 > buffer required by pktio interface be used for storing application packets? Yes, the buffers are shared btw internal queues and application, because they are really used for internal queuing of packets in HW, e.g. the contain: - packets waiting for reception in RX queue - packets waiting for transmission in TX queue - empty packets allocated for future reception If the driver is under heavy load, all those queues may be filled up and lead to buffer starvation that is difficult to recover from and it certainly limits the performance since lack of buffers leads to dropping traffic. -- You are receiving this mail because: You are on the CC list for the bug.