From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754635AbcAHKgG (ORCPT ); Fri, 8 Jan 2016 05:36:06 -0500 Received: from smtp-out6.electric.net ([192.162.217.190]:50022 "EHLO smtp-out6.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754147AbcAHKgE (ORCPT ); Fri, 8 Jan 2016 05:36:04 -0500 From: David Laight To: "'Hans Westgaard Ry'" , "David S. Miller" CC: Alexey Kuznetsov , James Morris , Hideaki YOSHIFUJI , Patrick McHardy , Alexei Starovoitov , Jiri Pirko , Eric Dumazet , Daniel Borkmann , Nicolas Dichtel , "Eric W. Biederman " , Salam Noureddine , Jarod Wilson , Toshiaki Makita , Julian Anastasov , Ying Xue , Craig Gallek , Mel Gorman , "\" hannes\"@stressinduktion.org " , Edward Jee , Julia Lawall , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Haakon Bugge , Knut Omang , Wei Lin Guay , Santosh Shilimkar , Yuval Shaia Subject: RE: [PATCH] net: add per device sg_max_frags for skb Thread-Topic: [PATCH] net: add per device sg_max_frags for skb Thread-Index: AQHRSISSMwvRT8zmnE6xY3PnxvoTm57ugndggALiCQCAAAkwwA== Date: Fri, 8 Jan 2016 10:33:11 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6D1CCC00C7@AcuExch.aculab.com> References: <1452086182-26748-1-git-send-email-hans.westgaard.ry@oracle.com> <063D6719AE5E284EB5DD2968C1650D6D1CCBE5AA@AcuExch.aculab.com> <568F87AC.60405@oracle.com> In-Reply-To: <568F87AC.60405@oracle.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-Outbound-IP: 213.249.233.130 X-Env-From: David.Laight@ACULAB.COM X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u08AaCP0016740 From: Hans Westgaard > Sent: 08 January 2016 09:56 ... > >> The patch allows the device to limit the maximum number fragments used > >> in one skb. > > > > This doesn't seem to me to be the correct way to fix this. > > Anything that adds an extra fragment (in this case IPoIB) should allow > > for the skb already having the maximum number of fragments. > > Fully linearising the skb is overkill, but I think the first fragment > > can be added to the linear part of the skb. > > > > David > > > > > When IpoIB handles a skb-request it converts fragments to SGEs to > be handled by a HCA. > The problem arises when the HCA have a limited number of SGEs less than > MAX_SKB_FRAGS. > (it gets a little worse since IPoIB need to yet another segment) > I have not found any easy way of fixing this with currenct codebase. I think one of the xen ethernet interfaces had a similar problem. Just reduce the number of fragments by copying two (or more) of them into a single fragment. In effect, anything that reduces the number of fragments will do a copy. David From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Laight Subject: RE: [PATCH] net: add per device sg_max_frags for skb Date: Fri, 8 Jan 2016 10:33:11 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6D1CCC00C7@AcuExch.aculab.com> References: <1452086182-26748-1-git-send-email-hans.westgaard.ry@oracle.com> <063D6719AE5E284EB5DD2968C1650D6D1CCBE5AA@AcuExch.aculab.com> <568F87AC.60405@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Cc: Alexey Kuznetsov , James Morris , Hideaki YOSHIFUJI , Patrick McHardy , Alexei Starovoitov , Jiri Pirko , Eric Dumazet , Daniel Borkmann , Nicolas Dichtel , "Eric W. Biederman " , Salam Noureddine , Jarod Wilson , Toshiaki Makita , Julian Anastasov , Ying Xue , Craig Gallek , Mel Gorman , "\" hannes\"@stressinduktion.org " , Edward Jee , Julia Lawall , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org"
  • , "David S. Miller" Return-path: In-Reply-To: <568F87AC.60405@oracle.com> Content-Language: en-US S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