K 10 svn:author V 5 markj K 8 svn:date V 27 2018-04-11T14:38:56.141158Z K 7 svn:log V 1051 Let the driver specify the required number of netdump clusters. In most cases, NETDUMP_MAX_IN_FLIGHT (64) is sufficient. However, the iflib and cxgb rx buffer allocation schemes have an edge case which make this insufficient. Both drivers allocate mbufs and clusters separately and keep them in separate arrays. If a received packet can fit in the mbuf, the cluster at the corresponding index is not consumed and will simply be left alone until the consumer wraps around. netdump ACKs fit in an mbuf's inline buffer, so the clusters are generally not used at all. However, if the drivers fail to allocate a cluster for a given producer index, they will not replenish the mbuf either, so unless there are enough pre-allocated clusters for the whole ring (which almost certainly has more than 64 entries), we quickly stop being able to receive packets. For these drivers, be sure to pre-allocate enough clusters to avoid the problem. This is quite wasteful but is the simplest path forward for now. Other drivers continue to pre-allocate 64 clusters. END