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:	Tue, 24 Nov 2015 19:35:12 +0000
From:	"Singhai, Anjali" <anjali.singhai@...el.com>
To:	Alexander Duyck <alexander.duyck@...il.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:	"jesse@...nel.org" <jesse@...nel.org>,
	"Patil, Kiran" <kiran.patil@...el.com>
Subject: RE: [PATCH v1 2/6] net: Add a generic udp_offload_get_port function



> -----Original Message-----
> From: Alexander Duyck [mailto:alexander.duyck@...il.com]
> Sent: Monday, November 23, 2015 10:38 PM
> To: Singhai, Anjali; netdev@...r.kernel.org
> Cc: jesse@...nel.org; Patil, Kiran
> Subject: Re: [PATCH v1 2/6] net: Add a generic udp_offload_get_port
> function
> 
> On 11/23/2015 01:02 PM, Anjali Singhai Jain wrote:
> > The new function udp_offload_get_port replaces vxlan_get_rx_port().
> > This is a generic function that will help replay all udp tunnel ports
> > irrespective of tunnel type.
> > This way when new udp tunnels get added this function need not change.
> >
> > Note: Drivers besides i40e are compile tested with this change.
> >
> > Signed-off-by: Anjali Singhai Jain <anjali.singhai@...el.com>
> > Signed-off-by: Kiran Patil <kiran.patil@...el.com>
> > ---
> 
> [...]
> 
> > diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c index
> > f938616..8597020 100644
> > --- a/net/ipv4/udp_offload.c
> > +++ b/net/ipv4/udp_offload.c
> > @@ -290,6 +290,33 @@ unlock:
> >   }
> >   EXPORT_SYMBOL(udp_del_offload);
> >
> > +void udp_offload_get_port(struct net_device *dev) {
> > +	struct udp_offload_priv __rcu **head;
> > +	struct udp_offload_priv *uo_priv;
> > +	struct udp_offload *uo;
> > +
> > +	if (udp_offload_base)
> > +		head = &udp_offload_base;
> > +	else
> > +		return;
> > +
> > +	spin_lock(&udp_offload_lock);
> > +	uo_priv = udp_deref_protected(*head);
> > +	for (; uo_priv != NULL; uo_priv = udp_deref_protected(*head)) {
> > +		/* call the right add port */
> > +		uo = uo_priv->offload;
> > +		if (uo && dev->netdev_ops->ndo_add_udp_tunnel_port)
> > +			dev->netdev_ops->ndo_add_udp_tunnel_port(dev,
> > +							uo->family,
> > +							uo->port,
> > +							uo->tunnel_type);
> > +		head = &uo_priv->next;
> > +	}
> > +	spin_unlock(&udp_offload_lock);
> > +}
> > +EXPORT_SYMBOL(udp_offload_get_port);
> > +
> >   struct sk_buff **udp_gro_receive(struct sk_buff **head, struct sk_buff
> *skb,
> >   				 struct udphdr *uh)
> >   {
> >
> 
> So when I got to patch 5 I realized this approach is horribly broken for
> IPv6 tunnels.  The udp_offload_base is only populated if the family is
> AF_INET.  What do you guys plan to do to get support for AF_INET6?
> 
> You probably ought to look at something like what ended up being done for
> the IOAT stuff.  What you end up needing is to support the drivers querying
> for what ports are active, and receiving notifications of tunnel updates, and
> the tunnel side that will register some functionality allowing the active ports
> for a given tunnel type to be queried.
> 
> - Alex

Alex you are right about the IPv6 handling and I will update the patch series to help fix that.
--
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