| 395 | |
| 396 | #ifdef _KERNEL |
| 397 | static inline int |
| 398 | m_epg_pagelen(const struct mbuf *m, int pidx, int pgoff) |
| 399 | { |
| 400 | |
| 401 | KASSERT(pgoff == 0 || pidx == 0, |
| 402 | ("page %d with non-zero offset %d in %p", pidx, pgoff, m)); |
| 403 | |
| 404 | if (pidx == m->m_epg_npgs - 1) { |
| 405 | return (m->m_epg_last_len); |
| 406 | } else { |
| 407 | return (PAGE_SIZE - pgoff); |
| 408 | } |
| 409 | } |
| 410 | |
| 411 | #ifdef INVARIANTS |
| 412 | #define MCHECK(ex, msg) KASSERT((ex), \ |
no outgoing calls
no test coverage detected