Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to extend TSN example with FlowMetering? #23

Closed
CC-vga opened this issue Aug 16, 2021 · 11 comments
Closed

How to extend TSN example with FlowMetering? #23

CC-vga opened this issue Aug 16, 2021 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@CC-vga
Copy link

CC-vga commented Aug 16, 2021

Hi,

I would like to extend the TSN example to use also FlowMetering. Node1 generates 2 streams now, one is TS and one is AVB. And I have 2 questions:

  1. Why when I define the FlowMeter for AVB stream on switch1, I get the following error:
    <!> Error: Cannot convert inf to simtime_t: Out of range (-9223372.036854775807,9223372.036854775807), allowed by scale exponent -12 -- in module (CoRE4INET::CreditBasedMeter) small_network.switch1.phy[0].filtering.flowMeter[1] (id=210), at t=0.00006376s, event #342 undisposed object: (CoRE4INET::SchedulerTimerEvent) small_network.switch1.phy[0].filtering.flowMeter.CBM_SENDSLOPE_END -- check module destructor
    Can someone help me please to fix this error?
  2. How I can define custom Committed Information Rate (CIR) for the meter? Let’s say that I would like to have a CIR of 1000B per 200us.

All best
Voica

@THaeckel THaeckel assigned THaeckel and Musteblume and unassigned THaeckel Aug 19, 2021
@THaeckel
Copy link
Member

Hello Voica,
The TSN example network also has a configuration for FlowMeters. Do you get any errors when running the TSN example?
Otherwise, it might be some kind of configuration problem or a bug, so we might need more information such as ini file configurations and network topology.

I have assigned Philipp (Musteblume) to this question and hope he can help you. Currently, he is on vacation, but he will get in touch as soon as he is back. Thanks for your patience.

Best
Timo

@THaeckel THaeckel added the question This is a question label Aug 19, 2021
@CC-vga
Copy link
Author

CC-vga commented Aug 19, 2021

Hi Timo,

Thanks for reaching back! Until Philipp is back, here are some details:
TSN example works with configuration "With_Qci". Though, this configuration is just using filtering and gating, but not flow metering.
Or there is another TSN example that has also a configuration defining CreditBasedMeters?

All best
Voica

@Musteblume
Copy link
Member

Hi Voica,

Regarding the CIR: The CreditBasedMeter is an experimental creation by us which is not defined in the standard. The token bucket based metering from the standard which uses CIR etc. is not implemented. You can implement a token based approach by extending IEEE8021QciMeter.

Regarding the Error: Are you still getting the error? Can you show the configuration that produces the error?

Best regards
Philipp

@Musteblume Musteblume added bug Something isn't working help wanted Extra attention is needed labels Aug 30, 2021
@CC-vga
Copy link
Author

CC-vga commented Sep 6, 2021

Hi Philipp,

Thank you for the clarification about the non-standard CIR implementation! After removing the flow meter, the error disappears :)

All best
Voica

@Musteblume
Copy link
Member

Hi Voica,

that's good news but it should also not crash when using the flow meter. Are you able to share your crashing configuration with me? It would be valuable to fix this.

Best regards
Philipp

@CC-vga
Copy link
Author

CC-vga commented Sep 9, 2021

Hi Philipp,

Hoping that helps, I’m attaching the switch configuration (switch1.txt) adapted from TSN example! Error message is as in the first comment, first point, of this thread.
There is another problem; I ended-up with 2 StreamGate and FlowMeter instances, since having only one customized instance per-port also crashed.
If you need more details, please feel free to reach out!

All best
Voica
switch1.txt

@Musteblume
Copy link
Member

Hi Voica,

thank you very much. I will have a deeper look into the issue.

Best regards
Philipp

@Musteblume
Copy link
Member

Hi,

was able to recreate the error:

The cause was a misconfiguration of the stream filter:

**.switch1.phy[0].filtering.streamFilter[1].typename = "QTagFilter"
**.switch1.phy[0].filtering.streamFilter[1].vID = 2
**.switch1.phy[0].filtering.streamFilter[1].pcp = 6
**.switch1.phy[0].filtering.streamFilter[1].srcAddress = "0A-00-00-00-00-01"
**.switch1.phy[0].filtering.streamFilter[1].gateID = 1
**.switch1.phy[0].filtering.streamFilter[1].meterID = 1 
**.switch1.phy[0].filtering.flowMeter[1].typename = "CreditBasedMeter"
**.switch1.phy[0].filtering.flowMeter[1].maxBurst = 1

But the source of the stream is **.node2.phy[*].mac.address = "0A-00-00-00-00-02"

This results in CreditBasedMeter thinking zero bandwidth is reserved for the stream.
I fixed that CBM is not crashing on zero bandwidth. Now, it doesn't crash on misconfiguration.
Thank you for the info's.

Best regards
Philipp

@CC-vga
Copy link
Author

CC-vga commented Nov 9, 2021 via email

@Musteblume
Copy link
Member

Hi Voica,

should be published here in the master branch today.

Best regards
Philipp

@Musteblume
Copy link
Member

Fix is published in master.

@Musteblume Musteblume removed help wanted Extra attention is needed question This is a question labels Apr 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants