-
Notifications
You must be signed in to change notification settings - Fork 26
changing reject to accept introduce stack increaseing #113
Comments
Upload the llvm-objdump -S -no-show-raw-insn xdp_test.o files: |
ping...... |
I don't know if there is much we can say about this; we do not have any control on how clang generates code. |
OK....I found a workaround. I also rewrite some logical in ControlBodyTranslator::preorder to help to judge if we should rewrite re-populate a header. And also fix the issue that using if-else in control.("if" emit a useless ";" in if-else statement which cause compile error) I found the counter only support 32bit which is too small, so increase it from 32bit to 64bit if using counterArray which type is hash. |
introducing 64bit counter: 2.7Mpps -->2.5Mpps |
Do you plan to contribute these changes to our code? |
It is draft code and I am afraid I don't have enough time to make it become a accepted patch recently. |
if you're allowed to change kernel, then you can increase MAX_BPF_STACK to a little larger value. |
Not only the linux stack size, the llvm-6 and llvm-7 would hit error in compiling if the stack size above 512bytes... |
Hi William and Mihai
I am trying to use p4x-xdp to make a simple loadbalancer. I found the stack increases if I change the "reject" to "accept" in parser. The stack increase from from 248byte to 440byte. It means I can only process one or two type of packets
I am not sure if it is llvm issue. Did you found a workaround for it?
the entire p4 example(
xdp_test.txt
) is uploaded. Please rename xdp_test.txt to xdp_test.p4.
The following command I used to compiled and load:
My env is :
Ubuntu 18.04
The text was updated successfully, but these errors were encountered: