| 256 | } |
| 257 | |
| 258 | static int |
| 259 | pktmbuf_read_into(const struct rte_mbuf *m, void *buf, size_t buf_len) |
| 260 | { |
| 261 | if (m->pkt_len > buf_len) |
| 262 | return -ENOMEM; |
| 263 | |
| 264 | const void *read = rte_pktmbuf_read(m, 0, m->pkt_len, buf); |
| 265 | if (read != NULL && read != buf) |
| 266 | memcpy(buf, read, m->pkt_len); |
| 267 | |
| 268 | return 0; |
| 269 | } |
| 270 | |
| 271 | static int |
| 272 | cryptodev_init(int dev_id) |
no test coverage detected