On 7/14/23 15:21, Eelco Chaudron wrote: > > > On 14 Jul 2023, at 13:46, Ilya Maximets wrote: > >> On 7/14/23 13:03, Eelco Chaudron wrote: >>> >>> >>> On 1 Jul 2023, at 16:40, [email protected] wrote: >>> >>>> From: Lin Huang <[email protected]> >>>> >>>> Now srtcm_policer will free pkts, if packets are exceed rate limit. >>>> This patch change srtcm_policer not to free pkts, just count dropped >>>> packets. >>>> >>> >>> Thanks for this patch Lin, however, this patch is wrongly freeing packets. >>> >>> Your code assumes packets get dropped in order, but this is not the case. >>> The srtcm_policer_run_single_packet() function can drop the first packet, >>> pass the second, and drop the third. >> >> Hrm, you're right. We should be able to re-order packets though >> by doing pkts[i] = pkts[cnt]; before pkts[cnt] = pkt; in the >> original code. What do you think? > > Yes, we could move the dropped ones to the end. As the order of freeing > them should not matter, or does it?
Should be fine to free in any order. Best regards, Ilya Maximets. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
