[ovs-dev] [RFC net-next 22/22] openvswitch: Use regular GRE net_device instead of vport
Thomas Graf
tgraf at suug.ch
Thu Jul 16 14:52:46 UTC 2015
On 07/16/15 at 05:59pm, Simon Horman wrote:
> On Fri, Jul 10, 2015 at 04:19:24PM +0200, Thomas Graf wrote:
> > static void ipgre_tap_setup(struct net_device *dev)
> > {
> > ether_setup(dev);
> > - dev->netdev_ops = &gre_tap_netdev_ops;
> > dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
> > ip_tunnel_setup(dev, gre_tap_net_id);
> > +
> > + if (!strcmp(dev->name, GRE_TAP_FB_NAME))
> > + dev->netdev_ops = &gre_fb_netdev_ops;
> > + else
> > + dev->netdev_ops = &gre_tap_netdev_ops;
> > }
> >
> > static int ipgre_newlink(struct net *src_net, struct net_device *dev,
>
> [snip]
>
> Is there a side-effect of the above that if a user creates a gretap device
> whose name is "gretap0" then the device will use gre_fb_netdev_ops instead
> of gre_tap_netdev_ops. If so, does that imply a change in behaviour for
> gretap devices created with that name?
I'm inclined to change this and use an in-kernel API as well to
create the net_device just like VXLAN does in patch 21.
Pravin, what do you think?
More information about the dev
mailing list