Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DPAA2: Release new buffers based on buffer pool utilization.
dpaa2_ni driver is attached with a limited (DPAA2_NI_BUFS_INIT) number of buffers released to the buffer pool. It might not be a problem when several channels per network interface are available. HoneyComb is a good example with 5600 = 16 channel * 350 buffers, but each network interface on Ten64 will have 350 = 1 channel * 350 buffers released to the buffer pool initially. Stress test and a huge amount of ingress traffic can lead to the pool depletion and dropped frames in this case. This patch allows to monitor buffer pool using dpaa2_ni_bp_task(), detect free buffers left with help of a new software portal command (DPAA2_SWP_QUERY_BP) and release new ones if necessary, i.e. pool will be doubled in size when amount of free buffers is less then 25% of the previous pool capacity. State of the buffer pool can be examined using sysctl: dev.dpaa2_ni.X.stats.buf_free dev.dpaa2_ni.X.stats.buf_num where the first one denotes number of free buffers detected right _before_ the last grow of the pool (0 means pool didn't grow), and the second one denotes current size of the pool.
- Loading branch information