From patchwork Mon Jun 18 23:36:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Gora X-Patchwork-Id: 41241 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5126A2BC8; Tue, 19 Jun 2018 01:37:04 +0200 (CEST) Received: from mail-ot0-f196.google.com (mail-ot0-f196.google.com [74.125.82.196]) by dpdk.org (Postfix) with ESMTP id 99DEE2AA0 for ; Tue, 19 Jun 2018 01:37:03 +0200 (CEST) Received: by mail-ot0-f196.google.com with SMTP id r18-v6so20539016otk.1 for ; Mon, 18 Jun 2018 16:37:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=MLOEPMVjAQWc+vC193wdKLeM6qwZesqTI9YZSiF/Ncs=; b=eKPtCl0zy6Mkchuo23hVUaKc6wDmNRHOP/9Ofja9Rx86Jirl90VWY4RTOpJbKY68xF I17XlO5ibQkbnY7EO9G0fvDAToZm7TFmzMsfvCyzac+upVcOVQltbNdzHYShAw3ZTHQ0 eVEqc+0/Pxlq8SjBVOQBiaOeyL7zBLxBPPjXwj9LseDajJiAiaUigShVWt0HLiChvyzo avJe1rlKmeXIukZQkFmjurABqw8apodNFHJ3Up7Hm2zMb7cC3MvLMyyn1jTFSfFvvEAy ZgfvNYg45bC/w2L1D0CaWGe2Cn/rH7hIzavJZkVAJlhByShi1fGs0G9vVo3tKSlB+8Gu 6s5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=MLOEPMVjAQWc+vC193wdKLeM6qwZesqTI9YZSiF/Ncs=; b=VcSBePENaksE8AJkuima4cDLGbJommsdBh5VuKxBHRUlTdt7/hssT2tnT6oRXKvewj TU+FkYlc/OQbTWP0R3VmIDmt4/qRv7uKYXbY9WVQ0MDtGvTSSH3ma8Gk9W7m9NwtMPTA ZqlcNAlKUft0mXT8Nzl02yfyUgRouXFa+icNnk98m0q9poLPLJc4ZCLxBFHdBJfIT2GR XHvp4celzfv7L5Ntb0nmc9S9tXyLTS1PVo5atF6WagRkKagSWrofZKNpv27WrxfgGpoo lDNGLH5F/ckMLwkH7amNxYw6APjOsKpUjWZDSLX8FXpJ/PwvETlfwAM8P5jr7CgsHdoD CiCQ== X-Gm-Message-State: APt69E3ndi04QijCEgyMv0uJBDb5YdLJu5KET9Q80RtihE2LBuNoa0v3 7ESFmAHfYl5qdzcWcDDtvAsu6Q== X-Google-Smtp-Source: ADUXVKIj+psxiNqnXQRvFGib7mEg+G4Ww4ih11KfypF931uNZvEDB89+LgmGqMSZa95ob6wtzz0a5g== X-Received: by 2002:a9d:1904:: with SMTP id j4-v6mr8577027ota.21.1529365022652; Mon, 18 Jun 2018 16:37:02 -0700 (PDT) Received: from linux.adax.com (172-11-198-60.lightspeed.sntcca.sbcglobal.net. [172.11.198.60]) by smtp.gmail.com with ESMTPSA id 2-v6sm6576627oij.11.2018.06.18.16.37.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Jun 2018 16:37:01 -0700 (PDT) From: Dan Gora To: dev@dpdk.org Cc: Dan Gora , Remy Horton , Ori Kam , Bruce Richardson , Pablo de Lara , Radu Nicolau , Akhil Goyal , Tomasz Kantecki Date: Mon, 18 Jun 2018 16:36:56 -0700 Message-Id: <20180618233656.22008-1-dg@adax.com> X-Mailer: git-send-email 2.18.0.rc1.1.g6f333ff2f Subject: [dpdk-dev] [PATCH v2 3/4] examples/ipsec-secgw: use ipsec fcn to access private area X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In inbound_sa_check(), use the application's get_priv() function to access the private area in the mbuf. Signed-off-by: Dan Gora --- examples/ipsec-secgw/sa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c index d9dcc0e06..4ab8e098a 100644 --- a/examples/ipsec-secgw/sa.c +++ b/examples/ipsec-secgw/sa.c @@ -939,7 +939,7 @@ inbound_sa_check(struct sa_ctx *sa_ctx, struct rte_mbuf *m, uint32_t sa_idx) { struct ipsec_mbuf_metadata *priv; - priv = RTE_PTR_ADD(m, sizeof(struct rte_mbuf)); + priv = get_priv(m); return (sa_ctx->sa[sa_idx].spi == priv->sa->spi); }