I’m experimenting with creating a p4 application that forwards packets to a different destination based on table entries set by a custom c/c++ application.
I see the whole JSON is sent (frame 9, 10, 12 [large MTU therefore fits in so few packets]).
But not sure how to further interpret this and whether it’s correct what’s being sent.
I tried recompiling simple_switch_grpc with -ggdb and -O0, with ulimit -c unlimited and analyze the coredump in GDB, but getting some weird errors like:
warning: core file may not match specified executable file.
warning: Section .reg-xstate/1058446 in core file too small.
of course nothing in the backtrace after that
while I’m sure the binary executable is the same while running vs what’s passed to GDB.
I think I will try to:
use another tool to interface with the simple_switch_grpc to see if that works (i believe there is some python/shell thing that uses grpc?)
try to lookup more examples to see how the SetForwardingPipelineConfig() is being used…
Alright! I was just experimenting a bit, and I can prevent the segfault if I do VERIFY_AND_COMMIT instead of RECONCILE_AND_COMMIT !!!
When doing the insert I don’t get the No forwarding pipeline config set for this device error anymore… Just an empty error: Failed to insert table entry: … anyway progress
– ah the simple_switch_grpc logs [P4Runtime] Invalid P4 id