| 1304 | */ |
| 1305 | |
| 1306 | int |
| 1307 | m_clget(struct mbuf *m, int how) |
| 1308 | { |
| 1309 | |
| 1310 | KASSERT((m->m_flags & M_EXT) == 0, ("%s: mbuf %p has M_EXT", |
| 1311 | __func__, m)); |
| 1312 | m->m_ext.ext_buf = (char *)NULL; |
| 1313 | uma_zalloc_arg(zone_clust, m, how); |
| 1314 | /* |
| 1315 | * On a cluster allocation failure, drain the packet zone and retry, |
| 1316 | * we might be able to loosen a few clusters up on the drain. |
| 1317 | */ |
| 1318 | if ((how & M_NOWAIT) && (m->m_ext.ext_buf == NULL)) { |
| 1319 | uma_zone_reclaim(zone_pack, UMA_RECLAIM_DRAIN); |
| 1320 | uma_zalloc_arg(zone_clust, m, how); |
| 1321 | } |
| 1322 | MBUF_PROBE2(m__clget, m, how); |
| 1323 | return (m->m_flags & M_EXT); |
| 1324 | } |
| 1325 | |
| 1326 | /* |
| 1327 | * m_cljget() is different from m_clget() as it can allocate clusters without |
nothing calls this directly
no test coverage detected