| 151 | } |
| 152 | |
| 153 | static inline uint8_t * |
| 154 | pktmbuf_mtod_offset(struct rte_mbuf *mbuf, int offset) { |
| 155 | struct rte_mbuf *m; |
| 156 | |
| 157 | for (m = mbuf; (m != NULL) && (offset > m->data_len); m = m->next) |
| 158 | offset -= m->data_len; |
| 159 | |
| 160 | if (m == NULL) { |
| 161 | printf("pktmbuf_mtod_offset: offset out of buffer\n"); |
| 162 | return NULL; |
| 163 | } |
| 164 | return rte_pktmbuf_mtod_offset(m, uint8_t *, offset); |
| 165 | } |
| 166 | |
| 167 | static inline rte_iova_t |
| 168 | pktmbuf_iova_offset(struct rte_mbuf *mbuf, int offset) { |
no test coverage detected