From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933589AbcA0PPK (ORCPT ); Wed, 27 Jan 2016 10:15:10 -0500 Received: from mail-pa0-f41.google.com ([209.85.220.41]:33186 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933513AbcA0PPH (ORCPT ); Wed, 27 Jan 2016 10:15:07 -0500 Message-ID: <1453907702.20722.6.camel@edumazet-glaptop2.roam.corp.google.com> Subject: Re: [PATCH v2] net:Add sysctl_tcp_sg_max_skb_frags From: Eric Dumazet To: Hans Westgaard Ry Cc: "David S. Miller" , Alexey Kuznetsov , James Morris , Hideaki YOSHIFUJI , Patrick McHardy , "\"\"hannes@stressinduktion.org\"\"" , "open list:NETWORKING [GENERAL]" , open list , Haakon Bugge Date: Wed, 27 Jan 2016 07:15:02 -0800 In-Reply-To: <1453900829-3384-1-git-send-email-hans.westgaard.ry@oracle.com> References: <568F87AC.60405@oracle.com> <1453900829-3384-1-git-send-email-hans.westgaard.ry@oracle.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2016-01-27 at 14:20 +0100, Hans Westgaard Ry wrote: > Devices may have limits on the number of fragments in an skb they support. > Current codebase uses a constant as maximum for number of fragments one > skb can hold and use. > When enabling scatter/gather and running traffic with many small messages > the codebase uses the maximum number of fragments and may thereby violate > the max for certain devices. > The patch introduces a global variable as max number of fragments in > scatter/gather. Principle looks good, but we have to ask if other skb providers [1] will add other sysctl, or if we could share a common one ? If it is a common one, it should be /proc/sys/net/core/... instead of /proc/sys/net/ipv4/tcp_.... Other providers include : 1) GRO stack 2) callers of sock_alloc_send_pskb(), alloc_skb_with_frags(), sock_alloc_send_skb() .. Thanks !