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

From: John Fastabend <[email-masked]>
Date: Mon, 30 Jan 2023 16:06:41 -0800

Singhai, Anjali wrote:
> Devlink is only for downloading the vendor specific compiler output for a P4 program and for teaching the driver about the names of runtime P4 object as to how they map onto the HW. This helps with the Initial definition of the Dataplane.
> 
> Devlink is NOT for the runtime programming of the Dataplane, that has to go through the P4TC block for anybody to deploy a programmable dataplane between the HW and the SW and have some flows that are in HW and some in SW or some processing HW and some in SW. ndo_setup_tc framework and support in the drivers will give us the hooks to program the HW match-action entries. 
> Please explain through ebpf model how do I program the HW at runtime? 
> 
> Thanks
> Anjali
> 

Didn't see this as it was top posted but, the answer is you don't program
hardware the ebpf when your underlying target is a MAT.

Use devlink for the runtime programming as well, its there to program
hardware. This "Devlink is NOT for the runtime programming" is
just an artificate of the design here which I disagree with and it feels
like many other folks also disagree.

Also if you have some flows going to SW you want to use the most
performant option you have which would be XDP-BPF at the moment in a
standard linux box or maybe af-xdp. So in these cases you should look
to divide your P4 pipeline between XDP and HW. Sure you can say
performance doesn't matter for my use case, but surely it does for
some things and anyways you have the performant thing already built
so just use it.

Thanks,
John