1. A method comprising: receiving a packet at a gateway shared by a plurality tenant logical networks, the received packet belonging to a particular tenant logical network, wherein the gateway comprises a plurality of namespaces, each namespace associated with a different tenant logical network; executing a plurality of pipeline stages for the received packet, the plurality of pipeline stages corresponding to logical entities of the particular tenant logical network; exporting a packet to a processing daemon contained in a namespace associated with the particular tenant logical network when a particular pipeline stage is being executed, said exported packet comprising an identifier for the particular tenant logical network, wherein said exporting comprises transporting the packet through a user-kernel transport to a network protocol stack in a kernel space, wherein the kernel space stack identifies the name space associated with the particular tenant logical network by using the identifier in the exported packet.