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]
Date:	Thu, 24 Jul 2014 13:28:04 -0700
From:	Andy Zhou <azhou@...ira.com>
To:	Or Gerlitz <or.gerlitz@...il.com>
Cc:	David Miller <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [net-next 01/10] net: Rename ndo_add_vxlan_port to ndo_add_udp_tunnel_port.

On Wed, Jul 23, 2014 at 11:40 PM, Or Gerlitz <or.gerlitz@...il.com> wrote:
> On Tue, Jul 22, 2014 at 1:19 PM, Andy Zhou <azhou@...ira.com> wrote:
>>
>> Rename ndo_add_vxlan_port() API provided by net_device_ops to
>> ndo_add_udp_tunnel_port(). Generalized the API in preparation for
>> up coming NICs and device drivers that may support offloading more
>> UDP tunnels protocols besides VxLAN.  There is no behavioral changes
>> with this patch.
>>
>
>
> [..]
>
>>
>> --- a/drivers/net/vxlan.c
>> +++ b/drivers/net/vxlan.c
>> @@ -650,9 +650,11 @@ static void vxlan_notify_add_rx_port(struct vxlan_sock *vs)
>>
>>         rcu_read_lock();
>>         for_each_netdev_rcu(net, dev) {
>> -               if (dev->netdev_ops->ndo_add_vxlan_port)
>> -                       dev->netdev_ops->ndo_add_vxlan_port(dev, sa_family,
>> -                                                           port);
>> +               if (!dev->netdev_ops->ndo_add_udp_tunnel_port)
>> +                       continue;
>> +
>> +               dev->netdev_ops->ndo_add_udp_tunnel_port(dev, sa_family, port,
>> +                                                        UDP_TUNNEL_TYPE_VXLAN);
>>         }
>>         rcu_read_unlock();
>>  }
>
>
>
> Such changes should be done in a manner which is as minimal as
> possible and not introduce further cleanups
> or style modifications, here the existing code say
>
> if(ndo X is supported by dev Y)
>    call it
>
> Please stick to this and just replace the ndo name in this patch
>
>
>>
>> @@ -668,9 +670,10 @@ static void vxlan_notify_del_rx_port(struct vxlan_sock *vs)
>>
>>         rcu_read_lock();
>>         for_each_netdev_rcu(net, dev) {
>> -               if (dev->netdev_ops->ndo_del_vxlan_port)
>> -                       dev->netdev_ops->ndo_del_vxlan_port(dev, sa_family,
>> -                                                           port);
>> +               if (!dev->netdev_ops->ndo_del_udp_tunnel_port)
>> +                       continue;
>> +               dev->netdev_ops->ndo_del_udp_tunnel_port(dev, sa_family, port,
>> +                                                        UDP_TUNNEL_TYPE_VXLAN);
>>         }
>>         rcu_read_unlock();
>>
>
> same here

O.K. I will revert them back.
--
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