On Mon, Aug 1, 2011 at 1:31 PM, Madhav Puri <madhav.p...@gmail.com> wrote: > Hello, > > I am trying to walk-thru and understand some of the ovs code that gets > exercised when ovs is configured for user-space datapath (i.e. > datapath_type=netdev). I have a few questions on use of tap devices in this > case for switching data between multiple interfaces. > > From the net-device creation function 'netdev_linux_create_tap()', > definition and the function header, it looks like we open and bind to same > tap device (/dev/net/tun) for all interfaces i.e. a read from this device > could give us data available on any of the underlying bound interfaces. If > the understanding is correct, then in 'dpif_netdev_run()' where we traverse > the list of all ports and call 'netdev_recv()' we could potentially read > data on one port which actually came on a different port. Is this > understanding correct? If so then how do we apply port specific open-flow > rules in this case? In other words, how do we distinguish between data > received on one port from another in user-space mode.
/dev/net/tun is simply a device on which to call ioctls - it is not the actual tap device. You can create multiple devices with it and distinguish based on file descriptor. The comment above netdev_linux_create_tap() refers to opening the same device multiple times, which will cause users to share buffers but only within that device. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev