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] [day] [month] [year] [list]
Message-ID: <566EE853.5040002@intel.com>
Date:	Mon, 14 Dec 2015 08:03:31 -0800
From:	"Singhai, Anjali" <anjali.singhai@...el.com>
To:	Tom Herbert <tom@...bertland.com>
Cc:	Linux Kernel Network Developers <netdev@...r.kernel.org>,
	jeffrey.t.kirsher@...el.org, Kiran Patil <kiran.patil@...el.com>
Subject: Re: [PATCH v3 1/4] geneve: Add geneve udp port offload for ethernet
 devices



On 12/11/2015 7:11 PM, Tom Herbert wrote:
> On Tue, Dec 8, 2015 at 10:12 AM, Anjali Singhai Jain
> <anjali.singhai@...el.com> wrote:
>> Add ndo_ops to add/del UDP ports to a device that supports geneve
>> offload.
>>
>> v3: Add some more comments about the use of the new ndo ops.
>>
>> Signed-off-by: Anjali Singhai Jain <anjali.singhai at intel.com>
>> Signed-off-by: Kiran Patil <kiran.patil at intel.com>
>> ---
>>   drivers/net/geneve.c      | 23 +++++++++++++++++++++++
>>   include/linux/netdevice.h | 21 ++++++++++++++++++++-
>>   2 files changed, 43 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
>> index de5c30c..b43fd56 100644
>> --- a/drivers/net/geneve.c
>> +++ b/drivers/net/geneve.c
>> @@ -371,8 +371,11 @@ static struct socket *geneve_create_sock(struct net *net, bool ipv6,
>>
>>   static void geneve_notify_add_rx_port(struct geneve_sock *gs)
>>   {
>> +       struct net_device *dev;
>>          struct sock *sk = gs->sock->sk;
>> +       struct net *net = sock_net(sk);
>>          sa_family_t sa_family = sk->sk_family;
>> +       __be16 port = inet_sk(sk)->inet_sport;
>>          int err;
>>
>>          if (sa_family == AF_INET) {
>> @@ -381,6 +384,14 @@ static void geneve_notify_add_rx_port(struct geneve_sock *gs)
>>                          pr_warn("geneve: udp_add_offload failed with status %d\n",
>>                                  err);
>>          }
>> +
>> +       rcu_read_lock();
>> +       for_each_netdev_rcu(net, dev) {
>> +               if (dev->netdev_ops->ndo_add_geneve_port)
>> +                       dev->netdev_ops->ndo_add_geneve_port(dev, sa_family,
>> +                                                            port);
>> +       }
>> +       rcu_read_unlock();
> What about IPv6 case?

The driver still gets add port calls for IPv6 and can decide to offload 
L4 RX checksum if the HW is capable.

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