What are the differences between the P4-DPDK Target and BMv2?

The biggest difference here lies in whether the former utilizes DPDK, or are there other distinctions as well?

The first difference is that their design and implementation was done by different people, at different times, without reference to what the other team was doing. That leads to a whole host of other differences.

What do they have in common? They are both P4-programmable software switches that run on general purpose CPUs such as x86_64, amd64, arm64, etc.

The main differences I would list are:

  • performance - I do not have performance measurements to share right now (please add some in a future reply, if you do), but DPDK was designed with high packet processing performance in mind from the beginning, whereas BMv2 was less focused on that.

  • debug features - DPDK has almost none today (2023-Sep). You can see the packets in and the packets out, and read counters, but that is about it. With BMv2, when you enable packet tracing, you get something close to a line-by-line execution trace of your P4 code as it processes each packet.

  • P4_16 architectures implemented: As of 2023-Sep, DPDK implements a large subset of the PSA and PNA architectures, but not v1model. BMv2 implements v1model completely (I would go so far as to say its implementation defines what v1model is, since there is no specification of v1model anywhere that is nearly as detailed as that). It has only a very partial implementation of PSA, and none of PNA.

I mention the date in my answer because as software switches developed and published as open source, all it takes is one dedicated skilled person to change those properties significantly, if they wish.

2 Likes

Thank you for your help. Wish you a happy life!