Re: [dpdk-users] Freeing up Mbuf
On Thu, Dec 22, 2016 at 10:17 PM, Kumaraparameshwaran Rathnavel < kr...@cloudsimple.com> wrote: > In FreeBSD the user can actually specify the free routine for the mbuf > when the transmit routine is called. Is this implemented in DPDK. currently, afaik, dpdk does not provide this functionality. basically, there is no way to poll the tx-ring for consumed buffers. or to put it another way, rte_eth_tx_burst doesn't synchronously transmit the packets. -- kind regards anupam In the beginning was the lambda, and the lambda was with Emacs, and Emacs was the lambda.
Re: [dpdk-users] Freeing up Mbuf
Hi Param, On Thu, Dec 22, 2016 at 5:47 PM, Kumaraparameshwaran Rathnavelwrote: > Hi All, > > The mbuf implementation is similar to the Network Driver of the FreeBSD > Network Driver. In DPDK userspace driver it is the responsibility of the > rte_eth_dev implementation to free the memory buffer associated with a Queue > when descriptors reach below a threshold. In FreeBSD the user can actually > specify the free routine for the mbuf when the transmit routine is called. Is > this implemented in DPDK. I basically will give the data buffer of the > application layer that will be chained with the Transport Layer Headers and I > do not want to free up the routines always. Is this possible? You can send a clone of the mbuf (see rte_pktmbuf_clone). Cloning the mbuf will increase the refcount of the direct mbuf (that stores the actual data). When the driver is done transmitting the clone it will decrement the refcount and only free the direct mbuf if the refcount is 0 (see rte_pktmbuf_free_seg and __rte_pktmbuf_prefree_seg). However, you need to be careful if you plan to change the data stored in the direct mbuf and make sure there are no more clones of the data pending transmission. > > Thanking You, > Param. Regards, Dumitru
[dpdk-users] Freeing up Mbuf
Hi All, The mbuf implementation is similar to the Network Driver of the FreeBSD Network Driver. In DPDK userspace driver it is the responsibility of the rte_eth_dev implementation to free the memory buffer associated with a Queue when descriptors reach below a threshold. In FreeBSD the user can actually specify the free routine for the mbuf when the transmit routine is called. Is this implemented in DPDK. I basically will give the data buffer of the application layer that will be chained with the Transport Layer Headers and I do not want to free up the routines always. Is this possible? Thanking You, Param.