Dear all.
I am building an example program based on the code available in the ngsdn-tutorial. This code uses the clone3() function for the action clone_to_cpu(). According to this post (https://github.com/jafingerhut/p4-guide/blob/master/v1model-special-ops/README.md), reporting changes on the P4 bmv2 backend, the clone3() function is deprecated and should be replaced by clone_preserving_field_list()
In my implementation, I am defining the local_metadata_t struct as follows, using the @field_list annotation:
struct
local_metadata_t {
@field_list(0)
port_num_t ingress_port;
}
Later, my clone_to_cpu() action definition looks like this
action
clone_to_cpu() {
//clone3(CloneType.I2E, CPU_CLONE_SESSION_ID, {
standard_metadata.ingress_port });
local_metadata.ingress_port =
standard_metadata.ingress_port;
clone_preserving_field_list(CloneType.I2E,
CPU_CLONE_SESSION_ID,0);
}
I am compiling my program with a fresh installation of p4c, compiled from sources. When executing the program, it does not seem to behave as expected. However, when compiling the program with the p4c docker image used in the ngsdn-tutorial, the program works fine.
Is there something I am missing in the invocation of
clone_preserving_field_list?
My idea is having a development environment not dependent on docker images but instead having all the tools installed in a base installation of the operating system.
Thanks in advance for any hint you can provide me.
-- Sergio Gutiérrez, Ph.D.
--
You received this message because you are subscribed to the Google Groups "p4-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to p4-dev+un...@lists.p4.org.
To view this discussion on the web visit https://groups.google.com/a/lists.p4.org/d/msgid/p4-dev/8c9d25f8-4ef4-ebe4-e6b6-94e4bbf12a94%40gmail.com.