  Data-plane programmability is now mainstream. As we find more use cases,
deployments need to be able to run multiple packet-processing modules in a
single device. These are likely to be developed by independent teams, either
within the same organization or from multiple organizations. Therefore, we need
isolation mechanisms to ensure that modules on the same device do not interfere
with each other. This paper presents Menshen, an extension of the
Reconfigurable Match Tables (RMT) pipeline that enforces isolation between
different packet-processing modules. Menshen is comprised of a set of
lightweight hardware primitives and an extension to the open source P4-16
reference compiler that act in conjunction to meet this goal. We have
prototyped Menshen on two FPGA platforms (NetFPGA and Corundum). We show that
our design provides isolation, and allows new modules to be loaded without
impacting the ones already running. Finally, we demonstrate that feasibility of
implementing Menshen on ASICs by using the FreePDK45nm technology library and
the Synopsys DC synthesis software, showing that our design meets timing at a
1GHz clock frequency and needs approximately 6% additional chip area. We have
open sourced the code for Menshen's hardware and software at
https://isolation.quest/.
