[ovs-dev] [tunnel 07/11] netdev: New function netdev_get_dpif_port().

Ben Pfaff blp at nicira.com
Mon Jan 28 19:17:38 UTC 2013

On Sun, Jan 27, 2013 at 04:58:08PM -0800, Ethan Jackson wrote:
> In future patches, a netdev's datapath port name may not
> necessarily be the same as its device name. This patch prepares for
> this by making the distinction in the netdev and dpif layers.
> Signed-off-by: Ethan Jackson <ethan at nicira.com>

I don't see a problem with this except for a layering violation: the
generic "netdev" layer now has a function and a function pointer in it
that is specific to the dpif code.  I can see two ways to deal with
this: either move it out of the generic "netdev" layer into some other
place, or to add conspicuous comments on ->get_dpif_port() and
netdev_get_dpif_port() that explain the context and why this
particular function might not make any sense (and you should just
leave it NULL) if you're implementing something that isn't a
dpif-based switch.



More information about the dev mailing list