Enabling P4Runtime on psa_switch

Hello, and thanks again you all for your help.
I’d like to ask how to enable a P4Runtime server on the psa_switch, the one provided by the starting installer (install-p4dev-v8.sh), as it seems to me there is no way to enable it with a command line option, differently from simple_switch_grpc.

In case it is not implemented, is there any different way to receive PacketIn’s in the Control Plane from that switch?

Thank you all again for your help.

The psa_switch executable is far away enough from complete that I would recommend that you not use it (unless you are someone who wants to enhance its implementation to make it more complete).

Thank you for the (very) quick response. Is there any software alternative to simple_switch_grpc that is usable right now?

Is there something in particular you are missing from simple_switch_grpc that you wish it had, that leads you to look for an alternative?

I ask not because there are 0 alternatives, but each tend to has its strengths vs. what it is weaker in, and before listing them all, it would be good to know the reason you want an alternative.

In particular, I believe that simple_switch_grpc is probably the most complete in terms of p4c compiler support, all of its defined externs are implemented and I believe complete in those implementations, and simple_switch_grpc supports both a P4Runtime API server, and a “native” simple_switch_CLI control plane CLI that lets you configure a few things that are not configurable via the P4Runtime API.

I am already using simple_switch_grpc, I needed another one to do some tests.
This second software switch should be able to:

  1. communicate with a control plane through P4Runtime protocol (with PacketIn support)
  2. forward L3 (IP) packets
  3. manage/reorder/prioritize packets in a similar way to the Traffic Manager/Packet Buffer present in the simple_switch[_grpc] processes between the Ingress and the Egress pipelines, or do some other kind of packet prioritization
  4. (completely optional) support something like around 400Mbps peak traffic volume

“I needed another one to do some tests.” Why? Except perhaps for #4 on your list, simple_switch_grpc seems to do everything you ask for.

I am not aware of another open source P4-programmable software switch that meets all of your requirements 1 through 3. In particular, #1 and #3 are not very commonly supported in open source software switches that I have seen.

If others know of an alternative that satisfies all of your desires, hopefully they will answer here.

Thanks.
Is there any other alternative to P4Runtime to exchange packets with a Control Plane?

And also, the CPU Port abstraction in the P4 language always points to a P4Runtime server?

There are implementations that do not support P4Runtime API, but some other control plane API, perhaps a proprietary one designed by the vendor of the programmable network device. For example Tofino implements something called the Barefoot Runtime API, which lets you do very similar things to P4Runtime API, but also lets you configure everything else about the device, too, e.g. configure Ethernet MAC port options. In such a system, there is a physical CPU port that connects over a PCI Express interface to a physical CPU on the board near the Tofino switch ASIC, but the control CPU typically does not run a P4Runtime server.

In simple_switch_grpc, the CPU port abstraction always connects to the P4Runtime server.