[ovs-dev] what functions should be implemented of the netdev-provider interface

Min Chen ustcer.tonychan at gmail.com
Fri Apr 6 07:48:41 UTC 2012


Thanks Ben for your reply.

On Tue, Apr 3, 2012 at 12:18 AM, Ben Pfaff <blp at nicira.com> wrote:

> On Sat, Mar 31, 2012 at 04:37:41PM +0800, Min Chen wrote:
> > I am reading source code of Open vSwitch 1.4.0. I have a question on
> > updating ports immediately upon ofproto_port_add
>
> This is a strange question.  What prompts the question, that is, why
> does it matter to you when we run it?
>

Sorry, I know it is weird but I am reading the source code and planning to
port Open vSwitch
to a hardware platform.


> > I searched this mailing list and I found Ben's
> > comment<http://openvswitch.org/pipermail/dev/2011-May/008561.html>on
> > updating ports after port_add. Ben wrote "I don't see a reason to
> > defer
> > this."
>
> Right.  That was patch 28 out of 35 in a patch series that refactored
> the whole switch implementation.  My guess is that the goal was not
> to update the port earlier or later, but to update it in a place that
> made it more amenable to refactoring in a later commit.
>
> > But what dose update_port do?
>
> It keeps the switch's knowledge of the collection of ports it manages
> up to date.  As an important side effect, it sends OpenFlow
> OFPT_PORT_STATUS messages.
>
> > Since netdev is opened before calling ofproto_port_add, why it's opened
> > again in update_port:
>
> Not all the callers have a netdev.
>

Sorry, but I am new to the Open vSwitch world so my questions might appear
obvious to you.

I am planning to port OVS to a hardware platform(a box with a switch chip
connected to CPU via PCI-E interfaces).

The goal is to support OpenFlow on this box. So the bonding, LACP, 802.1ag
and other features are not of my concern.

I've been reading the source code for a while. Although the PORTING manual
is quite clear, but still I have no idea how to port this to switching
ASICs. For example, on writing the netdev provider, it reads in the manual:

>     * Functions required to properly implement OpenFlow features.  For
>       example, OpenFlow requires the ability to report the Ethernet
>       hardware address of a port.  These functions must be implemented
>       for minimally correct operation.
>

There is no API of the switching chip that will get or set the Ethernet
address of a port on the chip. And what does open/close (a netdev) do on a
switching chip? All the ports are managed by the chip, what should the
open/close of a port mean? netdev-vport.c serves as model for minimal
netdev implementation. Is this implementation sufficient when porting to a
hardware platform?

Again, sorry for asking these trivial questions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20120406/b1093655/attachment-0003.html>


More information about the dev mailing list