aboutsummaryrefslogtreecommitdiffstats
path: root/odp/odp-dpdk/0004-HACK-enable-inline-for-odp-dpdk.patch
diff options
context:
space:
mode:
authorMichal Mazur <mkm@semihalf.com>2018-02-21 20:25:30 +0100
committerSzymon Sliwa <szs@semihalf.com>2018-02-26 16:27:04 +0100
commit09f6ceb4a70a64b999af5c8e0960ae0a81168172 (patch)
tree47d6c7359d902b2009ec4b29d3dee24953488db1 /odp/odp-dpdk/0004-HACK-enable-inline-for-odp-dpdk.patch
parent708ae49d7a1ff8341152dc7ee7f3a5abafb2d2c0 (diff)
odp: Update readme file and include odp patches1707
Restore odp-linux section in readme file as it can now be build with minor modification. Required patches are included in odp directory. Slightly improve other sections. Change-Id: I2e7f8bc7802627bc15b07b81ddf2e9b4f72f5d41 Signed-off-by: Michal Mazur <mkm@semihalf.com> Signed-off-by: Szymon Sliwa <szs@semihalf.com>
Diffstat (limited to 'odp/odp-dpdk/0004-HACK-enable-inline-for-odp-dpdk.patch')
-rw-r--r--odp/odp-dpdk/0004-HACK-enable-inline-for-odp-dpdk.patch61
1 files changed, 61 insertions, 0 deletions
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
+