diff options
author | Anand B Jyoti <anand.b.jyoti@intel.com> | 2017-06-23 11:39:08 +0530 |
---|---|---|
committer | Anand B Jyoti <anand.b.jyoti@intel.com> | 2017-06-23 11:39:08 +0530 |
commit | f49d646236d446f8b680f83594ec6e2e79c7e601 (patch) | |
tree | c55c2b0e42ac2c6c39323788828c6eea7518f926 | |
parent | e65864efce7da482bc9f337189de5f8c49df5091 (diff) |
conntrack: timer reset in reply traffic causes performance impact
JIRA: SAMPLEVNF-44
The UDP connection timer was getting reset for every packets with
reply traffic due to connection state check.
This patch avoids resetting the timer instead uses the expected
timeout to reset avoiding frequent timer reset for every packet.
Change-Id: I6b5aac62bb709f403aeacee75f52d099b2d2397f
Signed-off-by: Anand B Jyoti <anand.b.jyoti@intel.com>
-rw-r--r-- | common/VIL/conntrack/rte_ct_udp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/VIL/conntrack/rte_ct_udp.c b/common/VIL/conntrack/rte_ct_udp.c index 6caa788f..9a50a592 100644 --- a/common/VIL/conntrack/rte_ct_udp.c +++ b/common/VIL/conntrack/rte_ct_udp.c @@ -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; } |