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 
fallback.
The XFRM device offload also does that
http://elixir.free-electrons.com/linux/v4.14.7/source/net/core/dev.c#L3058

The check can be optimized but I didn't want to do that before I saw that it's 
an issue.
I'm also not sure what the correct solution is.
I don't like that fact that each "stateful protocol" we offload requires its 
own check. 
We need to think if we can find a generic way of doing it.

Perhaps we can hold the expected netdev somewhere in the SKB and only if we 
don't
Go out of the expected netdev go to a slow path that does a check for each 
protocol.

Thanks,
Ilya

Reply via email to