From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Horman Subject: Re: [PATCH net-next] sctp: define sctp_packet_gso_append to build GSO frames Date: Thu, 14 Jun 2018 07:35:27 -0400 Message-ID: <20180614113527.GA6733@hmswarspite.think-freely.org> References: <20180614004643.GA12409@neilslaptop.think-freely.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: network dev , linux-sctp@vger.kernel.org, Marcelo Ricardo Leitner , davem , Eric Dumazet To: Xin Long Return-path: Received: from charlotte.tuxdriver.com ([70.61.120.58]:59173 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754950AbeFNLgK (ORCPT ); Thu, 14 Jun 2018 07:36:10 -0400 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Thu, Jun 14, 2018 at 09:21:52AM +0800, Xin Long wrote: > On Thu, Jun 14, 2018 at 8:46 AM, Neil Horman wrote: > > On Thu, Jun 14, 2018 at 07:37:02AM +0800, Xin Long wrote: > >> Now sctp GSO uses skb_gro_receive() to append the data into head > >> skb frag_list. However it actually only needs very few code from > >> skb_gro_receive(). Besides, NAPI_GRO_CB has to be set while most > >> of its members are not needed here. > >> > >> This patch is to add sctp_packet_gso_append() to build GSO frames > >> instead of skb_gro_receive(), and it would avoid many unnecessary > >> checks and make the code clearer. > >> > >> Note that sctp will use page frags instead of frag_list to build > >> GSO frames in another patch. But it may take time, as sctp's GSO > >> frames may have different size. skb_segment() can only split it > >> into the frags with the same size, which would break the border > >> of sctp chunks. > >> > >> Signed-off-by: Xin Long > > Do you have any performance numbers to compare with and without this patch? > > Adding a function like this implies that any fixes that go into skb_gro_receive > > now need to be evaluated for this function too, which means theres an implied > > overhead in maintaining it. If we're signing up for that, I'd like to know that > > theres a significant performance benefit. > Hi Neil, > > I don't think there's a noticeable performance benefit since it's > just avoided some checks and variables settings. > > The new function makes SCTP GSO code clearer and readable, > as skb_gro_receive() should only be used in the GRO code paths, > it's confusing in sctp tx path. > > We're doing this, actually because skb_gro_receive() is being > changed now, it would not be suitable for SCTP GSO, see: > https://www.spinics.net/lists/netdev/msg507716.html > Ok, I'm not on board if the only reason was to improve readability, as I didn't want to maintain two separate code paths, but if skb_gro_receive isn't going to be useable, then I'm ok with it Acked-by: Neil Horman