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: <1458945071.6263.2.camel@perches.com>
Date:	Fri, 25 Mar 2016 15:31:11 -0700
From:	Joe Perches <joe@...ches.com>
To:	David Miller <davem@...emloft.net>, tom@...bertland.com
Cc:	netdev@...r.kernel.org, kernel-team@...com
Subject: Re: [PATCH RFC 3/9] net: Add fast receive encapsulation

On Fri, 2016-03-25 at 16:40 -0400, David Miller wrote:
> From: Tom Herbert <tom@...bertland.com>
> Date: Wed, 23 Mar 2016 15:36:52 -0700
> 
> > +{
> > +     struct udp_sock *up = udp_sk(sk);
> > +     int is_udplite = IS_UDPLITE(sk);
> > +
> > +     int (*encap_rcv)(struct sock *sk, struct sk_buff *skb);
> > +
> 
> Small nit, please put this encap_rcv function pointer declaration at
> the top of the local variable list.

It might also be nice to remove the equivalent typedef and
use the same form in udp_tunnel.h
---
 include/net/udp_tunnel.h | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/include/net/udp_tunnel.h b/include/net/udp_tunnel.h
index b831140..71885b1 100644
--- a/include/net/udp_tunnel.h
+++ b/include/net/udp_tunnel.h
@@ -62,15 +62,12 @@ static inline int udp_sock_create(struct net *net,
 	return -EPFNOSUPPORT;
 }
 
-typedef int (*udp_tunnel_encap_rcv_t)(struct sock *sk, struct sk_buff *skb);
-typedef void (*udp_tunnel_encap_destroy_t)(struct sock *sk);
-
 struct udp_tunnel_sock_cfg {
 	void *sk_user_data;     /* user data used by encap_rcv call back */
 	/* Used for setting up udp_sock fields, see udp.h for details */
 	__u8  encap_type;
-	udp_tunnel_encap_rcv_t encap_rcv;
-	udp_tunnel_encap_destroy_t encap_destroy;
+	int (*encap_rcv)(struct sock *sk, struct sk_buff *skb);
+	void (*encap_destroy)(struct sock *sk);
 };
 
 /* Setup the given (UDP) sock to receive UDP encapsulated packets */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ