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

Warning: Table TopPipe.forward key pre-padded with 8 bits #57

Open
happyPisces opened this issue Nov 11, 2020 · 1 comment
Open

Warning: Table TopPipe.forward key pre-padded with 8 bits #57

happyPisces opened this issue Nov 11, 2020 · 1 comment

Comments

@happyPisces
Copy link

hello everyone,
I want to use P4 to implement a simple grouping function: hash the packet's 5-tuple and modulo 2 to the hash result. If the final result equals 0, we send it to the corresponding port; if the final result equals 1, we send the eth-address of the packet to cpu.

this is my lines in the table(in command.txt):
image

this is my hash function and the length of hash_result is 4 bits:
image

I use the hash_result%2 as the value of user_metadata.my_hash_result and transmitted to the control pipe:
image
image

I use the user_metadata.my_hash_result as the key of forward table:
image

however, when I make the P4 program in the director P4_PROJECT_DIR, I meet the problem:
image

I had set the length of key in the command.txt with 4 bits and the length of hash_result is also 4 bits, but Why the Table TopPipe.forward key pre-padded with 8 bits? Please help me, thanks!

@salvatorg
Copy link

What about the hash_lrc() method?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants