DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 2/4] examples/ipsec-secgw: use rte fcn to access private area
@ 2018-06-07 23:55 Dan Gora
  0 siblings, 0 replies; only message in thread
From: Dan Gora @ 2018-06-07 23:55 UTC (permalink / raw)
  To: dev
  Cc: Dan Gora, Remy Horton, Ori Kam, Bruce Richardson, Pablo de Lara,
	Radu Nicolau, Akhil Goyal, Tomasz Kantecki

Update get_priv() to use rte_mbuf_to_priv() to access the private
area in the mbuf.

Signed-off-by: Dan Gora <dg@adax.com>
---
 examples/ipsec-secgw/ipsec.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h
index 9b87278c1..3b5c3ec8c 100644
--- a/examples/ipsec-secgw/ipsec.h
+++ b/examples/ipsec-secgw/ipsec.h
@@ -191,7 +191,7 @@ ipsec_metadata_size(void)
 static inline struct ipsec_mbuf_metadata *
 get_priv(struct rte_mbuf *m)
 {
-	return RTE_PTR_ADD(m, sizeof(struct rte_mbuf));
+	return (ipsec_mbuf_metadata *)rte_mbuf_to_priv(m);
 }
 
 static inline void *
-- 
2.17.0.582.gccdcbd54c4

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-06-07 23:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-07 23:55 [dpdk-dev] [PATCH 2/4] examples/ipsec-secgw: use rte fcn to access private area Dan Gora

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).