From owner-svn-src-head@freebsd.org Sat Sep 2 13:28:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EA6EE13223; Sat, 2 Sep 2017 13:28:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EE772DA8; Sat, 2 Sep 2017 13:28:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v82DSj31011685; Sat, 2 Sep 2017 13:28:45 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v82DSj5j011683; Sat, 2 Sep 2017 13:28:45 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201709021328.v82DSj5j011683@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 2 Sep 2017 13:28:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323128 - in head/sys/dev/ntb: . ntb_hw X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in head/sys/dev/ntb: . ntb_hw X-SVN-Commit-Revision: 323128 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Sep 2017 13:28:46 -0000 Author: mav Date: Sat Sep 2 13:28:45 2017 New Revision: 323128 URL: https://svnweb.freebsd.org/changeset/base/323128 Log: Increase negotiation polling period from 10ms to 100ms. There is no big need to burn CPU if other side may be not there yet. For example, the PLX hardware by default enables the NTB link up on reset, not dependig on driver to do it. In case of Intel hardware this also reduces race between MSI-X workaround negotiation and upper layers, using the same scratchpad registers in different time. MFC after: 12 days Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c head/sys/dev/ntb/ntb_transport.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Sat Sep 2 11:57:08 2017 (r323127) +++ head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Sat Sep 2 13:28:45 2017 (r323128) @@ -2689,7 +2689,7 @@ reschedule: ntb->lnk_sta = pci_read_config(ntb->device, ntb->reg->lnk_sta, 2); if (_xeon_link_is_up(ntb)) { callout_reset(&ntb->peer_msix_work, - hz * (ntb->peer_msix_good ? 2 : 1) / 100, + hz * (ntb->peer_msix_good ? 2 : 1) / 10, intel_ntb_exchange_msix, ntb); } else intel_ntb_spad_clear(ntb->device); Modified: head/sys/dev/ntb/ntb_transport.c ============================================================================== --- head/sys/dev/ntb/ntb_transport.c Sat Sep 2 11:57:08 2017 (r323127) +++ head/sys/dev/ntb/ntb_transport.c Sat Sep 2 13:28:45 2017 (r323128) @@ -250,7 +250,7 @@ enum { #define QP_TO_MW(nt, qp) ((qp) % nt->mw_count) #define NTB_QP_DEF_NUM_ENTRIES 100 -#define NTB_LINK_DOWN_TIMEOUT 10 +#define NTB_LINK_DOWN_TIMEOUT 100 static int ntb_transport_probe(device_t dev); static int ntb_transport_attach(device_t dev);