diff options
| author | Olivier Matz <[email protected]> | 2021-10-15 21:24:08 +0200 |
|---|---|---|
| committer | David Marchand <[email protected]> | 2021-10-24 13:37:43 +0200 |
| commit | daa02b5cddbb8e11b31d41e2bf7bb1ae64dcae2f (patch) | |
| tree | 22d2fe110fae957428c30d1e082c5c863ba852bf /lib/ipsec | |
| parent | 735155ee3b7c126b14ac28c5667d5a2d811ddf4c (diff) | |
mbuf: add namespace to offload flags
Fix the mbuf offload flags namespace by adding an RTE_ prefix to the
name. The old flags remain usable, but a deprecation warning is issued
at compilation.
Signed-off-by: Olivier Matz <[email protected]>
Acked-by: Andrew Rybchenko <[email protected]>
Acked-by: Ajit Khaparde <[email protected]>
Acked-by: Somnath Kotur <[email protected]>
Diffstat (limited to 'lib/ipsec')
| -rw-r--r-- | lib/ipsec/esp_inb.c | 10 | ||||
| -rw-r--r-- | lib/ipsec/esp_outb.c | 4 | ||||
| -rw-r--r-- | lib/ipsec/misc.h | 2 | ||||
| -rw-r--r-- | lib/ipsec/rte_ipsec_group.h | 6 | ||||
| -rw-r--r-- | lib/ipsec/sa.c | 2 |
5 files changed, 12 insertions, 12 deletions
diff --git a/lib/ipsec/esp_inb.c b/lib/ipsec/esp_inb.c index 6fbe468a61..99e9c43f2f 100644 --- a/lib/ipsec/esp_inb.c +++ b/lib/ipsec/esp_inb.c @@ -459,7 +459,7 @@ static inline int32_t trs_process_check(struct rte_mbuf *mb, struct rte_mbuf **ml, uint32_t *tofs, struct rte_esp_tail espt, uint32_t hlen, uint32_t tlen) { - if ((mb->ol_flags & PKT_RX_SEC_OFFLOAD_FAILED) != 0 || + if ((mb->ol_flags & RTE_MBUF_F_RX_SEC_OFFLOAD_FAILED) != 0 || tlen + hlen > mb->pkt_len) return -EBADMSG; @@ -547,8 +547,8 @@ trs_process_step3(struct rte_mbuf *mb) /* reset mbuf packet type */ mb->packet_type &= (RTE_PTYPE_L2_MASK | RTE_PTYPE_L3_MASK); - /* clear the PKT_RX_SEC_OFFLOAD flag if set */ - mb->ol_flags &= ~PKT_RX_SEC_OFFLOAD; + /* clear the RTE_MBUF_F_RX_SEC_OFFLOAD flag if set */ + mb->ol_flags &= ~RTE_MBUF_F_RX_SEC_OFFLOAD; } /* @@ -565,8 +565,8 @@ tun_process_step3(struct rte_mbuf *mb, uint64_t txof_msk, uint64_t txof_val) mb->packet_type = RTE_PTYPE_UNKNOWN; mb->tx_offload = (mb->tx_offload & txof_msk) | txof_val; - /* clear the PKT_RX_SEC_OFFLOAD flag if set */ - mb->ol_flags &= ~PKT_RX_SEC_OFFLOAD; + /* clear the RTE_MBUF_F_RX_SEC_OFFLOAD flag if set */ + mb->ol_flags &= ~RTE_MBUF_F_RX_SEC_OFFLOAD; } /* diff --git a/lib/ipsec/esp_outb.c b/lib/ipsec/esp_outb.c index b6c72f58a4..336d24a6af 100644 --- a/lib/ipsec/esp_outb.c +++ b/lib/ipsec/esp_outb.c @@ -618,7 +618,7 @@ esp_outb_sqh_process(const struct rte_ipsec_session *ss, struct rte_mbuf *mb[], bytes = 0; for (i = 0; i != num; i++) { - if ((mb[i]->ol_flags & PKT_RX_SEC_OFFLOAD_FAILED) == 0) { + if ((mb[i]->ol_flags & RTE_MBUF_F_RX_SEC_OFFLOAD_FAILED) == 0) { ml = rte_pktmbuf_lastseg(mb[i]); /* remove high-order 32 bits of esn from packet len */ mb[i]->pkt_len -= sa->sqh_len; @@ -658,7 +658,7 @@ inline_outb_mbuf_prepare(const struct rte_ipsec_session *ss, bytes = 0; for (i = 0; i != num; i++) { - mb[i]->ol_flags |= PKT_TX_SEC_OFFLOAD; + mb[i]->ol_flags |= RTE_MBUF_F_TX_SEC_OFFLOAD; bytes += mb[i]->pkt_len; if (ol_flags != 0) rte_security_set_pkt_metadata(ss->security.ctx, diff --git a/lib/ipsec/misc.h b/lib/ipsec/misc.h index 58ff538141..fd4d3f5256 100644 --- a/lib/ipsec/misc.h +++ b/lib/ipsec/misc.h @@ -173,7 +173,7 @@ cpu_crypto_bulk(const struct rte_ipsec_session *ss, j = num - n; for (i = 0; j != 0 && i != num; i++) { if (st[i] != 0) { - mb[i]->ol_flags |= PKT_RX_SEC_OFFLOAD_FAILED; + mb[i]->ol_flags |= RTE_MBUF_F_RX_SEC_OFFLOAD_FAILED; j--; } } diff --git a/lib/ipsec/rte_ipsec_group.h b/lib/ipsec/rte_ipsec_group.h index ea3bdfad95..60ab297710 100644 --- a/lib/ipsec/rte_ipsec_group.h +++ b/lib/ipsec/rte_ipsec_group.h @@ -61,7 +61,7 @@ rte_ipsec_ses_from_crypto(const struct rte_crypto_op *cop) * Take as input completed crypto ops, extract related mbufs * and group them by rte_ipsec_session they belong to. * For mbuf which crypto-op wasn't completed successfully - * PKT_RX_SEC_OFFLOAD_FAILED will be raised in ol_flags. + * RTE_MBUF_F_RX_SEC_OFFLOAD_FAILED will be raised in ol_flags. * Note that mbufs with undetermined SA (session-less) are not freed * by the function, but are placed beyond mbufs for the last valid group. * It is a user responsibility to handle them further. @@ -95,9 +95,9 @@ rte_ipsec_pkt_crypto_group(const struct rte_crypto_op *cop[], m = cop[i]->sym[0].m_src; ns = cop[i]->sym[0].session; - m->ol_flags |= PKT_RX_SEC_OFFLOAD; + m->ol_flags |= RTE_MBUF_F_RX_SEC_OFFLOAD; if (cop[i]->status != RTE_CRYPTO_OP_STATUS_SUCCESS) - m->ol_flags |= PKT_RX_SEC_OFFLOAD_FAILED; + m->ol_flags |= RTE_MBUF_F_RX_SEC_OFFLOAD_FAILED; /* no valid session found */ if (ns == NULL) { diff --git a/lib/ipsec/sa.c b/lib/ipsec/sa.c index 9d5ffda627..a19819f9f1 100644 --- a/lib/ipsec/sa.c +++ b/lib/ipsec/sa.c @@ -665,7 +665,7 @@ pkt_flag_process(const struct rte_ipsec_session *ss, k = 0; bytes = 0; for (i = 0; i != num; i++) { - if ((mb[i]->ol_flags & PKT_RX_SEC_OFFLOAD_FAILED) == 0) { + if ((mb[i]->ol_flags & RTE_MBUF_F_RX_SEC_OFFLOAD_FAILED) == 0) { k++; bytes += mb[i]->pkt_len; } |
