DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net: add missing rte prefix for esp tail
@ 2019-09-27 11:30 David Marchand
  2019-10-04  8:38 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: David Marchand @ 2019-09-27 11:30 UTC (permalink / raw)
  To: dev; +Cc: stable, Konstantin Ananyev, Bernard Iremonger, Olivier Matz

This structure has been missed during the big rework.

Fixes: 5ef254676752 ("net: add rte prefix to ESP structure")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_ipsec.c       |  4 ++--
 lib/librte_ipsec/esp_inb.c  | 14 +++++++-------
 lib/librte_ipsec/esp_outb.c |  8 ++++----
 lib/librte_net/rte_esp.h    |  2 +-
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index 392bf90..4007eff 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -574,7 +574,7 @@ setup_test_string_tunneled(struct rte_mempool *mpool, const char *string,
 	struct rte_mbuf *m = rte_pktmbuf_alloc(mpool);
 	uint32_t hdrlen = sizeof(struct rte_ipv4_hdr) +
 		sizeof(struct rte_esp_hdr);
-	uint32_t taillen = sizeof(struct esp_tail);
+	uint32_t taillen = sizeof(struct rte_esp_tail);
 	uint32_t t_len = len + hdrlen + taillen;
 	uint32_t padlen;
 
@@ -586,7 +586,7 @@ setup_test_string_tunneled(struct rte_mempool *mpool, const char *string,
 	padlen = RTE_ALIGN(t_len, 4) - t_len;
 	t_len += padlen;
 
-	struct esp_tail espt  = {
+	struct rte_esp_tail espt = {
 		.pad_len = padlen,
 		.next_proto = IPPROTO_IPIP,
 	};
diff --git a/lib/librte_ipsec/esp_inb.c b/lib/librte_ipsec/esp_inb.c
index 8e3ecbc..5c653dd 100644
--- a/lib/librte_ipsec/esp_inb.c
+++ b/lib/librte_ipsec/esp_inb.c
@@ -296,15 +296,15 @@ esp_inb_pkt_prepare(const struct rte_ipsec_session *ss, struct rte_mbuf *mb[],
  */
 static inline void
 process_step1(struct rte_mbuf *mb, uint32_t tlen, struct rte_mbuf **ml,
-	struct esp_tail *espt, uint32_t *hlen, uint32_t *tofs)
+	struct rte_esp_tail *espt, uint32_t *hlen, uint32_t *tofs)
 {
-	const struct esp_tail *pt;
+	const struct rte_esp_tail *pt;
 	uint32_t ofs;
 
 	ofs = mb->pkt_len - tlen;
 	hlen[0] = mb->l2_len + mb->l3_len;
 	ml[0] = mbuf_get_seg_ofs(mb, &ofs);
-	pt = rte_pktmbuf_mtod_offset(ml[0], const struct esp_tail *, ofs);
+	pt = rte_pktmbuf_mtod_offset(ml[0], const struct rte_esp_tail *, ofs);
 	tofs[0] = ofs;
 	espt[0] = pt[0];
 }
@@ -341,7 +341,7 @@ check_pad_bytes(struct rte_mbuf *mb, uint32_t ofs, uint32_t len)
  */
 static inline int32_t
 trs_process_check(struct rte_mbuf *mb, struct rte_mbuf **ml,
-	uint32_t *tofs, struct esp_tail espt, uint32_t hlen, uint32_t tlen)
+	uint32_t *tofs, struct rte_esp_tail espt, uint32_t hlen, uint32_t tlen)
 {
 	if ((mb->ol_flags & PKT_RX_SEC_OFFLOAD_FAILED) != 0 ||
 			tlen + hlen > mb->pkt_len)
@@ -364,7 +364,7 @@ trs_process_check(struct rte_mbuf *mb, struct rte_mbuf **ml,
  */
 static inline int32_t
 tun_process_check(struct rte_mbuf *mb, struct rte_mbuf **ml,
-	uint32_t *tofs, struct esp_tail espt, uint32_t hlen, uint32_t tlen,
+	uint32_t *tofs, struct rte_esp_tail espt, uint32_t hlen, uint32_t tlen,
 	uint8_t proto)
 {
 	return (trs_process_check(mb, ml, tofs, espt, hlen, tlen) ||
@@ -462,7 +462,7 @@ tun_process(const struct rte_ipsec_sa *sa, struct rte_mbuf *mb[],
 {
 	uint32_t adj, i, k, tl;
 	uint32_t hl[num], to[num];
-	struct esp_tail espt[num];
+	struct rte_esp_tail espt[num];
 	struct rte_mbuf *ml[num];
 	const void *outh;
 	void *inh;
@@ -523,7 +523,7 @@ trs_process(const struct rte_ipsec_sa *sa, struct rte_mbuf *mb[],
 	char *np;
 	uint32_t i, k, l2, tl;
 	uint32_t hl[num], to[num];
-	struct esp_tail espt[num];
+	struct rte_esp_tail espt[num];
 	struct rte_mbuf *ml[num];
 
 	/*
diff --git a/lib/librte_ipsec/esp_outb.c b/lib/librte_ipsec/esp_outb.c
index 55799a8..e983b25 100644
--- a/lib/librte_ipsec/esp_outb.c
+++ b/lib/librte_ipsec/esp_outb.c
@@ -109,7 +109,7 @@ outb_tun_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc,
 	uint32_t clen, hlen, l2len, pdlen, pdofs, plen, tlen;
 	struct rte_mbuf *ml;
 	struct rte_esp_hdr *esph;
-	struct esp_tail *espt;
+	struct rte_esp_tail *espt;
 	char *ph, *pt;
 	uint64_t *iv;
 
@@ -173,7 +173,7 @@ outb_tun_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc,
 	rte_memcpy(pt, esp_pad_bytes, pdlen);
 
 	/* update esp trailer */
-	espt = (struct esp_tail *)(pt + pdlen);
+	espt = (struct rte_esp_tail *)(pt + pdlen);
 	espt->pad_len = pdlen;
 	espt->next_proto = sa->proto;
 
@@ -277,7 +277,7 @@ outb_trs_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc,
 	uint32_t clen, hlen, pdlen, pdofs, plen, tlen, uhlen;
 	struct rte_mbuf *ml;
 	struct rte_esp_hdr *esph;
-	struct esp_tail *espt;
+	struct rte_esp_tail *espt;
 	char *ph, *pt;
 	uint64_t *iv;
 
@@ -336,7 +336,7 @@ outb_trs_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc,
 	rte_memcpy(pt, esp_pad_bytes, pdlen);
 
 	/* update esp trailer */
-	espt = (struct esp_tail *)(pt + pdlen);
+	espt = (struct rte_esp_tail *)(pt + pdlen);
 	espt->pad_len = pdlen;
 	espt->next_proto = np;
 
diff --git a/lib/librte_net/rte_esp.h b/lib/librte_net/rte_esp.h
index c569b79..bc7b20a 100644
--- a/lib/librte_net/rte_esp.h
+++ b/lib/librte_net/rte_esp.h
@@ -28,7 +28,7 @@ struct rte_esp_hdr {
 /**
  * ESP Trailer
  */
-struct esp_tail {
+struct rte_esp_tail {
 	uint8_t pad_len;     /**< number of pad bytes (0-255) */
 	uint8_t next_proto;  /**< IPv4 or IPv6 or next layer header */
 } __attribute__((__packed__));
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] net: add missing rte prefix for esp tail
  2019-09-27 11:30 [dpdk-dev] [PATCH] net: add missing rte prefix for esp tail David Marchand
@ 2019-10-04  8:38 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2019-10-04  8:38 UTC (permalink / raw)
  To: David Marchand, dev
  Cc: stable, Konstantin Ananyev, Bernard Iremonger, Olivier Matz

On 9/27/2019 12:30 PM, David Marchand wrote:
> This structure has been missed during the big rework.
> 
> Fixes: 5ef254676752 ("net: add rte prefix to ESP structure")
> Cc: stable@dpdk.org
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-04  8:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-27 11:30 [dpdk-dev] [PATCH] net: add missing rte prefix for esp tail David Marchand
2019-10-04  8:38 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).