Subject: Re: [PATCH net-next RFC 00/20] Introducing P4TC

From: Toke Høiland-Jørgensen <[email-masked]>
Date: Mon, 30 Jan 2023 12:26:58 +0100

Jiri Pirko <[email-masked]> writes:

>>P4TC as SW/HW running same P4:
>>
>>1. This doesn't need to be done in kernel. If one compiler runs
>>   P4 into XDP or TC-BPF that is good and another compiler runs
>>   it into hw specific backend. This satisifies having both
>>   software and hardware implementation.
>>
>>Extra commentary: I agree we've been chatting about this for a long
>>time but until some vendor (Intel?) will OSS and support a linux
>>driver and hardware with open programmable parser and MAT. I'm not
>>sure how we get P4 for Linux users. Does it exist and I missed it?
>
>
> John, I think that your summary is quite accurate. Regarding SW
> implementation, I have to admit I also fail to see motivation to have P4
> specific datapath instead of having XDP/eBPF one, that could run P4
> compiled program. The only motivation would be that if somehow helps to
> offload to HW. But can it?

According to the slides from the netdev talk[0], it seems that
offloading will have to have a component that goes outside of TC anyway
(see "Model 3: Joint loading" where it says "this is impossible"). So I
don't really see why having this interpreter in TC help any.

Also, any control plane management feature specific to managing P4 state
in hardware could just as well manage a BPF-based software path on the
kernel side instead of the P4 interpreter stuff...

-Toke

[0] https://netdevconf.info/0x16/session.html?Your-Network-Datapath-Will-Be-P4-Scripted