behavioral-model icon indicating copy to clipboard operation
behavioral-model copied to clipboard

Implement configurability for links to behave like physical constant bit rate links

Open jfingerh opened this issue 3 years ago • 5 comments

See https://github.com/p4lang/behavioral-model/issues/1066 for some discussion of things that can be very confusing when trying to use bmv2 and veth links with bit rate limits, where because veth's do not behave like physical constant bit rate links, bmv2 plus veth's does not behave like a switch with physical constant bit rate links, either.

To make bmv2 behave most like a physical switch here, at least for low bit rate links that the CPU core(s) can keep up with, having some kind of per-port configuration of maximum bit rate to send packets to it would be appropriate. Ideally this would work correctly regardless of the mix of packet lengths sent to that link, i.e. it would be configured as a maximum bit rate, not a maximum packet rate like the set_queue_rate command does today.

Also ideally this would be a per-port configuration and would limit the total rate of sending packets to a port, even if bmv2 was running with multiple FIFO queues per port, e.g. because https://github.com/p4lang/behavioral-model/issues/1065 was implemented.

jfingerh avatar Dec 22 '21 16:12 jfingerh

The 'good first issue' label for this one is intended to attract attention for anyone interested in this kind of enhancement. It might be slightly more advanced than some of the other issues with that label in terms of code changes required. I have not tried to scope out the work in detail.

jafingerhut avatar Dec 22 '21 16:12 jafingerhut

Also ideally this would be a per-port configuration and would limit the total rate of sending packets to a port, even if bmv2 was running with multiple FIFO queues per port

I agree, this is the biggest issue with the current implementation. The queueing system should be able to enforce rate-limiting over the entire set of priority queues.

antoninbas avatar Dec 22 '21 18:12 antoninbas

@antoninbas In case it is not clear, these issues are not requests for you to develop such changes. I am hoping with this series of "P4.org open source developer days" to see if we can get some interest in developing such enhancements.

jafingerhut avatar Dec 22 '21 18:12 jafingerhut

@jafingerhut I am well aware of that, I'm just expressing my support :)

If someone wants to looks at this, the code is there: https://github.com/p4lang/behavioral-model/blob/182810a20e6293ae72c06699f74106321b5cd83a/include/bm/bm_sim/queueing.h#L473-L489

antoninbas avatar Dec 22 '21 18:12 antoninbas

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment, or this will be closed in 180 days

github-actions[bot] avatar Sep 01 '22 00:09 github-actions[bot]