-
Notifications
You must be signed in to change notification settings - Fork 0
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
Some (most) keys saved by the MJRTY are stored as "-1" #1
Comments
Hello @signorello, I have just pushed some changes with the bug I am currently facing in the P4 implementation, to a new branch (bug-fixing). Commit: 9822080 What is the problemThe majority vote algorithm (mjrty) from the MV Sketch implementation requires storing the five-tuple keys. To avoid re-submitting packets and because I need to compare the stored key with the current one, I am using an array of bit<128> register (sketch_key) to store the srcAddr (32bit), dstAddr (32bit), srcPort (16bit), dstPort (16bit), protocol (8bit) for each bucket. Everything works well until I have to read the register from the controller. Even if the log shows that a 128-bit value was written into a position in the register, reading the same value from the controller will return "-1". This happens every time for the 128-bit array register but only happens sometimes when using two 64-bit array registers. Which led me to believe that the controller might be trying to read a 64-bit signed integer from the registers but when it gets more than that it will just return "-1". Could that be the reason? How could I avoid this? How to replicate the problemStart the simple switch:
Send one packet using the script send.py (press Enter to send a packet):
Use simple_switch_CLI to read the sketch_key register:
|
Hello @gon1995matos even before looking at your code there are a few conceptual bits here which we would need to clarify. (i) register-size: you should know that 128-bit hw-registers are rare/nonexistent :) So, you should assume not to have that structure on your target. If you really needed (see (ii) below) to store that amount of bits, you should think about how to split it across multiple registers (of, for example, 32-bit size). |
No description provided.
The text was updated successfully, but these errors were encountered: