File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -108,8 +108,12 @@ void *dequeue_prog(struct dequeue_ctx *ctx)
108108 goto err ;
109109
110110 flow -> pkts -- ;
111- if (flow -> pkts <= 0 && !flow -> persistent )
112- bpf_map_delete_elem (& flow_states , & nt );
111+ if (flow -> pkts <= 0 ) {
112+ if (!flow -> persistent )
113+ bpf_map_delete_elem (& flow_states , & nt );
114+ else
115+ flow -> finish_bytes = 0 ;
116+ }
113117
114118 bpf_printk ("DEQUEUE SPRIO with priority %d" , prio );
115119 return pkt ;
Original file line number Diff line number Diff line change @@ -113,8 +113,12 @@ void *dequeue_prog(struct dequeue_ctx *ctx)
113113 goto err ;
114114
115115 flow -> pkts -- ;
116- if (flow -> pkts <= 0 && !flow -> persistent )
117- bpf_map_delete_elem (& flow_states , & nt );
116+ if (flow -> pkts <= 0 ) {
117+ if (!flow -> persistent )
118+ bpf_map_delete_elem (& flow_states , & nt );
119+ else
120+ flow -> finish_bytes = 0 ;
121+ }
118122
119123 virtual_time_bytes = prio ;
120124
You can’t perform that action at this time.
0 commit comments