| 3248 | } |
| 3249 | |
| 3250 | static void |
| 3251 | copy_plaintext(struct rte_mbuf *m_src, struct rte_mbuf *m_dst, |
| 3252 | struct rte_crypto_op *op) |
| 3253 | { |
| 3254 | uint8_t *p_src, *p_dst; |
| 3255 | |
| 3256 | p_src = rte_pktmbuf_mtod(m_src, uint8_t *); |
| 3257 | p_dst = rte_pktmbuf_mtod(m_dst, uint8_t *); |
| 3258 | |
| 3259 | /** |
| 3260 | * Copy the content between cipher offset and auth offset |
| 3261 | * for generating correct digest. |
| 3262 | */ |
| 3263 | if (op->sym->cipher.data.offset > op->sym->auth.data.offset) |
| 3264 | memcpy(p_dst + op->sym->auth.data.offset, |
| 3265 | p_src + op->sym->auth.data.offset, |
| 3266 | op->sym->cipher.data.offset - |
| 3267 | op->sym->auth.data.offset); |
| 3268 | } |
| 3269 | |
| 3270 | /** Process crypto operation for mbuf */ |
| 3271 | static int |