Re: [PATCH net-next] udp: use sk_protocol instead of pcflag to detect udplite sockets

2017-04-01 Thread David Miller
From: Paolo Abeni Date: Fri, 31 Mar 2017 11:47:39 +0200 > In the udp_sock struct, the 'forward_deficit' and 'pcflag' fields > share the same cacheline. While the first is dirtied by > udp_recvmsg, the latter is read, possibly several times, by the > bottom half processing to

Re: [PATCH net-next] udp: use sk_protocol instead of pcflag to detect udplite sockets

2017-03-31 Thread Paolo Abeni
On Fri, 2017-03-31 at 08:09 -0700, Eric Dumazet wrote: > On Fri, 2017-03-31 at 16:33 +0200, Paolo Abeni wrote: > > > I did the above to avoid increasing the udp_sock struct size; this will > > costs more than a whole cacheline. > > Yes, but who cares :) > > Also note that we discussed about

Re: [PATCH net-next] udp: use sk_protocol instead of pcflag to detect udplite sockets

2017-03-31 Thread Eric Dumazet
On Fri, 2017-03-31 at 15:03 +, David Laight wrote: > Is that really sensible on systems with large cache lines? Yes it is. We mostly do our perf analysis on x86, and it turns out that linux networking on PowerPC is not great because of this. struct dst_entry is showing problems, simply

Re: [PATCH net-next] udp: use sk_protocol instead of pcflag to detect udplite sockets

2017-03-31 Thread Eric Dumazet
On Fri, 2017-03-31 at 16:33 +0200, Paolo Abeni wrote: > I did the above to avoid increasing the udp_sock struct size; this will > costs more than a whole cacheline. Yes, but who cares :) Also note that we discussed about having a secondary receive queue in the future, to decouple the fact that

RE: [PATCH net-next] udp: use sk_protocol instead of pcflag to detect udplite sockets

2017-03-31 Thread David Laight
From: Eric Dumazet > Sent: 31 March 2017 14:25 > On Fri, 2017-03-31 at 11:47 +0200, Paolo Abeni wrote: > > In the udp_sock struct, the 'forward_deficit' and 'pcflag' fields > > share the same cacheline. While the first is dirtied by > > udp_recvmsg, the latter is read, possibly several times, by

Re: [PATCH net-next] udp: use sk_protocol instead of pcflag to detect udplite sockets

2017-03-31 Thread Paolo Abeni
On Fri, 2017-03-31 at 06:25 -0700, Eric Dumazet wrote: > On Fri, 2017-03-31 at 11:47 +0200, Paolo Abeni wrote: > > In the udp_sock struct, the 'forward_deficit' and 'pcflag' fields > > share the same cacheline. While the first is dirtied by > > udp_recvmsg, the latter is read, possibly several

Re: [PATCH net-next] udp: use sk_protocol instead of pcflag to detect udplite sockets

2017-03-31 Thread Eric Dumazet
On Fri, 2017-03-31 at 11:47 +0200, Paolo Abeni wrote: > In the udp_sock struct, the 'forward_deficit' and 'pcflag' fields > share the same cacheline. While the first is dirtied by > udp_recvmsg, the latter is read, possibly several times, by the > bottom half processing to discriminate between udp

[PATCH net-next] udp: use sk_protocol instead of pcflag to detect udplite sockets

2017-03-31 Thread Paolo Abeni
In the udp_sock struct, the 'forward_deficit' and 'pcflag' fields share the same cacheline. While the first is dirtied by udp_recvmsg, the latter is read, possibly several times, by the bottom half processing to discriminate between udp and udplite sockets. With this patch, sk->sk_protocol is