DPDK patches and discussions
 help / color / mirror / Atom feed
From: Fiona Trahe <fiona.trahe@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v9 5/5] mbuf_offload: remove library
Date: Thu, 10 Mar 2016 15:41:13 +0000	[thread overview]
Message-ID: <1457624473-11138-6-git-send-email-fiona.trahe@intel.com> (raw)
In-Reply-To: <1457617381-8296-1-git-send-email-fiona.trahe@intel.com>

From: Declan Doherty <declan.doherty@intel.com>

As cryptodev library does not depend on mbuf_offload library
any longer, this patch removes it.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
---
 MAINTAINERS                                        |   4 -
 app/test/test_cryptodev.c                          |   1 -
 app/test/test_cryptodev_perf.c                     |   1 -
 config/common_base                                 |   7 -
 doc/api/doxy-api-index.md                          |   1 -
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c         |   1 -
 drivers/crypto/qat/qat_crypto.c                    |   1 -
 examples/l2fwd-crypto/main.c                       |   1 -
 lib/Makefile                                       |   1 -
 lib/librte_mbuf/rte_mbuf.h                         |   6 -
 lib/librte_mbuf_offload/Makefile                   |  52 ----
 lib/librte_mbuf_offload/rte_mbuf_offload.c         | 100 -------
 lib/librte_mbuf_offload/rte_mbuf_offload.h         | 310 ---------------------
 .../rte_mbuf_offload_version.map                   |   7 -
 14 files changed, 493 deletions(-)
 delete mode 100644 lib/librte_mbuf_offload/Makefile
 delete mode 100644 lib/librte_mbuf_offload/rte_mbuf_offload.c
 delete mode 100644 lib/librte_mbuf_offload/rte_mbuf_offload.h
 delete mode 100644 lib/librte_mbuf_offload/rte_mbuf_offload_version.map

diff --git a/MAINTAINERS b/MAINTAINERS
index e253bf7..421c317 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -223,10 +223,6 @@ F: lib/librte_mbuf/
 F: doc/guides/prog_guide/mbuf_lib.rst
 F: app/test/test_mbuf.c
 
-Packet buffer offload - EXPERIMENTAL
-M: Declan Doherty <declan.doherty@intel.com>
-F: lib/librte_mbuf_offload/
-
 Ethernet API
 M: Thomas Monjalon <thomas.monjalon@6wind.com>
 F: lib/librte_ether/
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 55367df..3240ecd 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -35,7 +35,6 @@
 #include <rte_mbuf.h>
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
-#include <rte_mbuf_offload.h>
 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
diff --git a/app/test/test_cryptodev_perf.c b/app/test/test_cryptodev_perf.c
index b43f9aa..b3f4fd9 100644
--- a/app/test/test_cryptodev_perf.c
+++ b/app/test/test_cryptodev_perf.c
@@ -32,7 +32,6 @@
 
 #include <rte_common.h>
 #include <rte_mbuf.h>
-#include <rte_mbuf_offload.h>
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
 
diff --git a/config/common_base b/config/common_base
index c73f71a..0a02924 100644
--- a/config/common_base
+++ b/config/common_base
@@ -361,13 +361,6 @@ CONFIG_RTE_MBUF_REFCNT_ATOMIC=y
 CONFIG_RTE_PKTMBUF_HEADROOM=128
 
 #
-# Compile librte_mbuf_offload
-# EXPERIMENTAL: API may change without prior notice
-#
-CONFIG_RTE_LIBRTE_MBUF_OFFLOAD=y
-CONFIG_RTE_LIBRTE_MBUF_OFFLOAD_DEBUG=n
-
-#
 # Compile librte_timer
 #
 CONFIG_RTE_LIBRTE_TIMER=y
diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md
index 7a91001..f626386 100644
--- a/doc/api/doxy-api-index.md
+++ b/doc/api/doxy-api-index.md
@@ -104,7 +104,6 @@ There are many libraries, so their headers may be grouped by topics:
 
 - **containers**:
   [mbuf]               (@ref rte_mbuf.h),
-  [mbuf_offload]       (@ref rte_mbuf_offload.h),
   [ring]               (@ref rte_ring.h),
   [distributor]        (@ref rte_distributor.h),
   [reorder]            (@ref rte_reorder.h),
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index f28b29f..9599cc4 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -37,7 +37,6 @@
 #include <rte_dev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
-#include <rte_mbuf_offload.h>
 
 #include "rte_aesni_mb_pmd_private.h"
 
diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c
index 11f7fb2..3533f37 100644
--- a/drivers/crypto/qat/qat_crypto.c
+++ b/drivers/crypto/qat/qat_crypto.c
@@ -59,7 +59,6 @@
 #include <rte_mbuf.h>
 #include <rte_string_fns.h>
 #include <rte_spinlock.h>
-#include <rte_mbuf_offload.h>
 #include <rte_hexdump.h>
 
 #include "qat_logs.h"
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 6aaa7c0..65e90b5 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -62,7 +62,6 @@
 #include <rte_log.h>
 #include <rte_malloc.h>
 #include <rte_mbuf.h>
-#include <rte_mbuf_offload.h>
 #include <rte_memcpy.h>
 #include <rte_memory.h>
 #include <rte_mempool.h>
diff --git a/lib/Makefile b/lib/Makefile
index 6840f87..f254dba 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -36,7 +36,6 @@ DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_eal
 DIRS-$(CONFIG_RTE_LIBRTE_RING) += librte_ring
 DIRS-$(CONFIG_RTE_LIBRTE_MEMPOOL) += librte_mempool
 DIRS-$(CONFIG_RTE_LIBRTE_MBUF) += librte_mbuf
-DIRS-$(CONFIG_RTE_LIBRTE_MBUF_OFFLOAD) += librte_mbuf_offload
 DIRS-$(CONFIG_RTE_LIBRTE_TIMER) += librte_timer
 DIRS-$(CONFIG_RTE_LIBRTE_CFGFILE) += librte_cfgfile
 DIRS-$(CONFIG_RTE_LIBRTE_CMDLINE) += librte_cmdline
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index e39ad28..52f96c3 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -728,9 +728,6 @@ typedef uint8_t  MARKER8[0];  /**< generic marker with 1B alignment */
 typedef uint64_t MARKER64[0]; /**< marker that allows us to overwrite 8 bytes
                                * with a single assignment */
 
-/** Opaque rte_mbuf_offload  structure declarations */
-struct rte_mbuf_offload;
-
 /**
  * The generic rte_mbuf, containing a packet mbuf.
  */
@@ -847,9 +844,6 @@ struct rte_mbuf {
 
 	/** Timesync flags for use with IEEE1588. */
 	uint16_t timesync;
-
-	/* Chain of off-load operations to perform on mbuf */
-	struct rte_mbuf_offload *offload_ops;
 } __rte_cache_aligned;
 
 static inline uint16_t rte_pktmbuf_priv_size(struct rte_mempool *mp);
diff --git a/lib/librte_mbuf_offload/Makefile b/lib/librte_mbuf_offload/Makefile
deleted file mode 100644
index acdb449..0000000
--- a/lib/librte_mbuf_offload/Makefile
+++ /dev/null
@@ -1,52 +0,0 @@
-#   BSD LICENSE
-#
-#   Copyright(c) 2015 Intel Corporation. All rights reserved.
-#
-#   Redistribution and use in source and binary forms, with or without
-#   modification, are permitted provided that the following conditions
-#   are met:
-#
-#     * Redistributions of source code must retain the above copyright
-#       notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above copyright
-#       notice, this list of conditions and the following disclaimer in
-#       the documentation and/or other materials provided with the
-#       distribution.
-#     * Neither the name of Intel Corporation nor the names of its
-#       contributors may be used to endorse or promote products derived
-#       from this software without specific prior written permission.
-#
-#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-include $(RTE_SDK)/mk/rte.vars.mk
-
-# library name
-LIB = librte_mbuf_offload.a
-
-CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
-
-EXPORT_MAP := rte_mbuf_offload_version.map
-
-LIBABIVER := 1
-
-# all source are stored in SRCS-y
-SRCS-$(CONFIG_RTE_LIBRTE_MBUF_OFFLOAD) := rte_mbuf_offload.c
-
-# install includes
-SYMLINK-$(CONFIG_RTE_LIBRTE_MBUF_OFFLOAD)-include := rte_mbuf_offload.h
-
-# this lib needs eal
-DEPDIRS-$(CONFIG_RTE_LIBRTE_MBUF_OFFLOAD) += lib/librte_mbuf
-DEPDIRS-$(CONFIG_RTE_LIBRTE_MBUF_OFFLOAD) += lib/librte_cryptodev
-
-include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/lib/librte_mbuf_offload/rte_mbuf_offload.c b/lib/librte_mbuf_offload/rte_mbuf_offload.c
deleted file mode 100644
index 5c0c9dd..0000000
--- a/lib/librte_mbuf_offload/rte_mbuf_offload.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2015 Intel Corporation. All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of Intel Corporation nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <string.h>
-#include <rte_common.h>
-
-#include "rte_mbuf_offload.h"
-
-/** Initialize rte_mbuf_offload structure */
-static void
-rte_pktmbuf_offload_init(struct rte_mempool *mp,
-		__rte_unused void *opaque_arg,
-		void *_op_data,
-		__rte_unused unsigned i)
-{
-	struct rte_mbuf_offload *ol = _op_data;
-
-	memset(_op_data, 0, mp->elt_size);
-
-	ol->type = RTE_PKTMBUF_OL_NOT_SPECIFIED;
-	ol->mp = mp;
-}
-
-
-struct rte_mempool *
-rte_pktmbuf_offload_pool_create(const char *name, unsigned size,
-		unsigned cache_size, uint16_t priv_size, int socket_id)
-{
-	struct rte_pktmbuf_offload_pool_private *priv;
-	unsigned elt_size = sizeof(struct rte_mbuf_offload) + priv_size;
-
-
-	/* lookup mempool in case already allocated */
-	struct rte_mempool *mp = rte_mempool_lookup(name);
-
-	if (mp != NULL) {
-		priv = (struct rte_pktmbuf_offload_pool_private *)
-				rte_mempool_get_priv(mp);
-
-		if (priv->offload_priv_size <  priv_size ||
-				mp->elt_size != elt_size ||
-				mp->cache_size < cache_size ||
-				mp->size < size) {
-			mp = NULL;
-			return NULL;
-		}
-		return mp;
-	}
-
-	mp = rte_mempool_create(
-			name,
-			size,
-			elt_size,
-			cache_size,
-			sizeof(struct rte_pktmbuf_offload_pool_private),
-			NULL,
-			NULL,
-			rte_pktmbuf_offload_init,
-			NULL,
-			socket_id,
-			0);
-
-	if (mp == NULL)
-		return NULL;
-
-	priv = (struct rte_pktmbuf_offload_pool_private *)
-			rte_mempool_get_priv(mp);
-
-	priv->offload_priv_size = priv_size;
-	return mp;
-}
diff --git a/lib/librte_mbuf_offload/rte_mbuf_offload.h b/lib/librte_mbuf_offload/rte_mbuf_offload.h
deleted file mode 100644
index 5ce6058..0000000
--- a/lib/librte_mbuf_offload/rte_mbuf_offload.h
+++ /dev/null
@@ -1,310 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2015-2016 Intel Corporation. All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of Intel Corporation nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _RTE_MBUF_OFFLOAD_H_
-#define _RTE_MBUF_OFFLOAD_H_
-
-/**
- * @file
- * RTE mbuf offload
- *
- * The rte_mbuf_offload library provides the ability to specify a device generic
- * off-load operation independent of the current Rx/Tx Ethernet offloads
- * supported within the rte_mbuf structure, and add supports for multiple
- * off-load operations and offload device types.
- *
- * The rte_mbuf_offload specifies the particular off-load operation type, such
- * as a crypto operation, and provides a container for the operations
- * parameter's inside the op union. These parameters are then used by the
- * device which supports that operation to perform the specified offload.
- *
- * This library provides an API to create pre-allocated mempool of offload
- * operations, with supporting allocate and free functions. It also provides
- * APIs for attaching an offload to a mbuf, as well as an API to retrieve a
- * specified offload type from an mbuf offload chain.
- *
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- */
-
-#include <rte_mbuf.h>
-#include <rte_crypto.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** packet mbuf offload operation types */
-enum rte_mbuf_ol_op_type {
-	RTE_PKTMBUF_OL_NOT_SPECIFIED = 0,
-	/**< Off-load not specified */
-	RTE_PKTMBUF_OL_CRYPTO_SYM
-	/**< Crypto offload operation */
-};
-
-/**
- * Generic packet mbuf offload
- * This is used to specify a offload operation to be performed on a rte_mbuf.
- * Multiple offload operations can be chained to the same mbuf, but only a
- * single offload operation of a particular type can be in the chain
- */
-struct rte_mbuf_offload {
-	struct rte_mbuf_offload *next;	/**< next offload in chain */
-	struct rte_mbuf *m;		/**< mbuf offload is attached to */
-	struct rte_mempool *mp;		/**< mempool offload allocated from */
-
-	enum rte_mbuf_ol_op_type type;	/**< offload type */
-	union {
-		struct rte_crypto_sym_op crypto;	/**< Crypto operation */
-	} op;
-};
-
-/**< private data structure belonging to packet mbug offload mempool */
-struct rte_pktmbuf_offload_pool_private {
-	uint16_t offload_priv_size;
-	/**< Size of private area in each mbuf_offload. */
-};
-
-
-/**
- * Creates a mempool of rte_mbuf_offload objects
- *
- * EXPERIMENTAL: this API file may change without prior notice
- *
- * @param	name		mempool name
- * @param	size		number of objects in mempool
- * @param	cache_size	cache size of objects for each core
- * @param	priv_size	size of private data to be allocated with each
- *				rte_mbuf_offload object
- * @param	socket_id	Socket on which to allocate mempool objects
- *
- * @return
- * - On success returns a valid mempool of rte_mbuf_offload objects
- * - On failure return NULL
- */
-extern struct rte_mempool *
-rte_pktmbuf_offload_pool_create(const char *name, unsigned size,
-		unsigned cache_size, uint16_t priv_size, int socket_id);
-
-
-/**
- * Returns private data size allocated with each rte_mbuf_offload object by
- * the mempool
- *
- * @param	mpool	rte_mbuf_offload mempool
- *
- * @return	private data size
- */
-static inline uint16_t
-__rte_pktmbuf_offload_priv_size(struct rte_mempool *mpool)
-{
-	struct rte_pktmbuf_offload_pool_private *priv =
-		(struct rte_pktmbuf_offload_pool_private *)rte_mempool_get_priv(mpool);
-
-	return priv->offload_priv_size;
-}
-
-/**
- * Get specified off-load operation type from mbuf.
- *
- * @param	m		packet mbuf.
- * @param	type		offload operation type requested.
- *
- * @return
- * - On success retruns rte_mbuf_offload pointer
- * - On failure returns NULL
- *
- */
-static inline struct rte_mbuf_offload *
-rte_pktmbuf_offload_get(struct rte_mbuf *m, enum rte_mbuf_ol_op_type type)
-{
-	struct rte_mbuf_offload *ol;
-
-	for (ol = m->offload_ops; ol != NULL; ol = ol->next)
-		if (ol->type == type)
-			return ol;
-
-	return ol;
-}
-
-/**
- * Attach a rte_mbuf_offload to a mbuf. We only support a single offload of any
- * one type in our chain of offloads.
- *
- * @param	m	packet mbuf.
- * @param	ol	rte_mbuf_offload strucutre to be attached
- *
- * @returns
- * - On success returns the pointer to the offload we just added
- * - On failure returns NULL
- */
-static inline struct rte_mbuf_offload *
-rte_pktmbuf_offload_attach(struct rte_mbuf *m, struct rte_mbuf_offload *ol)
-{
-	struct rte_mbuf_offload **ol_last;
-
-	for (ol_last = &m->offload_ops;	ol_last[0] != NULL;
-			ol_last = &ol_last[0]->next)
-		if (ol_last[0]->type == ol->type)
-			return NULL;
-
-	ol_last[0] = ol;
-	ol_last[0]->m = m;
-	ol_last[0]->next = NULL;
-
-	return ol_last[0];
-}
-
-
-/** Rearms rte_mbuf_offload default parameters */
-static inline void
-__rte_pktmbuf_offload_reset(struct rte_mbuf_offload *ol,
-		enum rte_mbuf_ol_op_type type)
-{
-	ol->m = NULL;
-	ol->type = type;
-
-	switch (type) {
-	case RTE_PKTMBUF_OL_CRYPTO_SYM:
-		__rte_crypto_sym_op_reset(&ol->op.crypto); break;
-	default:
-		break;
-	}
-}
-
-/** Allocate rte_mbuf_offload from mempool */
-static inline struct rte_mbuf_offload *
-__rte_pktmbuf_offload_raw_alloc(struct rte_mempool *mp)
-{
-	void *buf = NULL;
-
-	if (rte_mempool_get(mp, &buf) < 0)
-		return NULL;
-
-	return (struct rte_mbuf_offload *)buf;
-}
-
-/**
- * Allocate a rte_mbuf_offload with a specified operation type from
- * rte_mbuf_offload mempool
- *
- * @param	mpool		rte_mbuf_offload mempool
- * @param	type		offload operation type
- *
- * @returns
- * - On success returns a valid rte_mbuf_offload structure
- * - On failure returns NULL
- */
-static inline struct rte_mbuf_offload *
-rte_pktmbuf_offload_alloc(struct rte_mempool *mpool,
-		enum rte_mbuf_ol_op_type type)
-{
-	struct rte_mbuf_offload *ol = __rte_pktmbuf_offload_raw_alloc(mpool);
-
-	if (ol != NULL)
-		__rte_pktmbuf_offload_reset(ol, type);
-
-	return ol;
-}
-
-/**
- * free rte_mbuf_offload structure
- */
-static inline void
-rte_pktmbuf_offload_free(struct rte_mbuf_offload *ol)
-{
-	if (ol != NULL && ol->mp != NULL)
-		rte_mempool_put(ol->mp, ol);
-}
-
-/**
- * Checks if the private data of a rte_mbuf_offload has enough capacity for
- * requested size
- *
- * @returns
- * - if sufficient space available returns pointer to start of private data
- * - if insufficient space returns NULL
- */
-static inline void *
-__rte_pktmbuf_offload_check_priv_data_size(struct rte_mbuf_offload *ol,
-		uint16_t size)
-{
-	uint16_t priv_size;
-
-	if (likely(ol->mp != NULL)) {
-		priv_size = __rte_pktmbuf_offload_priv_size(ol->mp);
-
-		if (likely(priv_size >= size))
-			return (void *)(ol + 1);
-	}
-	return NULL;
-}
-
-/**
- * Allocate space for crypto xforms in the private data space of the
- * rte_mbuf_offload. This also defaults the crypto xform type and configures
- * the chaining of the xform in the crypto operation
- *
- * @return
- * - On success returns pointer to first crypto xform in crypto operations chain
- * - On failure returns NULL
- */
-static inline struct rte_crypto_sym_xform *
-rte_pktmbuf_offload_alloc_crypto_sym_xforms(struct rte_mbuf_offload *ol,
-		unsigned nb_xforms)
-{
-	struct rte_crypto_sym_xform *xform;
-	void *priv_data;
-	uint16_t size;
-
-	size = sizeof(struct rte_crypto_sym_xform) * nb_xforms;
-	priv_data = __rte_pktmbuf_offload_check_priv_data_size(ol, size);
-
-	if (priv_data == NULL)
-		return NULL;
-
-	ol->op.crypto.xform = xform = (struct rte_crypto_sym_xform *)priv_data;
-
-	do {
-		xform->type = RTE_CRYPTO_SYM_XFORM_NOT_SPECIFIED;
-		xform = xform->next = --nb_xforms > 0 ? xform + 1 : NULL;
-	} while (xform);
-
-	return ol->op.crypto.xform;
-}
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _RTE_MBUF_OFFLOAD_H_ */
diff --git a/lib/librte_mbuf_offload/rte_mbuf_offload_version.map b/lib/librte_mbuf_offload/rte_mbuf_offload_version.map
deleted file mode 100644
index 3d3b06a..0000000
--- a/lib/librte_mbuf_offload/rte_mbuf_offload_version.map
+++ /dev/null
@@ -1,7 +0,0 @@
-DPDK_2.2 {
-	global:
-
-	rte_pktmbuf_offload_pool_create;
-
-	local: *;
-};
-- 
2.5.0

  parent reply	other threads:[~2016-03-10 15:51 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-30 13:07 [dpdk-dev] [PATCH] cryptodev: API change to rte_crypto_op bursts Declan Doherty
2016-02-08 17:50 ` Trahe, Fiona
2016-02-19 11:01 ` [dpdk-dev] [PATCH v2 0/2] cryptodev API changes Declan Doherty
2016-02-19 11:01   ` [dpdk-dev] [PATCH v2 1/2] cryptodev: API tidy and changes to support future extensions Declan Doherty
2016-02-19 11:01   ` [dpdk-dev] [PATCH v2 2/2] cryptodev: change burst API to be crypto op oriented Declan Doherty
2016-02-22 11:17     ` Trahe, Fiona
2016-02-22 18:23     ` Trahe, Fiona
2016-02-22 18:56     ` Trahe, Fiona
2016-02-26 17:30   ` [dpdk-dev] [PATCH v3 0/2] cryptodev API changes Declan Doherty
2016-02-26 17:30     ` [dpdk-dev] [PATCH v3 1/2] cryptodev: API tidy and changes to support future extensions Declan Doherty
2016-02-26 17:30     ` [dpdk-dev] [PATCH v3 2/2] cryptodev: change burst API to be crypto op oriented Declan Doherty
2016-02-29 16:00     ` [dpdk-dev] [PATCH v3 0/2] cryptodev API changes Declan Doherty
2016-02-29 16:52     ` [dpdk-dev] [PATCH v4 " Declan Doherty
2016-02-29 16:52       ` [dpdk-dev] [PATCH v4 1/2] cryptodev: API tidy and changes to support future extensions Declan Doherty
2016-03-04 14:43         ` Thomas Monjalon
2016-02-29 16:52       ` [dpdk-dev] [PATCH v4 2/2] cryptodev: change burst API to be crypto op oriented Declan Doherty
2016-02-29 17:47       ` [dpdk-dev] [PATCH v4 0/2] cryptodev API changes Trahe, Fiona
2016-03-04 17:17       ` [dpdk-dev] [PATCH v5 " Fiona Trahe
2016-03-04 17:38         ` Thomas Monjalon
2016-03-04 17:43           ` Trahe, Fiona
2016-03-04 17:45             ` Thomas Monjalon
2016-03-04 18:01               ` Trahe, Fiona
2016-03-04 17:39         ` Trahe, Fiona
2016-03-15  6:48         ` Cao, Min
2016-03-04 17:17       ` [dpdk-dev] [PATCH v5 1/2] This patch splits symmetric specific definitions and functions away from the common crypto APIs to facilitate the future extension and expansion of the cryptodev framework, in order to allow asymmetric crypto operations to be introduced at a later date, as well as to clean the logical structure of the public includes. The patch also introduces the _sym prefix to symmetric specific structure and functions to improve clarity in the API Fiona Trahe
2016-03-04 17:17       ` [dpdk-dev] [PATCH v5 2/2] This patch modifies the crypto burst enqueue/dequeue APIs to operate on bursts rte_crypto_op's rather than the current implementation which operates on rte_mbuf bursts, this simplifies the burst processing in the crypto PMDs and the use of crypto operations in general Fiona Trahe
2016-03-04 18:29       ` [dpdk-dev] [PATCH v6 0/2] cryptodev API changes Fiona Trahe
2016-03-07 11:50         ` [dpdk-dev] [PATCH v7 " Fiona Trahe
2016-03-07 13:23           ` De Lara Guarch, Pablo
2016-03-07 13:53           ` Jain, Deepak K
2016-03-10 13:42           ` [dpdk-dev] [PATCH v8 0/5] " Fiona Trahe
2016-03-10 14:05             ` De Lara Guarch, Pablo
2016-03-10 15:41             ` [dpdk-dev] [PATCH v9 " Fiona Trahe
2016-03-10 16:14               ` Thomas Monjalon
2016-03-10 15:41             ` [dpdk-dev] [PATCH v9 1/5] cryptodev: code cleanup Fiona Trahe
2016-03-10 15:41             ` [dpdk-dev] [PATCH v9 2/5] cryptodev: refactor to partition common from symmetric-specific code Fiona Trahe
2016-03-10 15:41             ` [dpdk-dev] [PATCH v9 3/5] cryptodev: remove unused phys_addr field from key Fiona Trahe
2016-03-10 15:41             ` [dpdk-dev] [PATCH v9 4/5] cryptodev: change burst API to be crypto op oriented Fiona Trahe
2016-03-10 16:03               ` Thomas Monjalon
2016-03-10 16:13                 ` Trahe, Fiona
2016-03-10 15:41             ` Fiona Trahe [this message]
2016-03-14  8:59             ` [dpdk-dev] [PATCH v8 0/5] cryptodev API changes Cao, Min
2016-03-10 13:42           ` [dpdk-dev] [PATCH v8 1/5] cryptodev: code cleanup Fiona Trahe
2016-03-10 13:42           ` [dpdk-dev] [PATCH v8 2/5] cryptodev: refactor to partition common from symmetric-specific code Fiona Trahe
2016-03-10 13:42           ` [dpdk-dev] [PATCH v8 3/5] cryptodev: remove unused phys_addr field from key Fiona Trahe
2016-03-10 13:43           ` [dpdk-dev] [PATCH v8 4/5] cryptodev: change burst API to be crypto op oriented Fiona Trahe
2016-03-10 14:03             ` Thomas Monjalon
2016-03-10 13:43           ` [dpdk-dev] [PATCH v8 5/5] mbuf_offload: remove library Fiona Trahe
2016-03-15  5:21           ` [dpdk-dev] [PATCH v7 0/2] cryptodev API changes Cao, Min
2016-03-07 11:50         ` [dpdk-dev] [PATCH v7 1/2] cryptodev: API tidy and changes to support future extensions Fiona Trahe
2016-03-08 14:10           ` Thomas Monjalon
2016-03-10 10:30             ` Trahe, Fiona
2016-03-07 11:50         ` [dpdk-dev] [PATCH v7 2/2] cryptodev: change burst API to be crypto op oriented Fiona Trahe
2016-03-08 14:32           ` Thomas Monjalon
2016-03-09 12:55             ` Trahe, Fiona
2016-03-10 10:28               ` Trahe, Fiona
2016-03-15  6:46         ` [dpdk-dev] [PATCH v6 0/2] cryptodev API changes Cao, Min
2016-03-04 18:29       ` [dpdk-dev] [PATCH v6 1/2] cryptodev: API tidy and changes to support future extensions Fiona Trahe
2016-03-04 18:29       ` [dpdk-dev] [PATCH v6 2/2] cryptodev: change burst API to be crypto op oriented Fiona Trahe
2016-03-15  6:57       ` [dpdk-dev] [PATCH v4 0/2] cryptodev API changes Cao, Min
2016-03-15  7:07     ` [dpdk-dev] [PATCH v3 " Cao, Min
2016-03-15  7:48   ` [dpdk-dev] [PATCH v2 " Cao, Min

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1457624473-11138-6-git-send-email-fiona.trahe@intel.com \
    --to=fiona.trahe@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).