How to implement softwared P4 switch in PC or general server to achieve better performance?

Thank you for your reply
At present, bmv2 and p4c have been deployed on an industrial PC, but there are some problems when using it as a p4 switch.I refer to the information you provide, as well as a link (Getting Started with P4 - Open Networking Foundation).
I run the following command line:

sudo simple_switch --interface 0@enp2s0 --interface 1@enp4s0 test.bmv2/test.json &
table_add ipv4_match to_port_action 10.10.0.0/16 => 0
table_add ipv4_match to_port_action 11.11.0.0/16 => 1

I plan to link two windows hosts through P4siwtch, with the following topology:

windows PC<----wired link----> industrial PC<----wired link---->windows PC
10.10.1.2___________ enp2s0(P4 Switch)enp4s0___________11.11.1.2

windows PC can’t ping each other successfully,But I capture packet information on industrial PC by wireshark(It shows correct source address).And I followed the links above to complete the whole experiment, which passed correctly…
But two physical hosts cannot communicate. Why is this?
Shouldn’t I bind the physical port directly to the virtual switch side?
The experiment on a physical machine is closer to the real world ,as we intend to simulate the effect of a p4 switch in a data center to assist computing services.but faces some difficulties. :tired_face: