From owner-svn-src-head@freebsd.org Wed Sep 13 01:55:04 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 AC153E04E03; Wed, 13 Sep 2017 01:55:04 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-pg0-f53.google.com (mail-pg0-f53.google.com [74.125.83.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7CAEF6D823; Wed, 13 Sep 2017 01:55:04 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-pg0-f53.google.com with SMTP id i130so17329273pgc.3; Tue, 12 Sep 2017 18:55:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=3YNUYXbfTsnTcV9XciyK/qL9OggbbYQ6oGu9HkVVzD4=; b=eodRKGCPlglcmBBCWANhLCOD2wZku7Q2ve6gZrt45EKpeEfLl1AKFmEqY0XcbjJAVK aotnhubGRMOZeT0Za0NI+pfgN4AboakcZt3V2FJUGIRox1eraSm+5FTBYWkniWYMEsE6 kcMORYit8Pn27+gtUZjak9E53ObgeG0oH/8fKm30S8nYEAohkcLNn9uoosKRkIaiTshs EXQopnV9bnqQU5cuFYej4l+rWdyrzNDUKviuybW4mJ3tzmT/lqEZUygCsdVAGRP75Gnk gSvXxqH7c0kugYNUlY40E9D12y3Za2lPuKWrxK0tvBW57Jz7btLCg3P6cAo1F2PYOKch mcgg== X-Gm-Message-State: AHPjjUhaKx4zIO0ePpyBCK/oYB4VdHYTOmNqqk9Wz1E0ZKi1VfJOb4Kz sDT0fZNqdys0UrtAptxMLA== X-Received: by 10.101.68.130 with SMTP id l2mr16417937pgq.346.1505267264270; Tue, 12 Sep 2017 18:47:44 -0700 (PDT) Received: from mail-pg0-f45.google.com (mail-pg0-f45.google.com. [74.125.83.45]) by smtp.gmail.com with ESMTPSA id l85sm23819306pfb.176.2017.09.12.18.47.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Sep 2017 18:47:43 -0700 (PDT) Received: by mail-pg0-f45.google.com with SMTP id 188so24571655pgb.2; Tue, 12 Sep 2017 18:47:43 -0700 (PDT) X-Google-Smtp-Source: ADKCNb6ZOmLSEXzdB2hvHH1LYA/chmdFXsJBIrLJ3W5uqmoKt4I7i5hJtLuaJV673DkNvGmF5klgrY5oe0JNOKTExzc= X-Received: by 10.84.133.35 with SMTP id 32mr18778987plf.249.1505267263009; Tue, 12 Sep 2017 18:47:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.207.193 with HTTP; Tue, 12 Sep 2017 18:47:42 -0700 (PDT) In-Reply-To: <201709130118.v8D1IgvB029215@repo.freebsd.org> References: <201709130118.v8D1IgvB029215@repo.freebsd.org> From: Ryan Libby Date: Tue, 12 Sep 2017 18:47:42 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r323516 - in head/sys: dev/bnxt dev/e1000 kern net sys To: Stephen Hurd Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Sean Bruno Content-Type: text/plain; charset="UTF-8" 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: Wed, 13 Sep 2017 01:55:04 -0000 On Tue, Sep 12, 2017 at 6:18 PM, Stephen Hurd wrote: > Author: shurd > Date: Wed Sep 13 01:18:42 2017 > New Revision: 323516 > URL: https://svnweb.freebsd.org/changeset/base/323516 > > Log: > Roll up iflib commits from github. This pulls in most of the work done > by Matt Macy as well as other changes which he has accepted via pull > request to his github repo at https://github.com/mattmacy/networking/ > > This should bring -CURRENT and the github repo into close enough sync to > allow small feature branches rather than a large chain of interdependant > patches being developed out of tree. The reset of the synchronization > should be able to be completed on github by splitting the remaining > changes that are not yet ready into short feature branches for later > review as smaller commits. > > Here is a summary of changes included in this patch: > > 1) More checks when INVARIANTS are enabled for eariler problem > detection > 2) Group Task Queue cleanups > - Fix use of duplicate shortdesc for gtaskqueue malloc type. > Some interfaces such as memguard(9) use the short description to > identify malloc types, so duplicates should be avoided. > 3) Allow gtaskqueues to use ithreads in addition to taskqueues > - In some cases, this can improve performance > 4) Better logging when taskqgroup_attach*() fails to set interrupt > affinity. > 5) Do not start gtaskqueues until they're needed > 6) Have mp_ring enqueue function enter the ABDICATED rather than BUSY > state. This moves the TX to the gtaskq and allows processing to > continue faster as well as make TX batching more likely. > 7) Add an ift_txd_errata function to struct if_txrx. This allows > drivers to inspect/modify mbufs before transmission. > 8) Add a new IFLIB_NEED_ZERO_CSUM for drivers to indicate they need > checksums zeroed for checksum offload to work. This avoids modifying > packet data in the TX path when possible. > 9) Use ithreads for iflib I/O instead of taskqueues > 10) Clean up ioctl and support async ioctl functions > 11) Prefetch two cachlines from each mbuf instead of one up to 128B. We > often need to parse packet header info beyond 64B. > 12) Fix potential memory corruption due to fence post error in > bit_nclear() usage. > 13) Improved hang detection and handling > 14) If the packet is smaller than MTU, disable the TSO flags. > This avoids extra packet parsing when not needed. > 15) Move TCP header parsing inside the IS_TSO?() test. > This avoids extra packet parsing when not needed. > 16) Pass chains of mbufs that are not consumed by lro to if_input() > rather call if_input() for each mbuf. > 17) Re-arrange packet header loads to get as much work as possible done > before a cache stall. > 18) Lock the context when calling IFDI_ATTACH_PRE()/IFDI_ATTACH_POST()/ > IFDI_DETACH(); > 19) Attempt to distribute RX/TX tasks across cores more sensibly, > especially when RX and TX share an interrupt. RX will attempt to > take the first threads on a core, and TX will attempt to take > successive threads. > 20) Allow iflib_softirq_alloc_generic() to request affinity to the same > cpus an interrupt has affinity with. This allows TX queues to > ensure they are serviced by the socket the device is on. > 21) Add new iflib sysctls to net.iflib: > - timer_int - interval at which to run per-queue timers in ticks > - force_busdma > 22) Add new per-device iflib sysctls to dev.X.Y.iflib > - rx_budget allows tuning the batch size on the RX path > - watchdog_events Count of watchdog events seen since load > 23) Fix error where netmap_rxq_init() could get called before > IFDI_INIT() > 24) e1000: Fixed version of r323008: post-cold sleep instead of DELAY > when waiting for firmware > - After interrupts are enabled, convert all waits to sleeps > - Eliminates e1000 software/firmware synchronization busy waits after > startup > 25) e1000: Remove special case for budget=1 in em_txrx.c > - Premature optimization which may actually be incorrect with > multi-segment packets > 26) e1000: Split out TX interrupt rather than share an interrupt for > RX and TX. > - Allows better performance by keeping RX and TX paths separate > 27) e1000: Separate igb from em code where suitable > Much easier to understand separate functions and "if (is_igb)" than > previous tests like "if (reg_icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC))" > > #blamebruno > > Reviewed by: sbruno > Approved by: sbruno (mentor) > Sponsored by: Limelight Networks > Differential Revision: https://reviews.freebsd.org/D12235 > > Modified: > head/sys/dev/bnxt/if_bnxt.c > head/sys/dev/e1000/e1000_80003es2lan.c > head/sys/dev/e1000/e1000_82571.c > head/sys/dev/e1000/e1000_82575.c > head/sys/dev/e1000/e1000_hw.h > head/sys/dev/e1000/e1000_i210.c > head/sys/dev/e1000/e1000_i210.h > head/sys/dev/e1000/e1000_ich8lan.c > head/sys/dev/e1000/e1000_mac.c > head/sys/dev/e1000/e1000_mac.h > head/sys/dev/e1000/e1000_osdep.h > head/sys/dev/e1000/em_txrx.c > head/sys/dev/e1000/if_em.c > head/sys/dev/e1000/if_em.h > head/sys/kern/subr_gtaskqueue.c > head/sys/net/iflib.c > head/sys/net/iflib.h > head/sys/net/mp_ring.c > head/sys/sys/gtaskqueue.h This broke gcc builds again, e.g. [1], [2]: > /usr/src/sys/dev/e1000/e1000_osdep.h:81: warning: redundant redeclaration of 'cold' [-Wredundant-decls] > /usr/src/sys/sys/systm.h:50: warning: previous declaration of 'cold' was here sys/dev/e1000/e1000_osdep.h is already including sys/sys/systm.h directly so I think this can just be fixed by deleting extern int cold; from e1000_osdep.h. [1] https://ci.freebsd.org/job/FreeBSD-head-powerpc64-build/1104 [2] https://ci.freebsd.org/job/FreeBSD-head-sparc64-build/3039/