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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALnjE+omzvWop3T2bD_Yp9gW3XN-9NbeEnCmh615iNqJH2dvog@mail.gmail.com>
Date:	Thu, 16 Jul 2015 14:36:19 -0700
From:	Pravin Shelar <pshelar@...ira.com>
To:	Thomas Graf <tgraf@...g.ch>
Cc:	Simon Horman <simon.horman@...ronome.com>,
	Roopa Prabhu <roopa@...ulusnetworks.com>, rshearma@...cade.com,
	ebiederm <ebiederm@...ssion.com>,
	Hannes Frederic Sowa <hannes@...essinduktion.org>,
	Jesse Gross <jesse@...ira.com>,
	David Miller <davem@...emloft.net>,
	Daniel Borkmann <daniel@...earbox.net>, tom@...bertland.com,
	Eric Dumazet <edumazet@...gle.com>,
	Jiří Pírko <jiri@...nulli.us>,
	marcelo.leitner@...il.com,
	Stephen Hemminger <stephen@...workplumber.org>,
	Justin Pettit <jpettit@...ira.com>,
	Patrick McHardy <kaber@...sh.net>,
	netdev <netdev@...r.kernel.org>,
	"dev@...nvswitch.org" <dev@...nvswitch.org>
Subject: Re: [RFC net-next 22/22] openvswitch: Use regular GRE net_device
 instead of vport

On Thu, Jul 16, 2015 at 7:52 AM, Thomas Graf <tgraf@...g.ch> wrote:
> 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?
>
Reason for checking the name is to switch to different xmit function
for flow based and non flow based devices. I did it to avoid checking
tunnel-info on every xmit. But vxlan does the check on xmit. So I will
change it so that there is no need to define another ops structure.
This way we can share same gre-tap-ops for flow based and non flow
based devices.

> 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?

About the vxlan APIs we also need to direct netlink interface for
userspace to configure vxlan device. This will allow us to remove
vxlan compat code from ovs vport-netdev.c in future.
--
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