[ovs-dev] switch local port

Gaetano Catalli gaetano.catalli at gmail.com
Thu Feb 24 15:04:43 UTC 2011

On Wed, Feb 23, 2011 at 6:39 PM, Ben Pfaff <blp at nicira.com> wrote:
> On Wed, Feb 23, 2011 at 04:30:12PM +0100, Gaetano Catalli wrote:
>> On Fri, Feb 11, 2011 at 6:09 PM, Ben Pfaff <blp at nicira.com> wrote:
>> > On Fri, Feb 11, 2011 at 06:05:08PM +0100, Gaetano Catalli wrote:
>> >> I have some doubts to resolve about switch local port.
>> >> Firstly, in the ovs-openflowd manpage I can read: "...The Open???Flow
>> >> local port is a virtual network port that ovs-openflowd bridges to the
>> >> physical switch ports...". I'm searching through the sources but I
>> >> can't find out where this bridging operation is realised. Can you
>> >> kindly show it to me? I'm working on the 1.1.0pre2 code version.
>> >
>> > vswitchd/bridge.c
>> >
>> >> Moreover, I don't understand which exactly is the role played by this
>> >> virtual device and in which cases it is used. Can you explain me it?
>> >
>> > If you want to configure an IP address for the bridge, you put that IP
>> > address on the local port.  (This is the same role as with the Linux
>> > bridge.)
>> Why a tap device is used as local port?
> What kind of device do you think is better suited?
>> Then I can't understand well the comment in 'netdev_linux_open()' :
>> "We can assume that the first user of the tap device is the primary
>> user and give them the tap FD. Subsequent users probably just expect
>> this to be a system device so open it normally to avoid send/receive
>> directions appearing to be reversed."
>> Why the send/receive directions could appear reversed?
> Anything written to the tun FD is received by the tun device.  The tun
> device records these packets as "received", but from the perspective of
> the switch, these are packets that it sent.

I got it.

>> Why this tap device could be opened more than one time?
> Any network device can be opened multiple times with netdev_open().
I apologise for bothering you with all these questions about the same topic.
Can you explain me why there is difference between the first user and
the following users?
I'm working at netdev level, so I can't see this difference, which is
probably observable at an higher level.

gaetano catalli

More information about the dev mailing list