RE: [PATCH v3 net-next 3/6] net: Add SW fallback infrastructure for offloaded sockets

2017-12-19 Thread Ilya Lesokhin
> > diff --git a/net/core/dev.c b/net/core/dev.c > > index b0eee49a2489..6a78d9046674 100644 > > --- a/net/core/dev.c > > +++ b/net/core/dev.c > > @@ -3051,6 +3051,10 @@ static struct sk_buff *validate_xmit_skb(struct > sk_buff *skb, struct net_device > > if (unlikely(!skb)) > >

Re: [PATCH v3 net-next 3/6] net: Add SW fallback infrastructure for offloaded sockets

2017-12-19 Thread Eric Dumazet
On Mon, 2017-12-18 at 13:10 +0200, Ilya Lesokhin wrote: > Offloaded sockets rely on the netdev to transform the transmitted > packets before sending them over the network. > When a packet from an offloaded socket is looped back or > rerouted to a different device we need to detect it and > do the

Re: [PATCH v3 net-next 3/6] net: Add SW fallback infrastructure for offloaded sockets

2017-12-19 Thread Marcelo Ricardo Leitner
On Tue, Dec 19, 2017 at 07:51:02AM +, Ilya Lesokhin wrote: > On Monday, December 18, 2017 9:18 PM, Marcelo Ricardo Leitner wrote: > > > > + > > > + if (sk && sk_fullsock(sk) && sk->sk_offload_check) > > > > Isn't this going to hurt the fast path, checking for sk fields here? > > > > We do

RE: [PATCH v3 net-next 3/6] net: Add SW fallback infrastructure for offloaded sockets

2017-12-18 Thread Ilya Lesokhin
On Monday, December 18, 2017 9:18 PM, Marcelo Ricardo Leitner wrote: > > + > > + if (sk && sk_fullsock(sk) && sk->sk_offload_check) > > Isn't this going to hurt the fast path, checking for sk fields here? > We do add code to the fast path but it seems unavoidable if you want to have SW

Re: [PATCH v3 net-next 3/6] net: Add SW fallback infrastructure for offloaded sockets

2017-12-18 Thread Marcelo Ricardo Leitner
On Mon, Dec 18, 2017 at 01:10:30PM +0200, Ilya Lesokhin wrote: > Offloaded sockets rely on the netdev to transform the transmitted > packets before sending them over the network. > When a packet from an offloaded socket is looped back or > rerouted to a different device we need to detect it and >

[PATCH v3 net-next 3/6] net: Add SW fallback infrastructure for offloaded sockets

2017-12-18 Thread Ilya Lesokhin
Offloaded sockets rely on the netdev to transform the transmitted packets before sending them over the network. When a packet from an offloaded socket is looped back or rerouted to a different device we need to detect it and do the transformation in software Signed-off-by: Ilya Lesokhin