diff options
author | Vishwesh M Rudramuni <vishwesh.m.rudramuni@intel.com> | 2017-06-06 04:11:25 +0530 |
---|---|---|
committer | Vishwesh M Rudramuni <vishwesh.m.rudramuni@intel.com> | 2017-07-14 06:08:28 +0530 |
commit | 0e51437be874b6831e95639f4c1ad6b0133c2a28 (patch) | |
tree | 20be5dcfe1a25b1c3f67e3845032e7796a29ac2d /common/VIL/pipeline_txrx | |
parent | 82416b375a275837689cddfd1782d82996fecaca (diff) |
[l2l3 stack] implements new arp state machine & arp buffering
JIRA: SAMPLEVNF-23
This patch implements
~New arp state machine implementing new states
like INCOMPLETE, COMPLETE, PROBE, STALE.
~removing unwanted code in arpicmp pipeline
~Implementing arp buffering, when arp is unresolved.
~Integratig the new changes with vCGNAPT
~Integrating the new changes with vACL
~Integrating the new changes with vFW.
Change-Id: If467ec035bc8de58463ea50d9e603a97f168c1a2
Signed-off-by: Vishwesh M Rudramuni <vishwesh.m.rudramuni@intel.com>
Diffstat (limited to 'common/VIL/pipeline_txrx')
-rw-r--r-- | common/VIL/pipeline_txrx/pipeline_txrx_be.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/common/VIL/pipeline_txrx/pipeline_txrx_be.c b/common/VIL/pipeline_txrx/pipeline_txrx_be.c index 9e7645dd..b47ee98e 100644 --- a/common/VIL/pipeline_txrx/pipeline_txrx_be.c +++ b/common/VIL/pipeline_txrx/pipeline_txrx_be.c @@ -37,6 +37,7 @@ uint8_t TXRX_DEBUG; int pkt_burst_cnt; + struct pipeline_txrx { struct pipeline p; pipeline_msg_req_handler @@ -55,7 +56,6 @@ TYPE_RXRX, }; static void *pipeline_txrx_msg_req_custom_handler(struct pipeline *p, void *msg); - static pipeline_msg_req_handler handlers[] = { [PIPELINE_MSG_REQ_PING] = pipeline_msg_req_ping_handler, @@ -240,7 +240,7 @@ pkt_work_txrx(struct rte_mbuf *pkt, uint32_t pkt_num, void *arg) case ETH_TYPE_ARP: rte_pipeline_port_out_packet_insert(p_txrx->p.p, out_port, pkt); - rte_pipeline_ah_packet_drop(p_txrx->p.p, pkt_mask); + rte_pipeline_ah_packet_hijack(p_txrx->p.p, pkt_mask); break; case ETH_TYPE_IPV4: @@ -261,19 +261,15 @@ pkt_work_txrx(struct rte_mbuf *pkt, uint32_t pkt_num, void *arg) #ifdef IPV6 case ETH_TYPE_IPV6: if (*protocol == ICMPV6_PROTOCOL_ID) { - #ifndef VNF_ACL if (!memcmp(ipv6_h->dst_addr, link->ipv6, 16) || !memcmp(ipv6_h->dst_addr, solicited_node_multicast_addr, 13)) { - #endif rte_pipeline_port_out_packet_insert(p_txrx->p.p, out_port, pkt); rte_pipeline_ah_packet_drop(p_txrx->p.p, pkt_mask); - #ifndef VNF_ACL } else { printf("Dropping the IPv6 pkt\n"); rte_pipeline_ah_packet_drop(p_txrx->p.p, pkt_mask); } - #endif } break; #endif @@ -395,7 +391,7 @@ pkt4_work_txrx(struct rte_mbuf **pkt, uint32_t pkt_num, void *arg) case ETH_TYPE_ARP: rte_pipeline_port_out_packet_insert(p_txrx->p.p, out_port, pkt[0]); - rte_pipeline_ah_packet_drop(p_txrx->p.p, pkt_mask0); + rte_pipeline_ah_packet_hijack(p_txrx->p.p, pkt_mask0); break; case ETH_TYPE_IPV4: @@ -414,20 +410,15 @@ pkt4_work_txrx(struct rte_mbuf **pkt, uint32_t pkt_num, void *arg) #ifdef IPV6 case ETH_TYPE_IPV6: if (*protocol0 == ICMPV6_PROTOCOL_ID) { - #ifndef VNF_ACL if (!memcmp(ipv6_h0->dst_addr, link->ipv6, 16) || !memcmp(ipv6_h0->dst_addr, solicited_node_multicast_addr, 13)) { - #endif rte_pipeline_port_out_packet_insert(p_txrx->p.p, out_port, pkt[0]); rte_pipeline_ah_packet_drop(p_txrx->p.p, pkt_mask0); - #ifndef VNF_ACL } else { - printf("Dropping the IPv6 pkt\n"); rte_pipeline_ah_packet_drop(p_txrx->p.p, pkt_mask0); } - #endif } break; #endif @@ -461,7 +452,7 @@ pkt4_work_txrx(struct rte_mbuf **pkt, uint32_t pkt_num, void *arg) case ETH_TYPE_ARP: rte_pipeline_port_out_packet_insert(p_txrx->p.p, out_port, pkt[1]); - rte_pipeline_ah_packet_drop(p_txrx->p.p, pkt_mask1); + rte_pipeline_ah_packet_hijack(p_txrx->p.p, pkt_mask1); break; case ETH_TYPE_IPV4: @@ -527,7 +518,7 @@ pkt4_work_txrx(struct rte_mbuf **pkt, uint32_t pkt_num, void *arg) case ETH_TYPE_ARP: rte_pipeline_port_out_packet_insert(p_txrx->p.p, out_port, pkt[2]); - rte_pipeline_ah_packet_drop(p_txrx->p.p, pkt_mask2); + rte_pipeline_ah_packet_hijack(p_txrx->p.p, pkt_mask2); break; case ETH_TYPE_IPV4: @@ -593,7 +584,7 @@ pkt4_work_txrx(struct rte_mbuf **pkt, uint32_t pkt_num, void *arg) case ETH_TYPE_ARP: rte_pipeline_port_out_packet_insert(p_txrx->p.p, out_port, pkt[3]); - rte_pipeline_ah_packet_drop(p_txrx->p.p, pkt_mask3); + rte_pipeline_ah_packet_hijack(p_txrx->p.p, pkt_mask3); break; case ETH_TYPE_IPV4: |