[P4-dev] generate_digest vs copy_to_cpu

ecm richard.mayers92 at gmail.com
Tue Aug 28 19:39:44 EDT 2018


Hi all,

I want to know which are the differences between using digests or
normal switch_ports when writing some sort of control plane. At the
moment the easiest way I found is to simply send a norma packet to a
special port where you have a process listening and then if needed
update the switch using the CLI, thrift, etc..

When reading the spec, I saw that there was a primitive (not an extern
in simple_switch) called digest. I never used it due to lack of
documentation, examples, etc. However, today I wanted to give it a
try, and after checking the l2 learning example + several mailing list
posts + some github issues I managed to do something.

Putting the P4Runtime aside, and considering only digest, and
copy_to_cpu ( is there more ways of having dp-cp communication ???), I
would like to know what is the best way to do DP-CP things, or when is
one more useful than the other ? Because for example using digests
seems quite cumbersome, since you have to acknowledge every packet you
receive.

PD: is there any good documentation of how to use the thrift API? The
best I found at the moment is the the runtime_CLI.py

Thanks in advance,
Richard



More information about the P4-dev mailing list