aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.vppodp112
-rw-r--r--odp/odp-dpdk/0001-linux-dpdk-pool-Return-address-range-in-pool-info.patch42
-rw-r--r--odp/odp-dpdk/0002-linux-dpdk-crypto-Change-queue-amount.patch43
-rw-r--r--odp/odp-dpdk/0003-Changed-the-digest-size-of-SHA256_HMAC.patch35
-rw-r--r--odp/odp-dpdk/0004-HACK-enable-inline-for-odp-dpdk.patch61
-rw-r--r--odp/odp-linux/0001-linux-generic-pool-Return-address-range-in-pool-info.patch33
-rw-r--r--odp/odp-linux/0002-linux-generic-Place-userdata-before-packet-data.patch153
-rw-r--r--odp/odp-linux/0003-HACK-enable-inline-in-dpdk-pktio.patch59
-rw-r--r--odp/odp-linux/0004-HACK-enable-inline-in-socket-pktio.patch58
9 files changed, 588 insertions, 8 deletions
diff --git a/README.vppodp b/README.vppodp
index ce419463..00f9d546 100644
--- a/README.vppodp
+++ b/README.vppodp
@@ -3,7 +3,9 @@
#Introduction:
--------------
-odp4vpp project aims to provide VPP with an additional vnet device based on OpenDataPlane (ODP is similar yet different from DPDK), with provisions for hardwareacceleration of packet paths. It envisions three deployment scenarios:
+odp4vpp project aims to provide VPP with an additional vnet device based on OpenDataPlane
+(ODP is similar yet different from DPDK), with provisions for hardware acceleration
+of packet paths. It envisions three deployment scenarios:
-Server + NICs
-Systems on a Chip
@@ -11,35 +13,106 @@ odp4vpp project aims to provide VPP with an additional vnet device based on Open
#Build Procedure:
----------------
-The source code add support to build VPP with odp-dpdk implementation.
+The source code add support to build VPP with either odp-dpdk or modified odp-linux.
Generic odp-linux is not supported as it keeps user area outside packet buffer.
VPP requires the user area (used to store vlib_buffer_t) to be located just before packet data.
-Build vpp with odp-dpdk:
+
+1)Build vpp with odp-linux:
+---------------------------
+Build the odp linux package by compiling odp from odp git repository:
+
+git clone https://git.linaro.org/lng/odp.git
+
+This release was tested with v1.17.0.0 version and with three additional patches.
+Patches can be found in odp/odp-linux directory:
+0001-linux-generic-pool-Return-address-range-in-pool-info.patch
+0002-linux-generic-Place-userdata-before-packet-data.patch
+
+If ODP IPsec will be tested in inline mode, using dpdk/socket pktio respectively
+0003-inline-HACK-in-dpdk-pktio.patch
+0004-inline-HACK-in-socket-pktio.patch
+
+
+Follow the README steps for complete build.
+
+- default pktio
+cd odp
+./bootstrap
+./configure --prefix=<odp-install-path>
+make install
+
+- dpdk pktio
+use scripts/build-pktio-dpdk to compile odp-linux with dpdk pktio
+
+
+Build vpp:
+Follow the README steps for complete build.
+
+Set the environment variables with ODP config:
+export PLATFORM=odp
+export ODP_INST_PATH=<odp-install-path>
+export ODP_PLATFORM_PARAMS="-m 400"
+
+- default pktio
+Adjust odp_odp_libs in build-data/platforms/odp.mk:
+odp_odp_libs = -lodp-linux -lodphelper -lpcap
+
+- dpdk pktio
+export LIBRARY_PATH=<dpdk-install-path>/lib/
+Adjust odp_odp_libs in build-data/platforms/odp.mk:
+odp_odp_libs = -lodp-linux -ldpdk -lodphelper -lpcap
+
+cd vpp
+make install-dep
+make build
+make run
+
+
+2)Build vpp with odp-dpdk:
--------------------------
Build the odp-dpdk package by compiling odp-dpdk from odp-dpdk git repository:
git clone https://git.linaro.org/lng/odp-dpdk.git
-Follow the README.DPDK steps for complete build with dpdk.
+This release was tested on master branch with commit e78e28ea32d5 with three
+additional patches. Patches can be found in odp/odp-dpdk directory:
+0001-linux-dpdk-pool-Return-address-range-in-pool-info.patch
+
+When using odp_crypto based IPsec the fixes below are necessary
+0002-linux-dpdk-crypto-Change-queue-amount.patch
+0003-Changed-the-digest-size-of-SHA256_HMAC.patch
+
+If ODP IPsec will be tested in inline mode, this is also needed
+0004-HACK-enable-inline-for-odp-dpdk.patch
+
+
+Follow the odp-dpdk/README.DPDK steps for complete build with dpdk.
+
+git clone --single-branch --branch=v17.08 http://dpdk.org/git/dpdk
+cd dpdk
+make config T=x86_64-native-linuxapp-gcc O=x86_64-native-linuxapp-gcc
+sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_OPENSSL=).*,\1y,' x86_64-native-linuxapp-gcc/.config
+sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_PCAP=).*,\1y,' x86_64-native-linuxapp-gcc/.config
+make O=x86_64-native-linuxapp-gcc EXTRA_CFLAGS="-fPIC"
cd odp-dpdk
./bootstrap
-./configure --prefix= <odp-dpdk-install-path> --with-sdk-install-path=<dpdk-dir>/x86_64-native-linuxapp-gcc
+./configure --prefix=<odp-dpdk-install-path> --with-dpdk-path=<dpdk-dir>/x86_64-native-linuxapp-gcc
make install
Set the environment variables with ODP config:
export PLATFORM=odp
export ODP_INST_PATH=<odp-dpdk-install-path>
-export ODP_PLATFORM_PARAMS="-m 400" # at least size of memory to allocate need to be specified
+export LIBRARY_PATH=<dpdk-dir>/x86_64-native-linuxapp-gcc/lib/
+export ODP_PLATFORM_PARAMS="-m 400 --vdev crypto_openssl"
-Note : Also check and copy dpdk/odp-dpdk libraries to default /usr/lib path for linking with vpp.
Build vpp:
Follow the README steps for complete build.
-cd vpp
+cd odp4vpp
make install-dep
make build
make run
@@ -148,7 +221,22 @@ odp-0 1 up rx packets
ip4 7
ip6 4
+
+# VPP startup configuration
+---------------------------
+Default configuration of ODP plugin, IPSec nodes and automatic creation of
+interfaces can be specified in startup.conf file.
+More details are in template: src/vpp/conf/startup.conf
+
+To use customized startup configuration:
+copy default config from src/vpp/conf/startup.conf
+add 'interactive' to 'unix' section and remove 'api-segment'
+uncomment and adjust 'odp' section
+export STARTUP_CONF=<path-to-startup.conf>
+
+
# ODP based ipsec nodes
+-----------------------
With the development of the odp4vpp project IPsec nodes have been added,
making use of the ODP APIs. In hope that in the future it will enable
accelerated IPsec tunnels.
@@ -192,3 +280,11 @@ odp {
async
}
+The IPsec inline mode is only supported on the loopback pktio in odp-linux,
+though it has not been tested with this pktio. It has been tested with modified
+versions of dpdk/socket pktio. The last two patches for odp-linux enable
+testing it with dpdk and socket based pktio on odp-linux. The last of the
+odp-dpdk patches enable inline mode in odp-dpdk. Those patches are not needed
+if no IPsec is planed to be ran in inline mode. Also these changes should soon
+be integrated in the odp and odp-dpdk repositories, and then these patches will
+no longer be needed.
diff --git a/odp/odp-dpdk/0001-linux-dpdk-pool-Return-address-range-in-pool-info.patch b/odp/odp-dpdk/0001-linux-dpdk-pool-Return-address-range-in-pool-info.patch
new file mode 100644
index 00000000..9185900e
--- /dev/null
+++ b/odp/odp-dpdk/0001-linux-dpdk-pool-Return-address-range-in-pool-info.patch
@@ -0,0 +1,42 @@
+From 005d463e8c8e7598c17a18985601ac54a99d52c0 Mon Sep 17 00:00:00 2001
+From: Michal Mazur <mkm@semihalf.com>
+Date: Fri, 12 Jan 2018 19:36:58 +0100
+Subject: [PATCH 1/4] linux-dpdk: pool: Return address range in pool info
+
+Implement support in odp_pool_info function to provide
+address range of pool data available for application.
+
+Pull request of related API change:
+https://github.com/Linaro/odp/pull/200
+
+Signed-off-by: Michal Mazur <mkm@semihalf.com>
+---
+ platform/linux-dpdk/odp_pool.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/platform/linux-dpdk/odp_pool.c b/platform/linux-dpdk/odp_pool.c
+index ee4a099..1cb1e12 100644
+--- a/platform/linux-dpdk/odp_pool.c
++++ b/platform/linux-dpdk/odp_pool.c
+@@ -613,6 +613,7 @@ void odp_pool_print(odp_pool_t pool_hdl)
+ int odp_pool_info(odp_pool_t pool_hdl, odp_pool_info_t *info)
+ {
+ pool_t *pool = pool_entry_from_hdl(pool_hdl);
++ struct rte_mempool_memhdr *hdr;
+
+ if (pool == NULL || info == NULL)
+ return -1;
+@@ -623,6 +624,10 @@ int odp_pool_info(odp_pool_t pool_hdl, odp_pool_info_t *info)
+ if (pool->params.type == ODP_POOL_PACKET)
+ info->pkt.max_num = pool->rte_mempool->size;
+
++ hdr = STAILQ_FIRST(&pool->rte_mempool->mem_list);
++ info->min_data_addr = (uint64_t)hdr->addr;
++ info->max_data_addr = (uint64_t)hdr->addr + hdr->len - 1;
++
+ return 0;
+ }
+
+--
+2.7.4
+
diff --git a/odp/odp-dpdk/0002-linux-dpdk-crypto-Change-queue-amount.patch b/odp/odp-dpdk/0002-linux-dpdk-crypto-Change-queue-amount.patch
new file mode 100644
index 00000000..08b77dd0
--- /dev/null
+++ b/odp/odp-dpdk/0002-linux-dpdk-crypto-Change-queue-amount.patch
@@ -0,0 +1,43 @@
+From 255ade1eb70498168b58551fd2fb78634029fdd1 Mon Sep 17 00:00:00 2001
+From: Szymon Sliwa <szs@semihalf.com>
+Date: Tue, 28 Nov 2017 17:51:55 +0100
+Subject: [PATCH 2/4] linux-dpdk: crypto: Change queue amount
+
+Changed the amount of queue pairs created for
+cryptodevs to the maximal possible amount,
+this is a workaround, but enables testing of
+the odp4vpp project.
+
+ODP-DPDK maps cryptodev queue pairs to cores
+by the odp_cpu_id (which is thread id in my
+case). So if ODP-DPDK is started with cpu
+mask 0x1 it should be enough to have 1
+pair of cryptodev queues. Unfortunatelly
+that is not the case - later additional
+threads are spawned using
+odph_odpthreads_create, and ODP-DPDK
+crashes spectacularily trying to access
+the abscent queues. (this commit only
+proposes a workaround)
+---
+ platform/linux-dpdk/odp_crypto.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/platform/linux-dpdk/odp_crypto.c b/platform/linux-dpdk/odp_crypto.c
+index 5ed84bc..1103cdd 100644
+--- a/platform/linux-dpdk/odp_crypto.c
++++ b/platform/linux-dpdk/odp_crypto.c
+@@ -259,9 +259,7 @@ int odp_crypto_init_global(void)
+ struct rte_cryptodev_info dev_info;
+
+ rte_cryptodev_info_get(cdev_id, &dev_info);
+- nb_queue_pairs = odp_cpu_count();
+- if (nb_queue_pairs > dev_info.max_nb_queue_pairs)
+- nb_queue_pairs = dev_info.max_nb_queue_pairs;
++ nb_queue_pairs = dev_info.max_nb_queue_pairs;
+
+ struct rte_cryptodev_qp_conf qp_conf;
+
+--
+2.7.4
+
diff --git a/odp/odp-dpdk/0003-Changed-the-digest-size-of-SHA256_HMAC.patch b/odp/odp-dpdk/0003-Changed-the-digest-size-of-SHA256_HMAC.patch
new file mode 100644
index 00000000..030222f2
--- /dev/null
+++ b/odp/odp-dpdk/0003-Changed-the-digest-size-of-SHA256_HMAC.patch
@@ -0,0 +1,35 @@
+From 39c04a0428bbe1fc9bed14c4d8526a94050b8674 Mon Sep 17 00:00:00 2001
+From: Szymon Sliwa <szs@semihalf.com>
+Date: Wed, 6 Dec 2017 11:35:53 +0100
+Subject: [PATCH 3/4] Changed the digest size of SHA256_HMAC
+
+The change was done to match OpenSSL PMD (from DPDK),
+compatibility list.
+---
+ platform/linux-dpdk/odp_crypto.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/platform/linux-dpdk/odp_crypto.c b/platform/linux-dpdk/odp_crypto.c
+index 1103cdd..9f89f29 100644
+--- a/platform/linux-dpdk/odp_crypto.c
++++ b/platform/linux-dpdk/odp_crypto.c
+@@ -136,12 +136,15 @@ static int auth_alg_odp_to_rte(odp_auth_alg_t auth_alg,
+ auth_xform->auth.digest_length = 12;
+ break;
+ case ODP_AUTH_ALG_SHA256_HMAC:
++ auth_xform->auth.algo = RTE_CRYPTO_AUTH_SHA256_HMAC;
++ auth_xform->auth.digest_length = 32;
++ break;
+ #if ODP_DEPRECATED_API
+ case ODP_AUTH_ALG_SHA256_128:
+-#endif
+ auth_xform->auth.algo = RTE_CRYPTO_AUTH_SHA256_HMAC;
+ auth_xform->auth.digest_length = 16;
+ break;
++#endif
+ case ODP_AUTH_ALG_SHA1_HMAC:
+ auth_xform->auth.algo = RTE_CRYPTO_AUTH_SHA1_HMAC;
+ auth_xform->auth.digest_length = 20;
+--
+2.7.4
+
diff --git a/odp/odp-dpdk/0004-HACK-enable-inline-for-odp-dpdk.patch b/odp/odp-dpdk/0004-HACK-enable-inline-for-odp-dpdk.patch
new file mode 100644
index 00000000..edb4e6b4
--- /dev/null
+++ b/odp/odp-dpdk/0004-HACK-enable-inline-for-odp-dpdk.patch
@@ -0,0 +1,61 @@
+From 2b0840f907a1e69f05a740a13df515dfa80ebf02 Mon Sep 17 00:00:00 2001
+From: Szymon Sliwa <szs@semihalf.com>
+Date: Thu, 22 Feb 2018 14:41:35 +0100
+Subject: [PATCH 4/4] [HACK] enable inline for odp-dpdk
+
+Added simple lines which enable IPsec inline mode
+on RX using socket pktio. The changes are not intended to be
+pushed to main odp repository - these are only minimal changes
+to make use of the functionality.
+
+Signed-off-by: Szymon Sliwa <szs@semihalf.com>
+---
+ platform/linux-dpdk/odp_packet_dpdk.c | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+diff --git a/platform/linux-dpdk/odp_packet_dpdk.c b/platform/linux-dpdk/odp_packet_dpdk.c
+index a660fe3..8e7a2db 100644
+--- a/platform/linux-dpdk/odp_packet_dpdk.c
++++ b/platform/linux-dpdk/odp_packet_dpdk.c
+@@ -30,6 +30,7 @@
+ #include <odp/api/system_info.h>
+ #include <odp_debug_internal.h>
+ #include <odp_classification_internal.h>
++#include <odp_ipsec_internal.h>
+ #include <odp_packet_io_internal.h>
+ #include <odp_packet_dpdk.h>
+ #include <net/if.h>
+@@ -219,6 +220,9 @@ static int setup_pkt_dpdk(odp_pktio_t pktio ODP_UNUSED, pktio_entry_t *pktio_ent
+ pktio_entry->s.capa.max_output_queues = RTE_MIN(dev_info.max_tx_queues,
+ PKTIO_MAX_QUEUES);
+
++ pktio_entry->s.capa.config.inbound_ipsec = 1;
++ pktio_entry->s.capa.config.outbound_ipsec = 1;
++
+ mtu = mtu_get_pkt_dpdk(pktio_entry);
+ if (mtu == 0) {
+ ODP_ERR("Failed to read interface MTU\n");
+@@ -500,6 +504,20 @@ static int recv_pkt_dpdk(pktio_entry_t *pktio_entry, int index,
+ nb_rx = success;
+ }
+
++ /* Try IPsec inline processing */
++ for (i = 0; i < nb_rx; i++) {
++ odp_packet_t pkt = pkt_table[i];
++ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
++
++ packet_parse_layer(pkt_hdr, ODP_PROTO_LAYER_L4);
++
++ //printf("try ipsec\n");
++
++ if(odp_packet_has_ipsec(pkt_table[i]))
++ _odp_ipsec_try_inline(pkt_table[i]);
++
++ }
++
+ return nb_rx;
+ }
+
+--
+2.7.4
+
diff --git a/odp/odp-linux/0001-linux-generic-pool-Return-address-range-in-pool-info.patch b/odp/odp-linux/0001-linux-generic-pool-Return-address-range-in-pool-info.patch
new file mode 100644
index 00000000..6c6ffee9
--- /dev/null
+++ b/odp/odp-linux/0001-linux-generic-pool-Return-address-range-in-pool-info.patch
@@ -0,0 +1,33 @@
+From 4ad1d3be11d5c421567134a53384374a81ad3db4 Mon Sep 17 00:00:00 2001
+From: Michal Mazur <mkm@semihalf.com>
+Date: Wed, 31 Jan 2018 16:32:54 +0100
+Subject: [PATCH 1/4] linux-generic: pool: Return address range in pool info
+
+Implement support in odp_pool_info API to provide address range
+of application accessible pool data (linux-generic platform).
+
+Pull request of API change for reference:
+https://github.com/Linaro/odp/pull/200
+
+Signed-off-by: Michal Mazur <mkm@semihalf.com>
+---
+ platform/linux-generic/odp_pool.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c
+index e20693d..a33dd45 100644
+--- a/platform/linux-generic/odp_pool.c
++++ b/platform/linux-generic/odp_pool.c
+@@ -692,6 +692,9 @@ int odp_pool_info(odp_pool_t pool_hdl, odp_pool_info_t *info)
+ if (pool->params.type == ODP_POOL_PACKET)
+ info->pkt.max_num = pool->num;
+
++ info->min_data_addr = (uint64_t) pool->base_addr;
++ info->max_data_addr = (uint64_t) pool->base_addr + pool->shm_size - 1;
++
+ return 0;
+ }
+
+--
+2.7.4
+
diff --git a/odp/odp-linux/0002-linux-generic-Place-userdata-before-packet-data.patch b/odp/odp-linux/0002-linux-generic-Place-userdata-before-packet-data.patch
new file mode 100644
index 00000000..4ec30ad3
--- /dev/null
+++ b/odp/odp-linux/0002-linux-generic-Place-userdata-before-packet-data.patch
@@ -0,0 +1,153 @@
+From 89ea1eb01acb424afd1ec340b6e0cea80904d0aa Mon Sep 17 00:00:00 2001
+From: Michal Mazur <mkm@semihalf.com>
+Date: Wed, 31 Jan 2018 16:32:54 +0100
+Subject: [PATCH 2/4] linux-generic: Place userdata before packet data
+
+Signed-off-by: Michal Mazur <mkm@semihalf.com>
+---
+ .../linux-generic/include/odp_packet_internal.h | 4 +--
+ platform/linux-generic/include/odp_pool_internal.h | 3 --
+ platform/linux-generic/odp_pool.c | 37 ++++------------------
+ 3 files changed, 9 insertions(+), 35 deletions(-)
+
+diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h
+index 62888f8..dc827ab 100644
+--- a/platform/linux-generic/include/odp_packet_internal.h
++++ b/platform/linux-generic/include/odp_packet_internal.h
+@@ -161,8 +161,8 @@ typedef struct {
+ /* Context for IPsec */
+ odp_ipsec_packet_result_t ipsec_ctx;
+
+- /* Packet data storage */
+- uint8_t data[0];
++ /* Packet data or user area */
++ uint8_t data[0] ODP_ALIGNED_CACHE;
+ } odp_packet_hdr_t;
+
+ /**
+diff --git a/platform/linux-generic/include/odp_pool_internal.h b/platform/linux-generic/include/odp_pool_internal.h
+index 61ec5cc..f1892f0 100644
+--- a/platform/linux-generic/include/odp_pool_internal.h
++++ b/platform/linux-generic/include/odp_pool_internal.h
+@@ -54,7 +54,6 @@ typedef struct pool_t {
+ uint32_t pool_idx;
+ uint32_t ring_mask;
+ odp_shm_t shm;
+- odp_shm_t uarea_shm;
+ int reserved;
+ uint32_t num;
+ uint32_t align;
+@@ -66,9 +65,7 @@ typedef struct pool_t {
+ uint32_t uarea_size;
+ uint32_t block_size;
+ uint32_t shm_size;
+- uint32_t uarea_shm_size;
+ uint8_t *base_addr;
+- uint8_t *uarea_base_addr;
+
+ /* Used by DPDK zero-copy pktio */
+ uint8_t mem_from_huge_pages;
+diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c
+index a33dd45..2d50e14 100644
+--- a/platform/linux-generic/odp_pool.c
++++ b/platform/linux-generic/odp_pool.c
+@@ -278,14 +278,16 @@ static void init_buffers(pool_t *pool)
+ continue;
+ }
+ }
+- if (pool->uarea_size)
+- uarea = &pool->uarea_base_addr[(i - skipped_blocks) *
+- pool->uarea_size];
+- data = buf_hdr->data;
+
++ data = buf_hdr->data;
+ if (type == ODP_POOL_PACKET)
+ data = pkt_hdr->data;
+
++ if (pool->uarea_size) {
++ uarea = data;
++ data = (uint8_t *)((uintptr_t)data + pool->uarea_size);
++ }
++
+ offset = pool->headroom;
+
+ /* move to correct align */
+@@ -451,7 +453,7 @@ static odp_pool_t pool_create(const char *name, odp_pool_param_t *params,
+ hdr_size = ROUNDUP_CACHE_LINE(hdr_size);
+
+ block_size = ROUNDUP_CACHE_LINE(hdr_size + align + headroom + seg_len +
+- tailroom);
++ tailroom + uarea_size);
+
+ /* Allocate extra memory for skipping packet buffers which cross huge
+ * page boundaries. */
+@@ -478,7 +480,6 @@ static odp_pool_t pool_create(const char *name, odp_pool_param_t *params,
+ pool->block_size = block_size;
+ pool->uarea_size = uarea_size;
+ pool->shm_size = (num + num_extra) * block_size;
+- pool->uarea_shm_size = num * uarea_size;
+ pool->ext_desc = NULL;
+ pool->ext_destroy = NULL;
+
+@@ -496,20 +497,6 @@ static odp_pool_t pool_create(const char *name, odp_pool_param_t *params,
+
+ pool->base_addr = odp_shm_addr(pool->shm);
+
+- pool->uarea_shm = ODP_SHM_INVALID;
+- if (uarea_size) {
+- shm = odp_shm_reserve(uarea_name, pool->uarea_shm_size,
+- ODP_PAGE_SIZE, shmflags);
+-
+- pool->uarea_shm = shm;
+-
+- if (shm == ODP_SHM_INVALID) {
+- ODP_ERR("Shm reserve failed (uarea)");
+- goto error;
+- }
+-
+- pool->uarea_base_addr = odp_shm_addr(pool->uarea_shm);
+- }
+
+ ring_init(&pool->ring->hdr);
+ init_buffers(pool);
+@@ -520,9 +507,6 @@ error:
+ if (pool->shm != ODP_SHM_INVALID)
+ odp_shm_free(pool->shm);
+
+- if (pool->uarea_shm != ODP_SHM_INVALID)
+- odp_shm_free(pool->uarea_shm);
+-
+ LOCK(&pool->lock);
+ pool->reserved = 0;
+ UNLOCK(&pool->lock);
+@@ -638,9 +622,6 @@ int odp_pool_destroy(odp_pool_t pool_hdl)
+
+ odp_shm_free(pool->shm);
+
+- if (pool->uarea_shm != ODP_SHM_INVALID)
+- odp_shm_free(pool->uarea_shm);
+-
+ pool->reserved = 0;
+ odp_shm_free(pool->ring_shm);
+ pool->ring = NULL;
+@@ -948,8 +929,6 @@ void odp_pool_print(odp_pool_t pool_hdl)
+ "unknown")));
+ ODP_PRINT(" pool shm %" PRIu64 "\n",
+ odp_shm_to_u64(pool->shm));
+- ODP_PRINT(" user area shm %" PRIu64 "\n",
+- odp_shm_to_u64(pool->uarea_shm));
+ ODP_PRINT(" num %u\n", pool->num);
+ ODP_PRINT(" align %u\n", pool->align);
+ ODP_PRINT(" headroom %u\n", pool->headroom);
+@@ -960,8 +939,6 @@ void odp_pool_print(odp_pool_t pool_hdl)
+ ODP_PRINT(" uarea size %u\n", pool->uarea_size);
+ ODP_PRINT(" shm size %u\n", pool->shm_size);
+ ODP_PRINT(" base addr %p\n", pool->base_addr);
+- ODP_PRINT(" uarea shm size %u\n", pool->uarea_shm_size);
+- ODP_PRINT(" uarea base addr %p\n", pool->uarea_base_addr);
+ ODP_PRINT("\n");
+ }
+
+--
+2.7.4
+
diff --git a/odp/odp-linux/0003-HACK-enable-inline-in-dpdk-pktio.patch b/odp/odp-linux/0003-HACK-enable-inline-in-dpdk-pktio.patch
new file mode 100644
index 00000000..036b5f99
--- /dev/null
+++ b/odp/odp-linux/0003-HACK-enable-inline-in-dpdk-pktio.patch
@@ -0,0 +1,59 @@
+From 566de3dd20df4a4d7d68091e934f59a8849e678c Mon Sep 17 00:00:00 2001
+From: Szymon Sliwa <szs@semihalf.com>
+Date: Wed, 31 Jan 2018 14:51:23 +0100
+Subject: [PATCH 3/4] [HACK] enable inline in dpdk pktio
+
+Added simple lines which enable IPsec inline mode
+on RX using dpdk pktio. The changes are not intended to be
+pushed to main odp repository - these are only minimal changes
+to make use of the functionality.
+
+Signed-off-by: Szymon Sliwa <szs@semihalf.com>
+---
+ platform/linux-generic/pktio/dpdk.c | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/platform/linux-generic/pktio/dpdk.c b/platform/linux-generic/pktio/dpdk.c
+index 54fd0bd..ce835d8 100644
+--- a/platform/linux-generic/pktio/dpdk.c
++++ b/platform/linux-generic/pktio/dpdk.c
+@@ -22,6 +22,7 @@
+
+ #include <odp_packet_io_internal.h>
+ #include <odp_classification_internal.h>
++#include <odp_ipsec_internal.h>
+ #include <odp_packet_dpdk.h>
+ #include <odp_debug_internal.h>
+
+@@ -1285,6 +1286,8 @@ static void dpdk_init_capability(pktio_entry_t *pktio_entry,
+ capa->config.pktout.bit.udp_chksum;
+ capa->config.pktout.bit.tcp_chksum_ena =
+ capa->config.pktout.bit.tcp_chksum;
++ capa->config.inbound_ipsec = 1;
++ capa->config.outbound_ipsec = 1;
+ }
+
+ static int dpdk_open(odp_pktio_t id ODP_UNUSED,
+@@ -1566,6 +1569,19 @@ static int dpdk_recv(pktio_entry_t *pktio_entry, int index,
+ else
+ nb_rx = mbuf_to_pkt(pktio_entry, pkt_table, rx_mbufs,
+ nb_rx, ts);
++
++ /* Try IPsec inline processing */
++ for (i = 0; i < nb_rx; i++) {
++ odp_packet_t pkt = pkt_table[i];
++ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
++
++ packet_parse_layer(pkt_hdr, ODP_PROTO_LAYER_L4);
++
++ if(odp_packet_has_ipsec(pkt_table[i]))
++ _odp_ipsec_try_inline(pkt_table[i]);
++
++ }
++
+ }
+
+ return nb_rx;
+--
+2.7.4
+
diff --git a/odp/odp-linux/0004-HACK-enable-inline-in-socket-pktio.patch b/odp/odp-linux/0004-HACK-enable-inline-in-socket-pktio.patch
new file mode 100644
index 00000000..85a1d18d
--- /dev/null
+++ b/odp/odp-linux/0004-HACK-enable-inline-in-socket-pktio.patch
@@ -0,0 +1,58 @@
+From 0b92516dd24764c3c54b30acb3a96aca94803a8b Mon Sep 17 00:00:00 2001
+From: Szymon Sliwa <szs@semihalf.com>
+Date: Thu, 22 Feb 2018 14:32:45 +0100
+Subject: [PATCH 4/4] [HACK] enable inline in socket pktio
+
+Added simple lines which enable IPsec inline mode
+on RX using socket pktio. The changes are not intended to be
+pushed to main odp repository - these are only minimal changes
+to make use of the functionality.
+
+Signed-off-by: Szymon Sliwa <szs@semihalf.com>
+---
+ platform/linux-generic/pktio/socket_mmap.c | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/platform/linux-generic/pktio/socket_mmap.c b/platform/linux-generic/pktio/socket_mmap.c
+index c63a253..f7cc8e1 100644
+--- a/platform/linux-generic/pktio/socket_mmap.c
++++ b/platform/linux-generic/pktio/socket_mmap.c
+@@ -32,6 +32,7 @@
+ #include <odp_classification_datamodel.h>
+ #include <odp_classification_inlines.h>
+ #include <odp_classification_internal.h>
++#include <odp_ipsec_internal.h>
+ #include <odp/api/hints.h>
+
+ #include <protocols/eth.h>
+@@ -244,6 +245,18 @@ static inline unsigned pkt_mmap_v2_rx(pktio_entry_t *pktio_entry,
+ nb_rx++;
+ }
+
++ /* Try IPsec inline processing */
++ for (i = 0; i < nb_rx; i++) {
++ odp_packet_t pkt = pkt_table[i];
++ odp_packet_hdr_t *pkt_hdr = odp_packet_hdr(pkt);
++
++ packet_parse_layer(pkt_hdr, ODP_PROTO_LAYER_L4);
++
++ if(odp_packet_has_ipsec(pkt_table[i]))
++ _odp_ipsec_try_inline(pkt_table[i]);
++
++ }
++
+ ring->frame_num = frame_num;
+ return nb_rx;
+ }
+@@ -671,6 +684,8 @@ static int sock_mmap_capability(pktio_entry_t *pktio_entry ODP_UNUSED,
+ odp_pktio_config_init(&capa->config);
+ capa->config.pktin.bit.ts_all = 1;
+ capa->config.pktin.bit.ts_ptp = 1;
++ capa->config.inbound_ipsec = 1;
++ capa->config.outbound_ipsec = 1;
+ return 0;
+ }
+
+--
+2.7.4
+