From owner-freebsd-net@FreeBSD.ORG Sun Oct 30 16:00:26 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DC401065754 for ; Sun, 30 Oct 2011 16:00:26 +0000 (UTC) (envelope-from hoomanfazaeli@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id EB8EB8FC16 for ; Sun, 30 Oct 2011 16:00:22 +0000 (UTC) Received: by bkbzs2 with SMTP id zs2so2588794bkb.13 for ; Sun, 30 Oct 2011 09:00:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=WBxLUUYoBpEQUXUjaVuCpHTW+8YY5h+1ehYxlWNgFmQ=; b=imQCpsycAk4KEw+MbFNPl/l+Od9/s/qL2hjGqPRhGBbxyBKSLUPOzTauKtjPAknQG/ ppOo3bjAPCkSeI9DKs4zfYUStAIGF2fH/nu35q6pzJQp3M6a7Pqylfz24o9T5Y05jftG 2vMGTp5hwuizOch+1qySdhE8Iw2NyZJKQOIL4= Received: by 10.204.141.8 with SMTP id k8mr8153858bku.14.1319990421766; Sun, 30 Oct 2011 09:00:21 -0700 (PDT) Received: from [192.168.1.180] ([84.241.57.181]) by mx.google.com with ESMTPS id w8sm14101548bks.11.2011.10.30.09.00.18 (version=SSLv3 cipher=OTHER); Sun, 30 Oct 2011 09:00:21 -0700 (PDT) Message-ID: <4EAD7490.4040108@gmail.com> Date: Sun, 30 Oct 2011 19:30:16 +0330 From: Hooman Fazaeli User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.23) Gecko/20110920 Thunderbird/3.1.15 MIME-Version: 1.0 To: Ryan Stone References: <4E8F157A.40702@sentex.net> <4E8F51D4.1060509@sentex.net> <4EA7E203.3020306@sepehrs.com> <4EA80818.3030504@sentex.net> <4EA80F88.4000400@hotplug.ru> <4EA82715.2000404@gmail.com> <4EA8FA40.7010504@hotplug.ru> <4EA91836.2040508@gmail.com> <4EA959EE.2070806@hotplug.ru> <4EAD116A.8090006@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: pyunyh@gmail.com, freebsd-net@freebsd.org, Jason Wolfe , Jack Vogel , Emil Muratov Subject: Re: Intel 82574L interface wedging on em 7.1.9/7.2.3 when MSIX enabled X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Oct 2011 16:00:26 -0000 On 10/30/2011 6:03 PM, Ryan Stone wrote: > On Sun, Oct 30, 2011 at 4:57 AM, Hooman Fazaeli wrote: >> IMHO, this is not a driver issue and the real fix would be to change >> IFQ_HANDOFF to call if_start when the queue is full. > I'm not sure that's the right approach. 99% of the time, calling > if_start when the queue is full will be a waste of time. It seems to > me that the link interrupt handler needs to kick off the tx task to > drain the tx queue instead. If the queue were not full, system would consume the CPU for sending packets. Now, that it is full, a much little time is used to recover from a (temporary) problem. Not a big deal! Furthermore, the most common case for queue being full is stack sending packets too fast. In this case OACTIVE is set and if_start is not called at all. Changing HANDOFF has the benefit that it is simple, can be implemented fast and fixes the problem once for all drivers and for all such dangerous bugs not yet discovered. It also makes drivers' code simpler.