From: Steffen Klassert Subject: Re: [PATCH net-next RFC 7/8] udp: gro behind static key Date: Mon, 17 Sep 2018 12:37:28 +0200 Message-ID: <20180917103728.GG23674@gauss3.secunet.de> References: <20180914175941.213950-1-willemdebruijn.kernel@gmail.com> <20180914175941.213950-8-willemdebruijn.kernel@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: , , , Willem de Bruijn To: Willem de Bruijn Return-path: Received: from a.mx.secunet.com ([62.96.220.36]:38840 "EHLO a.mx.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726995AbeIQQET (ORCPT ); Mon, 17 Sep 2018 12:04:19 -0400 Content-Disposition: inline In-Reply-To: <20180914175941.213950-8-willemdebruijn.kernel@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, Sep 14, 2018 at 01:59:40PM -0400, Willem de Bruijn wrote: > From: Willem de Bruijn > > Avoid the socket lookup cost in udp_gro_receive if no socket has a > gro callback configured. It would be nice if we could do GRO not just for GRO configured sockets, but also for flows that are going to be IPsec transformed or directly forwarded. Maybe in case that forwarding is enabled on the receiving device, inet_gro_receive() could do a route lookup and allow GRO if the route lookup returned at forwarding route. For flows that are likely software segmented after that, it would be worth to build packet chains insted of merging the payload. Packets of the same flow could travel together, but it would save the cost of the packet merging and segmenting. This could be done similar to what I proposed for the list receive case: https://www.spinics.net/lists/netdev/msg522706.html How GRO should be done could be even configured by replacing the net_offload pointer similar to what Paolo propsed in his pachset with the inet_update_offload() function.