From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Gora Subject: [PATCH v2 2/4] examples/ipsec-secgw: use rte fcn to access private area Date: Mon, 18 Jun 2018 16:36:18 -0700 Message-ID: <20180618233618.21729-1-dg@adax.com> Cc: Dan Gora , Remy Horton , Ori Kam , Bruce Richardson , Pablo de Lara , Radu Nicolau , Akhil Goyal , Tomasz Kantecki To: dev@dpdk.org Return-path: Received: from mail-oi0-f67.google.com (mail-oi0-f67.google.com [209.85.218.67]) by dpdk.org (Postfix) with ESMTP id 2BF752BC8 for ; Tue, 19 Jun 2018 01:36:27 +0200 (CEST) Received: by mail-oi0-f67.google.com with SMTP id l22-v6so16498103oib.4 for ; Mon, 18 Jun 2018 16:36:27 -0700 (PDT) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Update get_priv() to use rte_mbuf_to_priv() to access the private area in the mbuf. Signed-off-by: Dan Gora --- 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.18.0.rc1.1.g6f333ff2f