From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot0-f180.google.com (mail-ot0-f180.google.com [74.125.82.180]) by dpdk.org (Postfix) with ESMTP id 27E512BC8 for ; Tue, 19 Jun 2018 01:38:18 +0200 (CEST) Received: by mail-ot0-f180.google.com with SMTP id p95-v6so20525728ota.5 for ; Mon, 18 Jun 2018 16:38:18 -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=BUhEOwLgjfRMpf+njvWp58aq/HcvwCcisqjcvaosEl4=; b=cXfVqKlzL1vgmDF4BBsbcB+Vi0yUYN67WiFoPmO8e9xUdQEhLxHMisLBEKo9fUH7Ie BSuamjMOzZZvp/TZIuaAyeT1YB2jNKs4ltWH2yC2AynP0lGrfW5kS+814unsuRs2YE8i Y2PyVyf4bilFyXp+fAHc8qBS7ugwWv+4lOjMOQSB/KZjOIGleLMPa0iHSya0GSh/owuv ucRL30EBoISnWswAOK3oDyKQ0a3k1oGVWuBrbfaJj5/YNei069+vzQ2NzQZz8PT5xt6H HD2XKLczrHYQUFa2p3oxNpnkZXT+5vcjVkmxaCe4AyjCHxsRl5ZcEtyTunwoTwkqywsR kJHQ== 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=BUhEOwLgjfRMpf+njvWp58aq/HcvwCcisqjcvaosEl4=; b=DFz/FnB1gI9U1N+RNgzTasUyreV6zYq0a2L2NHWyc/Fn5ZcKxA9yU3qsFZ9H09YanH IudzCZh4Y2/vsHPc1j2csV2isTvqytJ970a+E7upcRAL93JkDQa6IkIibtzQ+2B29cfF Jj1RvNiWntfF22vmcP4IOhwwuTBXpKtepWEFnSyP+OMqK0G1O2r+YTbsfcCPgM+cZ+lp 1vJueXzrZY2OuYZRGLAeVrHou/XRxRBZWZiImurzMtVxCPjhwhjPjoZlFpRxVharXxZE XwMqQ4mTwzTO3wTasJ69nGRSW9pciMGX8MLxJknrqe614HsZ3UOGHNb1fIzRugmYQ58p yS4A== X-Gm-Message-State: APt69E1Uam8dZy9lGzyzRazZYYHHu3l0T9XMY20U6c+VYdt5aadkkH6U b++WEbbCpQjqPq4jt/dUuRvtcw== X-Google-Smtp-Source: ADUXVKI9ra1lKQXiO+bBjLTrpJ+3bXzHDUw6Y+smlcH/DzF2w8zn5zssLEd7VSifbwNQ2fT9sWEtgw== X-Received: by 2002:a9d:3684:: with SMTP id h4-v6mr9620004otc.186.1529365097178; Mon, 18 Jun 2018 16:38:17 -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 t4-v6sm16343493otd.40.2018.06.18.16.38.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Jun 2018 16:38:16 -0700 (PDT) Sender: Dan Gora From: Dan Gora To: dev@dpdk.org Cc: Dan Gora , Maxime Coquelin Date: Mon, 18 Jun 2018 16:37:33 -0700 Message-Id: <20180618233733.22353-1-dg@adax.com> X-Mailer: git-send-email 2.18.0.rc1.1.g6f333ff2f Subject: [dpdk-dev] [PATCH v2 4/4] vhost/crypto: use rte 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: , X-List-Received-Date: Mon, 18 Jun 2018 23:38:18 -0000 Use rte_mbuf_to_priv() to access the private data area in the mbuf. Signed-off-by: Dan Gora --- lib/librte_vhost/vhost_crypto.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c index f1650738a..57341ef8f 100644 --- a/lib/librte_vhost/vhost_crypto.c +++ b/lib/librte_vhost/vhost_crypto.c @@ -940,8 +940,7 @@ vhost_crypto_process_one_req(struct vhost_crypto *vcrypto, struct vhost_virtqueue *vq, struct rte_crypto_op *op, struct vring_desc *head, uint16_t desc_idx) { - struct vhost_crypto_data_req *vc_req = RTE_PTR_ADD(op->sym->m_src, - sizeof(struct rte_mbuf)); + struct vhost_crypto_data_req *vc_req = rte_mbuf_to_priv(op->sym->m_src); struct rte_cryptodev_sym_session *session; struct virtio_crypto_op_data_req *req, tmp_req; struct virtio_crypto_inhdr *inhdr; @@ -1062,8 +1061,7 @@ vhost_crypto_finalize_one_request(struct rte_crypto_op *op, { struct rte_mbuf *m_src = op->sym->m_src; struct rte_mbuf *m_dst = op->sym->m_dst; - struct vhost_crypto_data_req *vc_req = RTE_PTR_ADD(m_src, - sizeof(struct rte_mbuf)); + struct vhost_crypto_data_req *vc_req = rte_mbuf_to_priv(m_src); uint16_t desc_idx; int ret = 0; -- 2.18.0.rc1.1.g6f333ff2f