1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018-2020 Intel Corporation
9 #include <rte_cryptodev.h>
12 #include "ipsec_sqn.h"
18 typedef int32_t (*esp_outb_prepare_t)(struct rte_ipsec_sa *sa, rte_be64_t sqc,
19 const uint64_t ivp[IPSEC_MAX_IV_QWORD], struct rte_mbuf *mb,
20 union sym_op_data *icv, uint8_t sqh_len, uint8_t tso);
23 * helper function to fill crypto_sym op for cipher+auth algorithms.
24 * used by outb_cop_prepare(), see below.
27 sop_ciph_auth_prepare(struct rte_crypto_sym_op *sop,
28 const struct rte_ipsec_sa *sa, const union sym_op_data *icv,
29 uint32_t pofs, uint32_t plen)
31 sop->cipher.data.offset = sa->ctp.cipher.offset + pofs;
32 sop->cipher.data.length = sa->ctp.cipher.length + plen;
33 sop->auth.data.offset = sa->ctp.auth.offset + pofs;
34 sop->auth.data.length = sa->ctp.auth.length + plen;
35 sop->auth.digest.data = icv->va;
36 sop->auth.digest.phys_addr = icv->pa;
40 * helper function to fill crypto_sym op for cipher+auth algorithms.
41 * used by outb_cop_prepare(), see below.
44 sop_aead_prepare(struct rte_crypto_sym_op *sop,
45 const struct rte_ipsec_sa *sa, const union sym_op_data *icv,
46 uint32_t pofs, uint32_t plen)
48 sop->aead.data.offset = sa->ctp.cipher.offset + pofs;
49 sop->aead.data.length = sa->ctp.cipher.length + plen;
50 sop->aead.digest.data = icv->va;
51 sop->aead.digest.phys_addr = icv->pa;
52 sop->aead.aad.data = icv->va + sa->icv_len;
53 sop->aead.aad.phys_addr = icv->pa + sa->icv_len;
57 * setup crypto op and crypto sym op for ESP outbound packet.
60 outb_cop_prepare(struct rte_crypto_op *cop,
61 const struct rte_ipsec_sa *sa, const uint64_t ivp[IPSEC_MAX_IV_QWORD],
62 const union sym_op_data *icv, uint32_t hlen, uint32_t plen)
64 struct rte_crypto_sym_op *sop;
65 struct aead_gcm_iv *gcm;
66 struct aead_ccm_iv *ccm;
67 struct aead_chacha20_poly1305_iv *chacha20_poly1305;
68 struct aesctr_cnt_blk *ctr;
73 /* fill sym op fields */
77 case ALGO_TYPE_AES_CBC:
78 /* Cipher-Auth (AES-CBC *) case */
79 case ALGO_TYPE_3DES_CBC:
80 /* Cipher-Auth (3DES-CBC *) case */
83 sop_ciph_auth_prepare(sop, sa, icv, hlen, plen);
85 case ALGO_TYPE_AES_GMAC:
87 sop_ciph_auth_prepare(sop, sa, icv, hlen, plen);
89 /* fill AAD IV (located inside crypto op) */
90 gcm = rte_crypto_op_ctod_offset(cop, struct aead_gcm_iv *,
92 aead_gcm_iv_fill(gcm, ivp[0], sa->salt);
94 case ALGO_TYPE_AES_GCM:
95 /* AEAD (AES_GCM) case */
96 sop_aead_prepare(sop, sa, icv, hlen, plen);
98 /* fill AAD IV (located inside crypto op) */
99 gcm = rte_crypto_op_ctod_offset(cop, struct aead_gcm_iv *,
101 aead_gcm_iv_fill(gcm, ivp[0], sa->salt);
103 case ALGO_TYPE_AES_CCM:
104 /* AEAD (AES_CCM) case */
105 sop_aead_prepare(sop, sa, icv, hlen, plen);
107 /* fill AAD IV (located inside crypto op) */
108 ccm = rte_crypto_op_ctod_offset(cop, struct aead_ccm_iv *,
110 aead_ccm_iv_fill(ccm, ivp[0], sa->salt);
112 case ALGO_TYPE_CHACHA20_POLY1305:
113 /* AEAD (CHACHA20_POLY) case */
114 sop_aead_prepare(sop, sa, icv, hlen, plen);
116 /* fill AAD IV (located inside crypto op) */
117 chacha20_poly1305 = rte_crypto_op_ctod_offset(cop,
118 struct aead_chacha20_poly1305_iv *,
120 aead_chacha20_poly1305_iv_fill(chacha20_poly1305,
123 case ALGO_TYPE_AES_CTR:
124 /* Cipher-Auth (AES-CTR *) case */
125 sop_ciph_auth_prepare(sop, sa, icv, hlen, plen);
127 /* fill CTR block (located inside crypto op) */
128 ctr = rte_crypto_op_ctod_offset(cop, struct aesctr_cnt_blk *,
130 aes_ctr_cnt_blk_fill(ctr, ivp[0], sa->salt);
136 * setup/update packet data and metadata for ESP outbound tunnel case.
138 static inline int32_t
139 outb_tun_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc,
140 const uint64_t ivp[IPSEC_MAX_IV_QWORD], struct rte_mbuf *mb,
141 union sym_op_data *icv, uint8_t sqh_len, uint8_t tso)
143 uint32_t clen, hlen, l2len, pdlen, pdofs, plen, tlen;
145 struct rte_esp_hdr *esph;
146 struct rte_esp_tail *espt;
150 /* calculate extra header space required */
151 hlen = sa->hdr_len + sa->iv_len + sizeof(*esph);
153 /* size of ipsec protected data */
155 plen = mb->pkt_len - l2len;
157 /* number of bytes to encrypt */
158 clen = plen + sizeof(*espt);
161 clen = RTE_ALIGN_CEIL(clen, sa->pad_align);
162 /* pad length + esp tail */
164 tlen = pdlen + sa->icv_len + sqh_len;
166 /* We don't need to pad/align packet or append ICV length
167 * when using TSO offload
170 tlen = pdlen + sqh_len;
173 /* do append and prepend */
174 ml = rte_pktmbuf_lastseg(mb);
175 if (tlen + sa->aad_len > rte_pktmbuf_tailroom(ml))
179 ph = rte_pktmbuf_prepend(mb, hlen - l2len);
184 pdofs = ml->data_len;
185 ml->data_len += tlen;
187 pt = rte_pktmbuf_mtod_offset(ml, typeof(pt), pdofs);
189 /* update pkt l2/l3 len */
190 mb->tx_offload = (mb->tx_offload & sa->tx_offload.msk) |
193 /* copy tunnel pkt header */
194 rte_memcpy(ph, sa->hdr, sa->hdr_len);
196 /* if UDP encap is enabled update the dgram_len */
197 if (sa->type & RTE_IPSEC_SATP_NATT_ENABLE) {
198 struct rte_udp_hdr *udph = (struct rte_udp_hdr *)
199 (ph - sizeof(struct rte_udp_hdr));
200 udph->dgram_len = rte_cpu_to_be_16(mb->pkt_len - sqh_len -
201 sa->hdr_l3_off - sa->hdr_len);
204 /* update original and new ip header fields */
205 update_tun_outb_l3hdr(sa, ph + sa->hdr_l3_off, ph + hlen,
206 mb->pkt_len - sqh_len, sa->hdr_l3_off, sqn_low16(sqc));
208 /* update spi, seqn and iv */
209 esph = (struct rte_esp_hdr *)(ph + sa->hdr_len);
210 iv = (uint64_t *)(esph + 1);
211 copy_iv(iv, ivp, sa->iv_len);
214 esph->seq = sqn_low32(sqc);
217 pdofs += pdlen + sa->sqh_len;
220 pdlen -= sizeof(*espt);
222 /* copy padding data */
223 rte_memcpy(pt, esp_pad_bytes, pdlen);
225 /* update esp trailer */
226 espt = (struct rte_esp_tail *)(pt + pdlen);
227 espt->pad_len = pdlen;
228 espt->next_proto = sa->proto;
230 /* set icv va/pa value(s) */
231 icv->va = rte_pktmbuf_mtod_offset(ml, void *, pdofs);
232 icv->pa = rte_pktmbuf_iova_offset(ml, pdofs);
238 * for pure cryptodev (lookaside none) depending on SA settings,
239 * we might have to write some extra data to the packet.
242 outb_pkt_xprepare(const struct rte_ipsec_sa *sa, rte_be64_t sqc,
243 const union sym_op_data *icv)
246 struct aead_gcm_aad *gaad;
247 struct aead_ccm_aad *caad;
248 struct aead_chacha20_poly1305_aad *chacha20_poly1305_aad;
250 /* insert SQN.hi between ESP trailer and ICV */
251 if (sa->sqh_len != 0) {
252 psqh = (uint32_t *)(icv->va - sa->sqh_len);
253 psqh[0] = sqn_hi32(sqc);
257 * fill IV and AAD fields, if any (aad fields are placed after icv),
258 * right now we support only one AEAD algorithm: AES-GCM .
260 switch (sa->algo_type) {
261 case ALGO_TYPE_AES_GCM:
262 if (sa->aad_len != 0) {
263 gaad = (struct aead_gcm_aad *)(icv->va + sa->icv_len);
264 aead_gcm_aad_fill(gaad, sa->spi, sqc, IS_ESN(sa));
267 case ALGO_TYPE_AES_CCM:
268 if (sa->aad_len != 0) {
269 caad = (struct aead_ccm_aad *)(icv->va + sa->icv_len);
270 aead_ccm_aad_fill(caad, sa->spi, sqc, IS_ESN(sa));
273 case ALGO_TYPE_CHACHA20_POLY1305:
274 if (sa->aad_len != 0) {
275 chacha20_poly1305_aad = (struct aead_chacha20_poly1305_aad *)
276 (icv->va + sa->icv_len);
277 aead_chacha20_poly1305_aad_fill(chacha20_poly1305_aad,
278 sa->spi, sqc, IS_ESN(sa));
287 * setup/update packets and crypto ops for ESP outbound tunnel case.
290 esp_outb_tun_prepare(const struct rte_ipsec_session *ss, struct rte_mbuf *mb[],
291 struct rte_crypto_op *cop[], uint16_t num)
297 struct rte_ipsec_sa *sa;
298 struct rte_cryptodev_sym_session *cs;
299 union sym_op_data icv;
300 uint64_t iv[IPSEC_MAX_IV_QWORD];
307 sqn = esn_outb_update_sqn(sa, &n);
309 rte_errno = EOVERFLOW;
312 for (i = 0; i != n; i++) {
314 sqc = rte_cpu_to_be_64(sqn + i);
317 /* try to update the packet itself */
318 rc = outb_tun_pkt_prepare(sa, sqc, iv, mb[i], &icv,
320 /* success, setup crypto op */
322 outb_pkt_xprepare(sa, sqc, &icv);
323 lksd_none_cop_prepare(cop[k], cs, mb[i]);
324 outb_cop_prepare(cop[k], sa, iv, &icv, 0, rc);
326 /* failure, put packet into the death-row */
333 /* copy not prepared mbufs beyond good ones */
334 if (k != n && k != 0)
335 move_bad_mbufs(mb, dr, n, n - k);
341 * setup/update packet data and metadata for ESP outbound transport case.
343 static inline int32_t
344 outb_trs_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc,
345 const uint64_t ivp[IPSEC_MAX_IV_QWORD], struct rte_mbuf *mb,
346 union sym_op_data *icv, uint8_t sqh_len, uint8_t tso)
349 uint32_t clen, hlen, pdlen, pdofs, plen, tlen, uhlen;
351 struct rte_esp_hdr *esph;
352 struct rte_esp_tail *espt;
355 uint32_t l2len, l3len;
360 uhlen = l2len + l3len;
361 plen = mb->pkt_len - uhlen;
363 /* calculate extra header space required */
364 hlen = sa->iv_len + sizeof(*esph);
366 /* number of bytes to encrypt */
367 clen = plen + sizeof(*espt);
370 clen = RTE_ALIGN_CEIL(clen, sa->pad_align);
371 /* pad length + esp tail */
373 tlen = pdlen + sa->icv_len + sqh_len;
375 /* We don't need to pad/align packet or append ICV length
376 * when using TSO offload
379 tlen = pdlen + sqh_len;
382 /* do append and insert */
383 ml = rte_pktmbuf_lastseg(mb);
384 if (tlen + sa->aad_len > rte_pktmbuf_tailroom(ml))
387 /* prepend space for ESP header */
388 ph = rte_pktmbuf_prepend(mb, hlen);
393 pdofs = ml->data_len;
394 ml->data_len += tlen;
396 pt = rte_pktmbuf_mtod_offset(ml, typeof(pt), pdofs);
398 /* shift L2/L3 headers */
399 insert_esph(ph, ph + hlen, uhlen);
401 /* update ip header fields */
402 np = update_trs_l3hdr(sa, ph + l2len, mb->pkt_len - sqh_len, l2len,
405 /* update spi, seqn and iv */
406 esph = (struct rte_esp_hdr *)(ph + uhlen);
407 iv = (uint64_t *)(esph + 1);
408 copy_iv(iv, ivp, sa->iv_len);
411 esph->seq = sqn_low32(sqc);
414 pdofs += pdlen + sa->sqh_len;
417 pdlen -= sizeof(*espt);
419 /* copy padding data */
420 rte_memcpy(pt, esp_pad_bytes, pdlen);
422 /* update esp trailer */
423 espt = (struct rte_esp_tail *)(pt + pdlen);
424 espt->pad_len = pdlen;
425 espt->next_proto = np;
427 /* set icv va/pa value(s) */
428 icv->va = rte_pktmbuf_mtod_offset(ml, void *, pdofs);
429 icv->pa = rte_pktmbuf_iova_offset(ml, pdofs);
435 * setup/update packets and crypto ops for ESP outbound transport case.
438 esp_outb_trs_prepare(const struct rte_ipsec_session *ss, struct rte_mbuf *mb[],
439 struct rte_crypto_op *cop[], uint16_t num)
442 uint32_t i, k, n, l2, l3;
445 struct rte_ipsec_sa *sa;
446 struct rte_cryptodev_sym_session *cs;
447 union sym_op_data icv;
448 uint64_t iv[IPSEC_MAX_IV_QWORD];
455 sqn = esn_outb_update_sqn(sa, &n);
457 rte_errno = EOVERFLOW;
460 for (i = 0; i != n; i++) {
465 sqc = rte_cpu_to_be_64(sqn + i);
468 /* try to update the packet itself */
469 rc = outb_trs_pkt_prepare(sa, sqc, iv, mb[i], &icv,
471 /* success, setup crypto op */
473 outb_pkt_xprepare(sa, sqc, &icv);
474 lksd_none_cop_prepare(cop[k], cs, mb[i]);
475 outb_cop_prepare(cop[k], sa, iv, &icv, l2 + l3, rc);
477 /* failure, put packet into the death-row */
484 /* copy not prepared mbufs beyond good ones */
485 if (k != n && k != 0)
486 move_bad_mbufs(mb, dr, n, n - k);
492 static inline uint32_t
493 outb_cpu_crypto_prepare(const struct rte_ipsec_sa *sa, uint32_t *pofs,
494 uint32_t plen, void *iv)
497 struct aead_gcm_iv *gcm;
498 struct aead_ccm_iv *ccm;
499 struct aead_chacha20_poly1305_iv *chacha20_poly1305;
500 struct aesctr_cnt_blk *ctr;
503 switch (sa->algo_type) {
504 case ALGO_TYPE_AES_GCM:
506 aead_gcm_iv_fill(gcm, ivp[0], sa->salt);
508 case ALGO_TYPE_AES_CCM:
510 aead_ccm_iv_fill(ccm, ivp[0], sa->salt);
512 case ALGO_TYPE_CHACHA20_POLY1305:
513 chacha20_poly1305 = iv;
514 aead_chacha20_poly1305_iv_fill(chacha20_poly1305,
517 case ALGO_TYPE_AES_CTR:
519 aes_ctr_cnt_blk_fill(ctr, ivp[0], sa->salt);
523 *pofs += sa->ctp.auth.offset;
524 clen = plen + sa->ctp.auth.length;
529 cpu_outb_pkt_prepare(const struct rte_ipsec_session *ss,
530 struct rte_mbuf *mb[], uint16_t num,
531 esp_outb_prepare_t prepare, uint32_t cofs_mask)
536 struct rte_ipsec_sa *sa;
539 union sym_op_data icv;
540 struct rte_crypto_va_iova_ptr iv[num];
541 struct rte_crypto_va_iova_ptr aad[num];
542 struct rte_crypto_va_iova_ptr dgst[num];
546 uint64_t ivbuf[num][IPSEC_MAX_IV_QWORD];
551 sqn = esn_outb_update_sqn(sa, &n);
553 rte_errno = EOVERFLOW;
555 for (i = 0, k = 0; i != n; i++) {
560 /* calculate ESP header offset */
561 l4ofs[k] = (l2 + l3) & cofs_mask;
563 sqc = rte_cpu_to_be_64(sqn + i);
564 gen_iv(ivbuf[k], sqc);
566 /* try to update the packet itself */
567 rc = prepare(sa, sqc, ivbuf[k], mb[i], &icv, sa->sqh_len, 0);
569 /* success, proceed with preparations */
572 outb_pkt_xprepare(sa, sqc, &icv);
574 /* get encrypted data offset and length */
575 clen[k] = outb_cpu_crypto_prepare(sa, l4ofs + k, rc,
578 /* fill iv, digest and aad */
580 aad[k].va = icv.va + sa->icv_len;
581 dgst[k++].va = icv.va;
588 /* copy not prepared mbufs beyond good ones */
589 if (k != n && k != 0)
590 move_bad_mbufs(mb, dr, n, n - k);
592 /* convert mbufs to iovecs and do actual crypto/auth processing */
594 cpu_crypto_bulk(ss, sa->cofs, mb, iv, aad, dgst,
600 cpu_outb_tun_pkt_prepare(const struct rte_ipsec_session *ss,
601 struct rte_mbuf *mb[], uint16_t num)
603 return cpu_outb_pkt_prepare(ss, mb, num, outb_tun_pkt_prepare, 0);
607 cpu_outb_trs_pkt_prepare(const struct rte_ipsec_session *ss,
608 struct rte_mbuf *mb[], uint16_t num)
610 return cpu_outb_pkt_prepare(ss, mb, num, outb_trs_pkt_prepare,
615 * process outbound packets for SA with ESN support,
616 * for algorithms that require SQN.hibits to be implicitly included
617 * into digest computation.
618 * In that case we have to move ICV bytes back to their proper place.
621 esp_outb_sqh_process(const struct rte_ipsec_session *ss, struct rte_mbuf *mb[],
624 uint32_t i, k, icv_len, *icv, bytes;
626 struct rte_ipsec_sa *sa;
632 icv_len = sa->icv_len;
635 for (i = 0; i != num; i++) {
636 if ((mb[i]->ol_flags & RTE_MBUF_F_RX_SEC_OFFLOAD_FAILED) == 0) {
637 ml = rte_pktmbuf_lastseg(mb[i]);
638 /* remove high-order 32 bits of esn from packet len */
639 mb[i]->pkt_len -= sa->sqh_len;
640 ml->data_len -= sa->sqh_len;
641 icv = rte_pktmbuf_mtod_offset(ml, void *,
642 ml->data_len - icv_len);
643 remove_sqh(icv, icv_len);
644 bytes += mb[i]->pkt_len;
649 sa->statistics.count += k;
650 sa->statistics.bytes += bytes;
652 /* handle unprocessed mbufs */
656 move_bad_mbufs(mb, dr, num, num - k);
663 * prepare packets for inline ipsec processing:
664 * set ol_flags and attach metadata.
667 inline_outb_mbuf_prepare(const struct rte_ipsec_session *ss,
668 struct rte_mbuf *mb[], uint16_t num)
670 uint32_t i, ol_flags, bytes;
672 ol_flags = ss->security.ol_flags & RTE_SECURITY_TX_OLOAD_NEED_MDATA;
674 for (i = 0; i != num; i++) {
676 mb[i]->ol_flags |= RTE_MBUF_F_TX_SEC_OFFLOAD;
677 bytes += mb[i]->pkt_len;
679 rte_security_set_pkt_metadata(ss->security.ctx,
680 ss->security.ses, mb[i], NULL);
682 ss->sa->statistics.count += num;
683 ss->sa->statistics.bytes += bytes;
688 esn_outb_nb_segments(struct rte_mbuf *m)
690 if (m->ol_flags & (RTE_MBUF_F_TX_TCP_SEG | RTE_MBUF_F_TX_UDP_SEG)) {
691 uint16_t pkt_l3len = m->pkt_len - m->l2_len;
693 (m->tso_segsz > 0 && pkt_l3len > m->tso_segsz) ?
694 (pkt_l3len + m->tso_segsz - 1) / m->tso_segsz : 1;
697 return 1; /* no TSO */
700 /* Compute how many packets can be sent before overflow occurs */
701 static inline uint16_t
702 esn_outb_nb_valid_packets(uint16_t num, uint32_t n_sqn, uint16_t nb_segs[])
705 uint32_t seg_cnt = 0;
706 for (i = 0; i < num && seg_cnt < n_sqn; i++)
707 seg_cnt += nb_segs[i];
712 * process group of ESP outbound tunnel packets destined for
713 * INLINE_CRYPTO type of device.
716 inline_outb_tun_pkt_process(const struct rte_ipsec_session *ss,
717 struct rte_mbuf *mb[], uint16_t num)
720 uint32_t i, k, nb_segs_total, n_sqn;
723 struct rte_ipsec_sa *sa;
724 union sym_op_data icv;
725 uint64_t iv[IPSEC_MAX_IV_QWORD];
727 uint16_t nb_segs[num];
731 /* Calculate number of segments */
732 for (i = 0; i != num; i++) {
733 nb_segs[i] = esn_outb_nb_segments(mb[i]);
734 nb_segs_total += nb_segs[i];
737 n_sqn = nb_segs_total;
738 sqn = esn_outb_update_sqn(sa, &n_sqn);
739 if (n_sqn != nb_segs_total) {
740 rte_errno = EOVERFLOW;
741 /* if there are segmented packets find out how many can be
742 * sent until overflow occurs
744 if (nb_segs_total > num) /* there is at least 1 */
745 num = esn_outb_nb_valid_packets(num, n_sqn, nb_segs);
747 num = n_sqn; /* no segmented packets */
751 for (i = 0; i != num; i++) {
753 sqc = rte_cpu_to_be_64(sqn);
757 /* try to update the packet itself */
758 rc = outb_tun_pkt_prepare(sa, sqc, iv, mb[i], &icv, 0,
760 (RTE_MBUF_F_TX_TCP_SEG | RTE_MBUF_F_TX_UDP_SEG)) != 0);
764 /* failure, put packet into the death-row */
771 /* copy not processed mbufs beyond good ones */
772 if (k != num && k != 0)
773 move_bad_mbufs(mb, dr, num, num - k);
775 inline_outb_mbuf_prepare(ss, mb, k);
780 * process group of ESP outbound transport packets destined for
781 * INLINE_CRYPTO type of device.
784 inline_outb_trs_pkt_process(const struct rte_ipsec_session *ss,
785 struct rte_mbuf *mb[], uint16_t num)
788 uint32_t i, k, nb_segs_total, n_sqn;
791 struct rte_ipsec_sa *sa;
792 union sym_op_data icv;
793 uint64_t iv[IPSEC_MAX_IV_QWORD];
795 uint16_t nb_segs[num];
799 /* Calculate number of segments */
800 for (i = 0; i != num; i++) {
801 nb_segs[i] = esn_outb_nb_segments(mb[i]);
802 nb_segs_total += nb_segs[i];
805 n_sqn = nb_segs_total;
806 sqn = esn_outb_update_sqn(sa, &n_sqn);
807 if (n_sqn != nb_segs_total) {
808 rte_errno = EOVERFLOW;
809 /* if there are segmented packets find out how many can be
810 * sent until overflow occurs
812 if (nb_segs_total > num) /* there is at least 1 */
813 num = esn_outb_nb_valid_packets(num, n_sqn, nb_segs);
815 num = n_sqn; /* no segmented packets */
819 for (i = 0; i != num; i++) {
821 sqc = rte_cpu_to_be_64(sqn);
825 /* try to update the packet itself */
826 rc = outb_trs_pkt_prepare(sa, sqc, iv, mb[i], &icv, 0,
828 (RTE_MBUF_F_TX_TCP_SEG | RTE_MBUF_F_TX_UDP_SEG)) != 0);
832 /* failure, put packet into the death-row */
839 /* copy not processed mbufs beyond good ones */
840 if (k != num && k != 0)
841 move_bad_mbufs(mb, dr, num, num - k);
843 inline_outb_mbuf_prepare(ss, mb, k);
848 * outbound for RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL:
849 * actual processing is done by HW/PMD, just set flags and metadata.
852 inline_proto_outb_pkt_process(const struct rte_ipsec_session *ss,
853 struct rte_mbuf *mb[], uint16_t num)
855 inline_outb_mbuf_prepare(ss, mb, num);