Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp367917imc; Sun, 10 Mar 2019 08:07:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqwz3fJWiMKcb/edbgJssHmGPPLXCD+tk4Qm+4OI07QEH60G59OeXBaPKF+apGbIK0MKtI4U X-Received: by 2002:a17:902:1002:: with SMTP id b2mr28493433pla.248.1552230420059; Sun, 10 Mar 2019 08:07:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552230420; cv=none; d=google.com; s=arc-20160816; b=jPGt6pyYhkDvURBWGTpdvRXcXeSY6YZlmFNPL8g+Eouqs6wbiOboC/npCZ8wvjYdaj l3rmhTe/g96MSQNKxua8rk3uqxiFHFrIaeZYein2yIvagFpFJDK1V6fXRC4I2PUaHAlr j2blGVPfdXQaiq1TCgJRkqIRdrChKrU5fQ+fEDXt6rXIqJT2o1kZzUjHGCFqgcXPsGLj Q5d/eI5vHG6pG/hDy+1Q38A9btwN72ULcmikUMGCCpMi4jYHUDzccU2hD35AcOjaUDct Pfyv62zcArT4cuGSe5kmAvwxDGPwKPCtAn/TOhj3t+KUDEAAr3Cpwmxrd78ErWhv8XEF dLFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=wtsxlbBjcxVfZ0eiSnungx+cQTrDHHozfu4bX+E0+Q4=; b=DXSz1fMQWwFazb4UMKBCAddJ6akUvFAkVLVbcJDB6QkQfNXsakcQmOuXhhHB22tQzy Drac7BDVlpCCXwZdsDyXQnvwdpwYcQhpnsKvrWRGmGaErjWNXsV72ijG/UwS9BrikKCB SFeXFXC8GtcEF7Jb46KUXg+jMK/nGww4dwpwTpK3J7bbavjHLoSiOC6FLnADVem9LFYI XK827/QWSwLeURLQ0VOIcXBmTJp7/dRCEM8orqJ5sVObJ1/LCg7Vwsvo4cmqcL69oDOY katmD9hB1jy2UcJ+mKabjMwfpy55I1XKCglTkfJjDzcPj3c2wrz+BJtbuK7gj8TvDija HnqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@post.cz header.s=beta header.b="WgfI/0y/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=post.cz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o5si3012032pfi.22.2019.03.10.08.06.42; Sun, 10 Mar 2019 08:06:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@post.cz header.s=beta header.b="WgfI/0y/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=post.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726597AbfCJNt4 (ORCPT + 99 others); Sun, 10 Mar 2019 09:49:56 -0400 Received: from mxc2.seznam.cz ([77.75.77.23]:26042 "EHLO mxc2.seznam.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726488AbfCJNt4 (ORCPT ); Sun, 10 Mar 2019 09:49:56 -0400 X-Greylist: delayed 813 seconds by postgrey-1.27 at vger.kernel.org; Sun, 10 Mar 2019 09:49:54 EDT Received: from email.seznam.cz by email-smtpc6a.ng.seznam.cz (email-smtpc6a.ng.seznam.cz [10.23.10.165]) id 61f4d8e60e7863d462bdf3b2; Sun, 10 Mar 2019 14:49:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=post.cz; s=beta; t=1552225793; bh=wtsxlbBjcxVfZ0eiSnungx+cQTrDHHozfu4bX+E0+Q4=; h=Received:Subject:To:Cc:References:From:Message-ID:Date:User-Agent: MIME-Version:In-Reply-To:Content-Type:Content-Language: Content-Transfer-Encoding; b=WgfI/0y/CnNMYTow8FARdJ6F7z2ou6aEDw7P4fMwp8dscIIhJh5/EN78Prja0SEoP vQfHfbKCH+rRvMX3TItWSnjbk6hfTo6NylNAJ1MZyUGPcHoZh508cIMH5LgGhP4Am8 nKBg4/W+0UC/eiPL6cLZt1nR/BQItNL9mQW9vdnU= Received: from [192.168.1.81] (static-cl188134234222.unet.cz [188.134.234.222]) by email-relay5.ng.seznam.cz (Seznam SMTPD 1.3.103) with ESMTP; Sun, 10 Mar 2019 14:36:12 +0100 (CET) Subject: Re: [PATCH] net: can: Increase tx queue length To: Appana Durga Kedareswara Rao , Andre Naujoks , "wg@grandegger.com" , "mkl@pengutronix.de" , "davem@davemloft.net" Cc: "linux-can@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Michal Sojka References: <1552140446-31535-1-git-send-email-appana.durga.rao@xilinx.com> From: Martin Jerabek Message-ID: <61d9d998-37f7-6f99-60d4-b1973e13e6ef@post.cz> Date: Sun, 10 Mar 2019 14:36:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US-large Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09. 03. 19 15:40, Appana Durga Kedareswara Rao wrote: > Hi Andre, > > >> >> On 3/9/19 3:07 PM, Appana Durga Kedareswara rao wrote: >>> While stress testing the CAN interface on xilinx axi can in loopback >>> mode getting message "write: no buffer space available" >>> Increasing device tx queue length resolved the above mentioned issue. >> >> No need to patch the kernel: >> >> $ ip link set txqueuelen 500 >> >> does the same thing. > > Thanks for the review... > Agree but it is not an out of box solution right?? > Do you have any idea for socket can devices why the tx queue length is 10 whereas > for other network devices (ex: ethernet) it is 1000 ?? > > Regards, > Kedar. There was already a patch for this in the past [1], together with a thorough analysis, but for some reason the discussion died out. Even if the defaults are not changed, it would be nice to at least see it mentioned in Documentation/networking/can.txt to save people some time while looking for the solution. Regards, Martin [1] http://socket-can.996257.n3.nabble.com/Solving-ENOBUFS-returned-by-write-td2886.html >> >>> >>> Signed-off-by: Appana Durga Kedareswara rao >>> >>> --- >>> --> Network devices default tx_queue_len is 1000 but for socket >>> can device it is 10 any reason for it?? >>> >>> drivers/net/can/dev.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c index >>> c05e4d5..32bd5be 100644 >>> --- a/drivers/net/can/dev.c >>> +++ b/drivers/net/can/dev.c >>> @@ -642,7 +642,7 @@ static void can_setup(struct net_device *dev) >>> dev->mtu = CAN_MTU; >>> dev->hard_header_len = 0; >>> dev->addr_len = 0; >>> - dev->tx_queue_len = 10; >>> + dev->tx_queue_len = 500; >>> >>> /* New-style flags. */ >>> dev->flags = IFF_NOARP; >>> >