[ovs-dev] what functions should be implemented of the netdev-provider interface
blp at nicira.com
Fri Apr 6 09:07:49 PDT 2012
On Fri, Apr 06, 2012 at 03:48:41PM +0800, Min Chen wrote:
> 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.
OpenFlow reports the Ethernet address for each OpenFlow port, so some
Ethernet address has to be supplied. If you don't have a real
Ethernet address, you will have to report some artificial Ethernet
address, such as a randomly generated one.
> 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
It gets a handle for querying and manipulating the netdev, the same as
it would in any other situation. It is analogous to a file
descriptor: it provides a handle for working with a network device,
regardless of how that network device is implemented.
> netdev-vport.c serves as model for minimal
> netdev implementation. Is this implementation sufficient when porting to a
> hardware platform?
More information about the dev