Merge "tools: Adding patches for disabling the DEBUG logs in DPDK" v1.0.1
authorDeepak S <deepak.s@linux.intel.com>
Tue, 27 Jun 2017 04:06:17 +0000 (04:06 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Tue, 27 Jun 2017 04:06:17 +0000 (04:06 +0000)
VNFs/vFW/pipeline/pipeline_vfw_be.h
common/VIL/conntrack/rte_cnxn_tracking.c
common/VIL/conntrack/rte_ct_udp.c

index 7e90c7c..cb41814 100644 (file)
@@ -40,7 +40,7 @@ extern uint8_t firewall_flag;
 extern uint8_t cnxn_tracking_is_active;
 #define KEY_SIZE 10              /*IPV4 src_ip + dst_ip + src_port + dst_port */
 #define IP_32BIT_SIZE 4
-#define MAX_VFW_INSTANCES 12       /* max number fw threads, actual usually less */
+#define MAX_VFW_INSTANCES 24       /* max number fw threads, actual usually less */
 #define IPv4_HDR_VERSION 4
 #define IPv6_HDR_VERSION 6
 #define IP_VERSION_CHECK 4
index aa18058..1559621 100644 (file)
@@ -1481,6 +1481,7 @@ rte_ct_cnxn_tracker_batch_lookup_basic_type(
        struct rte_ct_cnxn_data *cnxn_data_entry[RTE_HASH_LOOKUP_BULK_MAX];
 
        rte_prefetch0(ct->hash_table_entries);
+       rte_prefetch0(ct->rhash);
 
        if (CNXN_TRX_DEBUG > 1) {
                printf("Enter cnxn tracker %p", ct);
@@ -1647,18 +1648,6 @@ rte_ct_cnxn_tracker_batch_lookup_basic_type(
                        rte_prefetch0(entry);
                        rte_prefetch0(&entry->key_is_client_order);
                }
-               else {
-                       uint8_t pkt_index = compacting_map[i];
-                       uint32_t *key = ct->hash_key_ptrs[pkt_index];
-                       uint8_t protocol = *(key + 9);
-                       if (protocol == UDP_PROTOCOL) {
-                               /* Search in new connections only for UDP */
-                               entry = rte_ct_search_new_connections(ct, key);
-                               rte_prefetch0(&entry->counters.packets_forwarded);
-                               rte_prefetch0(entry);
-                               rte_prefetch0(&entry->key_is_client_order);
-                       }
-               }
                cnxn_data_entry[i] = entry;
        }
 
@@ -1735,7 +1724,7 @@ rte_ct_cnxn_tracker_batch_lookup_basic_type(
                                 */
 
                                struct rte_ct_cnxn_data *recent_entry =
-                                       cnxn_data_entry[i];
+                                       rte_ct_search_new_connections(ct, key);
 
                                if (recent_entry != NULL) {
                                        if (rte_ct_udp_packet(ct, recent_entry,
index 6caa788..9a50a59 100644 (file)
@@ -43,7 +43,10 @@ enum rte_ct_packet_action rte_ct_udp_packet(struct rte_ct_cnxn_tracker *ct,
                ustate = RTE_CT_UDP_REPLIED;
                cd->connstatus = RTE_ASSURED_CONN;
        }
-       rte_ct_set_cnxn_timer_for_udp(ct, cd, ustate);
+       /* Avoid timer resetting if connection is setup */
+       if(cd->connstatus != RTE_INIT_CONN)
+               cd->state_used_for_timer = ustate;
 
+       rte_ct_set_cnxn_timer_for_udp(ct, cd, ustate);
        return RTE_CT_FORWARD_PACKET;
 }