Closed Pterosaur closed 2 weeks ago
Hi @Pterosaur , do you mind to add some description here to describe the issue and how we are fixing it?
Hi @Pterosaur , do you mind to add some description here to describe the issue and how we are fixing it?
Hi @r12f , Thanks for your suggestion. This PR is just for testing right now, So it looks hacky and drafted. I will refactor it after confirmed.
hi Ze, do you mind to add some explanation on what bug we are fixing in this change and how?
hi Ze, do you mind to add some explanation on what bug we are fixing in this change and how?
@r12f Thanks for your suggestion, Please check it again.
@r12f - looks like a request for you to re-check after edits :)
This is to ensure bmv2 can launch, but is a temporary patch. Not valid in LPM, and it fails.
@r12f will designate someone to file an Issue in P4 Runtime GitHub (leading 0's) if we feel it is related here.
We need a volunteer to fix this if we can figure it out.
1.To set a default IPv6 route with the prefix 0, we will get following error logs. It's caused by the limitation of p4lang: https://github.com/p4lang/PI/blob/24e0a3c08c964e36d235973556b90e0ae922b894/proto/frontend/src/device_mgr.cpp#L2242-L2246 .
In this case, I just ignore the default IPv6 route to skip this limitation.
leadingNonZeroBits
returns the exact length of prefix, we shouldn't directly subtract it from 129. For example, if the mask is 0xffffffffffffffffffffffff, the original implementation will get 129-0-32=97, it is obviously wrong. The correct answer is 128. So, I fix this bug.