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 @@ -937,6 +937,7 @@ int dp_create_sync_snat_flows(void)
937937 const struct netnat_portoverload_tbl_key * portoverload_key ;
938938 struct netnat_portoverload_sync_metadata * sync_metadata ;
939939 uint64_t timestamp = rte_rdtsc (); // NOTE: synced flows will have full default timeout
940+ struct dp_port * port ;
940941 uint32_t index = 0 ;
941942 int ret ;
942943
@@ -947,6 +948,10 @@ int dp_create_sync_snat_flows(void)
947948 }
948949 if (DP_FAILED (dp_cntrack_from_sync_nat (portoverload_key , sync_metadata , timestamp )))
949950 DPS_LOG_WARNING ("Cannot create conntrack flow from sync NAT entry" );
951+ // only now increase the counter (because DEC() is only ever called by flow timeout)
952+ port = dp_get_port_by_id (sync_metadata -> created_port_id );
953+ if (port )
954+ DP_STATS_NAT_INC_USED_PORT_CNT (port );
950955 }
951956 return DP_OK ;
952957}
You can’t perform that action at this time.
0 commit comments