diff options
Diffstat (limited to 'odp/odp-dpdk')
4 files changed, 181 insertions, 0 deletions
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 + |