summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/packet_utils.h
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2018-11-27 15:33:20 +0100
committerXavier Simonart <xavier.simonart@intel.com>2018-12-13 16:29:03 +0100
commite8afac40272ae6515998c4cf29a86e2408334dde (patch)
treebae2e2007e31c8b51f7d8be80466a67738131e19 /VNFs/DPPD-PROX/packet_utils.h
parent4da0effed52e73e23f73884af771d2aff1332efc (diff)
Add support for zero packet loss in PROX L3 mode.
In L3 mode, prox is extracting IP destination address in the packets. It uses this destination address to find the MAC address. If the MAC address is not found, it sends a ARP request. It also sends ARP request when it realizes that some timeout expired. However, PROX was using the mbuf of the existing packets (to be forwarded) to send the ARP. This resulted in packet loss. Now PROX is generating ARP requests using mbuf from an ARP mempool. Some clean up was also done. Change-Id: Icb6083a8cdf88789553ad23c32ca12d6b7ba7f08 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/packet_utils.h')
-rw-r--r--VNFs/DPPD-PROX/packet_utils.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/VNFs/DPPD-PROX/packet_utils.h b/VNFs/DPPD-PROX/packet_utils.h
index a58340e2..74a3f60e 100644
--- a/VNFs/DPPD-PROX/packet_utils.h
+++ b/VNFs/DPPD-PROX/packet_utils.h
@@ -27,6 +27,12 @@
#define MAX_ARP_ENTRIES 65536
#define IP4(x) x & 0xff, (x >> 8) & 0xff, (x >> 16) & 0xff, x >> 24
+enum {
+ SEND_MBUF_AND_ARP,
+ SEND_MBUF,
+ SEND_ARP,
+ DROP_MBUF
+};
struct task_base;
struct task_args;
@@ -48,6 +54,7 @@ struct l3_base {
struct arp_table optimized_arp_table[4];
struct rte_hash *ip_hash;
struct arp_table *arp_table;
+ struct rte_mempool *arp_pool;
};
void task_init_l3(struct task_base *tbase, struct task_args *targ);