File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -936,6 +936,7 @@ int dp_create_sync_snat_flows(void)
936936 const struct netnat_portoverload_tbl_key * portoverload_key ;
937937 struct netnat_portoverload_sync_metadata * sync_metadata ;
938938 uint64_t timestamp = rte_rdtsc (); // NOTE: synced flows will have full default timeout
939+ struct dp_port * port ;
939940 uint32_t index = 0 ;
940941 int ret ;
941942
@@ -946,6 +947,10 @@ int dp_create_sync_snat_flows(void)
946947 }
947948 if (DP_FAILED (dp_cntrack_from_sync_nat (portoverload_key , sync_metadata , timestamp )))
948949 DPS_LOG_WARNING ("Cannot create conntrack flow from sync NAT entry" );
950+ // only now increase the counter (because DEC() is only ever called by flow timeout)
951+ port = dp_get_port_by_id (sync_metadata -> created_port_id );
952+ if (port )
953+ DP_STATS_NAT_INC_USED_PORT_CNT (port );
949954 }
950955 return DP_OK ;
951956}
You can’t perform that action at this time.
0 commit comments