lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALnjE+rwf1ytPScx3Ok8QGURwR11KN0AEATxEYG04_rEJYL4gg@mail.gmail.com>
Date:	Tue, 4 Aug 2015 19:50:40 -0700
From:	Pravin Shelar <pshelar@...ira.com>
To:	Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc:	netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next v3 2/3] openvswitch: Use regular GRE net_device
 instead of vport

On Tue, Aug 4, 2015 at 7:27 PM, Alexei Starovoitov
<alexei.starovoitov@...il.com> wrote:
> On Tue, Aug 04, 2015 at 04:22:35PM -0700, Pravin B Shelar wrote:
>> Following patch adds support for flow based tunnel to GRE
>> tap deivces. Using flow based tunneling, we can implement
>> OVS GRE vport. This patch removes all of the OVS
>> specific GRE code and make OVS use a ip_gre net_device.
>> Minimal GRE vport is kept to handle compatibility with
>> current userspace application.
>>
>> Signed-off-by: Pravin B Shelar <pshelar@...ira.com>
> ...
>> diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
> ...
>> +struct net_device *ipgre_fb_dev_create(struct net *net, const char *name,
>> +                                    u8 name_assign_type)
>> +{
>> +     struct ip_tunnel_net *itn = net_generic(net, gre_tap_net_id);
>> +     struct nlattr *tb[IFLA_MAX + 1];
>> +     struct net_device *dev;
>> +     struct ip_tunnel *t;
>> +     int err;
>> +
>> +     if (rtnl_dereference(itn->flow_based_tunnel))
>> +             return ERR_PTR(-EEXIST);
>> +
>> +     memset(&tb, 0, sizeof(tb));
>> +
>> +     dev = rtnl_create_link(net, name, name_assign_type,
>> +                            &ipgre_tap_ops, tb);
>> +     if (IS_ERR(dev))
>> +             return dev;
>> +
>> +     /* Configure flow based GRE device. */
>> +     t = netdev_priv(dev);
>> +     t->is_fb_tunnel = true;
>> +
>> +     err = ipgre_newlink(net, dev, tb, NULL);
>> +     if (err < 0)
>> +             goto out;
>> +     return dev;
>> +out:
>> +     free_netdev(dev);
>> +     return ERR_PTR(err);
>> +}
>> +EXPORT_SYMBOL_GPL(ipgre_fb_dev_create);
>
> ...
>> diff --git a/net/openvswitch/vport-gre.c b/net/openvswitch/vport-gre.c
> ...
>> +static struct vport *gre_tnl_create(const struct vport_parms *parms)
>>  {
> ...
>> +     rtnl_lock();
>> +     dev = ipgre_fb_dev_create(net, parms->name, NET_NAME_USER);
>> +     if (IS_ERR(dev)) {
>> +             rtnl_unlock();
>> +             ovs_vport_free(vport);
>> +             return ERR_CAST(dev);
>
> So the code from vport-gre.c got moved into ip_gre.c and ipgre_fb_dev_create()
> got exported with the only user being ovs vport-gre ?!
> Then the proper commit message should say 'move ovs specific gre bits
> to ip_gre.c', since the only way to use it is to create ovs vport-gre.
> Instead, can you please do it similar to Thomas's vxlan patch so that
> such gre tunnel can actually be usable outside of ovs?
>

I am planning on adding the ip_gre netlink interface later on. OVS
userspace needs same interface to directly create the GRE device
without vport-gre module. vport-gre module is compatibility code. If
you want I can do it in same patch.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ