In the no-backpressure case, this code accepts all packets in case its consumer accepts all packets.
However, if the consumer does not accept packets, canPushPacket returns true iff the packet criteria does not match, meaning it accepts all packets it will immediately filter out.
I cannot think about any scenario why this implementation would be useful.
Could you please clarify why it is implemented like this?
Hello,
I'm currently working with some Per-Stream Filtering and Policing in INET and stumbled upon the following lines of code:
https://github.com/inet-framework/inet/blob/61410b46d87c5c4f337d70fa1b3c268425c7dd03/src/inet/queueing/base/PacketFilterBase.cc#L65-L71
In the no-backpressure case, this code accepts all packets in case its consumer accepts all packets. However, if the consumer does not accept packets, canPushPacket returns true iff the packet criteria does not match, meaning it accepts all packets it will immediately filter out. I cannot think about any scenario why this implementation would be useful.
Could you please clarify why it is implemented like this?