From: Dan Gora Subject: [PATCH 2/4] examples/ipsec-secgw: use rte fcn to access private area Date: Thu, 7 Jun 2018 20:55:33 -0300 Message-ID: <20180607235533.27927-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-qt0-f195.google.com (mail-qt0-f195.google.com [209.85.216.195]) by dpdk.org (Postfix) with ESMTP id E3B765F34 for ; Fri, 8 Jun 2018 01:56:14 +0200 (CEST) Received: by mail-qt0-f195.google.com with SMTP id o9-v6so11778481qtp.3 for ; Thu, 07 Jun 2018 16:56:14 -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.17.0.582.gccdcbd54c4