From: Joe Perches <joe@perches.com>
To: David Miller <davem@davemloft.net>, tom@herbertland.com
Cc: netdev@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH RFC 3/9] net: Add fast receive encapsulation
Date: Fri, 25 Mar 2016 15:31:11 -0700 [thread overview]
Message-ID: <1458945071.6263.2.camel@perches.com> (raw)
In-Reply-To: <20160325.164042.1532577255302949895.davem@davemloft.net>
On Fri, 2016-03-25 at 16:40 -0400, David Miller wrote:
> From: Tom Herbert <tom@herbertland.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 */
next prev parent reply other threads:[~2016-03-25 22:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-23 22:36 [PATCH RFC 0/9] udp: GRO in UDP sockets and fast encap_rcv Tom Herbert
2016-03-23 22:36 ` [PATCH RFC 1/9] net: Check skb_dst for NULL in inet_iif Tom Herbert
2016-03-23 22:36 ` [PATCH RFC 2/9] udp: Add noreference lookup functions Tom Herbert
2016-03-23 22:59 ` Eric Dumazet
2016-03-23 23:17 ` Tom Herbert
2016-03-23 23:28 ` Eric Dumazet
2016-03-23 22:36 ` [PATCH RFC 3/9] net: Add fast receive encapsulation Tom Herbert
2016-03-25 20:40 ` David Miller
2016-03-25 22:31 ` Joe Perches [this message]
2016-03-23 22:36 ` [PATCH RFC 4/9] udp: Add GRO functions to UDP socket Tom Herbert
2016-03-23 22:36 ` [PATCH RFC 5/9] udp: Add socket based GRO and fast receive encap to tunnel config Tom Herbert
2016-03-23 22:36 ` [PATCH RFC 6/9] vxlan: change vxlan to use UDP socket GRO Tom Herbert
2016-03-23 22:36 ` [PATCH RFC 7/9] fou: change to use UDP socket GRO and fast rcv encap Tom Herbert
2016-03-23 22:36 ` [PATCH RFC 8/9] geneve: change to use UDP socket GRO Tom Herbert
2016-03-23 22:36 ` [PATCH RFC 9/9] udp: Remove udp_offloads Tom Herbert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1458945071.6263.2.camel@perches.com \
--to=joe@perches.com \
--cc=davem@davemloft.net \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
--cc=tom@herbertland.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.