summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Gora <dg@adax.com>2018-06-18 16:37:33 -0700
committerThomas Monjalon <thomas@monjalon.net>2018-07-13 23:14:41 +0200
commit9f976204f5da713375f39ad7be272937d8520973 (patch)
treeee0c46afd47a83a21c5bcb1149bd3649d7179efe /lib
parentb1d295e69e75eefaf5aaa8cef0808e36f5b0817e (diff)
downloaddpdk-9f976204f5da713375f39ad7be272937d8520973.zip
dpdk-9f976204f5da713375f39ad7be272937d8520973.tar.gz
dpdk-9f976204f5da713375f39ad7be272937d8520973.tar.xz
vhost/crypto: use function to access mbuf private area
Use rte_mbuf_to_priv() to access the private data area in the mbuf. Signed-off-by: Dan Gora <dg@adax.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/librte_vhost/vhost_crypto.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
index f165073..57341ef 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;