On Mon, Oct 17, 2016 at 6:02 AM, Jiri Benc <jb...@redhat.com> wrote: > From: Simon Horman <simon.hor...@netronome.com> > > This allows GRE tunnels to send and receive both > layer 2 packets (packets with an ethernet header) and > layer 3 packets (packets without an ethernet header). > > Signed-off-by: Simon Horman <simon.hor...@netronome.com> > Signed-off-by: Jiri Benc <jb...@redhat.com> > --- > v12: removed the non-gre hunks (now part of previous patches in this > patchset) > --- > include/net/gre.h | 4 ++-- > net/ipv4/ip_gre.c | 9 +++++---- > net/openvswitch/vport-gre.c | 2 +- > 3 files changed, 8 insertions(+), 7 deletions(-) > > diff --git a/include/net/gre.h b/include/net/gre.h > index d25d836c129b..1a0bb1cefa60 100644 > --- a/include/net/gre.h > +++ b/include/net/gre.h > @@ -31,8 +31,8 @@ struct gre_protocol { > int gre_add_protocol(const struct gre_protocol *proto, u8 version); > int gre_del_protocol(const struct gre_protocol *proto, u8 version); > > -struct net_device *gretap_fb_dev_create(struct net *net, const char *name, > - u8 name_assign_type); > +struct net_device *gre_fb_dev_create(struct net *net, const char *name, > + u8 name_assign_type); > int gre_parse_header(struct sk_buff *skb, struct tnl_ptk_info *tpi, > bool *csum_err, __be16 proto, int nhs); > > diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c > index 576f705d8180..18caea5c6d09 100644 > --- a/net/ipv4/ip_gre.c > +++ b/net/ipv4/ip_gre.c > @@ -1125,8 +1125,8 @@ static int ipgre_fill_info(struct sk_buff *skb, const > struct net_device *dev) > .get_link_net = ip_tunnel_get_link_net, > }; > > -struct net_device *gretap_fb_dev_create(struct net *net, const char *name, > - u8 name_assign_type) > +struct net_device *gre_fb_dev_create(struct net *net, const char *name, > + u8 name_assign_type) > { > struct nlattr *tb[IFLA_MAX + 1]; > struct net_device *dev; > @@ -1137,13 +1137,14 @@ struct net_device *gretap_fb_dev_create(struct net > *net, const char *name, > memset(&tb, 0, sizeof(tb)); > > dev = rtnl_create_link(net, name, name_assign_type, > - &ipgre_tap_ops, tb); > + &ipgre_link_ops, tb); > if (IS_ERR(dev)) > return dev; > > /* Configure flow based GRE device. */ > t = netdev_priv(dev); > t->collect_md = true; > + dev->type = ARPHRD_NONE; >
This is OVS tunnel compatibility code. We are not suppose to add new features to compat code. Just provide a way to configure such device over rtnl. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev