From owner-svn-src-head@freebsd.org Sun Sep 13 00:08:05 2015 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 13029A02B25; Sun, 13 Sep 2015 00:08:05 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 ECB831847; Sun, 13 Sep 2015 00:08:04 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8D08425022375; Sun, 13 Sep 2015 00:08:04 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8D084d0022374; Sun, 13 Sep 2015 00:08:04 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201509130008.t8D084d0022374@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 13 Sep 2015 00:08:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287728 - head/sys/sparc64/include X-SVN-Group: head 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.20 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: Sun, 13 Sep 2015 00:08:05 -0000 Author: marius Date: Sun Sep 13 00:08:04 2015 New Revision: 287728 URL: https://svnweb.freebsd.org/changeset/base/287728 Log: Merge r286374 from x86: Formally pair store_rel(&smp_started) with load_acq(&smp_started). Similarly to x86, this change is mostly a NOP due to the kernel being run in total store order. MFC after: 1 week Modified: head/sys/sparc64/include/smp.h Modified: head/sys/sparc64/include/smp.h ============================================================================== --- head/sys/sparc64/include/smp.h Sat Sep 12 23:10:34 2015 (r287727) +++ head/sys/sparc64/include/smp.h Sun Sep 13 00:08:04 2015 (r287728) @@ -47,6 +47,7 @@ #include #include +#include #include #include @@ -143,7 +144,7 @@ ipi_all_but_self(u_int ipi) { cpuset_t cpus; - if (__predict_false(smp_started == 0)) + if (__predict_false(atomic_load_acq_int(&smp_started) == 0)) return; cpus = all_cpus; sched_pin(); @@ -158,7 +159,8 @@ static __inline void ipi_selected(cpuset_t cpus, u_int ipi) { - if (__predict_false(smp_started == 0 || CPU_EMPTY(&cpus))) + if (__predict_false(atomic_load_acq_int(&smp_started) == 0 || + CPU_EMPTY(&cpus))) return; mtx_lock_spin(&ipi_mtx); cpu_ipi_selected(cpus, 0, (u_long)tl_ipi_level, ipi); @@ -169,7 +171,7 @@ static __inline void ipi_cpu(int cpu, u_int ipi) { - if (__predict_false(smp_started == 0)) + if (__predict_false(atomic_load_acq_int(&smp_started) == 0)) return; mtx_lock_spin(&ipi_mtx); cpu_ipi_single(cpu, 0, (u_long)tl_ipi_level, ipi); @@ -183,7 +185,7 @@ ipi_dcache_page_inval(void *func, vm_pad { struct ipi_cache_args *ica; - if (__predict_false(smp_started == 0)) + if (__predict_false(atomic_load_acq_int(&smp_started) == 0)) return (NULL); sched_pin(); ica = &ipi_cache_args; @@ -200,7 +202,7 @@ ipi_icache_page_inval(void *func, vm_pad { struct ipi_cache_args *ica; - if (__predict_false(smp_started == 0)) + if (__predict_false(atomic_load_acq_int(&smp_started) == 0)) return (NULL); sched_pin(); ica = &ipi_cache_args; @@ -217,7 +219,7 @@ ipi_rd(u_int cpu, void *func, u_long *va { struct ipi_rd_args *ira; - if (__predict_false(smp_started == 0)) + if (__predict_false(atomic_load_acq_int(&smp_started) == 0)) return (NULL); sched_pin(); ira = &ipi_rd_args; @@ -234,7 +236,7 @@ ipi_tlb_context_demap(struct pmap *pm) struct ipi_tlb_args *ita; cpuset_t cpus; - if (__predict_false(smp_started == 0)) + if (__predict_false(atomic_load_acq_int(&smp_started) == 0)) return (NULL); sched_pin(); cpus = pm->pm_active; @@ -259,7 +261,7 @@ ipi_tlb_page_demap(struct pmap *pm, vm_o struct ipi_tlb_args *ita; cpuset_t cpus; - if (__predict_false(smp_started == 0)) + if (__predict_false(atomic_load_acq_int(&smp_started) == 0)) return (NULL); sched_pin(); cpus = pm->pm_active; @@ -284,7 +286,7 @@ ipi_tlb_range_demap(struct pmap *pm, vm_ struct ipi_tlb_args *ita; cpuset_t cpus; - if (__predict_false(smp_started == 0)) + if (__predict_false(atomic_load_acq_int(&smp_started) == 0)) return (NULL); sched_pin(); cpus = pm->pm_active; From owner-svn-src-head@freebsd.org Sun Sep 13 00:56:33 2015 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 54978A0224B; Sun, 13 Sep 2015 00:56:33 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x22f.google.com (mail-pa0-x22f.google.com [IPv6:2607:f8b0:400e:c03::22f]) (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 2333D198A; Sun, 13 Sep 2015 00:56:33 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pacex6 with SMTP id ex6so108854169pac.0; Sat, 12 Sep 2015 17:56:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=JhSenBX5DLQq9MdlmStDitAuuo8M13SKXo057JR/M20=; b=mDtaSOHPD6mkBBfP0lbUXwCdtqP0ucSZR/clfrXSwnUumP4yYJONubnhGpbuKI+Ha0 aKYNu9gmcEwe2UURfwE82evN4YtBsVWKua9F8Gvv8DirkRu/0cUHpnRzmHSpwkVIFlrd po5uP0fxUh4apjHSEbjQibWVLyz4L58eXFhWXBGOlBBw9PcCyY10NScTbMgE6kEghDb3 Fo5nKGVU43VZFLTk3+6tgkNUQBqrAbsmzuwuAIkTp4Eek7AY/x1f1HBGBJ7mOmP2/PKC yQx8cGdd2aSt3AbzQm5jHn1kwugChcx5jFGE4SJhmOCqRIBtNo5ERHGZdjMsjMps9ldm 4iXA== X-Received: by 10.68.125.197 with SMTP id ms5mr16277491pbb.38.1442105792614; Sat, 12 Sep 2015 17:56:32 -0700 (PDT) Received: from [21.136.107.25] ([172.56.32.133]) by smtp.gmail.com with ESMTPSA id pi9sm7907906pbb.96.2015.09.12.17.56.31 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Sep 2015 17:56:31 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r287465 - head/sys/dev/e1000 From: Garrett Cooper X-Mailer: iPhone Mail (12H321) In-Reply-To: <20150912224516.GU64965@strugglingcoder.info> Date: Sat, 12 Sep 2015 17:56:24 -0700 Cc: Eric Joyner , Sean Bruno , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <201509041607.t84G7S6f029313@repo.freebsd.org> <20150904161813.GX68814@strugglingcoder.info> <20150912224516.GU64965@strugglingcoder.info> To: hiren panchasara X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Sun, 13 Sep 2015 00:56:33 -0000 > On Sep 12, 2015, at 15:45, hiren panchasara w= rote: >=20 >> On 09/12/15 at 07:23P, Eric Joyner wrote: >> For the errata, the (lack of) details are in the specification updates fo= r >> HW like I210, I211, 82575 etc. It would be in the ones updated in August >> 2015. >=20 > Yes, I (we) know erratas are there in the h/w specs. Point is, which > exact errata problem are you fixing here so I can go look up the spec > for more detail. Errata number/name and exact spec should also be quoted > for less ambiguity. (Think about someone having to debug this code 5 > years down the road.) As a general request, better commit notes would help a lot when dealing w= ith driver porting/upgrades. There are a few times in the past where I've tr= ied upgrading things or cherry picking commits and decided against it (or ra= n into other issues), so having more info to provide to management and test w= ould be extremely useful, especially when we need to qualify how much risk i= s associated with changes. Thanks!= From owner-svn-src-head@freebsd.org Sun Sep 13 04:12:52 2015 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 CB7CEA0181C; Sun, 13 Sep 2015 04:12:52 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 AFAB81722; Sun, 13 Sep 2015 04:12:52 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8D4Cqie025124; Sun, 13 Sep 2015 04:12:52 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8D4Cqk4025123; Sun, 13 Sep 2015 04:12:52 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509130412.t8D4Cqk4025123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 13 Sep 2015 04:12:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287740 - head/sys/dev/usb/wlan X-SVN-Group: head 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.20 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: Sun, 13 Sep 2015 04:12:53 -0000 Author: adrian Date: Sun Sep 13 04:12:51 2015 New Revision: 287740 URL: https://svnweb.freebsd.org/changeset/base/287740 Log: * fiddle with some more of the debugging output * yes, when a "sta disconnect" message comes through we should, like, disconnect things. We're not currently generating beacon miss messages, and net80211 isn't disconnecting things via software beacon miss receive. Tested: * RTL8712, cut 3, STA mode Modified: head/sys/dev/usb/wlan/if_rsu.c Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Sun Sep 13 04:05:27 2015 (r287739) +++ head/sys/dev/usb/wlan/if_rsu.c Sun Sep 13 04:12:51 2015 (r287740) @@ -888,7 +888,7 @@ rsu_fw_cmd(struct rsu_softc *sc, uint8_t /* Copy command payload. */ memcpy(&cmd[1], buf, len); - RSU_DPRINTF(sc, RSU_DEBUG_TX, + RSU_DPRINTF(sc, RSU_DEBUG_TX | RSU_DEBUG_FWCMD, "%s: Tx cmd code=0x%x len=0x%x\n", __func__, code, cmdsz); data->buflen = xferlen; @@ -1212,7 +1212,9 @@ rsu_event_join_bss(struct rsu_softc *sc, rsp = (struct r92s_event_join_bss *)buf; res = (int)le32toh(rsp->join_res); - DPRINTF("Rx join BSS event len=%d res=%d\n", len, res); + RSU_DPRINTF(sc, RSU_DEBUG_STATE | RSU_DEBUG_FWCMD, + "%s: Rx join BSS event len=%d res=%d\n", + __func__, len, res); if (res <= 0) { RSU_UNLOCK(sc); ieee80211_new_state(vap, IEEE80211_S_SCAN, -1); @@ -1224,8 +1226,10 @@ rsu_event_join_bss(struct rsu_softc *sc, DPRINTF("Assoc ID overflow\n"); tmp = 1; } - DPRINTF("associated with %s associd=%d\n", - ether_sprintf(rsp->bss.macaddr), tmp); + RSU_DPRINTF(sc, RSU_DEBUG_STATE | RSU_DEBUG_FWCMD, + "%s: associated with %s associd=%d\n", + __func__, ether_sprintf(rsp->bss.macaddr), tmp); + /* XXX is this required? What's the top two bits for again? */ ni->ni_associd = tmp | 0xc000; RSU_UNLOCK(sc); ieee80211_new_state(vap, IEEE80211_S_RUN, @@ -1239,7 +1243,7 @@ rsu_rx_event(struct rsu_softc *sc, uint8 struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - RSU_DPRINTF(sc, RSU_DEBUG_RX, + RSU_DPRINTF(sc, RSU_DEBUG_RX | RSU_DEBUG_FWCMD, "%s: Rx event code=%d len=%d\n", __func__, code, len); switch (code) { case R92S_EVT_SURVEY: @@ -1266,11 +1270,10 @@ rsu_rx_event(struct rsu_softc *sc, uint8 if (vap->iv_state == IEEE80211_S_AUTH) rsu_event_join_bss(sc, buf, len); break; -#if 0 -XXX This event is occurring regularly, possibly due to some power saving event -XXX and disrupts the WLAN traffic. Disable for now. case R92S_EVT_DEL_STA: - DPRINTF("disassociated from %s\n", ether_sprintf(buf)); + RSU_DPRINTF(sc, RSU_DEBUG_FWCMD | RSU_DEBUG_STATE, + "%s: disassociated from %s\n", __func__, + ether_sprintf(buf)); if (vap->iv_state == IEEE80211_S_RUN && IEEE80211_ADDR_EQ(vap->iv_bss->ni_bssid, buf)) { RSU_UNLOCK(sc); @@ -1278,7 +1281,6 @@ XXX and disrupts the WLAN traffic. Disab RSU_LOCK(sc); } break; -#endif case R92S_EVT_WPS_PBC: RSU_DPRINTF(sc, RSU_DEBUG_RX | RSU_DEBUG_FWCMD, "%s: WPS PBC pushed.\n", __func__); From owner-svn-src-head@freebsd.org Sun Sep 13 04:41:14 2015 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 CE0B0A03527; Sun, 13 Sep 2015 04:41:14 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 BBAEA11CF; Sun, 13 Sep 2015 04:41:14 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8D4fEDO035941; Sun, 13 Sep 2015 04:41:14 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8D4fEVE035940; Sun, 13 Sep 2015 04:41:14 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509130441.t8D4fEVE035940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 13 Sep 2015 04:41:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287741 - head/sys/dev/usb/wlan X-SVN-Group: head 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.20 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: Sun, 13 Sep 2015 04:41:14 -0000 Author: adrian Date: Sun Sep 13 04:41:13 2015 New Revision: 287741 URL: https://svnweb.freebsd.org/changeset/base/287741 Log: After reading the linux driver, document what this bit is doing (doing a full NIC awake.) Modified: head/sys/dev/usb/wlan/if_rsu.c Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Sun Sep 13 04:12:51 2015 (r287740) +++ head/sys/dev/usb/wlan/if_rsu.c Sun Sep 13 04:41:13 2015 (r287741) @@ -2401,7 +2401,7 @@ rsu_init(struct rsu_softc *sc) rsu_write_1(sc, R92S_USB_HRPWM, R92S_USB_HRPWM_PS_ST_ACTIVE | R92S_USB_HRPWM_PS_ALL_ON); - /* XXX non-configurable psmode? */ + /* Set PS mode fully active */ memset(&cmd, 0, sizeof(cmd)); cmd.mode = R92S_PS_MODE_ACTIVE; RSU_DPRINTF(sc, RSU_DEBUG_RESET, "%s: setting ps mode to %d\n", From owner-svn-src-head@freebsd.org Sun Sep 13 05:22:21 2015 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 C851C9CD67E; Sun, 13 Sep 2015 05:22:21 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 B8DBD1177; Sun, 13 Sep 2015 05:22:21 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8D5MLpP053943; Sun, 13 Sep 2015 05:22:21 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8D5MLmG053942; Sun, 13 Sep 2015 05:22:21 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509130522.t8D5MLmG053942@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 13 Sep 2015 05:22:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287742 - head/sys/dev/usb/wlan X-SVN-Group: head 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.20 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: Sun, 13 Sep 2015 05:22:21 -0000 Author: adrian Date: Sun Sep 13 05:22:20 2015 New Revision: 287742 URL: https://svnweb.freebsd.org/changeset/base/287742 Log: Add RSSI logging to the event survey results. Modified: head/sys/dev/usb/wlan/if_rsu.c Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Sun Sep 13 04:41:13 2015 (r287741) +++ head/sys/dev/usb/wlan/if_rsu.c Sun Sep 13 05:22:20 2015 (r287742) @@ -1156,11 +1156,12 @@ rsu_event_survey(struct rsu_softc *sc, u RSU_DPRINTF(sc, RSU_DEBUG_SCAN, "%s: found BSS %s: len=%d chan=%d inframode=%d " - "networktype=%d privacy=%d\n", + "networktype=%d privacy=%d, RSSI=%d\n", __func__, ether_sprintf(bss->macaddr), le32toh(bss->len), le32toh(bss->config.dsconfig), le32toh(bss->inframode), - le32toh(bss->networktype), le32toh(bss->privacy)); + le32toh(bss->networktype), le32toh(bss->privacy), + le32toh(bss->rssi)); /* Build a fake beacon frame to let net80211 do all the parsing. */ /* XXX TODO: just call the new scan API methods! */ From owner-svn-src-head@freebsd.org Sun Sep 13 06:40:33 2015 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 0520A9CADE2; Sun, 13 Sep 2015 06:40:33 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 CDA6E1E2B; Sun, 13 Sep 2015 06:40:32 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8D6eW1Y083229; Sun, 13 Sep 2015 06:40:32 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8D6eWvA083228; Sun, 13 Sep 2015 06:40:32 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201509130640.t8D6eWvA083228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 13 Sep 2015 06:40:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287743 - head/sys/cddl/contrib/opensolaris X-SVN-Group: head 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.20 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: Sun, 13 Sep 2015 06:40:33 -0000 Author: delphij Date: Sun Sep 13 06:40:32 2015 New Revision: 287743 URL: https://svnweb.freebsd.org/changeset/base/287743 Log: Note r284031,284302 as merged. This is an no-op to actual code. Modified: Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) From owner-svn-src-head@freebsd.org Sun Sep 13 06:49:43 2015 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 95707A022A6; Sun, 13 Sep 2015 06:49:43 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 863AB11EC; Sun, 13 Sep 2015 06:49:43 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8D6nhVA086763; Sun, 13 Sep 2015 06:49:43 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8D6nh1G086762; Sun, 13 Sep 2015 06:49:43 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201509130649.t8D6nh1G086762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 13 Sep 2015 06:49:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287744 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head 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.20 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: Sun, 13 Sep 2015 06:49:43 -0000 Author: delphij Date: Sun Sep 13 06:49:42 2015 New Revision: 287744 URL: https://svnweb.freebsd.org/changeset/base/287744 Log: Note r286552 as merged and reduce diff against upstream. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Sun Sep 13 06:40:32 2015 (r287743) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Sun Sep 13 06:49:42 2015 (r287744) @@ -1633,6 +1633,7 @@ load_nvlist(spa_t *spa, uint64_t obj, nv error = dmu_bonus_hold(spa->spa_meta_objset, obj, FTAG, &db); if (error != 0) return (error); + nvsize = *(uint64_t *)db->db_data; dmu_buf_rele(db, FTAG); From owner-svn-src-head@freebsd.org Sun Sep 13 07:15:16 2015 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 2237CA010DF; Sun, 13 Sep 2015 07:15:16 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 1250F1DFA; Sun, 13 Sep 2015 07:15:16 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8D7FFiV098830; Sun, 13 Sep 2015 07:15:15 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8D7FFQ9098827; Sun, 13 Sep 2015 07:15:15 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201509130715.t8D7FFQ9098827@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 13 Sep 2015 07:15:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287745 - in head/sys/cddl/contrib/opensolaris/uts/common: fs/zfs sys/sysevent X-SVN-Group: head 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.20 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: Sun, 13 Sep 2015 07:15:16 -0000 Author: delphij Date: Sun Sep 13 07:15:14 2015 New Revision: 287745 URL: https://svnweb.freebsd.org/changeset/base/287745 Log: MFV r287623: 5997 FRU field not set during pool creation and never updated ZFS already supports storing the vdev FRU in a vdev property. There is code in libzfs to work with this property, and there is code in the zfs-retire FMA module that looks for that information. But there is no code actually setting or updating the FRU. To address this, ZFS is changed to send a handful of new events whenever a vdev is added, attached, cleared, or onlined, as well as when a pool is created or imported. Note that syseventd is not currently available on FreeBSD and thus some work is needed to actually support the new ZFS events (e.g. in zfsd) to actually use this capability, this changeset is mostly a diff reduction from upstream. illumos/illumos-gate@1437283407f89cab03860accf49408f94559bc34 Illumos issues: 5997 FRU field not set during pool creation and never updated https://www.illumos.org/issues/5997 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c head/sys/cddl/contrib/opensolaris/uts/common/sys/sysevent/eventdefs.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Sun Sep 13 06:49:42 2015 (r287744) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Sun Sep 13 07:15:14 2015 (r287745) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2014 by Delphix. All rights reserved. - * Copyright (c) 2013, 2014, Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2015, Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013 Martin Matuska . All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. */ @@ -3774,6 +3774,7 @@ spa_create(const char *pool, nvlist_t *n txg_wait_synced(spa->spa_dsl_pool, txg); spa_config_sync(spa, B_FALSE, B_TRUE); + spa_event_notify(spa, NULL, ESC_ZFS_POOL_CREATE); spa_history_log_version(spa, "create"); @@ -4234,6 +4235,7 @@ spa_import(const char *pool, nvlist_t *c spa_configfile_set(spa, props, B_FALSE); spa_config_sync(spa, B_FALSE, B_TRUE); + spa_event_notify(spa, NULL, ESC_ZFS_POOL_IMPORT); mutex_exit(&spa_namespace_lock); return (0); @@ -4364,9 +4366,12 @@ spa_import(const char *pool, nvlist_t *c */ spa_async_request(spa, SPA_ASYNC_AUTOEXPAND); - mutex_exit(&spa_namespace_lock); spa_history_log_version(spa, "import"); + spa_event_notify(spa, NULL, ESC_ZFS_POOL_IMPORT); + + mutex_exit(&spa_namespace_lock); + #ifdef __FreeBSD__ #ifdef _KERNEL zvol_create_minors(pool); @@ -4712,6 +4717,7 @@ spa_vdev_add(spa_t *spa, nvlist_t *nvroo mutex_enter(&spa_namespace_lock); spa_config_update(spa, SPA_CONFIG_UPDATE_POOL); + spa_event_notify(spa, NULL, ESC_ZFS_VDEV_ADD); mutex_exit(&spa_namespace_lock); return (0); @@ -4906,6 +4912,11 @@ spa_vdev_attach(spa_t *spa, uint64_t gui */ dsl_resilver_restart(spa->spa_dsl_pool, dtl_max_txg); + if (spa->spa_bootfs) + spa_event_notify(spa, newvd, ESC_ZFS_BOOTFS_VDEV_ATTACH); + + spa_event_notify(spa, newvd, ESC_ZFS_VDEV_ATTACH); + /* * Commit the config */ @@ -4920,9 +4931,6 @@ spa_vdev_attach(spa_t *spa, uint64_t gui spa_strfree(oldvdpath); spa_strfree(newvdpath); - if (spa->spa_bootfs) - spa_event_notify(spa, newvd, ESC_ZFS_BOOTFS_VDEV_ATTACH); - return (0); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Sun Sep 13 06:49:42 2015 (r287744) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Sun Sep 13 07:15:14 2015 (r287745) @@ -2503,6 +2503,7 @@ int vdev_online(spa_t *spa, uint64_t guid, uint64_t flags, vdev_state_t *newstate) { vdev_t *vd, *tvd, *pvd, *rvd = spa->spa_root_vdev; + boolean_t postevent = B_FALSE; spa_vdev_state_enter(spa, SCL_NONE); @@ -2512,6 +2513,10 @@ vdev_online(spa_t *spa, uint64_t guid, u if (!vd->vdev_ops->vdev_op_leaf) return (spa_vdev_state_exit(spa, NULL, ENOTSUP)); + postevent = + (vd->vdev_offline == B_TRUE || vd->vdev_tmpoffline == B_TRUE) ? + B_TRUE : B_FALSE; + tvd = vd->vdev_top; vd->vdev_offline = B_FALSE; vd->vdev_tmpoffline = B_FALSE; @@ -2547,6 +2552,10 @@ vdev_online(spa_t *spa, uint64_t guid, u return (spa_vdev_state_exit(spa, vd, ENOTSUP)); spa_async_request(spa, SPA_ASYNC_CONFIG_UPDATE); } + + if (postevent) + spa_event_notify(spa, vd, ESC_ZFS_VDEV_ONLINE); + return (spa_vdev_state_exit(spa, vd, 0)); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/sysevent/eventdefs.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/sysevent/eventdefs.h Sun Sep 13 06:49:42 2015 (r287744) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/sysevent/eventdefs.h Sun Sep 13 07:15:14 2015 (r287745) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. */ #ifndef _SYS_SYSEVENT_EVENTDEFS_H @@ -249,9 +249,14 @@ extern "C" { #define ESC_ZFS_RESILVER_START "ESC_ZFS_resilver_start" #define ESC_ZFS_RESILVER_FINISH "ESC_ZFS_resilver_finish" #define ESC_ZFS_VDEV_REMOVE "ESC_ZFS_vdev_remove" +#define ESC_ZFS_POOL_CREATE "ESC_ZFS_pool_create" #define ESC_ZFS_POOL_DESTROY "ESC_ZFS_pool_destroy" +#define ESC_ZFS_POOL_IMPORT "ESC_ZFS_pool_import" +#define ESC_ZFS_VDEV_ADD "ESC_ZFS_vdev_add" +#define ESC_ZFS_VDEV_ATTACH "ESC_ZFS_vdev_attach" #define ESC_ZFS_VDEV_CLEAR "ESC_ZFS_vdev_clear" #define ESC_ZFS_VDEV_CHECK "ESC_ZFS_vdev_check" +#define ESC_ZFS_VDEV_ONLINE "ESC_ZFS_vdev_online" #define ESC_ZFS_CONFIG_SYNC "ESC_ZFS_config_sync" #define ESC_ZFS_SCRUB_START "ESC_ZFS_scrub_start" #define ESC_ZFS_SCRUB_FINISH "ESC_ZFS_scrub_finish" From owner-svn-src-head@freebsd.org Sun Sep 13 12:08:26 2015 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 7C6739CBB01; Sun, 13 Sep 2015 12:08:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 6D0091BB3; Sun, 13 Sep 2015 12:08:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8DC8QY8028054; Sun, 13 Sep 2015 12:08:26 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8DC8QZ9028053; Sun, 13 Sep 2015 12:08:26 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509131208.t8DC8QZ9028053@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 13 Sep 2015 12:08:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287747 - head/sys/dev/uart X-SVN-Group: head 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.20 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: Sun, 13 Sep 2015 12:08:26 -0000 Author: mav Date: Sun Sep 13 12:08:25 2015 New Revision: 287747 URL: https://svnweb.freebsd.org/changeset/base/287747 Log: Add ID for Intel Panther Point KT Controller Found on ASUS P8Q77-M motherboard. Submitted by: Dmitry Luhtionov MFC after: 2 weeks Modified: head/sys/dev/uart/uart_bus_pci.c Modified: head/sys/dev/uart/uart_bus_pci.c ============================================================================== --- head/sys/dev/uart/uart_bus_pci.c Sun Sep 13 07:15:45 2015 (r287746) +++ head/sys/dev/uart/uart_bus_pci.c Sun Sep 13 12:08:25 2015 (r287747) @@ -127,6 +127,7 @@ static const struct pci_id pci_ns8250_id 24 * DEFAULT_RCLK, 2 }, { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, { 0x8086, 0x1d3d, 0xffff, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, +{ 0x8086, 0x1e3d, 0xffff, 0, "Intel Panther Point KT Controller", 0x10 }, { 0x8086, 0x2a07, 0xffff, 0, "Intel AMT - PM965/GM965 KT Controller", 0x10 }, { 0x8086, 0x2a47, 0xffff, 0, "Mobile 4 Series Chipset KT Controller", 0x10 }, { 0x8086, 0x2e17, 0xffff, 0, "4 Series Chipset Serial KT Controller", 0x10 }, From owner-svn-src-head@freebsd.org Sun Sep 13 13:00:21 2015 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 A66FBA038DA; Sun, 13 Sep 2015 13:00:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 9760A186B; Sun, 13 Sep 2015 13:00:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8DD0Lw8053893; Sun, 13 Sep 2015 13:00:21 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8DD0LOI053892; Sun, 13 Sep 2015 13:00:21 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509131300.t8DD0LOI053892@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 13 Sep 2015 13:00:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287748 - head/sys/cam/ctl X-SVN-Group: head 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.20 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: Sun, 13 Sep 2015 13:00:21 -0000 Author: mav Date: Sun Sep 13 13:00:20 2015 New Revision: 287748 URL: https://svnweb.freebsd.org/changeset/base/287748 Log: Make TARGET RESET respect LUN mapping. Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Sun Sep 13 12:08:25 2015 (r287747) +++ head/sys/cam/ctl/ctl.c Sun Sep 13 13:00:20 2015 (r287748) @@ -11336,6 +11336,7 @@ static int ctl_target_reset(struct ctl_softc *softc, union ctl_io *io, ctl_ua_type ua_type) { + struct ctl_port *port; struct ctl_lun *lun; int retval; @@ -11356,8 +11357,13 @@ ctl_target_reset(struct ctl_softc *softc retval = 0; mtx_lock(&softc->ctl_lock); - STAILQ_FOREACH(lun, &softc->lun_list, links) + port = softc->ctl_ports[io->io_hdr.nexus.targ_port]; + STAILQ_FOREACH(lun, &softc->lun_list, links) { + if (port != NULL && + ctl_lun_map_to_port(port, lun->lun) >= CTL_MAX_LUNS) + continue; retval += ctl_lun_reset(lun, io, ua_type); + } mtx_unlock(&softc->ctl_lock); return (retval); From owner-svn-src-head@freebsd.org Sun Sep 13 14:00:50 2015 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 C6CE8A02C26; Sun, 13 Sep 2015 14:00:50 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 B4F111289; Sun, 13 Sep 2015 14:00:50 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8DE0otP081615; Sun, 13 Sep 2015 14:00:50 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8DE0oVH081613; Sun, 13 Sep 2015 14:00:50 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201509131400.t8DE0oVH081613@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 13 Sep 2015 14:00:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287753 - head/lib/libc/sys X-SVN-Group: head 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.20 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: Sun, 13 Sep 2015 14:00:50 -0000 Author: jilles Date: Sun Sep 13 14:00:49 2015 New Revision: 287753 URL: https://svnweb.freebsd.org/changeset/base/287753 Log: setuid(2): Suggest O_CLOEXEC instead of fcntl(F_SETFD). Modified: head/lib/libc/sys/setuid.2 Modified: head/lib/libc/sys/setuid.2 ============================================================================== --- head/lib/libc/sys/setuid.2 Sun Sep 13 13:58:46 2015 (r287752) +++ head/lib/libc/sys/setuid.2 Sun Sep 13 14:00:49 2015 (r287753) @@ -28,7 +28,7 @@ .\" @(#)setuid.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd September 13, 2015 .Dt SETUID 2 .Os .Sh NAME @@ -178,15 +178,10 @@ pseudocode(void) int fd; /* ... */ - fd = open("/path/to/sensitive/data", O_RDWR); + fd = open("/path/to/sensitive/data", O_RDWR | O_CLOEXEC); if (fd == -1) err(1, "open"); - /* - * Set close-on-exec flag; see fcntl(2) for more information. - */ - if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) - err(1, "fcntl(F_SETFD)"); /* ... */ execve(path, argv, environ); } From owner-svn-src-head@freebsd.org Sun Sep 13 14:04:43 2015 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 1C880A02EBB; Sun, 13 Sep 2015 14:04:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 00B651643; Sun, 13 Sep 2015 14:04:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8DE4gDG083762; Sun, 13 Sep 2015 14:04:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8DE4gXA083761; Sun, 13 Sep 2015 14:04:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509131404.t8DE4gXA083761@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 13 Sep 2015 14:04:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287754 - head/sys/cam/ctl X-SVN-Group: head 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.20 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: Sun, 13 Sep 2015 14:04:43 -0000 Author: mav Date: Sun Sep 13 14:04:42 2015 New Revision: 287754 URL: https://svnweb.freebsd.org/changeset/base/287754 Log: Report CTL_UA_LUN_CHANGE on LUN map change. Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Sun Sep 13 14:00:49 2015 (r287753) +++ head/sys/cam/ctl/ctl.c Sun Sep 13 14:04:42 2015 (r287754) @@ -406,6 +406,8 @@ static int ctl_scsiio_lun_check(struct c struct ctl_scsiio *ctsio); static void ctl_failover_lun(struct ctl_lun *lun); static void ctl_est_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua); +static void ctl_est_ua_port(struct ctl_lun *lun, int port, uint32_t except, + ctl_ua_type ua); static void ctl_est_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua); static void ctl_clr_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua); static void ctl_clr_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua); @@ -1213,24 +1215,32 @@ ctl_est_ua(struct ctl_lun *lun, uint32_t } static void -ctl_est_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua) +ctl_est_ua_port(struct ctl_lun *lun, int port, uint32_t except, ctl_ua_type ua) { - struct ctl_softc *softc = lun->ctl_softc; - int i, j; + int i; mtx_assert(&lun->lun_lock, MA_OWNED); - for (i = softc->port_min; i < softc->port_max; i++) { - if (lun->pending_ua[i] == NULL) + if (lun->pending_ua[port] == NULL) + return; + for (i = 0; i < CTL_MAX_INIT_PER_PORT; i++) { + if (port * CTL_MAX_INIT_PER_PORT + i == except) continue; - for (j = 0; j < CTL_MAX_INIT_PER_PORT; j++) { - if (i * CTL_MAX_INIT_PER_PORT + j == except) - continue; - lun->pending_ua[i][j] |= ua; - } + lun->pending_ua[port][i] |= ua; } } static void +ctl_est_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua) +{ + struct ctl_softc *softc = lun->ctl_softc; + int i; + + mtx_assert(&lun->lun_lock, MA_OWNED); + for (i = softc->port_min; i < softc->port_max; i++) + ctl_est_ua_port(lun, i, except, ua); +} + +static void ctl_clr_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua) { struct ctl_softc *softc = lun->ctl_softc; @@ -2115,6 +2125,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, struct thread *td) { struct ctl_softc *softc; + struct ctl_lun *lun; int retval; softc = control_softc; @@ -2273,7 +2284,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, break; } case CTL_DUMP_OOA: { - struct ctl_lun *lun; union ctl_io *io; char printbuf[128]; struct sbuf sb; @@ -2310,7 +2320,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, break; } case CTL_GET_OOA: { - struct ctl_lun *lun; struct ctl_ooa *ooa_hdr; struct ctl_ooa_entry *entries; uint32_t cur_fill_num; @@ -2402,7 +2411,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, } case CTL_CHECK_OOA: { union ctl_io *io; - struct ctl_lun *lun; struct ctl_ooa_info *ooa_info; @@ -2435,9 +2443,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, } case CTL_DELAY_IO: { struct ctl_io_delay_info *delay_info; -#ifdef CTL_IO_DELAY - struct ctl_lun *lun; -#endif /* CTL_IO_DELAY */ delay_info = (struct ctl_io_delay_info *)addr; @@ -2528,7 +2533,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, case CTL_SETSYNC: case CTL_GETSYNC: { struct ctl_sync_info *sync_info; - struct ctl_lun *lun; sync_info = (struct ctl_sync_info *)addr; @@ -2558,7 +2562,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, } case CTL_GETSTATS: { struct ctl_stats *stats; - struct ctl_lun *lun; int i; stats = (struct ctl_stats *)addr; @@ -2594,7 +2597,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, } case CTL_ERROR_INJECT: { struct ctl_error_desc *err_desc, *new_err_desc; - struct ctl_lun *lun; err_desc = (struct ctl_error_desc *)addr; @@ -2641,7 +2643,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, } case CTL_ERROR_INJECT_DELETE: { struct ctl_error_desc *delete_desc, *desc, *desc2; - struct ctl_lun *lun; int delete_done; delete_desc = (struct ctl_error_desc *)addr; @@ -2685,8 +2686,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, mtx_lock(&softc->ctl_lock); printf("CTL Persistent Reservation information start:\n"); for (i = 0; i < CTL_MAX_LUNS; i++) { - struct ctl_lun *lun; - lun = softc->ctl_luns[i]; if ((lun == NULL) @@ -2780,7 +2779,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, } case CTL_LUN_LIST: { struct sbuf *sb; - struct ctl_lun *lun; struct ctl_lun_list *list; struct ctl_option *opt; @@ -3153,6 +3151,13 @@ ctl_ioctl(struct cdev *dev, u_long cmd, mtx_unlock(&softc->ctl_lock); return (ENXIO); } + STAILQ_FOREACH(lun, &softc->lun_list, links) { + if (ctl_lun_map_to_port(port, lun->lun) >= CTL_MAX_LUNS) + continue; + mtx_lock(&lun->lun_lock); + ctl_est_ua_port(lun, lm->port, -1, CTL_UA_LUN_CHANGE); + mtx_unlock(&lun->lun_lock); + } mtx_unlock(&softc->ctl_lock); // XXX: port_enable sleeps if (lm->plun < CTL_MAX_LUNS) { if (lm->lun == UINT32_MAX) From owner-svn-src-head@freebsd.org Sun Sep 13 14:52:33 2015 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 395DEA03616; Sun, 13 Sep 2015 14:52:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 2A1AD1455; Sun, 13 Sep 2015 14:52:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8DEqXD6007526; Sun, 13 Sep 2015 14:52:33 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8DEqWCF007522; Sun, 13 Sep 2015 14:52:32 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509131452.t8DEqWCF007522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 13 Sep 2015 14:52:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287756 - head/sys/cam/ctl X-SVN-Group: head 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.20 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: Sun, 13 Sep 2015 14:52:33 -0000 Author: mav Date: Sun Sep 13 14:52:31 2015 New Revision: 287756 URL: https://svnweb.freebsd.org/changeset/base/287756 Log: Report INQUIRY DATA HAS CHANGED for related LUNs on port on-/offline. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl.h head/sys/cam/ctl/ctl_error.c head/sys/cam/ctl/ctl_frontend.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Sun Sep 13 14:24:12 2015 (r287755) +++ head/sys/cam/ctl/ctl.c Sun Sep 13 14:52:31 2015 (r287756) @@ -405,14 +405,6 @@ static int ctl_scsiio_lun_check(struct c const struct ctl_cmd_entry *entry, struct ctl_scsiio *ctsio); static void ctl_failover_lun(struct ctl_lun *lun); -static void ctl_est_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua); -static void ctl_est_ua_port(struct ctl_lun *lun, int port, uint32_t except, - ctl_ua_type ua); -static void ctl_est_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua); -static void ctl_clr_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua); -static void ctl_clr_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua); -static void ctl_clr_ua_allluns(struct ctl_softc *ctl_softc, uint32_t initidx, - ctl_ua_type ua_type); static int ctl_scsiio_precheck(struct ctl_softc *ctl_softc, struct ctl_scsiio *ctsio); static int ctl_scsiio(struct ctl_scsiio *ctsio); @@ -802,6 +794,7 @@ static void ctl_isc_port_sync(struct ctl_softc *softc, union ctl_ha_msg *msg, int len) { struct ctl_port *port; + struct ctl_lun *lun; int i, new; port = softc->ctl_ports[msg->hdr.nexus.targ_port]; @@ -877,6 +870,15 @@ ctl_isc_port_sync(struct ctl_softc *soft __func__); } } + mtx_lock(&softc->ctl_lock); + STAILQ_FOREACH(lun, &softc->lun_list, links) { + if (ctl_lun_map_to_port(port, lun->lun) >= CTL_MAX_LUNS) + continue; + mtx_lock(&lun->lun_lock); + ctl_est_ua_all(lun, -1, CTL_UA_INQ_CHANGE); + mtx_unlock(&lun->lun_lock); + } + mtx_unlock(&softc->ctl_lock); } /* @@ -1199,7 +1201,7 @@ ctl_copy_sense_data_back(union ctl_io *s dest->hdr.status = src->io_hdr.status; } -static void +void ctl_est_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua) { struct ctl_softc *softc = lun->ctl_softc; @@ -1214,7 +1216,7 @@ ctl_est_ua(struct ctl_lun *lun, uint32_t pu[initidx % CTL_MAX_INIT_PER_PORT] |= ua; } -static void +void ctl_est_ua_port(struct ctl_lun *lun, int port, uint32_t except, ctl_ua_type ua) { int i; @@ -1229,7 +1231,7 @@ ctl_est_ua_port(struct ctl_lun *lun, int } } -static void +void ctl_est_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua) { struct ctl_softc *softc = lun->ctl_softc; @@ -1240,7 +1242,7 @@ ctl_est_ua_all(struct ctl_lun *lun, uint ctl_est_ua_port(lun, i, except, ua); } -static void +void ctl_clr_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua) { struct ctl_softc *softc = lun->ctl_softc; @@ -1255,7 +1257,7 @@ ctl_clr_ua(struct ctl_lun *lun, uint32_t pu[initidx % CTL_MAX_INIT_PER_PORT] &= ~ua; } -static void +void ctl_clr_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua) { struct ctl_softc *softc = lun->ctl_softc; @@ -1273,7 +1275,7 @@ ctl_clr_ua_all(struct ctl_lun *lun, uint } } -static void +void ctl_clr_ua_allluns(struct ctl_softc *ctl_softc, uint32_t initidx, ctl_ua_type ua_type) { Modified: head/sys/cam/ctl/ctl.h ============================================================================== --- head/sys/cam/ctl/ctl.h Sun Sep 13 14:24:12 2015 (r287755) +++ head/sys/cam/ctl/ctl.h Sun Sep 13 14:52:31 2015 (r287756) @@ -120,6 +120,7 @@ typedef enum { CTL_UA_LUN_CHANGE = 0x0020, CTL_UA_MODE_CHANGE = 0x0040, CTL_UA_LOG_CHANGE = 0x0080, + CTL_UA_INQ_CHANGE = 0x0100, CTL_UA_RES_PREEMPT = 0x0400, CTL_UA_RES_RELEASE = 0x0800, CTL_UA_REG_PREEMPT = 0x1000, @@ -138,6 +139,10 @@ struct ctl_page_index; SYSCTL_DECL(_kern_cam_ctl); #endif +struct ctl_lun; +struct ctl_port; +struct ctl_softc; + /* * Put a string into an sbuf, escaping characters that are illegal or not * recommended in XML. Note this doesn't escape everything, just > < and &. @@ -174,9 +179,17 @@ void ctl_config_write_done(union ctl_io void ctl_portDB_changed(int portnum); int ctl_ioctl_io(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td); -struct ctl_lun; + +void ctl_est_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua); +void ctl_est_ua_port(struct ctl_lun *lun, int port, uint32_t except, + ctl_ua_type ua); +void ctl_est_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua); +void ctl_clr_ua(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua); +void ctl_clr_ua_all(struct ctl_lun *lun, uint32_t except, ctl_ua_type ua); +void ctl_clr_ua_allluns(struct ctl_softc *ctl_softc, uint32_t initidx, + ctl_ua_type ua_type); + void ctl_isc_announce_lun(struct ctl_lun *lun); -struct ctl_port; void ctl_isc_announce_port(struct ctl_port *port); /* Modified: head/sys/cam/ctl/ctl_error.c ============================================================================== --- head/sys/cam/ctl/ctl_error.c Sun Sep 13 14:24:12 2015 (r287755) +++ head/sys/cam/ctl/ctl_error.c Sun Sep 13 14:52:31 2015 (r287756) @@ -446,6 +446,11 @@ ctl_build_ua(struct ctl_lun *lun, uint32 asc = 0x2A; ascq = 0x02; break; + case CTL_UA_INQ_CHANGE: + /* 3Fh/03h INQUIRY DATA HAS CHANGED */ + asc = 0x3F; + ascq = 0x03; + break; case CTL_UA_RES_PREEMPT: /* 2Ah/03h RESERVATIONS PREEMPTED */ asc = 0x2A; Modified: head/sys/cam/ctl/ctl_frontend.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend.c Sun Sep 13 14:24:12 2015 (r287755) +++ head/sys/cam/ctl/ctl_frontend.c Sun Sep 13 14:52:31 2015 (r287756) @@ -328,8 +328,16 @@ ctl_port_online(struct ctl_port *port) } if (port->port_online != NULL) port->port_online(port->onoff_arg); - /* XXX KDM need a lock here? */ + mtx_lock(&softc->ctl_lock); port->status |= CTL_PORT_STATUS_ONLINE; + STAILQ_FOREACH(lun, &softc->lun_list, links) { + if (ctl_lun_map_to_port(port, lun->lun) >= CTL_MAX_LUNS) + continue; + mtx_lock(&lun->lun_lock); + ctl_est_ua_all(lun, -1, CTL_UA_INQ_CHANGE); + mtx_unlock(&lun->lun_lock); + } + mtx_unlock(&softc->ctl_lock); ctl_isc_announce_port(port); } @@ -355,8 +363,16 @@ ctl_port_offline(struct ctl_port *port) port->lun_disable(port->targ_lun_arg, lun->lun); } } - /* XXX KDM need a lock here? */ + mtx_lock(&softc->ctl_lock); port->status &= ~CTL_PORT_STATUS_ONLINE; + STAILQ_FOREACH(lun, &softc->lun_list, links) { + if (ctl_lun_map_to_port(port, lun->lun) >= CTL_MAX_LUNS) + continue; + mtx_lock(&lun->lun_lock); + ctl_est_ua_all(lun, -1, CTL_UA_INQ_CHANGE); + mtx_unlock(&lun->lun_lock); + } + mtx_unlock(&softc->ctl_lock); ctl_isc_announce_port(port); } From owner-svn-src-head@freebsd.org Sun Sep 13 15:08:08 2015 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 2AF9AA03CDA; Sun, 13 Sep 2015 15:08:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 013341D09; Sun, 13 Sep 2015 15:08:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8DF87rN012723; Sun, 13 Sep 2015 15:08:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8DF870J012720; Sun, 13 Sep 2015 15:08:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509131508.t8DF870J012720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 13 Sep 2015 15:08:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287757 - head/usr.sbin/ctld X-SVN-Group: head 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.20 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: Sun, 13 Sep 2015 15:08:08 -0000 Author: mav Date: Sun Sep 13 15:08:06 2015 New Revision: 287757 URL: https://svnweb.freebsd.org/changeset/base/287757 Log: When updating port, apply only change of LUN map, not whole. Modified: head/usr.sbin/ctld/ctld.c head/usr.sbin/ctld/ctld.h head/usr.sbin/ctld/kernel.c Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Sun Sep 13 14:52:31 2015 (r287756) +++ head/usr.sbin/ctld/ctld.c Sun Sep 13 15:08:06 2015 (r287757) @@ -2002,7 +2002,7 @@ conf_apply(struct conf *oldconf, struct } else { log_debugx("updating port \"%s\"", newport->p_name); newport->p_ctl_port = oldport->p_ctl_port; - error = kernel_port_update(newport); + error = kernel_port_update(newport, oldport); } if (error != 0) { log_warnx("failed to %s port %s", Modified: head/usr.sbin/ctld/ctld.h ============================================================================== --- head/usr.sbin/ctld/ctld.h Sun Sep 13 14:52:31 2015 (r287756) +++ head/usr.sbin/ctld/ctld.h Sun Sep 13 15:08:06 2015 (r287757) @@ -399,7 +399,7 @@ void kernel_handoff(struct connection void kernel_limits(const char *offload, size_t *max_data_segment_length); int kernel_port_add(struct port *port); -int kernel_port_update(struct port *port); +int kernel_port_update(struct port *port, struct port *old); int kernel_port_remove(struct port *port); void kernel_capsicate(void); Modified: head/usr.sbin/ctld/kernel.c ============================================================================== --- head/usr.sbin/ctld/kernel.c Sun Sep 13 14:52:31 2015 (r287756) +++ head/usr.sbin/ctld/kernel.c Sun Sep 13 15:08:06 2015 (r287757) @@ -1024,11 +1024,13 @@ kernel_port_add(struct port *port) } int -kernel_port_update(struct port *port) +kernel_port_update(struct port *port, struct port *oport) { struct ctl_lun_map lm; struct target *targ = port->p_target; + struct target *otarg = oport->p_target; int error, i; + uint32_t olun; /* Map configured LUNs and unmap others */ for (i = 0; i < MAX_LUNS; i++) { @@ -1038,6 +1040,12 @@ kernel_port_update(struct port *port) lm.lun = UINT32_MAX; else lm.lun = targ->t_luns[i]->l_ctl_lun; + if (otarg->t_luns[i] == NULL) + olun = UINT32_MAX; + else + olun = otarg->t_luns[i]->l_ctl_lun; + if (lm.lun == olun) + continue; error = ioctl(ctl_fd, CTL_LUN_MAP, &lm); if (error != 0) log_warn("CTL_LUN_MAP ioctl failed"); From owner-svn-src-head@freebsd.org Sun Sep 13 15:31:56 2015 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 BF56EA03826; Sun, 13 Sep 2015 15:31:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 ADF051CBE; Sun, 13 Sep 2015 15:31:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8DFVuuI025764; Sun, 13 Sep 2015 15:31:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8DFVuOZ025763; Sun, 13 Sep 2015 15:31:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509131531.t8DFVuOZ025763@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 13 Sep 2015 15:31:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287758 - head/sys/cam/ctl X-SVN-Group: head 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.20 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: Sun, 13 Sep 2015 15:31:56 -0000 Author: mav Date: Sun Sep 13 15:31:55 2015 New Revision: 287758 URL: https://svnweb.freebsd.org/changeset/base/287758 Log: Reannounce port to HA peer if LUN map changed after online. Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Sun Sep 13 15:08:06 2015 (r287757) +++ head/sys/cam/ctl/ctl.c Sun Sep 13 15:31:55 2015 (r287758) @@ -3153,12 +3153,16 @@ ctl_ioctl(struct cdev *dev, u_long cmd, mtx_unlock(&softc->ctl_lock); return (ENXIO); } - STAILQ_FOREACH(lun, &softc->lun_list, links) { - if (ctl_lun_map_to_port(port, lun->lun) >= CTL_MAX_LUNS) - continue; - mtx_lock(&lun->lun_lock); - ctl_est_ua_port(lun, lm->port, -1, CTL_UA_LUN_CHANGE); - mtx_unlock(&lun->lun_lock); + if (port->status & CTL_PORT_STATUS_ONLINE) { + STAILQ_FOREACH(lun, &softc->lun_list, links) { + if (ctl_lun_map_to_port(port, lun->lun) >= + CTL_MAX_LUNS) + continue; + mtx_lock(&lun->lun_lock); + ctl_est_ua_port(lun, lm->port, -1, + CTL_UA_LUN_CHANGE); + mtx_unlock(&lun->lun_lock); + } } mtx_unlock(&softc->ctl_lock); // XXX: port_enable sleeps if (lm->plun < CTL_MAX_LUNS) { @@ -3176,6 +3180,8 @@ ctl_ioctl(struct cdev *dev, u_long cmd, retval = ctl_lun_map_init(port); } else return (ENXIO); + if (port->status & CTL_PORT_STATUS_ONLINE) + ctl_isc_announce_port(port); break; } default: { From owner-svn-src-head@freebsd.org Sun Sep 13 15:50:58 2015 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 6375DA03204; Sun, 13 Sep 2015 15:50:58 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 5349214C1; Sun, 13 Sep 2015 15:50:58 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8DFowCe031943; Sun, 13 Sep 2015 15:50:58 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8DFotja031665; Sun, 13 Sep 2015 15:50:55 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201509131550.t8DFotja031665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Sun, 13 Sep 2015 15:50:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287759 - in head: cddl/lib/libdtrace share/dtrace sys/netinet X-SVN-Group: head 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.20 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: Sun, 13 Sep 2015 15:50:58 -0000 Author: gnn Date: Sun Sep 13 15:50:55 2015 New Revision: 287759 URL: https://svnweb.freebsd.org/changeset/base/287759 Log: dd DTrace probe points, translators and a corresponding script to provide the TCPDEBUG functionality with pure DTrace. Reviewed by: rwatson MFC after: 2 weeks Sponsored by: Limelight Networks Differential Revision: D3530 Added: head/share/dtrace/tcpdebug (contents, props changed) Modified: head/cddl/lib/libdtrace/tcp.d head/sys/netinet/in_kdtrace.c head/sys/netinet/in_kdtrace.h head/sys/netinet/tcp_input.c head/sys/netinet/tcp_output.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_timer.c head/sys/netinet/tcp_usrreq.c Modified: head/cddl/lib/libdtrace/tcp.d ============================================================================== --- head/cddl/lib/libdtrace/tcp.d Sun Sep 13 15:31:55 2015 (r287758) +++ head/cddl/lib/libdtrace/tcp.d Sun Sep 13 15:50:55 2015 (r287759) @@ -103,11 +103,15 @@ typedef struct tcpsinfo { int32_t tcps_state; /* TCP state */ uint32_t tcps_iss; /* Initial sequence # sent */ uint32_t tcps_suna; /* sequence # sent but unacked */ + uint32_t tcps_smax; /* highest sequence number sent */ uint32_t tcps_snxt; /* next sequence # to send */ uint32_t tcps_rack; /* sequence # we have acked */ uint32_t tcps_rnxt; /* next sequence # expected */ uint32_t tcps_swnd; /* send window size */ int32_t tcps_snd_ws; /* send window scaling */ + uint32_t tcps_swl1; /* window update seg seq number */ + uint32_t tcps_swl2; /* window update seg ack number */ + uint32_t tcps_rup; /* receive urgent pointer */ uint32_t tcps_rwnd; /* receive window size */ int32_t tcps_rcv_ws; /* receive window scaling */ uint32_t tcps_cwnd; /* congestion window */ @@ -117,7 +121,8 @@ typedef struct tcpsinfo { uint32_t tcps_rto; /* round-trip timeout, msec */ uint32_t tcps_mss; /* max segment size */ int tcps_retransmit; /* retransmit send event, boolean */ - int tcps_srtt; /* smoothed RTT in units of (TCP_RTT_SCALE*hz) */ + int tcps_srtt; /* smoothed RTT in units of (TCP_RTT_SCALE*hz) */ + int tcps_debug; /* socket has SO_DEBUG set */ } tcpsinfo_t; /* @@ -188,12 +193,16 @@ translator tcpsinfo_t < struct tcpcb *p tcps_state = p == NULL ? -1 : p->t_state; tcps_iss = p == NULL ? 0 : p->iss; tcps_suna = p == NULL ? 0 : p->snd_una; + tcps_smax = p == NULL ? 0 : p->snd_max; tcps_snxt = p == NULL ? 0 : p->snd_nxt; tcps_rack = p == NULL ? 0 : p->last_ack_sent; tcps_rnxt = p == NULL ? 0 : p->rcv_nxt; tcps_swnd = p == NULL ? -1 : p->snd_wnd; tcps_snd_ws = p == NULL ? -1 : p->snd_scale; + tcps_swl1 = p == NULL ? -1 : p->snd_wl1; + tcps_swl2 = p == NULL ? -1 : p->snd_wl2; tcps_rwnd = p == NULL ? -1 : p->rcv_wnd; + tcps_rup = p == NULL ? -1 : p->rcv_up; tcps_rcv_ws = p == NULL ? -1 : p->rcv_scale; tcps_cwnd = p == NULL ? -1 : p->snd_cwnd; tcps_cwnd_ssthresh = p == NULL ? -1 : p->snd_ssthresh; @@ -203,6 +212,8 @@ translator tcpsinfo_t < struct tcpcb *p tcps_mss = p == NULL ? -1 : p->t_maxseg; tcps_retransmit = p == NULL ? -1 : p->t_rxtshift > 0 ? 1 : 0; tcps_srtt = p == NULL ? -1 : p->t_srtt; /* smoothed RTT in units of (TCP_RTT_SCALE*hz) */ + tcps_debug = p == NULL ? 0 : + p->t_inpcb->inp_socket->so_options & 1; }; #pragma D binding "1.6.3" translator @@ -242,3 +253,123 @@ translator tcpinfoh_t < struct tcphdr *p translator tcplsinfo_t < int s > { tcps_state = s; }; + + +/* Support for TCP debug */ + +#pragma D binding "1.12.1" TA_INPUT +inline int TA_INPUT = 0; +#pragma D binding "1.12.1" TA_OUTPUT +inline int TA_OUTPUT = 1; +#pragma D binding "1.12.1" TA_USER +inline int TA_USER = 2; +#pragma D binding "1.12.1" TA_RESPOND +inline int TA_RESPOND = 3; +#pragma D binding "1.12.1" TA_DROP +inline int TA_DROP = 4; + +/* direction strings. */ + +#pragma D binding "1.12.1" tcpdebug_dir_string +inline string tcpdebug_dir_string[uint8_t direction] = + direction == TA_INPUT ? "input" : + direction == TA_OUTPUT ? "output" : + direction == TA_USER ? "user" : + direction == TA_RESPOND ? "respond" : + direction == TA_OUTPUT ? "drop" : + "unknown" ; + +#pragma D binding "1.12.1" tcpflag_string +inline string tcpflag_string[uint8_t flags] = + flags & TH_FIN ? "FIN" : + flags & TH_SYN ? "SYN" : + flags & TH_RST ? "RST" : + flags & TH_PUSH ? "PUSH" : + flags & TH_ACK ? "ACK" : + flags & TH_URG ? "URG" : + flags & TH_ECE ? "ECE" : + flags & TH_CWR ? "CWR" : + "unknown" ; + +#pragma D binding "1.12.1" PRU_ATTACH +inline int PRU_ATTACH = 0; +#pragma D binding "1.12.1" PRU_DETACH +inline int PRU_DETACH = 1; +#pragma D binding "1.12.1" PRU_BIND +inline int PRU_BIND = 2; +#pragma D binding "1.12.1" PRU_LISTEN +inline int PRU_LISTEN = 3; +#pragma D binding "1.12.1" PRU_CONNECT +inline int PRU_CONNECT = 4; +#pragma D binding "1.12.1" PRU_ACCEPT +inline int PRU_ACCEPT = 5 ; +#pragma D binding "1.12.1" PRU_DISCONNECT +inline int PRU_DISCONNECT= 6; +#pragma D binding "1.12.1" PRU_SHUTDOWN +inline int PRU_SHUTDOWN = 7; +#pragma D binding "1.12.1" PRU_RCVD +inline int PRU_RCVD = 8; +#pragma D binding "1.12.1" PRU_SEND +inline int PRU_SEND = 9; +#pragma D binding "1.12.1" PRU_ABORT +inline int PRU_ABORT = 10; +#pragma D binding "1.12.1" PRU_CONTROL +inline int PRU_CONTROL = 11; +#pragma D binding "1.12.1" PRU_SENSE +inline int PRU_SENSE = 12; +#pragma D binding "1.12.1" PRU_RCVOOB +inline int PRU_RCVOOB = 13; +#pragma D binding "1.12.1" PRU_SENDOOB +inline int PRU_SENDOOB = 14; +#pragma D binding "1.12.1" PRU_SOCKADDR +inline int PRU_SOCKADDR = 15; +#pragma D binding "1.12.1" PRU_PEERADDR +inline int PRU_PEERADDR = 16; +#pragma D binding "1.12.1" PRU_CONNECT2 +inline int PRU_CONNECT2 = 17; +#pragma D binding "1.12.1" PRU_FASTTIMO +inline int PRU_FASTTIMO = 18; +#pragma D binding "1.12.1" PRU_SLOWTIMO +inline int PRU_SLOWTIMO = 19; +#pragma D binding "1.12.1" PRU_PROTORCV +inline int PRU_PROTORCV = 20; +#pragma D binding "1.12.1" PRU_PROTOSEND +inline int PRU_PROTOSEND = 21; +#pragma D binding "1.12.1" PRU_SEND_EOF +inline int PRU_SEND_EOF = 22; +#pragma D binding "1.12.1" PRU_SOSETLABEL +inline int PRU_SOSETLABEL = 23; +#pragma D binding "1.12.1" PRU_CLOSE +inline int PRU_CLOSE = 24; +#pragma D binding "1.12.1" PRU_FLUSH +inline int PRU_FLUSH = 25; + +#pragma D binding "1.12.1" prureq_string +inline string prureq_string[uint8_t req] = + req == PRU_ATTACH ? "ATTACH" : + req == PRU_DETACH ? "DETACH" : + req == PRU_BIND ? "BIND" : + req == PRU_LISTEN ? "LISTEN" : + req == PRU_CONNECT ? "CONNECT" : + req == PRU_ACCEPT ? "ACCEPT" : + req == PRU_DISCONNECT ? "DISCONNECT" : + req == PRU_SHUTDOWN ? "SHUTDOWN" : + req == PRU_RCVD ? "RCVD" : + req == PRU_SEND ? "SEND" : + req == PRU_ABORT ? "ABORT" : + req == PRU_CONTROL ? "CONTROL" : + req == PRU_SENSE ? "SENSE" : + req == PRU_RCVOOB ? "RCVOOB" : + req == PRU_SENDOOB ? "SENDOOB" : + req == PRU_SOCKADDR ? "SOCKADDR" : + req == PRU_PEERADDR ? "PEERADDR" : + req == PRU_CONNECT2 ? "CONNECT2" : + req == PRU_FASTTIMO ? "FASTTIMO" : + req == PRU_SLOWTIMO ? "SLOWTIMO" : + req == PRU_PROTORCV ? "PROTORCV" : + req == PRU_PROTOSEND ? "PROTOSEND" : + req == PRU_SEND ? "SEND_EOF" : + req == PRU_SOSETLABEL ? "SOSETLABEL" : + req == PRU_CLOSE ? "CLOSE" : + req == PRU_FLUSH ? "FLUSE" : + "unknown" ; Added: head/share/dtrace/tcpdebug ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/dtrace/tcpdebug Sun Sep 13 15:50:55 2015 (r287759) @@ -0,0 +1,165 @@ +#!/usr/sbin/dtrace -s +/* + * Copyright (c) 2015 George V. Neville-Neil + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + * + * The tcpdebug D script uses the tcp:kernel::debug tracepoints + * to replicate the action of turning on TCPDEBUG in a kernel configuration. + * + * A TCP debug statement shows a connection's + * + * direction: input, output, user, drop + * state: CLOSED, LISTEN, SYN_SENT, SYN_RCVD, ESTABLISHED, + * CLOSE_WAIT, FIN_WAIT_1, CLOSING, LAST_ACK, FIN_WAIT_2,TIME_WAIT + * sequence: sequence space + * + * congestion: rcv_nxt, rcv_wnd, rcv_up, snd_una, snd_nxt, snx_max, + * snd_wl1, snd_wl2, snd_wnd + * + * NOTE: Only sockets with SO_DEBUG set will be shown. + * + * Usage: tcpdebug + */ + +#pragma D option quiet +tcp:kernel::debug-input +/args[0]->tcps_debug/ +{ + seq = args[1]->tcp_seq; + ack = args[1]->tcp_ack; + len = args[2]->ip_plength - sizeof(struct tcphdr); + flags = args[1]->tcp_flags; + + printf("%p %s: input [%xu..%xu]", arg0, + tcp_state_string[args[0]->tcps_state], seq, seq + len); + + printf("@%x, urp=%x", ack, args[1]->tcp_urgent); + + printf("%s", flags != 0 ? "<" : ""); + printf("%s", flags & TH_SYN ? "SYN," :""); + printf("%s", flags & TH_ACK ? "ACK," :""); + printf("%s", flags & TH_FIN ? "FIN," :""); + printf("%s", flags & TH_RST ? "RST," :""); + printf("%s", flags & TH_PUSH ? "PUSH," :""); + printf("%s", flags & TH_URG ? "URG," :""); + printf("%s", flags & TH_ECE ? "ECE," :""); + printf("%s", flags & TH_CWR ? "CWR" :""); + printf("%s", flags != 0 ? ">" : ""); + + printf("\n"); + printf("\trcv_(nxt,wnd,up) (%x,%x,%x) snd_(una,nxt,max) (%x,%x,%x)\n", + args[0]->tcps_rnxt, args[0]->tcps_rwnd, args[0]->tcps_rup, + args[0]->tcps_suna, args[0]->tcps_snxt, args[0]->tcps_smax); + printf("\tsnd_(wl1,wl2,wnd) (%x,%x,%x)\n", + args[0]->tcps_swl1, args[0]->tcps_swl2, args[0]->tcps_swnd); + +} + +tcp:kernel::debug-output +/args[0]->tcps_debug/ +{ + seq = args[1]->tcp_seq; + ack = args[1]->tcp_ack; + len = args[2]->ip_plength - 20; + + printf("%p %s: output [%x..%x]", arg0, + tcp_state_string[args[0]->tcps_state], seq, seq + len); + + printf("@%x, urp=%x", ack, args[1]->tcp_urgent); + + printf("%s", flags != 0 ? "<" : ""); + printf("%s", flags & TH_SYN ? "SYN," :""); + printf("%s", flags & TH_ACK ? "ACK," :""); + printf("%s", flags & TH_FIN ? "FIN," :""); + printf("%s", flags & TH_RST ? "RST," :""); + printf("%s", flags & TH_PUSH ? "PUSH," :""); + printf("%s", flags & TH_URG ? "URG," :""); + printf("%s", flags & TH_ECE ? "ECE," :""); + printf("%s", flags & TH_CWR ? "CWR" :""); + printf("%s", flags != 0 ? ">" : ""); + + printf("\n"); + printf("\trcv_(nxt,wnd,up) (%u,%x,%x) snd_(una,nxt,max) (%x,%x,%x)\n", + args[0]->tcps_rnxt, args[0]->tcps_rwnd, args[0]->tcps_rup, + args[0]->tcps_suna, args[0]->tcps_snxt, args[0]->tcps_smax); + printf("\tsnd_(wl1,wl2,wnd) (%x,%x,%x)\n", + args[0]->tcps_swl1, args[0]->tcps_swl2, args[0]->tcps_swnd); + +} + +tcp:kernel::debug-drop +/args[0]->tcps_debug/ +{ + printf("%p %s: output [x..x] @%x, urp=%x\n", arg0, + tcp_state_string[args[0]->tcps_state], + args[1]->tcp_ack, + args[1]->tcp_urgent); + + seq = args[1]->tcp_seq; + ack = args[1]->tcp_ack; + len = args[2]->ip_plength; + + printf("%p %s: drop [%x..%x]", arg0, + tcp_state_string[args[0]->tcps_state], seq, seq + len); + + printf("@%x, urp=%x", ack, args[1]->tcp_urgent); + + printf("%s", flags != 0 ? "<" : ""); + printf("%s", flags & TH_SYN ? "SYN," :""); + printf("%s", flags & TH_ACK ? "ACK," :""); + printf("%s", flags & TH_FIN ? "FIN," :""); + printf("%s", flags & TH_RST ? "RST," :""); + printf("%s", flags & TH_PUSH ? "PUSH," :""); + printf("%s", flags & TH_URG ? "URG," :""); + printf("%s", flags & TH_ECE ? "ECE," :""); + printf("%s", flags & TH_CWR ? "CWR" :""); + printf("%s", flags != 0 ? ">" : ""); + + printf("\n"); + printf("\trcv_(nxt,wnd,up) (%x,%x,%x) snd_(una,nxt,max) (%x,%x,%x)\n", + args[0]->tcps_rnxt, args[0]->tcps_rwnd, args[0]->tcps_rup, + args[0]->tcps_suna, args[0]->tcps_snxt, args[0]->tcps_smax); + printf("\tsnd_(wl1,wl2,wnd) (%x,%x,%x)\n", + args[0]->tcps_swl1, args[0]->tcps_swl2, args[0]->tcps_swnd); + +} + +tcp:kernel::debug-user +/args[0]->tcps_debug/ +{ + printf("%p %s: user ", arg0, + tcp_state_string[args[0]->tcps_state]); + + printf("%s", prureq_string[arg1]); + printf("\n"); + printf("\trcv_(nxt,wnd,up) (%x,%x,%x) snd_(una,nxt,max) (%x,%x,%x)\n", + args[0]->tcps_rnxt, args[0]->tcps_rwnd, args[0]->tcps_rup, + args[0]->tcps_suna, args[0]->tcps_snxt, args[0]->tcps_smax); + printf("\tsnd_(wl1,wl2,wnd) (%x,%x,%x)\n", + args[0]->tcps_swl1, args[0]->tcps_swl2, args[0]->tcps_swnd); + +} + Modified: head/sys/netinet/in_kdtrace.c ============================================================================== --- head/sys/netinet/in_kdtrace.c Sun Sep 13 15:31:55 2015 (r287758) +++ head/sys/netinet/in_kdtrace.c Sun Sep 13 15:50:55 2015 (r287759) @@ -105,6 +105,25 @@ SDT_PROBE_DEFINE5_XLATE(tcp, , , send, SDT_PROBE_DEFINE1_XLATE(tcp, , , siftr, "struct pkt_node *", "siftrinfo_t *"); +SDT_PROBE_DEFINE3_XLATE(tcp, , , debug__input, + "struct tcpcb *", "tcpsinfo_t *" , + "struct tcphdr *", "tcpinfo_t *", + "uint8_t *", "ipinfo_t *"); + +SDT_PROBE_DEFINE3_XLATE(tcp, , , debug__output, + "struct tcpcb *", "tcpsinfo_t *" , + "struct tcphdr *", "tcpinfo_t *", + "uint8_t *", "ipinfo_t *"); + +SDT_PROBE_DEFINE2_XLATE(tcp, , , debug__user, + "struct tcpcb *", "tcpsinfo_t *" , + "int", "int"); + +SDT_PROBE_DEFINE3_XLATE(tcp, , , debug__drop, + "struct tcpcb *", "tcpsinfo_t *" , + "struct tcphdr *", "tcpinfo_t *", + "uint8_t *", "ipinfo_t *") + SDT_PROBE_DEFINE6_XLATE(tcp, , , state__change, "void *", "void *", "struct tcpcb *", "csinfo_t *", Modified: head/sys/netinet/in_kdtrace.h ============================================================================== --- head/sys/netinet/in_kdtrace.h Sun Sep 13 15:31:55 2015 (r287758) +++ head/sys/netinet/in_kdtrace.h Sun Sep 13 15:50:55 2015 (r287759) @@ -34,6 +34,12 @@ SDT_PROBE5(udp, , , probe, arg0, arg1, arg2, arg3, arg4) #define TCP_PROBE1(probe, arg0) \ SDT_PROBE1(tcp, , , probe, arg0) +#define TCP_PROBE2(probe, arg0, arg1) \ + SDT_PROBE2(tcp, , , probe, arg0, arg1) +#define TCP_PROBE3(probe, arg0, arg1, arg2) \ + SDT_PROBE3(tcp, , , probe, arg0, arg1, arg2) +#define TCP_PROBE4(probe, arg0, arg1, arg2, arg3) \ + SDT_PROBE4(tcp, , , probe, arg0, arg1, arg2, arg3) #define TCP_PROBE5(probe, arg0, arg1, arg2, arg3, arg4) \ SDT_PROBE5(tcp, , , probe, arg0, arg1, arg2, arg3, arg4) #define TCP_PROBE6(probe, arg0, arg1, arg2, arg3, arg4, arg5) \ @@ -55,6 +61,10 @@ SDT_PROBE_DECLARE(tcp, , , receive); SDT_PROBE_DECLARE(tcp, , , send); SDT_PROBE_DECLARE(tcp, , , siftr); SDT_PROBE_DECLARE(tcp, , , state__change); +SDT_PROBE_DECLARE(tcp, , , debug__input); +SDT_PROBE_DECLARE(tcp, , , debug__output); +SDT_PROBE_DECLARE(tcp, , , debug__user); +SDT_PROBE_DECLARE(tcp, , , debug__drop); SDT_PROBE_DECLARE(udp, , , receive); SDT_PROBE_DECLARE(udp, , , send); Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Sun Sep 13 15:31:55 2015 (r287758) +++ head/sys/netinet/tcp_input.c Sun Sep 13 15:50:55 2015 (r287759) @@ -1377,6 +1377,7 @@ relocked: tcp_trace(TA_INPUT, ostate, tp, (void *)tcp_saveipgen, &tcp_savetcp, 0); #endif + TCP_PROBE3(debug__input, tp, th, mtod(m, const char *)); tcp_dooptions(&to, optp, optlen, TO_SYN); syncache_add(&inc, &to, th, inp, &so, m, NULL, NULL); /* @@ -1779,6 +1780,8 @@ tcp_do_segment(struct mbuf *m, struct tc (void *)tcp_saveipgen, &tcp_savetcp, 0); #endif + TCP_PROBE3(debug__input, tp, th, + mtod(m, const char *)); if (tp->snd_una == tp->snd_max) tcp_timer_activate(tp, TT_REXMT, 0); else if (!tcp_timer_active(tp, TT_PERSIST)) @@ -1825,6 +1828,8 @@ tcp_do_segment(struct mbuf *m, struct tc tcp_trace(TA_INPUT, ostate, tp, (void *)tcp_saveipgen, &tcp_savetcp, 0); #endif + TCP_PROBE3(debug__input, tp, th, mtod(m, const char *)); + /* * Automatic sizing of receive socket buffer. Often the send * buffer size is not optimally adjusted to the actual network @@ -3022,6 +3027,7 @@ dodata: /* XXX */ tcp_trace(TA_INPUT, ostate, tp, (void *)tcp_saveipgen, &tcp_savetcp, 0); #endif + TCP_PROBE3(debug__input, tp, th, mtod(m, const char *)); /* * Return any desired output. @@ -3069,6 +3075,7 @@ dropafterack: tcp_trace(TA_DROP, ostate, tp, (void *)tcp_saveipgen, &tcp_savetcp, 0); #endif + TCP_PROBE3(debug__input, tp, th, mtod(m, const char *)); if (ti_locked == TI_RLOCKED) INP_INFO_RUNLOCK(&V_tcbinfo); ti_locked = TI_UNLOCKED; @@ -3109,6 +3116,7 @@ drop: tcp_trace(TA_DROP, ostate, tp, (void *)tcp_saveipgen, &tcp_savetcp, 0); #endif + TCP_PROBE3(debug__input, tp, th, mtod(m, const char *)); if (tp != NULL) INP_WUNLOCK(tp->t_inpcb); m_freem(m); Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Sun Sep 13 15:31:55 2015 (r287758) +++ head/sys/netinet/tcp_output.c Sun Sep 13 15:50:55 2015 (r287759) @@ -1253,6 +1253,7 @@ send: ipov->ih_len = save; } #endif /* TCPDEBUG */ + TCP_PROBE3(debug__input, tp, th, mtod(m, const char *)); /* * Fill in IP length and desired time to live and Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Sun Sep 13 15:31:55 2015 (r287758) +++ head/sys/netinet/tcp_subr.c Sun Sep 13 15:50:55 2015 (r287759) @@ -720,6 +720,7 @@ tcp_respond(struct tcpcb *tp, void *ipge if (tp == NULL || (inp->inp_socket->so_options & SO_DEBUG)) tcp_trace(TA_OUTPUT, 0, tp, mtod(m, void *), th, 0); #endif + TCP_PROBE3(debug__input, tp, th, mtod(m, const char *)); if (flags & TH_RST) TCP_PROBE5(accept__refused, NULL, NULL, mtod(m, const char *), tp, nth); Modified: head/sys/netinet/tcp_timer.c ============================================================================== --- head/sys/netinet/tcp_timer.c Sun Sep 13 15:31:55 2015 (r287758) +++ head/sys/netinet/tcp_timer.c Sun Sep 13 15:50:55 2015 (r287759) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -369,6 +370,8 @@ tcp_timer_2msl(void *xtp) tcp_trace(TA_USER, ostate, tp, (void *)0, (struct tcphdr *)0, PRU_SLOWTIMO); #endif + TCP_PROBE2(debug__user, tp, PRU_SLOWTIMO); + if (tp != NULL) INP_WUNLOCK(inp); INP_INFO_RUNLOCK(&V_tcbinfo); @@ -454,6 +457,7 @@ tcp_timer_keep(void *xtp) tcp_trace(TA_USER, ostate, tp, (void *)0, (struct tcphdr *)0, PRU_SLOWTIMO); #endif + TCP_PROBE2(debug__user, tp, PRU_SLOWTIMO); INP_WUNLOCK(inp); INP_INFO_RUNLOCK(&V_tcbinfo); CURVNET_RESTORE(); @@ -468,6 +472,7 @@ dropit: tcp_trace(TA_USER, ostate, tp, (void *)0, (struct tcphdr *)0, PRU_SLOWTIMO); #endif + TCP_PROBE2(debug__user, tp, PRU_SLOWTIMO); if (tp != NULL) INP_WUNLOCK(tp->t_inpcb); INP_INFO_RUNLOCK(&V_tcbinfo); @@ -546,6 +551,7 @@ out: if (tp != NULL && tp->t_inpcb->inp_socket->so_options & SO_DEBUG) tcp_trace(TA_USER, ostate, tp, NULL, NULL, PRU_SLOWTIMO); #endif + TCP_PROBE2(debug__user, tp, PRU_SLOWTIMO); if (tp != NULL) INP_WUNLOCK(inp); INP_INFO_RUNLOCK(&V_tcbinfo); @@ -792,6 +798,7 @@ out: tcp_trace(TA_USER, ostate, tp, (void *)0, (struct tcphdr *)0, PRU_SLOWTIMO); #endif + TCP_PROBE2(debug__user, tp, PRU_SLOWTIMO); if (tp != NULL) INP_WUNLOCK(inp); if (headlocked) Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Sun Sep 13 15:31:55 2015 (r287758) +++ head/sys/netinet/tcp_usrreq.c Sun Sep 13 15:50:55 2015 (r287759) @@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -146,6 +147,7 @@ tcp_usr_attach(struct socket *so, int pr tp = intotcpcb(inp); out: TCPDEBUG2(PRU_ATTACH); + TCP_PROBE2(debug__user, tp, PRU_ATTACH); return error; } @@ -295,6 +297,7 @@ tcp_usr_bind(struct socket *so, struct s INP_HASH_WUNLOCK(&V_tcbinfo); out: TCPDEBUG2(PRU_BIND); + TCP_PROBE2(debug__user, tp, PRU_BIND); INP_WUNLOCK(inp); return (error); @@ -355,6 +358,7 @@ tcp6_usr_bind(struct socket *so, struct INP_HASH_WUNLOCK(&V_tcbinfo); out: TCPDEBUG2(PRU_BIND); + TCP_PROBE2(debug__user, tp, PRU_BIND); INP_WUNLOCK(inp); return (error); } @@ -399,6 +403,7 @@ tcp_usr_listen(struct socket *so, int ba out: TCPDEBUG2(PRU_LISTEN); + TCP_PROBE2(debug__user, tp, PRU_LISTEN); INP_WUNLOCK(inp); return (error); } @@ -444,6 +449,7 @@ tcp6_usr_listen(struct socket *so, int b out: TCPDEBUG2(PRU_LISTEN); + TCP_PROBE2(debug__user, tp, PRU_LISTEN); INP_WUNLOCK(inp); return (error); } @@ -592,6 +598,7 @@ tcp6_usr_connect(struct socket *so, stru out: TCPDEBUG2(PRU_CONNECT); + TCP_PROBE2(debug__user, tp, PRU_CONNECT); INP_WUNLOCK(inp); return (error); } @@ -631,6 +638,7 @@ tcp_usr_disconnect(struct socket *so) tcp_disconnect(tp); out: TCPDEBUG2(PRU_DISCONNECT); + TCP_PROBE2(debug__user, tp, PRU_DISCONNECT); INP_WUNLOCK(inp); INP_INFO_RUNLOCK(&V_tcbinfo); return (error); @@ -674,6 +682,7 @@ tcp_usr_accept(struct socket *so, struct out: TCPDEBUG2(PRU_ACCEPT); + TCP_PROBE2(debug__user, tp, PRU_ACCEPT); INP_WUNLOCK(inp); if (error == 0) *nam = in_sockaddr(port, &addr); @@ -724,6 +733,7 @@ tcp6_usr_accept(struct socket *so, struc out: TCPDEBUG2(PRU_ACCEPT); + TCP_PROBE2(debug__user, tp, PRU_ACCEPT); INP_WUNLOCK(inp); INP_INFO_RUNLOCK(&V_tcbinfo); if (error == 0) { @@ -764,6 +774,7 @@ tcp_usr_shutdown(struct socket *so) out: TCPDEBUG2(PRU_SHUTDOWN); + TCP_PROBE2(debug__user, tp, PRU_SHUTDOWN); INP_WUNLOCK(inp); INP_INFO_RUNLOCK(&V_tcbinfo); @@ -799,6 +810,7 @@ tcp_usr_rcvd(struct socket *so, int flag out: TCPDEBUG2(PRU_RCVD); + TCP_PROBE2(debug__user, tp, PRU_RCVD); INP_WUNLOCK(inp); return (error); } @@ -953,6 +965,8 @@ tcp_usr_send(struct socket *so, int flag out: TCPDEBUG2((flags & PRUS_OOB) ? PRU_SENDOOB : ((flags & PRUS_EOF) ? PRU_SEND_EOF : PRU_SEND)); + TCP_PROBE2(debug__user, tp, (flags & PRUS_OOB) ? PRU_SENDOOB : + ((flags & PRUS_EOF) ? PRU_SEND_EOF : PRU_SEND)); INP_WUNLOCK(inp); if (flags & PRUS_EOF) INP_INFO_RUNLOCK(&V_tcbinfo); @@ -1013,6 +1027,7 @@ tcp_usr_abort(struct socket *so) TCPDEBUG1(); tcp_drop(tp, ECONNABORTED); TCPDEBUG2(PRU_ABORT); + TCP_PROBE2(debug__user, tp, PRU_ABORT); } if (!(inp->inp_flags & INP_DROPPED)) { SOCK_LOCK(so); @@ -1052,6 +1067,7 @@ tcp_usr_close(struct socket *so) TCPDEBUG1(); tcp_disconnect(tp); TCPDEBUG2(PRU_CLOSE); + TCP_PROBE2(debug__user, tp, PRU_CLOSE); } if (!(inp->inp_flags & INP_DROPPED)) { SOCK_LOCK(so); @@ -1101,6 +1117,7 @@ tcp_usr_rcvoob(struct socket *so, struct out: TCPDEBUG2(PRU_RCVOOB); + TCP_PROBE2(debug__user, tp, PRU_RCVOOB); INP_WUNLOCK(inp); return (error); } From owner-svn-src-head@freebsd.org Sun Sep 13 16:49:43 2015 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 D68F0A0301C; Sun, 13 Sep 2015 16:49:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 C7DA912B7; Sun, 13 Sep 2015 16:49:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8DGnhrO058254; Sun, 13 Sep 2015 16:49:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8DGngAZ058248; Sun, 13 Sep 2015 16:49:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509131649.t8DGngAZ058248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 13 Sep 2015 16:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287760 - head/sys/cam/ctl X-SVN-Group: head 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.20 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: Sun, 13 Sep 2015 16:49:43 -0000 Author: mav Date: Sun Sep 13 16:49:41 2015 New Revision: 287760 URL: https://svnweb.freebsd.org/changeset/base/287760 Log: Improve read-only support. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_backend_block.c head/sys/cam/ctl/ctl_cmd_table.c head/sys/cam/ctl/ctl_error.c head/sys/cam/ctl/ctl_error.h Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Sun Sep 13 15:50:55 2015 (r287759) +++ head/sys/cam/ctl/ctl.c Sun Sep 13 16:49:41 2015 (r287760) @@ -10846,9 +10846,7 @@ ctl_scsiio_lun_check(struct ctl_lun *lun if (entry->pattern & CTL_LUN_PAT_WRITE) { if (lun->be_lun && lun->be_lun->flags & CTL_LUN_FLAG_READONLY) { - ctl_set_sense(ctsio, /*current_error*/ 1, - /*sense_key*/ SSD_KEY_DATA_PROTECT, - /*asc*/ 0x27, /*ascq*/ 0x01, SSD_ELEM_NONE); + ctl_set_hw_write_protected(ctsio); retval = 1; goto bailout; } Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Sun Sep 13 15:50:55 2015 (r287759) +++ head/sys/cam/ctl/ctl_backend_block.c Sun Sep 13 16:49:41 2015 (r287760) @@ -508,6 +508,8 @@ ctl_be_block_biodone(struct bio *bio) ctl_set_invalid_opcode(&io->scsiio); } else if (error == ENOSPC || error == EDQUOT) { ctl_set_space_alloc_fail(&io->scsiio); + } else if (error == EROFS || error == EACCES) { + ctl_set_hw_write_protected(&io->scsiio); } else if (beio->bio_cmd == BIO_FLUSH) { /* XXX KDM is there is a better error here? */ ctl_set_internal_failure(&io->scsiio, @@ -720,6 +722,8 @@ ctl_be_block_dispatch_file(struct ctl_be (beio->bio_cmd == BIO_READ) ? "READ" : "WRITE", error); if (error == ENOSPC || error == EDQUOT) { ctl_set_space_alloc_fail(&io->scsiio); + } else if (error == EROFS || error == EACCES) { + ctl_set_hw_write_protected(&io->scsiio); } else ctl_set_medium_error(&io->scsiio); ctl_complete_beio(beio); @@ -885,6 +889,8 @@ ctl_be_block_dispatch_zvol(struct ctl_be if (error != 0) { if (error == ENOSPC || error == EDQUOT) { ctl_set_space_alloc_fail(&io->scsiio); + } else if (error == EROFS || error == EACCES) { + ctl_set_hw_write_protected(&io->scsiio); } else ctl_set_medium_error(&io->scsiio); ctl_complete_beio(beio); Modified: head/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- head/sys/cam/ctl/ctl_cmd_table.c Sun Sep 13 15:50:55 2015 (r287759) +++ head/sys/cam/ctl/ctl_cmd_table.c Sun Sep 13 16:49:41 2015 (r287760) @@ -768,7 +768,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 35 SYNCHRONIZE CACHE(10) */ {ctl_sync_cache, CTL_SERIDX_SYNC, CTL_CMD_FLAG_OK_ON_SLUN | CTL_FLAG_DATA_NONE, - CTL_LUN_PAT_NONE, + CTL_LUN_PAT_WRITE, 10, {0x02, 0xff, 0xff, 0xff, 0xff, 0, 0xff, 0xff, 0x07}}, /* 36 LOCK UNLOCK CACHE(10) */ @@ -1117,7 +1117,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 91 SYNCHRONIZE CACHE(16) */ {ctl_sync_cache, CTL_SERIDX_SYNC, CTL_CMD_FLAG_OK_ON_SLUN | CTL_FLAG_DATA_NONE, - CTL_LUN_PAT_NONE, + CTL_LUN_PAT_WRITE, 16, {0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, Modified: head/sys/cam/ctl/ctl_error.c ============================================================================== --- head/sys/cam/ctl/ctl_error.c Sun Sep 13 15:50:55 2015 (r287759) +++ head/sys/cam/ctl/ctl_error.c Sun Sep 13 16:49:41 2015 (r287760) @@ -848,6 +848,18 @@ ctl_set_task_aborted(struct ctl_scsiio * } void +ctl_set_hw_write_protected(struct ctl_scsiio *ctsio) +{ + /* "Hardware write protected" */ + ctl_set_sense(ctsio, + /*current_error*/ 1, + /*sense_key*/ SSD_KEY_DATA_PROTECT, + /*asc*/ 0x27, + /*ascq*/ 0x01, + SSD_ELEM_NONE); +} + +void ctl_set_space_alloc_fail(struct ctl_scsiio *ctsio) { /* "Space allocation failed write protect" */ Modified: head/sys/cam/ctl/ctl_error.h ============================================================================== --- head/sys/cam/ctl/ctl_error.h Sun Sep 13 15:50:55 2015 (r287759) +++ head/sys/cam/ctl/ctl_error.h Sun Sep 13 16:49:41 2015 (r287760) @@ -85,6 +85,7 @@ void ctl_set_reservation_conflict(struct void ctl_set_queue_full(struct ctl_scsiio *ctsio); void ctl_set_busy(struct ctl_scsiio *ctsio); void ctl_set_task_aborted(struct ctl_scsiio *ctsio); +void ctl_set_hw_write_protected(struct ctl_scsiio *ctsio); void ctl_set_space_alloc_fail(struct ctl_scsiio *ctsio); void ctl_set_success(struct ctl_scsiio *ctsio); From owner-svn-src-head@freebsd.org Sun Sep 13 17:17:53 2015 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 B82B0A03DF7; Sun, 13 Sep 2015 17:17:53 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 A929E10EA; Sun, 13 Sep 2015 17:17:53 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8DHHrQK070953; Sun, 13 Sep 2015 17:17:53 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8DHHri1070952; Sun, 13 Sep 2015 17:17:53 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201509131717.t8DHHri1070952@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 13 Sep 2015 17:17:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287761 - head/lib/libc/db/recno X-SVN-Group: head 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.20 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: Sun, 13 Sep 2015 17:17:53 -0000 Author: jilles Date: Sun Sep 13 17:17:52 2015 New Revision: 287761 URL: https://svnweb.freebsd.org/changeset/base/287761 Log: db/recno: Open with close-on-exec like btree and hash do. Modified: head/lib/libc/db/recno/rec_open.c Modified: head/lib/libc/db/recno/rec_open.c ============================================================================== --- head/lib/libc/db/recno/rec_open.c Sun Sep 13 16:49:41 2015 (r287760) +++ head/lib/libc/db/recno/rec_open.c Sun Sep 13 17:17:52 2015 (r287761) @@ -64,7 +64,7 @@ __rec_open(const char *fname, int flags, int rfd, sverrno; /* Open the user's file -- if this fails, we're done. */ - if (fname != NULL && (rfd = _open(fname, flags, mode)) < 0) + if (fname != NULL && (rfd = _open(fname, flags | O_CLOEXEC, mode)) < 0) return (NULL); /* Create a btree in memory (backed by disk). */ From owner-svn-src-head@freebsd.org Sun Sep 13 18:26:10 2015 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 5F6BAA03198; Sun, 13 Sep 2015 18:26:10 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 4F39C1569; Sun, 13 Sep 2015 18:26:10 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8DIQAgO000535; Sun, 13 Sep 2015 18:26:10 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8DIQ694000518; Sun, 13 Sep 2015 18:26:06 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201509131826.t8DIQ694000518@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sun, 13 Sep 2015 18:26:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287762 - head/sys/dev/e1000 X-SVN-Group: head 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.20 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: Sun, 13 Sep 2015 18:26:10 -0000 Author: sbruno Date: Sun Sep 13 18:26:05 2015 New Revision: 287762 URL: https://svnweb.freebsd.org/changeset/base/287762 Log: Update em(4) with D3162 after testing further on hardware that failed to attach with the last version of this commit. This commit fixes attach failures on "ICH8" class devices via modifications to e1000_init_nvm_params_ich8lan() - Fix compiler warning in 80003es2lan.c - Add return value handler for e1000_*_kmrn_reg_80003es2lan - Fix usage of DEBUGOUT - Remove unnecessary variable initializations. - Removed unused variables (complaints from gcc). - Edit defines in 82571.h. - Add workaround for igb hw errata. - Shared code changes for Skylake/I219 support. - Remove unused OBFF and LTR functions. Tested by some of the folks that reported breakage in previous incarnation. Thanks to AllanJude, gjb, gnn, tijl for tempting fate with their machines. Submitted by: erj@freebsd.org MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D3162 Modified: head/sys/dev/e1000/e1000_80003es2lan.c head/sys/dev/e1000/e1000_82540.c head/sys/dev/e1000/e1000_82541.c head/sys/dev/e1000/e1000_82542.c head/sys/dev/e1000/e1000_82543.c head/sys/dev/e1000/e1000_82571.h head/sys/dev/e1000/e1000_82575.c head/sys/dev/e1000/e1000_82575.h head/sys/dev/e1000/e1000_api.c head/sys/dev/e1000/e1000_api.h head/sys/dev/e1000/e1000_defines.h 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_ich8lan.h head/sys/dev/e1000/e1000_mac.c head/sys/dev/e1000/e1000_mac.h head/sys/dev/e1000/e1000_nvm.c head/sys/dev/e1000/e1000_nvm.h head/sys/dev/e1000/e1000_osdep.h head/sys/dev/e1000/e1000_phy.c head/sys/dev/e1000/e1000_regs.h head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/e1000_80003es2lan.c ============================================================================== --- head/sys/dev/e1000/e1000_80003es2lan.c Sun Sep 13 17:17:52 2015 (r287761) +++ head/sys/dev/e1000/e1000_80003es2lan.c Sun Sep 13 18:26:05 2015 (r287762) @@ -851,11 +851,17 @@ static s32 e1000_reset_hw_80003es2lan(st e1000_release_phy_80003es2lan(hw); /* Disable IBIST slave mode (far-end loopback) */ - e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, - &kum_reg_data); - kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE; - e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, - kum_reg_data); + ret_val = e1000_read_kmrn_reg_80003es2lan(hw, + E1000_KMRNCTRLSTA_INBAND_PARAM, &kum_reg_data); + if (!ret_val) { + kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE; + ret_val = e1000_write_kmrn_reg_80003es2lan(hw, + E1000_KMRNCTRLSTA_INBAND_PARAM, + kum_reg_data); + if (ret_val) + DEBUGOUT("Error disabling far-end loopback\n"); + } else + DEBUGOUT("Error disabling far-end loopback\n"); ret_val = e1000_get_auto_rd_done_generic(hw); if (ret_val) @@ -911,11 +917,18 @@ static s32 e1000_init_hw_80003es2lan(str return ret_val; /* Disable IBIST slave mode (far-end loopback) */ - e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, - &kum_reg_data); - kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE; - e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, - kum_reg_data); + ret_val = + e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, + &kum_reg_data); + if (!ret_val) { + kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE; + ret_val = e1000_write_kmrn_reg_80003es2lan(hw, + E1000_KMRNCTRLSTA_INBAND_PARAM, + kum_reg_data); + if (ret_val) + DEBUGOUT("Error disabling far-end loopback\n"); + } else + DEBUGOUT("Error disabling far-end loopback\n"); /* Set the transmit descriptor write-back policy */ reg_data = E1000_READ_REG(hw, E1000_TXDCTL(0)); Modified: head/sys/dev/e1000/e1000_82540.c ============================================================================== --- head/sys/dev/e1000/e1000_82540.c Sun Sep 13 17:17:52 2015 (r287761) +++ head/sys/dev/e1000/e1000_82540.c Sun Sep 13 18:26:05 2015 (r287762) @@ -66,7 +66,7 @@ static s32 e1000_read_mac_addr_82540(st static s32 e1000_init_phy_params_82540(struct e1000_hw *hw) { struct e1000_phy_info *phy = &hw->phy; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; phy->addr = 1; phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; @@ -329,7 +329,7 @@ static s32 e1000_init_hw_82540(struct e1 { struct e1000_mac_info *mac = &hw->mac; u32 txdctl, ctrl_ext; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; u16 i; DEBUGFUNC("e1000_init_hw_82540"); @@ -411,7 +411,7 @@ static s32 e1000_init_hw_82540(struct e1 static s32 e1000_setup_copper_link_82540(struct e1000_hw *hw) { u32 ctrl; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; u16 data; DEBUGFUNC("e1000_setup_copper_link_82540"); @@ -498,7 +498,7 @@ out: **/ static s32 e1000_adjust_serdes_amplitude_82540(struct e1000_hw *hw) { - s32 ret_val = E1000_SUCCESS; + s32 ret_val; u16 nvm_data; DEBUGFUNC("e1000_adjust_serdes_amplitude_82540"); @@ -528,7 +528,7 @@ out: **/ static s32 e1000_set_vco_speed_82540(struct e1000_hw *hw) { - s32 ret_val = E1000_SUCCESS; + s32 ret_val; u16 default_page = 0; u16 phy_data; Modified: head/sys/dev/e1000/e1000_82541.c ============================================================================== --- head/sys/dev/e1000/e1000_82541.c Sun Sep 13 17:17:52 2015 (r287761) +++ head/sys/dev/e1000/e1000_82541.c Sun Sep 13 18:26:05 2015 (r287762) @@ -85,7 +85,7 @@ static const u16 e1000_igp_cable_length_ static s32 e1000_init_phy_params_82541(struct e1000_hw *hw) { struct e1000_phy_info *phy = &hw->phy; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; DEBUGFUNC("e1000_init_phy_params_82541"); @@ -295,7 +295,7 @@ void e1000_init_function_pointers_82541( **/ static s32 e1000_reset_hw_82541(struct e1000_hw *hw) { - u32 ledctl, ctrl, icr, manc; + u32 ledctl, ctrl, manc; DEBUGFUNC("e1000_reset_hw_82541"); @@ -317,6 +317,7 @@ static s32 e1000_reset_hw_82541(struct e /* Must reset the Phy before resetting the MAC */ if ((hw->mac.type == e1000_82541) || (hw->mac.type == e1000_82547)) { E1000_WRITE_REG(hw, E1000_CTRL, (ctrl | E1000_CTRL_PHY_RST)); + E1000_WRITE_FLUSH(hw); msec_delay(5); } @@ -359,7 +360,7 @@ static s32 e1000_reset_hw_82541(struct e E1000_WRITE_REG(hw, E1000_IMC, 0xFFFFFFFF); /* Clear any pending interrupt events. */ - icr = E1000_READ_REG(hw, E1000_ICR); + E1000_READ_REG(hw, E1000_ICR); return E1000_SUCCESS; } Modified: head/sys/dev/e1000/e1000_82542.c ============================================================================== --- head/sys/dev/e1000/e1000_82542.c Sun Sep 13 17:17:52 2015 (r287761) +++ head/sys/dev/e1000/e1000_82542.c Sun Sep 13 18:26:05 2015 (r287762) @@ -317,7 +317,7 @@ static s32 e1000_init_hw_82542(struct e1 static s32 e1000_setup_link_82542(struct e1000_hw *hw) { struct e1000_mac_info *mac = &hw->mac; - s32 ret_val = E1000_SUCCESS; + s32 ret_val; DEBUGFUNC("e1000_setup_link_82542"); @@ -565,7 +565,7 @@ static void e1000_clear_hw_cntrs_82542(s * * Reads the device MAC address from the EEPROM and stores the value. **/ -static s32 e1000_read_mac_addr_82542(struct e1000_hw *hw) +s32 e1000_read_mac_addr_82542(struct e1000_hw *hw) { s32 ret_val = E1000_SUCCESS; u16 offset, nvm_data, i; Modified: head/sys/dev/e1000/e1000_82543.c ============================================================================== --- head/sys/dev/e1000/e1000_82543.c Sun Sep 13 17:17:52 2015 (r287761) +++ head/sys/dev/e1000/e1000_82543.c Sun Sep 13 18:26:05 2015 (r287762) @@ -900,7 +900,7 @@ static s32 e1000_phy_hw_reset_82543(stru **/ static s32 e1000_reset_hw_82543(struct e1000_hw *hw) { - u32 ctrl, icr; + u32 ctrl; s32 ret_val = E1000_SUCCESS; DEBUGFUNC("e1000_reset_hw_82543"); @@ -942,7 +942,7 @@ static s32 e1000_reset_hw_82543(struct e /* Masking off and clearing any pending interrupts */ E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff); - icr = E1000_READ_REG(hw, E1000_ICR); + E1000_READ_REG(hw, E1000_ICR); return ret_val; } Modified: head/sys/dev/e1000/e1000_82571.h ============================================================================== --- head/sys/dev/e1000/e1000_82571.h Sun Sep 13 17:17:52 2015 (r287761) +++ head/sys/dev/e1000/e1000_82571.h Sun Sep 13 18:26:05 2015 (r287762) @@ -50,9 +50,10 @@ #define E1000_EIAC_82574 0x000DC /* Ext. Interrupt Auto Clear - RW */ #define E1000_EIAC_MASK_82574 0x01F00000 -#define E1000_NVM_INIT_CTRL2_MNGM 0x6000 /* Manageability Operation Mode mask */ +#define E1000_IVAR_INT_ALLOC_VALID 0x8 -#define E1000_RXCFGL 0x0B634 /* TimeSync Rx EtherType & Msg Type Reg - RW */ +/* Manageability Operation Mode mask */ +#define E1000_NVM_INIT_CTRL2_MNGM 0x6000 #define E1000_BASE1000T_STATUS 10 #define E1000_IDLE_ERROR_COUNT_MASK 0xFF Modified: head/sys/dev/e1000/e1000_82575.c ============================================================================== --- head/sys/dev/e1000/e1000_82575.c Sun Sep 13 17:17:52 2015 (r287761) +++ head/sys/dev/e1000/e1000_82575.c Sun Sep 13 18:26:05 2015 (r287762) @@ -1235,7 +1235,7 @@ static s32 e1000_check_for_link_media_sw DEBUGFUNC("e1000_check_for_link_media_swap"); - /* Check the copper medium. */ + /* Check for copper. */ ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0); if (ret_val) return ret_val; @@ -1247,7 +1247,7 @@ static s32 e1000_check_for_link_media_sw if (data & E1000_M88E1112_STATUS_LINK) port = E1000_MEDIA_PORT_COPPER; - /* Check the other medium. */ + /* Check for other. */ ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 1); if (ret_val) return ret_val; @@ -1256,11 +1256,6 @@ static s32 e1000_check_for_link_media_sw if (ret_val) return ret_val; - /* reset page to 0 */ - ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0); - if (ret_val) - return ret_val; - if (data & E1000_M88E1112_STATUS_LINK) port = E1000_MEDIA_PORT_OTHER; @@ -1268,8 +1263,20 @@ static s32 e1000_check_for_link_media_sw if (port && (hw->dev_spec._82575.media_port != port)) { hw->dev_spec._82575.media_port = port; hw->dev_spec._82575.media_changed = TRUE; + } + + if (port == E1000_MEDIA_PORT_COPPER) { + /* reset page to 0 */ + ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0); + if (ret_val) + return ret_val; + e1000_check_for_link_82575(hw); } else { - ret_val = e1000_check_for_link_82575(hw); + e1000_check_for_link_82575(hw); + /* reset page to 0 */ + ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0); + if (ret_val) + return ret_val; } return E1000_SUCCESS; @@ -2136,7 +2143,13 @@ void e1000_rx_fifo_flush_82575(struct e1 u32 rctl, rlpml, rxdctl[4], rfctl, temp_rctl, rx_enabled; int i, ms_wait; - DEBUGFUNC("e1000_rx_fifo_workaround_82575"); + DEBUGFUNC("e1000_rx_fifo_flush_82575"); + + /* disable IPv6 options as per hardware errata */ + rfctl = E1000_READ_REG(hw, E1000_RFCTL); + rfctl |= E1000_RFCTL_IPV6_EX_DIS; + E1000_WRITE_REG(hw, E1000_RFCTL, rfctl); + if (hw->mac.type != e1000_82575 || !(E1000_READ_REG(hw, E1000_MANC) & E1000_MANC_RCV_TCO_EN)) return; @@ -2164,7 +2177,6 @@ void e1000_rx_fifo_flush_82575(struct e1 * incoming packets are rejected. Set enable and wait 2ms so that * any packet that was coming in as RCTL.EN was set is flushed */ - rfctl = E1000_READ_REG(hw, E1000_RFCTL); E1000_WRITE_REG(hw, E1000_RFCTL, rfctl & ~E1000_RFCTL_LEF); rlpml = E1000_READ_REG(hw, E1000_RLPML); @@ -2894,11 +2906,13 @@ out: /** * e1000_set_eee_i350 - Enable/disable EEE support * @hw: pointer to the HW structure + * @adv1g: boolean flag enabling 1G EEE advertisement + * @adv100m: boolean flag enabling 100M EEE advertisement * * Enable/disable EEE based on setting in dev_spec structure. * **/ -s32 e1000_set_eee_i350(struct e1000_hw *hw) +s32 e1000_set_eee_i350(struct e1000_hw *hw, bool adv1G, bool adv100M) { u32 ipcnfg, eeer; @@ -2914,7 +2928,16 @@ s32 e1000_set_eee_i350(struct e1000_hw * if (!(hw->dev_spec._82575.eee_disable)) { u32 eee_su = E1000_READ_REG(hw, E1000_EEE_SU); - ipcnfg |= (E1000_IPCNFG_EEE_1G_AN | E1000_IPCNFG_EEE_100M_AN); + if (adv100M) + ipcnfg |= E1000_IPCNFG_EEE_100M_AN; + else + ipcnfg &= ~E1000_IPCNFG_EEE_100M_AN; + + if (adv1G) + ipcnfg |= E1000_IPCNFG_EEE_1G_AN; + else + ipcnfg &= ~E1000_IPCNFG_EEE_1G_AN; + eeer |= (E1000_EEER_TX_LPI_EN | E1000_EEER_RX_LPI_EN | E1000_EEER_LPI_FC); @@ -2938,11 +2961,13 @@ out: /** * e1000_set_eee_i354 - Enable/disable EEE support * @hw: pointer to the HW structure + * @adv1g: boolean flag enabling 1G EEE advertisement + * @adv100m: boolean flag enabling 100M EEE advertisement * * Enable/disable EEE legacy mode based on setting in dev_spec structure. * **/ -s32 e1000_set_eee_i354(struct e1000_hw *hw) +s32 e1000_set_eee_i354(struct e1000_hw *hw, bool adv1G, bool adv100M) { struct e1000_phy_info *phy = &hw->phy; s32 ret_val = E1000_SUCCESS; @@ -2984,8 +3009,16 @@ s32 e1000_set_eee_i354(struct e1000_hw * if (ret_val) goto out; - phy_data |= E1000_EEE_ADV_100_SUPPORTED | - E1000_EEE_ADV_1000_SUPPORTED; + if (adv100M) + phy_data |= E1000_EEE_ADV_100_SUPPORTED; + else + phy_data &= ~E1000_EEE_ADV_100_SUPPORTED; + + if (adv1G) + phy_data |= E1000_EEE_ADV_1000_SUPPORTED; + else + phy_data &= ~E1000_EEE_ADV_1000_SUPPORTED; + ret_val = e1000_write_xmdio_reg(hw, E1000_EEE_ADV_ADDR_I354, E1000_EEE_ADV_DEV_I354, phy_data); Modified: head/sys/dev/e1000/e1000_82575.h ============================================================================== --- head/sys/dev/e1000/e1000_82575.h Sun Sep 13 17:17:52 2015 (r287761) +++ head/sys/dev/e1000/e1000_82575.h Sun Sep 13 18:26:05 2015 (r287762) @@ -495,8 +495,8 @@ void e1000_rlpml_set_vf(struct e1000_hw s32 e1000_promisc_set_vf(struct e1000_hw *, enum e1000_promisc_type type); u16 e1000_rxpbs_adjust_82580(u32 data); s32 e1000_read_emi_reg(struct e1000_hw *hw, u16 addr, u16 *data); -s32 e1000_set_eee_i350(struct e1000_hw *); -s32 e1000_set_eee_i354(struct e1000_hw *); +s32 e1000_set_eee_i350(struct e1000_hw *hw, bool adv1G, bool adv100M); +s32 e1000_set_eee_i354(struct e1000_hw *hw, bool adv1G, bool adv100M); s32 e1000_get_eee_status_i354(struct e1000_hw *, bool *); s32 e1000_initialize_M88E1512_phy(struct e1000_hw *hw); Modified: head/sys/dev/e1000/e1000_api.c ============================================================================== --- head/sys/dev/e1000/e1000_api.c Sun Sep 13 17:17:52 2015 (r287761) +++ head/sys/dev/e1000/e1000_api.c Sun Sep 13 18:26:05 2015 (r287762) @@ -299,6 +299,12 @@ s32 e1000_set_mac_type(struct e1000_hw * case E1000_DEV_ID_PCH_I218_V3: mac->type = e1000_pch_lpt; break; + case E1000_DEV_ID_PCH_SPT_I219_LM: + case E1000_DEV_ID_PCH_SPT_I219_V: + case E1000_DEV_ID_PCH_SPT_I219_LM2: + case E1000_DEV_ID_PCH_SPT_I219_V2: + mac->type = e1000_pch_spt; + break; case E1000_DEV_ID_82575EB_COPPER: case E1000_DEV_ID_82575EB_FIBER_SERDES: case E1000_DEV_ID_82575GB_QUAD_COPPER: @@ -449,6 +455,7 @@ s32 e1000_setup_init_funcs(struct e1000_ case e1000_pchlan: case e1000_pch2lan: case e1000_pch_lpt: + case e1000_pch_spt: e1000_init_function_pointers_ich8lan(hw); break; case e1000_82575: @@ -929,21 +936,6 @@ s32 e1000_mng_enable_host_if(struct e100 } /** - * e1000_set_obff_timer - Set Optimized Buffer Flush/Fill timer - * @hw: pointer to the HW structure - * @itr: u32 indicating itr value - * - * Set the OBFF timer based on the given interrupt rate. - **/ -s32 e1000_set_obff_timer(struct e1000_hw *hw, u32 itr) -{ - if (hw->mac.ops.set_obff_timer) - return hw->mac.ops.set_obff_timer(hw, itr); - - return E1000_SUCCESS; -} - -/** * e1000_check_reset_block - Verifies PHY can be reset * @hw: pointer to the HW structure * @@ -1216,6 +1208,21 @@ s32 e1000_read_pba_length(struct e1000_h } /** + * e1000_read_pba_num - Read device part number + * @hw: pointer to the HW structure + * @pba_num: pointer to device part number + * + * Reads the product board assembly (PBA) number from the EEPROM and stores + * the value in pba_num. + * Currently no func pointer exists and all implementations are handled in the + * generic version of this function. + **/ +s32 e1000_read_pba_num(struct e1000_hw *hw, u32 *pba_num) +{ + return e1000_read_pba_num_generic(hw, pba_num); +} + +/** * e1000_validate_nvm_checksum - Verifies NVM (EEPROM) checksum * @hw: pointer to the HW structure * Modified: head/sys/dev/e1000/e1000_api.h ============================================================================== --- head/sys/dev/e1000/e1000_api.h Sun Sep 13 17:17:52 2015 (r287761) +++ head/sys/dev/e1000/e1000_api.h Sun Sep 13 18:26:05 2015 (r287762) @@ -97,6 +97,7 @@ s32 e1000_phy_commit(struct e1000_hw *hw void e1000_power_up_phy(struct e1000_hw *hw); void e1000_power_down_phy(struct e1000_hw *hw); s32 e1000_read_mac_addr(struct e1000_hw *hw); +s32 e1000_read_pba_num(struct e1000_hw *hw, u32 *part_num); s32 e1000_read_pba_string(struct e1000_hw *hw, u8 *pba_num, u32 pba_num_size); s32 e1000_read_pba_length(struct e1000_hw *hw, u32 *pba_num_size); void e1000_reload_nvm(struct e1000_hw *hw); Modified: head/sys/dev/e1000/e1000_defines.h ============================================================================== --- head/sys/dev/e1000/e1000_defines.h Sun Sep 13 17:17:52 2015 (r287761) +++ head/sys/dev/e1000/e1000_defines.h Sun Sep 13 18:26:05 2015 (r287762) @@ -197,6 +197,8 @@ #define E1000_RCTL_LBM_TCVR 0x000000C0 /* tcvr loopback mode */ #define E1000_RCTL_DTYP_PS 0x00000400 /* Packet Split descriptor */ #define E1000_RCTL_RDMTS_HALF 0x00000000 /* Rx desc min thresh size */ +#define E1000_RCTL_RDMTS_HEX 0x00010000 +#define E1000_RCTL_RDMTS1_HEX E1000_RCTL_RDMTS_HEX #define E1000_RCTL_MO_SHIFT 12 /* multicast offset shift */ #define E1000_RCTL_MO_3 0x00003000 /* multicast offset 15:4 */ #define E1000_RCTL_BAM 0x00008000 /* broadcast enable */ @@ -565,9 +567,6 @@ #define E1000_ICR_THS 0x00800000 /* ICR.THS: Thermal Sensor Event*/ #define E1000_ICR_MDDET 0x10000000 /* Malicious Driver Detect */ -#define E1000_ITR_MASK 0x000FFFFF /* ITR value bitfield */ -#define E1000_ITR_MULT 256 /* ITR mulitplier in nsec */ - /* PBA ECC Register */ #define E1000_PBA_ECC_COUNTER_MASK 0xFFF00000 /* ECC counter mask */ #define E1000_PBA_ECC_COUNTER_SHIFT 20 /* ECC counter shift value */ @@ -753,6 +752,12 @@ #define E1000_TSYNCTXCTL_VALID 0x00000001 /* Tx timestamp valid */ #define E1000_TSYNCTXCTL_ENABLED 0x00000010 /* enable Tx timestamping */ +/* HH Time Sync */ +#define E1000_TSYNCTXCTL_MAX_ALLOWED_DLY_MASK 0x0000F000 /* max delay */ +#define E1000_TSYNCTXCTL_SYNC_COMP_ERR 0x20000000 /* sync err */ +#define E1000_TSYNCTXCTL_SYNC_COMP 0x40000000 /* sync complete */ +#define E1000_TSYNCTXCTL_START_SYNC 0x80000000 /* initiate sync */ + #define E1000_TSYNCRXCTL_VALID 0x00000001 /* Rx timestamp valid */ #define E1000_TSYNCRXCTL_TYPE_MASK 0x0000000E /* Rx type mask */ #define E1000_TSYNCRXCTL_TYPE_L2_V2 0x00 @@ -1020,9 +1025,7 @@ /* NVM Addressing bits based on type 0=small, 1=large */ #define E1000_EECD_ADDR_BITS 0x00000400 #define E1000_EECD_TYPE 0x00002000 /* NVM Type (1-SPI, 0-Microwire) */ -#ifndef E1000_NVM_GRANT_ATTEMPTS #define E1000_NVM_GRANT_ATTEMPTS 1000 /* NVM # attempts to gain grant */ -#endif #define E1000_EECD_AUTO_RD 0x00000200 /* NVM Auto Read done */ #define E1000_EECD_SIZE_EX_MASK 0x00007800 /* NVM Size */ #define E1000_EECD_SIZE_EX_SHIFT 11 @@ -1059,11 +1062,44 @@ /* NVM Word Offsets */ #define NVM_COMPAT 0x0003 #define NVM_ID_LED_SETTINGS 0x0004 +#define NVM_VERSION 0x0005 #define NVM_SERDES_AMPLITUDE 0x0006 /* SERDES output amplitude */ #define NVM_PHY_CLASS_WORD 0x0007 #define E1000_I210_NVM_FW_MODULE_PTR 0x0010 #define E1000_I350_NVM_FW_MODULE_PTR 0x0051 #define NVM_FUTURE_INIT_WORD1 0x0019 +#define NVM_ETRACK_WORD 0x0042 +#define NVM_ETRACK_HIWORD 0x0043 +#define NVM_COMB_VER_OFF 0x0083 +#define NVM_COMB_VER_PTR 0x003d + +/* NVM version defines */ +#define NVM_MAJOR_MASK 0xF000 +#define NVM_MINOR_MASK 0x0FF0 +#define NVM_IMAGE_ID_MASK 0x000F +#define NVM_COMB_VER_MASK 0x00FF +#define NVM_MAJOR_SHIFT 12 +#define NVM_MINOR_SHIFT 4 +#define NVM_COMB_VER_SHFT 8 +#define NVM_VER_INVALID 0xFFFF +#define NVM_ETRACK_SHIFT 16 +#define NVM_ETRACK_VALID 0x8000 +#define NVM_NEW_DEC_MASK 0x0F00 +#define NVM_HEX_CONV 16 +#define NVM_HEX_TENS 10 + +/* FW version defines */ +/* Offset of "Loader patch ptr" in Firmware Header */ +#define E1000_I350_NVM_FW_LOADER_PATCH_PTR_OFFSET 0x01 +/* Patch generation hour & minutes */ +#define E1000_I350_NVM_FW_VER_WORD1_OFFSET 0x04 +/* Patch generation month & day */ +#define E1000_I350_NVM_FW_VER_WORD2_OFFSET 0x05 +/* Patch generation year */ +#define E1000_I350_NVM_FW_VER_WORD3_OFFSET 0x06 +/* Patch major & minor numbers */ +#define E1000_I350_NVM_FW_VER_WORD4_OFFSET 0x07 + #define NVM_MAC_ADDR 0x0000 #define NVM_SUB_DEV_ID 0x000B #define NVM_SUB_VEN_ID 0x000C @@ -1440,8 +1476,6 @@ #define I210_RXPBSIZE_DEFAULT 0x000000A2 /* RXPBSIZE default */ #define I210_TXPBSIZE_DEFAULT 0x04000014 /* TXPBSIZE default */ -#define E1000_DOBFFCTL_OBFFTHR_MASK 0x000000FF /* OBFF threshold */ -#define E1000_DOBFFCTL_EXIT_ACT_MASK 0x01000000 /* Exit active CB */ /* Proxy Filter Control */ #define E1000_PROXYFC_D0 0x00000001 /* Enable offload in D0 */ Modified: head/sys/dev/e1000/e1000_hw.h ============================================================================== --- head/sys/dev/e1000/e1000_hw.h Sun Sep 13 17:17:52 2015 (r287761) +++ head/sys/dev/e1000/e1000_hw.h Sun Sep 13 18:26:05 2015 (r287762) @@ -137,6 +137,10 @@ struct e1000_hw; #define E1000_DEV_ID_PCH_I218_V2 0x15A1 #define E1000_DEV_ID_PCH_I218_LM3 0x15A2 /* Wildcat Point PCH */ #define E1000_DEV_ID_PCH_I218_V3 0x15A3 /* Wildcat Point PCH */ +#define E1000_DEV_ID_PCH_SPT_I219_LM 0x156F /* Sunrise Point PCH */ +#define E1000_DEV_ID_PCH_SPT_I219_V 0x1570 /* Sunrise Point PCH */ +#define E1000_DEV_ID_PCH_SPT_I219_LM2 0x15B7 /* Sunrise Point-H PCH */ +#define E1000_DEV_ID_PCH_SPT_I219_V2 0x15B8 /* Sunrise Point-H PCH */ #define E1000_DEV_ID_82576 0x10C9 #define E1000_DEV_ID_82576_FIBER 0x10E6 #define E1000_DEV_ID_82576_SERDES 0x10E7 @@ -222,6 +226,7 @@ enum e1000_mac_type { e1000_pchlan, e1000_pch2lan, e1000_pch_lpt, + e1000_pch_spt, e1000_82575, e1000_82576, e1000_82580, @@ -703,7 +708,6 @@ struct e1000_mac_operations { int (*rar_set)(struct e1000_hw *, u8*, u32); s32 (*read_mac_addr)(struct e1000_hw *); s32 (*validate_mdi_setting)(struct e1000_hw *); - s32 (*set_obff_timer)(struct e1000_hw *, u32); s32 (*acquire_swfw_sync)(struct e1000_hw *, u16); void (*release_swfw_sync)(struct e1000_hw *, u16); }; @@ -805,7 +809,7 @@ struct e1000_mac_info { enum e1000_serdes_link_state serdes_link_state; bool serdes_has_link; bool tx_pkt_filtering; - u32 max_frame_size; + u32 max_frame_size; }; struct e1000_phy_info { Modified: head/sys/dev/e1000/e1000_i210.c ============================================================================== --- head/sys/dev/e1000/e1000_i210.c Sun Sep 13 17:17:52 2015 (r287761) +++ head/sys/dev/e1000/e1000_i210.c Sun Sep 13 18:26:05 2015 (r287762) @@ -489,6 +489,105 @@ static s32 e1000_read_invm_i210(struct e } /** + * e1000_read_invm_version - Reads iNVM version and image type + * @hw: pointer to the HW structure + * @invm_ver: version structure for the version read + * + * Reads iNVM version and image type. + **/ +s32 e1000_read_invm_version(struct e1000_hw *hw, + struct e1000_fw_version *invm_ver) +{ + u32 *record = NULL; + u32 *next_record = NULL; + u32 i = 0; + u32 invm_dword = 0; + u32 invm_blocks = E1000_INVM_SIZE - (E1000_INVM_ULT_BYTES_SIZE / + E1000_INVM_RECORD_SIZE_IN_BYTES); + u32 buffer[E1000_INVM_SIZE]; + s32 status = -E1000_ERR_INVM_VALUE_NOT_FOUND; + u16 version = 0; + + DEBUGFUNC("e1000_read_invm_version"); + + /* Read iNVM memory */ + for (i = 0; i < E1000_INVM_SIZE; i++) { + invm_dword = E1000_READ_REG(hw, E1000_INVM_DATA_REG(i)); + buffer[i] = invm_dword; + } + + /* Read version number */ + for (i = 1; i < invm_blocks; i++) { + record = &buffer[invm_blocks - i]; + next_record = &buffer[invm_blocks - i + 1]; + + /* Check if we have first version location used */ + if ((i == 1) && ((*record & E1000_INVM_VER_FIELD_ONE) == 0)) { + version = 0; + status = E1000_SUCCESS; + break; + } + /* Check if we have second version location used */ + else if ((i == 1) && + ((*record & E1000_INVM_VER_FIELD_TWO) == 0)) { + version = (*record & E1000_INVM_VER_FIELD_ONE) >> 3; + status = E1000_SUCCESS; + break; + } + /* + * Check if we have odd version location + * used and it is the last one used + */ + else if ((((*record & E1000_INVM_VER_FIELD_ONE) == 0) && + ((*record & 0x3) == 0)) || (((*record & 0x3) != 0) && + (i != 1))) { + version = (*next_record & E1000_INVM_VER_FIELD_TWO) + >> 13; + status = E1000_SUCCESS; + break; + } + /* + * Check if we have even version location + * used and it is the last one used + */ + else if (((*record & E1000_INVM_VER_FIELD_TWO) == 0) && + ((*record & 0x3) == 0)) { + version = (*record & E1000_INVM_VER_FIELD_ONE) >> 3; + status = E1000_SUCCESS; + break; + } + } + + if (status == E1000_SUCCESS) { + invm_ver->invm_major = (version & E1000_INVM_MAJOR_MASK) + >> E1000_INVM_MAJOR_SHIFT; + invm_ver->invm_minor = version & E1000_INVM_MINOR_MASK; + } + /* Read Image Type */ + for (i = 1; i < invm_blocks; i++) { + record = &buffer[invm_blocks - i]; + next_record = &buffer[invm_blocks - i + 1]; + + /* Check if we have image type in first location used */ + if ((i == 1) && ((*record & E1000_INVM_IMGTYPE_FIELD) == 0)) { + invm_ver->invm_img_type = 0; + status = E1000_SUCCESS; + break; + } + /* Check if we have image type in first location used */ + else if ((((*record & 0x3) == 0) && + ((*record & E1000_INVM_IMGTYPE_FIELD) == 0)) || + ((((*record & 0x3) != 0) && (i != 1)))) { + invm_ver->invm_img_type = + (*next_record & E1000_INVM_IMGTYPE_FIELD) >> 23; + status = E1000_SUCCESS; + break; + } + } + return status; +} + +/** * e1000_validate_nvm_checksum_i210 - Validate EEPROM checksum * @hw: pointer to the HW structure * Modified: head/sys/dev/e1000/e1000_i210.h ============================================================================== --- head/sys/dev/e1000/e1000_i210.h Sun Sep 13 17:17:52 2015 (r287761) +++ head/sys/dev/e1000/e1000_i210.h Sun Sep 13 18:26:05 2015 (r287762) @@ -43,6 +43,8 @@ s32 e1000_write_nvm_srwr_i210(struct e10 u16 words, u16 *data); s32 e1000_read_nvm_srrd_i210(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); +s32 e1000_read_invm_version(struct e1000_hw *hw, + struct e1000_fw_version *invm_ver); s32 e1000_acquire_swfw_sync_i210(struct e1000_hw *hw, u16 mask); void e1000_release_swfw_sync_i210(struct e1000_hw *hw, u16 mask); s32 e1000_read_xmdio_reg(struct e1000_hw *hw, u16 addr, u8 dev_addr, Modified: head/sys/dev/e1000/e1000_ich8lan.c ============================================================================== --- head/sys/dev/e1000/e1000_ich8lan.c Sun Sep 13 17:17:52 2015 (r287761) +++ head/sys/dev/e1000/e1000_ich8lan.c Sun Sep 13 18:26:05 2015 (r287762) @@ -92,10 +92,13 @@ static s32 e1000_set_d3_lplu_state_ich8 bool active); static s32 e1000_read_nvm_ich8lan(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); +static s32 e1000_read_nvm_spt(struct e1000_hw *hw, u16 offset, u16 words, + u16 *data); static s32 e1000_write_nvm_ich8lan(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); static s32 e1000_validate_nvm_checksum_ich8lan(struct e1000_hw *hw); static s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw); +static s32 e1000_update_nvm_checksum_spt(struct e1000_hw *hw); static s32 e1000_valid_led_default_ich8lan(struct e1000_hw *hw, u16 *data); static s32 e1000_id_led_init_pchlan(struct e1000_hw *hw); @@ -123,6 +126,14 @@ static s32 e1000_read_flash_byte_ich8la u32 offset, u8 *data); static s32 e1000_read_flash_data_ich8lan(struct e1000_hw *hw, u32 offset, u8 size, u16 *data); +static s32 e1000_read_flash_data32_ich8lan(struct e1000_hw *hw, u32 offset, + u32 *data); +static s32 e1000_read_flash_dword_ich8lan(struct e1000_hw *hw, + u32 offset, u32 *data); +static s32 e1000_write_flash_data32_ich8lan(struct e1000_hw *hw, + u32 offset, u32 data); +static s32 e1000_retry_write_flash_dword_ich8lan(struct e1000_hw *hw, + u32 offset, u32 dword); static s32 e1000_read_flash_word_ich8lan(struct e1000_hw *hw, u32 offset, u16 *data); static s32 e1000_retry_write_flash_byte_ich8lan(struct e1000_hw *hw, @@ -133,7 +144,6 @@ static s32 e1000_check_for_copper_link_i static s32 e1000_set_mdio_slow_mode_hv(struct e1000_hw *hw); static s32 e1000_k1_workaround_lv(struct e1000_hw *hw); static void e1000_gate_hw_phy_config_ich8lan(struct e1000_hw *hw, bool gate); -static s32 e1000_set_obff_timer_pch_lpt(struct e1000_hw *hw, u32 itr); /* ICH GbE Flash Hardware Sequencing Flash Status Register bit breakdown */ /* Offset 04h HSFSTS */ @@ -232,16 +242,21 @@ static bool e1000_phy_is_accessible_pchl if (ret_val) return FALSE; out: - if (hw->mac.type == e1000_pch_lpt) { - /* Unforce SMBus mode in PHY */ - hw->phy.ops.read_reg_locked(hw, CV_SMB_CTRL, &phy_reg); - phy_reg &= ~CV_SMB_CTRL_FORCE_SMBUS; - hw->phy.ops.write_reg_locked(hw, CV_SMB_CTRL, phy_reg); + if ((hw->mac.type == e1000_pch_lpt) || + (hw->mac.type == e1000_pch_spt)) { + /* Only unforce SMBus if ME is not active */ + if (!(E1000_READ_REG(hw, E1000_FWSM) & + E1000_ICH_FWSM_FW_VALID)) { + /* Unforce SMBus mode in PHY */ + hw->phy.ops.read_reg_locked(hw, CV_SMB_CTRL, &phy_reg); + phy_reg &= ~CV_SMB_CTRL_FORCE_SMBUS; + hw->phy.ops.write_reg_locked(hw, CV_SMB_CTRL, phy_reg); - /* Unforce SMBus mode in MAC */ - mac_reg = E1000_READ_REG(hw, E1000_CTRL_EXT); - mac_reg &= ~E1000_CTRL_EXT_FORCE_SMBUS; - E1000_WRITE_REG(hw, E1000_CTRL_EXT, mac_reg); + /* Unforce SMBus mode in MAC */ + mac_reg = E1000_READ_REG(hw, E1000_CTRL_EXT); + mac_reg &= ~E1000_CTRL_EXT_FORCE_SMBUS; + E1000_WRITE_REG(hw, E1000_CTRL_EXT, mac_reg); + } } return TRUE; @@ -328,6 +343,7 @@ static s32 e1000_init_phy_workarounds_pc */ switch (hw->mac.type) { case e1000_pch_lpt: + case e1000_pch_spt: if (e1000_phy_is_accessible_pchlan(hw)) break; @@ -475,6 +491,7 @@ static s32 e1000_init_phy_params_pchlan( /* fall-through */ case e1000_pch2lan: case e1000_pch_lpt: + case e1000_pch_spt: /* In case the PHY needs to be in mdio slow mode, * set slow mode and try to get the PHY id again. */ @@ -617,36 +634,53 @@ static s32 e1000_init_nvm_params_ich8lan struct e1000_dev_spec_ich8lan *dev_spec = &hw->dev_spec.ich8lan; u32 gfpreg, sector_base_addr, sector_end_addr; u16 i; + u32 nvm_size; DEBUGFUNC("e1000_init_nvm_params_ich8lan"); /* Can't read flash registers if the register set isn't mapped. */ nvm->type = e1000_nvm_flash_sw; - if (!hw->flash_address) { - DEBUGOUT("ERROR: Flash registers not mapped\n"); - return -E1000_ERR_CONFIG; - } + /* in SPT, gfpreg doesn't exist. NVM size is taken from the + * STRAP register + */ + if (hw->mac.type == e1000_pch_spt) { + nvm->flash_base_addr = 0; + nvm_size = + (((E1000_READ_REG(hw, E1000_STRAP) >> 1) & 0x1F) + 1) + * NVM_SIZE_MULTIPLIER; + nvm->flash_bank_size = nvm_size / 2; + /* Adjust to word count */ + nvm->flash_bank_size /= sizeof(u16); + /* Set the base address for flash register access */ + hw->flash_address = hw->hw_addr + E1000_FLASH_BASE_ADDR; + } else { + if (!hw->flash_address) { + DEBUGOUT("ERROR: Flash registers not mapped\n"); + return -E1000_ERR_CONFIG; + } + + gfpreg = E1000_READ_FLASH_REG(hw, ICH_FLASH_GFPREG); + + /* sector_X_addr is a "sector"-aligned address (4096 bytes) + * Add 1 to sector_end_addr since this sector is included in + * the overall size. + */ + sector_base_addr = gfpreg & FLASH_GFPREG_BASE_MASK; + sector_end_addr = ((gfpreg >> 16) & FLASH_GFPREG_BASE_MASK) + 1; - gfpreg = E1000_READ_FLASH_REG(hw, ICH_FLASH_GFPREG); + /* flash_base_addr is byte-aligned */ + nvm->flash_base_addr = sector_base_addr + << FLASH_SECTOR_ADDR_SHIFT; - /* sector_X_addr is a "sector"-aligned address (4096 bytes) - * Add 1 to sector_end_addr since this sector is included in - * the overall size. - */ - sector_base_addr = gfpreg & FLASH_GFPREG_BASE_MASK; - sector_end_addr = ((gfpreg >> 16) & FLASH_GFPREG_BASE_MASK) + 1; - - /* flash_base_addr is byte-aligned */ - nvm->flash_base_addr = sector_base_addr << FLASH_SECTOR_ADDR_SHIFT; - - /* find total size of the NVM, then cut in half since the total - * size represents two separate NVM banks. - */ - nvm->flash_bank_size = ((sector_end_addr - sector_base_addr) - << FLASH_SECTOR_ADDR_SHIFT); - nvm->flash_bank_size /= 2; - /* Adjust to word count */ - nvm->flash_bank_size /= sizeof(u16); + /* find total size of the NVM, then cut in half since the total + * size represents two separate NVM banks. + */ + nvm->flash_bank_size = ((sector_end_addr - sector_base_addr) + << FLASH_SECTOR_ADDR_SHIFT); + nvm->flash_bank_size /= 2; + /* Adjust to word count */ + nvm->flash_bank_size /= sizeof(u16); + } nvm->word_size = E1000_SHADOW_RAM_WORDS; @@ -662,8 +696,13 @@ static s32 e1000_init_nvm_params_ich8lan /* Function Pointers */ nvm->ops.acquire = e1000_acquire_nvm_ich8lan; nvm->ops.release = e1000_release_nvm_ich8lan; - nvm->ops.read = e1000_read_nvm_ich8lan; - nvm->ops.update = e1000_update_nvm_checksum_ich8lan; + if (hw->mac.type == e1000_pch_spt) { + nvm->ops.read = e1000_read_nvm_spt; + nvm->ops.update = e1000_update_nvm_checksum_spt; + } else { + nvm->ops.read = e1000_read_nvm_ich8lan; + nvm->ops.update = e1000_update_nvm_checksum_ich8lan; + } nvm->ops.valid_led_default = e1000_valid_led_default_ich8lan; nvm->ops.validate = e1000_validate_nvm_checksum_ich8lan; nvm->ops.write = e1000_write_nvm_ich8lan; @@ -681,9 +720,7 @@ static s32 e1000_init_nvm_params_ich8lan static s32 e1000_init_mac_params_ich8lan(struct e1000_hw *hw) { struct e1000_mac_info *mac = &hw->mac; -#if defined(QV_RELEASE) || !defined(NO_PCH_LPT_B0_SUPPORT) u16 pci_cfg; -#endif /* QV_RELEASE || !defined(NO_PCH_LPT_B0_SUPPORT) */ DEBUGFUNC("e1000_init_mac_params_ich8lan"); @@ -752,15 +789,21 @@ static s32 e1000_init_mac_params_ich8lan mac->ops.rar_set = e1000_rar_set_pch2lan; /* fall-through */ case e1000_pch_lpt: + case e1000_pch_spt: /* multicast address update for pch2 */ mac->ops.update_mc_addr_list = e1000_update_mc_addr_list_pch2lan; + /* fall-through */ case e1000_pchlan: -#if defined(QV_RELEASE) || !defined(NO_PCH_LPT_B0_SUPPORT) /* save PCH revision_id */ e1000_read_pci_cfg(hw, E1000_PCI_REVISION_ID_REG, &pci_cfg); - hw->revision_id = (u8)(pci_cfg &= 0x000F); -#endif /* QV_RELEASE || !defined(NO_PCH_LPT_B0_SUPPORT) */ + /* SPT uses full byte for revision ID, + * as opposed to previous generations + */ + if (hw->mac.type >= e1000_pch_spt) + hw->revision_id = (u8)(pci_cfg &= 0x00FF); + else + hw->revision_id = (u8)(pci_cfg &= 0x000F); /* check management mode */ mac->ops.check_mng_mode = e1000_check_mng_mode_pchlan; /* ID LED init */ @@ -777,11 +820,11 @@ static s32 e1000_init_mac_params_ich8lan break; } - if (mac->type == e1000_pch_lpt) { + if ((mac->type == e1000_pch_lpt) || + (mac->type == e1000_pch_spt)) { mac->rar_entry_count = E1000_PCH_LPT_RAR_ENTRIES; mac->ops.rar_set = e1000_rar_set_pch_lpt; mac->ops.setup_physical_interface = e1000_setup_copper_link_pch_lpt; - mac->ops.set_obff_timer = e1000_set_obff_timer_pch_lpt; } /* Enable PCS Lock-loss workaround for ICH8 */ @@ -1007,8 +1050,9 @@ release: /* clear FEXTNVM6 bit 8 on link down or 10/100 */ fextnvm6 &= ~E1000_FEXTNVM6_REQ_PLL_CLK; - if (!link || ((status & E1000_STATUS_SPEED_100) && - (status & E1000_STATUS_FD))) + if ((hw->phy.revision > 5) || !link || + ((status & E1000_STATUS_SPEED_100) && + (status & E1000_STATUS_FD))) goto update_fextnvm6; ret_val = hw->phy.ops.read_reg(hw, I217_INBAND_CTRL, ®); @@ -1044,168 +1088,6 @@ update_fextnvm6: return ret_val; } -static u64 e1000_ltr2ns(u16 ltr) -{ - u32 value, scale; - - /* Determine the latency in nsec based on the LTR value & scale */ - value = ltr & E1000_LTRV_VALUE_MASK; - scale = (ltr & E1000_LTRV_SCALE_MASK) >> E1000_LTRV_SCALE_SHIFT; - - return value * (1 << (scale * E1000_LTRV_SCALE_FACTOR)); -} - -/** - * e1000_platform_pm_pch_lpt - Set platform power management values - * @hw: pointer to the HW structure - * @link: bool indicating link status - * - * Set the Latency Tolerance Reporting (LTR) values for the "PCIe-like" - * GbE MAC in the Lynx Point PCH based on Rx buffer size and link speed - * when link is up (which must not exceed the maximum latency supported - * by the platform), otherwise specify there is no LTR requirement. - * Unlike TRUE-PCIe devices which set the LTR maximum snoop/no-snoop - * latencies in the LTR Extended Capability Structure in the PCIe Extended - * Capability register set, on this device LTR is set by writing the - * equivalent snoop/no-snoop latencies in the LTRV register in the MAC and - * set the SEND bit to send an Intel On-chip System Fabric sideband (IOSF-SB) - * message to the PMC. - * - * Use the LTR value to calculate the Optimized Buffer Flush/Fill (OBFF) - * high-water mark. - **/ -static s32 e1000_platform_pm_pch_lpt(struct e1000_hw *hw, bool link) -{ - u32 reg = link << (E1000_LTRV_REQ_SHIFT + E1000_LTRV_NOSNOOP_SHIFT) | - link << E1000_LTRV_REQ_SHIFT | E1000_LTRV_SEND; - u16 lat_enc = 0; /* latency encoded */ - s32 obff_hwm = 0; - - DEBUGFUNC("e1000_platform_pm_pch_lpt"); - - if (link) { - u16 speed, duplex, scale = 0; - u16 max_snoop, max_nosnoop; - u16 max_ltr_enc; /* max LTR latency encoded */ - s64 lat_ns; - s64 value; - u32 rxa; - - if (!hw->mac.max_frame_size) { - DEBUGOUT("max_frame_size not set.\n"); - return -E1000_ERR_CONFIG; - } - - hw->mac.ops.get_link_up_info(hw, &speed, &duplex); - if (!speed) { - DEBUGOUT("Speed not set.\n"); - return -E1000_ERR_CONFIG; - } - - /* Rx Packet Buffer Allocation size (KB) */ - rxa = E1000_READ_REG(hw, E1000_PBA) & E1000_PBA_RXA_MASK; - - /* Determine the maximum latency tolerated by the device. - * - * Per the PCIe spec, the tolerated latencies are encoded as - * a 3-bit encoded scale (only 0-5 are valid) multiplied by - * a 10-bit value (0-1023) to provide a range from 1 ns to - * 2^25*(2^10-1) ns. The scale is encoded as 0=2^0ns, - * 1=2^5ns, 2=2^10ns,...5=2^25ns. - */ - lat_ns = ((s64)rxa * 1024 - - (2 * (s64)hw->mac.max_frame_size)) * 8 * 1000; - if (lat_ns < 0) - lat_ns = 0; - else - lat_ns /= speed; - value = lat_ns; - - while (value > E1000_LTRV_VALUE_MASK) { - scale++; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sun Sep 13 19:17:27 2015 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 97423A039D4; Sun, 13 Sep 2015 19:17:27 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 87AC11DDF; Sun, 13 Sep 2015 19:17:27 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8DJHRwT021603; Sun, 13 Sep 2015 19:17:27 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8DJHRxP021602; Sun, 13 Sep 2015 19:17:27 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509131917.t8DJHRxP021602@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 13 Sep 2015 19:17:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287763 - head/sys/dev/usb/wlan X-SVN-Group: head 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.20 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: Sun, 13 Sep 2015 19:17:27 -0000 Author: adrian Date: Sun Sep 13 19:17:26 2015 New Revision: 287763 URL: https://svnweb.freebsd.org/changeset/base/287763 Log: Disable mgmt frame sending in if_rsu. The firmware in this NIC sends management frames. So far I'm not sure which ones it handles and which ones it doesn't handle - but this is what openbsd does. The association messages are handled by the firmware; the key negotiation for 802.1x and WPA are done as raw frames, not management frames. This successfully allows it to associate to my home networks whereas it didn't work beforehand. Tested: * RTL8712, cut 3, STA mode TODO: * The firmware does send a join response with a status code; that should be logged in a more obvious way to assist with debugging. Ie, the firmware is the thing that is saying "couldn't join, sorry!", not net80211. Modified: head/sys/dev/usb/wlan/if_rsu.c Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Sun Sep 13 18:26:05 2015 (r287762) +++ head/sys/dev/usb/wlan/if_rsu.c Sun Sep 13 19:17:26 2015 (r287763) @@ -299,6 +299,13 @@ rsu_match(device_t self) } static int +rsu_send_mgmt(struct ieee80211_node *ni, int type, int arg) +{ + + return (ENOTSUP); +} + +static int rsu_attach(device_t self) { struct usb_attach_arg *uaa = device_get_ivars(self); @@ -398,6 +405,7 @@ rsu_attach(device_t self) ic->ic_update_mcast = rsu_update_mcast; ic->ic_parent = rsu_parent; ic->ic_transmit = rsu_transmit; + ic->ic_send_mgmt = rsu_send_mgmt; ieee80211_radiotap_attach(ic, &sc->sc_txtap.wt_ihdr, sizeof(sc->sc_txtap), RSU_TX_RADIOTAP_PRESENT, From owner-svn-src-head@freebsd.org Sun Sep 13 20:22:19 2015 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 EA0AEA03C2C; Sun, 13 Sep 2015 20:22:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 C0FF619A2; Sun, 13 Sep 2015 20:22:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8DKMJ2h049691; Sun, 13 Sep 2015 20:22:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8DKMJMa049690; Sun, 13 Sep 2015 20:22:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509132022.t8DKMJMa049690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 13 Sep 2015 20:22:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287764 - head/sys/cam/ctl X-SVN-Group: head 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.20 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: Sun, 13 Sep 2015 20:22:20 -0000 Author: mav Date: Sun Sep 13 20:22:18 2015 New Revision: 287764 URL: https://svnweb.freebsd.org/changeset/base/287764 Log: Implement iSCSI TARGET COLD RESET task management function. Implement it as CTL_TASK_TARGET_RESET plus termination of all sessions. Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Sun Sep 13 19:17:26 2015 (r287763) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Sun Sep 13 20:22:18 2015 (r287764) @@ -651,6 +651,12 @@ cfiscsi_pdu_handle_task_request(struct i #endif io->taskio.task_action = CTL_TASK_TARGET_RESET; break; + case BHSTMR_FUNCTION_TARGET_COLD_RESET: +#if 0 + CFISCSI_SESSION_DEBUG(cs, "BHSTMR_FUNCTION_TARGET_COLD_RESET"); +#endif + io->taskio.task_action = CTL_TASK_TARGET_RESET; + break; default: CFISCSI_SESSION_DEBUG(cs, "unsupported function 0x%x", bhstmr->bhstmr_function & ~0x80); @@ -2842,7 +2848,9 @@ cfiscsi_task_management_done(union ctl_i struct iscsi_bhs_task_management_request *bhstmr; struct iscsi_bhs_task_management_response *bhstmr2; struct cfiscsi_data_wait *cdw, *tmpcdw; - struct cfiscsi_session *cs; + struct cfiscsi_session *cs, *tcs; + struct cfiscsi_softc *softc; + int cold_reset = 0; request = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; cs = PDU_SESSION(request); @@ -2880,6 +2888,10 @@ cfiscsi_task_management_done(union ctl_i } CFISCSI_SESSION_UNLOCK(cs); } + if ((bhstmr->bhstmr_function & ~0x80) == + BHSTMR_FUNCTION_TARGET_COLD_RESET && + io->io_hdr.status == CTL_SUCCESS) + cold_reset = 1; response = cfiscsi_pdu_new_response(request, M_WAITOK); bhstmr2 = (struct iscsi_bhs_task_management_response *) @@ -2903,6 +2915,16 @@ cfiscsi_task_management_done(union ctl_i ctl_free_io(io); icl_pdu_free(request); cfiscsi_pdu_queue(response); + + if (cold_reset) { + softc = cs->cs_target->ct_softc; + mtx_lock(&softc->lock); + TAILQ_FOREACH(tcs, &softc->sessions, cs_next) { + if (tcs->cs_target == cs->cs_target) + cfiscsi_session_terminate(tcs); + } + mtx_unlock(&softc->lock); + } } static void From owner-svn-src-head@freebsd.org Sun Sep 13 20:40:01 2015 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 7CCAFA0374F; Sun, 13 Sep 2015 20:40:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 6AD5813BC; Sun, 13 Sep 2015 20:40:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8DKe1DI054736; Sun, 13 Sep 2015 20:40:01 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8DKe1fn054735; Sun, 13 Sep 2015 20:40:01 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509132040.t8DKe1fn054735@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 13 Sep 2015 20:40:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287765 - head/sys/cam/ctl X-SVN-Group: head 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.20 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: Sun, 13 Sep 2015 20:40:01 -0000 Author: mav Date: Sun Sep 13 20:40:00 2015 New Revision: 287765 URL: https://svnweb.freebsd.org/changeset/base/287765 Log: Map CLEAR TASK SET and I_T NEXUS RESET for iSCSI. The last should not be called without iSCSIProtocolLevel negotiation. Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Sun Sep 13 20:22:18 2015 (r287764) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Sun Sep 13 20:40:00 2015 (r287765) @@ -639,6 +639,12 @@ cfiscsi_pdu_handle_task_request(struct i #endif io->taskio.task_action = CTL_TASK_ABORT_TASK_SET; break; + case BHSTMR_FUNCTION_CLEAR_TASK_SET: +#if 0 + CFISCSI_SESSION_DEBUG(cs, "BHSTMR_FUNCTION_CLEAR_TASK_SET"); +#endif + io->taskio.task_action = CTL_TASK_CLEAR_TASK_SET; + break; case BHSTMR_FUNCTION_LOGICAL_UNIT_RESET: #if 0 CFISCSI_SESSION_DEBUG(cs, "BHSTMR_FUNCTION_LOGICAL_UNIT_RESET"); @@ -657,6 +663,12 @@ cfiscsi_pdu_handle_task_request(struct i #endif io->taskio.task_action = CTL_TASK_TARGET_RESET; break; + case BHSTMR_FUNCTION_I_T_NEXUS_RESET: +#if 0 + CFISCSI_SESSION_DEBUG(cs, "BHSTMR_FUNCTION_I_T_NEXUS_RESET"); +#endif + io->taskio.task_action = CTL_TASK_I_T_NEXUS_RESET; + break; default: CFISCSI_SESSION_DEBUG(cs, "unsupported function 0x%x", bhstmr->bhstmr_function & ~0x80); From owner-svn-src-head@freebsd.org Sun Sep 13 20:58:23 2015 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 BBE78A03FC2; Sun, 13 Sep 2015 20:58:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 ACBE31E9D; Sun, 13 Sep 2015 20:58:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8DKwNYx062712; Sun, 13 Sep 2015 20:58:23 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8DKwNlB062711; Sun, 13 Sep 2015 20:58:23 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509132058.t8DKwNlB062711@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 13 Sep 2015 20:58:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287766 - head/usr.sbin/ctld X-SVN-Group: head 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.20 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: Sun, 13 Sep 2015 20:58:23 -0000 Author: mav Date: Sun Sep 13 20:58:22 2015 New Revision: 287766 URL: https://svnweb.freebsd.org/changeset/base/287766 Log: Add negotiation of iSCSIProtocolLevel to 2 (RFC7144). We may need to pass negotiated value to kernel level, but so far it is not necessary, since it does not use any new features without request. Modified: head/usr.sbin/ctld/login.c Modified: head/usr.sbin/ctld/login.c ============================================================================== --- head/usr.sbin/ctld/login.c Sun Sep 13 20:40:00 2015 (r287765) +++ head/usr.sbin/ctld/login.c Sun Sep 13 20:58:22 2015 (r287766) @@ -602,6 +602,11 @@ login_negotiate_key(struct pdu *request, keys_add(response_keys, name, "No"); } else if (strcmp(name, "IFMarker") == 0) { keys_add(response_keys, name, "No"); + } else if (strcmp(name, "iSCSIProtocolLevel") == 0) { + tmp = strtoul(value, NULL, 10); + if (tmp > 2) + tmp = 2; + keys_add_int(response_keys, name, tmp); } else { log_debugx("unknown key \"%s\"; responding " "with NotUnderstood", name); From owner-svn-src-head@freebsd.org Sun Sep 13 21:59:57 2015 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 6A8ADA0328D; Sun, 13 Sep 2015 21:59:57 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 4FA3A163C; Sun, 13 Sep 2015 21:59:57 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8DLxvm1087499; Sun, 13 Sep 2015 21:59:57 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8DLxvDj087498; Sun, 13 Sep 2015 21:59:57 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201509132159.t8DLxvDj087498@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 13 Sep 2015 21:59:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287767 - head/sys/sparc64/ebus X-SVN-Group: head 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.20 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: Sun, 13 Sep 2015 21:59:57 -0000 Author: marius Date: Sun Sep 13 21:59:56 2015 New Revision: 287767 URL: https://svnweb.freebsd.org/changeset/base/287767 Log: - Sanity check that the parent ranges given in the "ranges" property of PCI-EBus-bridges actually match the BARs as specified in and required by [1, p. 113 f.]. Doing so earlier would have simplified diagnosing a bug in QEMU/OpenBIOS getting the mapping of child addresses wrong, which still needs to be fixed there. In theory, we could try to change the BARs accordingly if we hit this problem. However, at least with real machines changing the decoding likely won't work, especially if the PCI-EBus-bridge is beneath an APB one. So implementing such functionality generally is rather pointless. - Actually change the allocation type of EBus resources if they change from SYS_RES_MEMORY to SYS_RES_IOPORT when mapping them to PCI ranges in ebus_alloc_resource() and passing them up to bus_activate_resource(9). This may happen with the QEMU/OpenBIOS PCI-EBus-bridge but not real ones. Still, this is only cleans up the code and the result of resource allocation and activation is unchanged. - Change the remainder of printf(9) to device_printf(9) calls and canonicalize their wording. MFC after: 1 week Peripheral Component Interconnect Input Output Controller, Part No.: 802-7837-01, Sun Microelectronics, March 1997 [1] Modified: head/sys/sparc64/ebus/ebus.c Modified: head/sys/sparc64/ebus/ebus.c ============================================================================== --- head/sys/sparc64/ebus/ebus.c Sun Sep 13 20:58:22 2015 (r287766) +++ head/sys/sparc64/ebus/ebus.c Sun Sep 13 21:59:56 2015 (r287767) @@ -69,7 +69,6 @@ __FBSDID("$FreeBSD$"); #include #include #include - #include #include @@ -294,7 +293,7 @@ ebus_nexus_attach(device_t dev) sc->sc_nrange = OF_getprop_alloc(node, "ranges", sizeof(struct ebus_nexus_ranges), &sc->sc_range); if (sc->sc_nrange == -1) { - printf("%s: could not get ranges property\n", __func__); + device_printf(dev, "could not get ranges property\n"); return (ENXIO); } return (ebus_attach(dev, sc, node)); @@ -306,6 +305,7 @@ ebus_pci_attach(device_t dev) struct ebus_softc *sc; struct ebus_rinfo *eri; struct resource *res; + struct isa_ranges *range; phandle_t node; int i, rnum, rid; @@ -322,7 +322,7 @@ ebus_pci_attach(device_t dev) sc->sc_nrange = OF_getprop_alloc(node, "ranges", sizeof(struct isa_ranges), &sc->sc_range); if (sc->sc_nrange == -1) { - printf("%s: could not get ranges property\n", __func__); + device_printf(dev, "could not get ranges property\n"); return (ENXIO); } @@ -332,21 +332,34 @@ ebus_pci_attach(device_t dev) /* For every range, there must be a matching resource. */ for (rnum = 0; rnum < sc->sc_nrange; rnum++) { eri = &sc->sc_rinfo[rnum]; - eri->eri_rtype = ofw_isa_range_restype( - &((struct isa_ranges *)sc->sc_range)[rnum]); + range = &((struct isa_ranges *)sc->sc_range)[rnum]; + eri->eri_rtype = ofw_isa_range_restype(range); rid = PCIR_BAR(rnum); res = bus_alloc_resource_any(dev, eri->eri_rtype, &rid, RF_ACTIVE); if (res == NULL) { - printf("%s: failed to allocate range resource!\n", - __func__); + device_printf(dev, + "could not allocate range resource %d\n", rnum); + goto fail; + } + if (rman_get_start(res) != ISA_RANGE_PHYS(range)) { + device_printf(dev, + "mismatch in start of range %d (0x%lx/0x%lx)\n", + rnum, rman_get_start(res), ISA_RANGE_PHYS(range)); + goto fail; + } + if (rman_get_size(res) != range->size) { + device_printf(dev, + "mismatch in size of range %d (0x%lx/0x%x)\n", + rnum, rman_get_size(res), range->size); goto fail; } eri->eri_res = res; eri->eri_rman.rm_type = RMAN_ARRAY; eri->eri_rman.rm_descr = "EBus range"; if (rman_init_from_resource(&eri->eri_rman, res) != 0) { - printf("%s: failed to initialize rman!", __func__); + device_printf(dev, + "could not initialize rman for range %d", rnum); goto fail; } } @@ -452,7 +465,7 @@ ebus_alloc_resource(device_t bus, device * Map EBus ranges to PCI ranges. This may include * changing the allocation type. */ - (void)ofw_isa_range_map(sc->sc_range, sc->sc_nrange, + type = ofw_isa_range_map(sc->sc_range, sc->sc_nrange, &start, &end, &ridx); eri = &sc->sc_rinfo[ridx]; res = rman_reserve_resource(&eri->eri_rman, start, @@ -507,7 +520,7 @@ ebus_activate_resource(device_t bus, dev int i, rv; sc = device_get_softc(bus); - if ((sc->sc_flags & EBUS_PCI) != 0 && type == SYS_RES_MEMORY) { + if ((sc->sc_flags & EBUS_PCI) != 0 && type != SYS_RES_IRQ) { for (i = 0; i < sc->sc_nrange; i++) { eri = &sc->sc_rinfo[i]; if (rman_is_region_manager(res, &eri->eri_rman) != 0) { @@ -550,7 +563,7 @@ ebus_release_resource(device_t bus, devi passthrough = (device_get_parent(child) != bus); rl = BUS_GET_RESOURCE_LIST(bus, child); sc = device_get_softc(bus); - if ((sc->sc_flags & EBUS_PCI) != 0 && type == SYS_RES_MEMORY) { + if ((sc->sc_flags & EBUS_PCI) != 0 && type != SYS_RES_IRQ) { if ((rman_get_flags(res) & RF_ACTIVE) != 0 ){ rv = bus_deactivate_resource(child, type, rid, res); if (rv != 0) From owner-svn-src-head@freebsd.org Sun Sep 13 22:22:31 2015 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 86813A03006; Sun, 13 Sep 2015 22:22:31 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 76BE719B4; Sun, 13 Sep 2015 22:22:31 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8DMMVKt000392; Sun, 13 Sep 2015 22:22:31 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8DMMVN3000390; Sun, 13 Sep 2015 22:22:31 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201509132222.t8DMMVN3000390@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 13 Sep 2015 22:22:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287768 - in head/sys/dev: re rl X-SVN-Group: head 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.20 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: Sun, 13 Sep 2015 22:22:31 -0000 Author: marius Date: Sun Sep 13 22:22:30 2015 New Revision: 287768 URL: https://svnweb.freebsd.org/changeset/base/287768 Log: Add preliminary support for RTL8168H, tested by Sreenath Battalahalli. MFC after: 1 week Modified: head/sys/dev/re/if_re.c head/sys/dev/rl/if_rlreg.h Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Sun Sep 13 21:59:56 2015 (r287767) +++ head/sys/dev/re/if_re.c Sun Sep 13 22:22:30 2015 (r287768) @@ -238,6 +238,7 @@ static const struct rl_hwrev re_hwrevs[] { RL_HWREV_8168F, RL_8169, "8168F/8111F", RL_JUMBO_MTU_9K}, { RL_HWREV_8168G, RL_8169, "8168G/8111G", RL_JUMBO_MTU_9K}, { RL_HWREV_8168GU, RL_8169, "8168GU/8111GU", RL_JUMBO_MTU_9K}, + { RL_HWREV_8168H, RL_8169, "8168H/8111H", RL_JUMBO_MTU_9K}, { RL_HWREV_8411, RL_8169, "8411", RL_JUMBO_MTU_9K}, { RL_HWREV_8411B, RL_8169, "8411B", RL_JUMBO_MTU_9K}, { 0, 0, NULL, 0 } @@ -1485,6 +1486,7 @@ re_attach(device_t dev) break; case RL_HWREV_8168EP: case RL_HWREV_8168G: + case RL_HWREV_8168H: case RL_HWREV_8411B: sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP | Modified: head/sys/dev/rl/if_rlreg.h ============================================================================== --- head/sys/dev/rl/if_rlreg.h Sun Sep 13 21:59:56 2015 (r287767) +++ head/sys/dev/rl/if_rlreg.h Sun Sep 13 22:22:30 2015 (r287768) @@ -195,6 +195,7 @@ #define RL_HWREV_8168G 0x4C000000 #define RL_HWREV_8168EP 0x50000000 #define RL_HWREV_8168GU 0x50800000 +#define RL_HWREV_8168H 0x54000000 #define RL_HWREV_8411B 0x5C800000 #define RL_HWREV_8139 0x60000000 #define RL_HWREV_8139A 0x70000000 From owner-svn-src-head@freebsd.org Mon Sep 14 06:00:52 2015 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 07F28A04C02; Mon, 14 Sep 2015 06:00:52 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 EC69310A7; Mon, 14 Sep 2015 06:00:51 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8E60pfH089316; Mon, 14 Sep 2015 06:00:51 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8E60pKK089314; Mon, 14 Sep 2015 06:00:51 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201509140600.t8E60pKK089314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 14 Sep 2015 06:00:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287770 - head/cddl/contrib/opensolaris/cmd/zfs X-SVN-Group: head 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.20 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: Mon, 14 Sep 2015 06:00:52 -0000 Author: delphij Date: Mon Sep 14 06:00:50 2015 New Revision: 287770 URL: https://svnweb.freebsd.org/changeset/base/287770 Log: MFV r277429: Document -S option when zfs inherit fails on quota and in manual pages. Illumos ZFS issues: 5410 Document -S option to zfs inherit https://illumos.org/issues/5410 5412 Mention -S option when zfs inherit fails on quota https://illumos.org/issues/5412 illumos/illumos-gate@5ff8cfa92ec8ea0f8593ad21aa2a04829b0ef5ea MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Sep 14 05:37:32 2015 (r287769) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Sep 14 06:00:50 2015 (r287770) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 30, 2015 +.Dd September 14, 2015 .Dt ZFS 8 .Os .Sh NAME @@ -2144,7 +2144,8 @@ Property name .It value Property value .It source -Property source. Can either be local, default, temporary, inherited, or none +Property source. Can either be local, default, temporary, inherited, received, +or none (\&-). .El .Pp @@ -2210,8 +2211,11 @@ The default value is all sources. .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Xc .Pp -Clears the specified property, causing it to be inherited from an ancestor. If -no ancestor has the property set, then the default value is used. See the +Clears the specified property, causing it to be inherited from an ancestor, +restored to default if no ancestor has the property set, or with the +.Fl S +option reverted to the received value if one exists. +See the .Qq Sx Properties section for a listing of default values, and details on which properties can be inherited. @@ -2219,8 +2223,10 @@ inherited. .It Fl r Recursively inherit the given property for all children. .It Fl S -For properties with a received value, revert to this value. This flag has no -effect on properties that do not have a received value. +Revert the property to the received value if one exists; otherwise operate as +if the +.Fl S +option was not specified. .El .It Xo .Nm Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon Sep 14 05:37:32 2015 (r287769) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon Sep 14 06:00:50 2015 (r287770) @@ -1928,9 +1928,13 @@ zfs_do_inherit(int argc, char **argv) if (prop == ZFS_PROP_QUOTA || prop == ZFS_PROP_RESERVATION || prop == ZFS_PROP_REFQUOTA || - prop == ZFS_PROP_REFRESERVATION) + prop == ZFS_PROP_REFRESERVATION) { (void) fprintf(stderr, gettext("use 'zfs set " "%s=none' to clear\n"), propname); + (void) fprintf(stderr, gettext("use 'zfs " + "inherit -S %s' to revert to received " + "value\n"), propname); + } return (1); } if (received && (prop == ZFS_PROP_VOLSIZE || From owner-svn-src-head@freebsd.org Mon Sep 14 06:10:50 2015 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 4EEDFA020BB; Mon, 14 Sep 2015 06:10:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 3C56614CD; Mon, 14 Sep 2015 06:10:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8E6AoQU092374; Mon, 14 Sep 2015 06:10:50 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8E6Aoid092373; Mon, 14 Sep 2015 06:10:50 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201509140610.t8E6Aoid092373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 14 Sep 2015 06:10:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287771 - head/cddl/contrib/opensolaris/cmd/zdb X-SVN-Group: head 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.20 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: Mon, 14 Sep 2015 06:10:50 -0000 Author: delphij Date: Mon Sep 14 06:10:49 2015 New Revision: 287771 URL: https://svnweb.freebsd.org/changeset/base/287771 Log: MFV r286224: 5695 dmu_sync'ed holes do not retain birth time (userland portion that was not merged in r286677) Update zdb to also print ltime, type, and level information for these new style holes. Previously, only the logical birth time would be printed. Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Sep 14 06:00:50 2015 (r287770) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Sep 14 06:10:49 2015 (r287771) @@ -1205,7 +1205,9 @@ snprintf_blkptr_compact(char *blkbuf, si if (BP_IS_HOLE(bp)) { (void) snprintf(blkbuf + strlen(blkbuf), - buflen - strlen(blkbuf), "B=%llu", + buflen - strlen(blkbuf), + "%llxL B=%llu", + (u_longlong_t)BP_GET_LSIZE(bp), (u_longlong_t)bp->blk_birth); } else { (void) snprintf(blkbuf + strlen(blkbuf), From owner-svn-src-head@freebsd.org Mon Sep 14 07:08:30 2015 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 0ABB5A04049; Mon, 14 Sep 2015 07:08:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 EF6351C6B; Mon, 14 Sep 2015 07:08:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8E78TXe014710; Mon, 14 Sep 2015 07:08:29 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8E78T1d014709; Mon, 14 Sep 2015 07:08:29 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201509140708.t8E78T1d014709@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 14 Sep 2015 07:08:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287772 - head/sys/dev/usb/controller X-SVN-Group: head 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.20 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: Mon, 14 Sep 2015 07:08:30 -0000 Author: hselasky Date: Mon Sep 14 07:08:29 2015 New Revision: 287772 URL: https://svnweb.freebsd.org/changeset/base/287772 Log: Correct PCI ID. Submitted by: Dmitry Luhtionov MFC after: 1 month PR: 202807 Modified: head/sys/dev/usb/controller/uhci_pci.c Modified: head/sys/dev/usb/controller/uhci_pci.c ============================================================================== --- head/sys/dev/usb/controller/uhci_pci.c Mon Sep 14 06:10:49 2015 (r287771) +++ head/sys/dev/usb/controller/uhci_pci.c Mon Sep 14 07:08:29 2015 (r287772) @@ -223,7 +223,7 @@ uhci_pci_match(device_t self) case 0x76028086: return ("Intel 82372FB/82468GX USB controller"); - case 0x3309103c: + case 0x3300103c: return ("HP iLO Standard Virtual USB controller"); case 0x30381106: From owner-svn-src-head@freebsd.org Mon Sep 14 07:11:54 2015 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 538A4A042BE; Mon, 14 Sep 2015 07:11:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 43E1E10E1; Mon, 14 Sep 2015 07:11:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8E7BsTK017509; Mon, 14 Sep 2015 07:11:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8E7Bs7Z017495; Mon, 14 Sep 2015 07:11:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201509140711.t8E7Bs7Z017495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 14 Sep 2015 07:11:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287773 - head/sys/boot/usb X-SVN-Group: head 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.20 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: Mon, 14 Sep 2015 07:11:54 -0000 Author: hselasky Date: Mon Sep 14 07:11:53 2015 New Revision: 287773 URL: https://svnweb.freebsd.org/changeset/base/287773 Log: Add missing file to build. Modified: head/sys/boot/usb/usbcore.mk Modified: head/sys/boot/usb/usbcore.mk ============================================================================== --- head/sys/boot/usb/usbcore.mk Mon Sep 14 07:08:29 2015 (r287772) +++ head/sys/boot/usb/usbcore.mk Mon Sep 14 07:11:53 2015 (r287773) @@ -143,6 +143,7 @@ KSRCS+= usb_template_kbd.c KSRCS+= usb_template_audio.c KSRCS+= usb_template_phone.c KSRCS+= usb_template_serialnet.c +KSRCS+= usb_template_midi.c # # USB mass storage support From owner-svn-src-head@freebsd.org Mon Sep 14 08:01:08 2015 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 0F23AA03320; Mon, 14 Sep 2015 08:01:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 F017117C6; Mon, 14 Sep 2015 08:01:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8E817XY037278; Mon, 14 Sep 2015 08:01:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8E8162d037269; Mon, 14 Sep 2015 08:01:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509140801.t8E8162d037269@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 14 Sep 2015 08:01:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287774 - head/sys/cam/ctl X-SVN-Group: head 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.20 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: Mon, 14 Sep 2015 08:01:08 -0000 Author: mav Date: Mon Sep 14 08:01:05 2015 New Revision: 287774 URL: https://svnweb.freebsd.org/changeset/base/287774 Log: Implement QUERY TASK, QUERY TASK SET and QUERY ASYNC EVENT. Now we support most of SAM-5 task management. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_error.c head/sys/cam/ctl/ctl_error.h head/sys/cam/ctl/ctl_frontend_iscsi.c head/sys/cam/ctl/ctl_io.h head/sys/cam/ctl/ctl_util.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Mon Sep 14 07:11:53 2015 (r287773) +++ head/sys/cam/ctl/ctl.c Mon Sep 14 08:01:05 2015 (r287774) @@ -412,11 +412,14 @@ static int ctl_scsiio(struct ctl_scsiio static int ctl_bus_reset(struct ctl_softc *ctl_softc, union ctl_io *io); static int ctl_target_reset(struct ctl_softc *ctl_softc, union ctl_io *io, ctl_ua_type ua_type); -static int ctl_lun_reset(struct ctl_lun *lun, union ctl_io *io, +static int ctl_do_lun_reset(struct ctl_lun *lun, union ctl_io *io, ctl_ua_type ua_type); +static int ctl_lun_reset(struct ctl_softc *ctl_softc, union ctl_io *io); static int ctl_abort_task(union ctl_io *io); static int ctl_abort_task_set(union ctl_io *io); +static int ctl_query_task(union ctl_io *io, int task_set); static int ctl_i_t_nexus_reset(union ctl_io *io); +static int ctl_query_async_event(union ctl_io *io); static void ctl_run_task(union ctl_io *io); #ifdef CTL_IO_DELAY static void ctl_datamove_timer_wakeup(void *arg); @@ -7362,8 +7365,9 @@ ctl_report_supported_tmf(struct ctl_scsi ctsio->kern_rel_offset = 0; data = (struct scsi_report_supported_tmf_data *)ctsio->kern_data_ptr; - data->byte1 |= RST_ATS | RST_ATSS | RST_CTSS | RST_LURS | RST_TRS; - data->byte2 |= RST_ITNRS; + data->byte1 |= RST_ATS | RST_ATSS | RST_CTSS | RST_LURS | RST_QTS | + RST_TRS; + data->byte2 |= RST_QAES | RST_QTSS | RST_ITNRS; ctl_set_success(ctsio); ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; @@ -11373,10 +11377,10 @@ ctl_target_reset(struct ctl_softc *softc if (port != NULL && ctl_lun_map_to_port(port, lun->lun) >= CTL_MAX_LUNS) continue; - retval += ctl_lun_reset(lun, io, ua_type); + retval += ctl_do_lun_reset(lun, io, ua_type); } mtx_unlock(&softc->ctl_lock); - + io->taskio.task_status = CTL_TASK_FUNCTION_COMPLETE; return (retval); } @@ -11402,7 +11406,7 @@ ctl_target_reset(struct ctl_softc *softc * XXX KDM for now, we're setting unit attention for all initiators. */ static int -ctl_lun_reset(struct ctl_lun *lun, union ctl_io *io, ctl_ua_type ua_type) +ctl_do_lun_reset(struct ctl_lun *lun, union ctl_io *io, ctl_ua_type ua_type) { union ctl_io *xio; #if 0 @@ -11450,6 +11454,39 @@ ctl_lun_reset(struct ctl_lun *lun, union return (0); } +static int +ctl_lun_reset(struct ctl_softc *softc, union ctl_io *io) +{ + struct ctl_lun *lun; + uint32_t targ_lun; + int retval; + + targ_lun = io->io_hdr.nexus.targ_mapped_lun; + mtx_lock(&softc->ctl_lock); + if ((targ_lun >= CTL_MAX_LUNS) || + (lun = softc->ctl_luns[targ_lun]) == NULL) { + mtx_unlock(&softc->ctl_lock); + io->taskio.task_status = CTL_TASK_LUN_DOES_NOT_EXIST; + return (1); + } + retval = ctl_do_lun_reset(lun, io, CTL_UA_LUN_RESET); + mtx_unlock(&softc->ctl_lock); + io->taskio.task_status = CTL_TASK_FUNCTION_COMPLETE; + + if ((io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) == 0) { + union ctl_ha_msg msg_info; + + msg_info.hdr.msg_type = CTL_MSG_MANAGE_TASKS; + msg_info.hdr.nexus = io->io_hdr.nexus; + msg_info.task.task_action = CTL_TASK_LUN_RESET; + msg_info.hdr.original_sc = NULL; + msg_info.hdr.serializing_sc = NULL; + ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, + sizeof(msg_info.task), M_WAITOK); + } + return (retval); +} + static void ctl_abort_tasks_lun(struct ctl_lun *lun, uint32_t targ_port, uint32_t init_id, int other_sc) @@ -11505,10 +11542,10 @@ ctl_abort_task_set(union ctl_io *io) */ targ_lun = io->io_hdr.nexus.targ_mapped_lun; mtx_lock(&softc->ctl_lock); - if ((targ_lun < CTL_MAX_LUNS) && (softc->ctl_luns[targ_lun] != NULL)) - lun = softc->ctl_luns[targ_lun]; - else { + if ((targ_lun >= CTL_MAX_LUNS) || + (lun = softc->ctl_luns[targ_lun]) == NULL) { mtx_unlock(&softc->ctl_lock); + io->taskio.task_status = CTL_TASK_LUN_DOES_NOT_EXIST; return (1); } @@ -11523,6 +11560,7 @@ ctl_abort_task_set(union ctl_io *io) (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) != 0); } mtx_unlock(&lun->lun_lock); + io->taskio.task_status = CTL_TASK_FUNCTION_COMPLETE; return (0); } @@ -11560,6 +11598,7 @@ ctl_i_t_nexus_reset(union ctl_io *io) mtx_unlock(&lun->lun_lock); } mtx_unlock(&softc->ctl_lock); + io->taskio.task_status = CTL_TASK_FUNCTION_COMPLETE; return (0); } @@ -11584,11 +11623,10 @@ ctl_abort_task(union ctl_io *io) */ targ_lun = io->io_hdr.nexus.targ_mapped_lun; mtx_lock(&softc->ctl_lock); - if ((targ_lun < CTL_MAX_LUNS) - && (softc->ctl_luns[targ_lun] != NULL)) - lun = softc->ctl_luns[targ_lun]; - else { + if ((targ_lun >= CTL_MAX_LUNS) || + (lun = softc->ctl_luns[targ_lun]) == NULL) { mtx_unlock(&softc->ctl_lock); + io->taskio.task_status = CTL_TASK_LUN_DOES_NOT_EXIST; return (1); } @@ -11694,6 +11732,77 @@ ctl_abort_task(union ctl_io *io) io->taskio.tag_type); #endif } + io->taskio.task_status = CTL_TASK_FUNCTION_COMPLETE; + return (0); +} + +static int +ctl_query_task(union ctl_io *io, int task_set) +{ + union ctl_io *xio; + struct ctl_lun *lun; + struct ctl_softc *softc; + int found = 0; + uint32_t targ_lun; + + softc = control_softc; + targ_lun = io->io_hdr.nexus.targ_mapped_lun; + mtx_lock(&softc->ctl_lock); + if ((targ_lun >= CTL_MAX_LUNS) || + (lun = softc->ctl_luns[targ_lun]) == NULL) { + mtx_unlock(&softc->ctl_lock); + io->taskio.task_status = CTL_TASK_LUN_DOES_NOT_EXIST; + return (1); + } + mtx_lock(&lun->lun_lock); + mtx_unlock(&softc->ctl_lock); + for (xio = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); xio != NULL; + xio = (union ctl_io *)TAILQ_NEXT(&xio->io_hdr, ooa_links)) { + + if ((xio->io_hdr.nexus.targ_port != io->io_hdr.nexus.targ_port) + || (xio->io_hdr.nexus.initid != io->io_hdr.nexus.initid) + || (xio->io_hdr.flags & CTL_FLAG_ABORT)) + continue; + + if (task_set || xio->scsiio.tag_num == io->taskio.tag_num) { + found = 1; + break; + } + } + mtx_unlock(&lun->lun_lock); + if (found) + io->taskio.task_status = CTL_TASK_FUNCTION_SUCCEEDED; + else + io->taskio.task_status = CTL_TASK_FUNCTION_COMPLETE; + return (0); +} + +static int +ctl_query_async_event(union ctl_io *io) +{ + struct ctl_lun *lun; + struct ctl_softc *softc; + ctl_ua_type ua; + uint32_t targ_lun, initidx; + + softc = control_softc; + targ_lun = io->io_hdr.nexus.targ_mapped_lun; + mtx_lock(&softc->ctl_lock); + if ((targ_lun >= CTL_MAX_LUNS) || + (lun = softc->ctl_luns[targ_lun]) == NULL) { + mtx_unlock(&softc->ctl_lock); + io->taskio.task_status = CTL_TASK_LUN_DOES_NOT_EXIST; + return (1); + } + mtx_lock(&lun->lun_lock); + mtx_unlock(&softc->ctl_lock); + initidx = ctl_get_initindex(&io->io_hdr.nexus); + ua = ctl_build_qae(lun, initidx, io->taskio.task_resp); + mtx_unlock(&lun->lun_lock); + if (ua != CTL_UA_NONE) + io->taskio.task_status = CTL_TASK_FUNCTION_SUCCEEDED; + else + io->taskio.task_status = CTL_TASK_FUNCTION_COMPLETE; return (0); } @@ -11702,41 +11811,12 @@ ctl_run_task(union ctl_io *io) { struct ctl_softc *softc = control_softc; int retval = 1; - const char *task_desc; CTL_DEBUG_PRINT(("ctl_run_task\n")); - KASSERT(io->io_hdr.io_type == CTL_IO_TASK, - ("ctl_run_task: Unextected io_type %d\n", - io->io_hdr.io_type)); - - task_desc = ctl_scsi_task_string(&io->taskio); - if (task_desc != NULL) { -#ifdef NEEDTOPORT - csevent_log(CSC_CTL | CSC_SHELF_SW | - CTL_TASK_REPORT, - csevent_LogType_Trace, - csevent_Severity_Information, - csevent_AlertLevel_Green, - csevent_FRU_Firmware, - csevent_FRU_Unknown, - "CTL: received task: %s",task_desc); -#endif - } else { -#ifdef NEEDTOPORT - csevent_log(CSC_CTL | CSC_SHELF_SW | - CTL_TASK_REPORT, - csevent_LogType_Trace, - csevent_Severity_Information, - csevent_AlertLevel_Green, - csevent_FRU_Firmware, - csevent_FRU_Unknown, - "CTL: received unknown task " - "type: %d (%#x)", - io->taskio.task_action, - io->taskio.task_action); -#endif - } + ("ctl_run_task: Unextected io_type %d\n", io->io_hdr.io_type)); + io->taskio.task_status = CTL_TASK_FUNCTION_NOT_SUPPORTED; + bzero(io->taskio.task_resp, sizeof(io->taskio.task_resp)); switch (io->taskio.task_action) { case CTL_TASK_ABORT_TASK: retval = ctl_abort_task(io); @@ -11750,36 +11830,9 @@ ctl_run_task(union ctl_io *io) case CTL_TASK_I_T_NEXUS_RESET: retval = ctl_i_t_nexus_reset(io); break; - case CTL_TASK_LUN_RESET: { - struct ctl_lun *lun; - uint32_t targ_lun; - - targ_lun = io->io_hdr.nexus.targ_mapped_lun; - mtx_lock(&softc->ctl_lock); - if ((targ_lun < CTL_MAX_LUNS) - && (softc->ctl_luns[targ_lun] != NULL)) - lun = softc->ctl_luns[targ_lun]; - else { - mtx_unlock(&softc->ctl_lock); - retval = 1; - break; - } - retval = ctl_lun_reset(lun, io, CTL_UA_LUN_RESET); - mtx_unlock(&softc->ctl_lock); - - if ((io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) == 0) { - union ctl_ha_msg msg_info; - - msg_info.hdr.msg_type = CTL_MSG_MANAGE_TASKS; - msg_info.hdr.nexus = io->io_hdr.nexus; - msg_info.task.task_action = CTL_TASK_LUN_RESET; - msg_info.hdr.original_sc = NULL; - msg_info.hdr.serializing_sc = NULL; - ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg_info, - sizeof(msg_info.task), M_WAITOK); - } + case CTL_TASK_LUN_RESET: + retval = ctl_lun_reset(softc, io); break; - } case CTL_TASK_TARGET_RESET: retval = ctl_target_reset(softc, io, CTL_UA_TARG_RESET); break; @@ -11790,9 +11843,18 @@ ctl_run_task(union ctl_io *io) break; case CTL_TASK_PORT_LOGOUT: break; + case CTL_TASK_QUERY_TASK: + retval = ctl_query_task(io, 0); + break; + case CTL_TASK_QUERY_TASK_SET: + retval = ctl_query_task(io, 1); + break; + case CTL_TASK_QUERY_ASYNC_EVENT: + retval = ctl_query_async_event(io); + break; default: - printf("ctl_run_task: got unknown task management event %d\n", - io->taskio.task_action); + printf("%s: got unknown task management event %d\n", + __func__, io->taskio.task_action); break; } if (retval == 0) Modified: head/sys/cam/ctl/ctl_error.c ============================================================================== --- head/sys/cam/ctl/ctl_error.c Mon Sep 14 07:11:53 2015 (r287773) +++ head/sys/cam/ctl/ctl_error.c Mon Sep 14 08:01:05 2015 (r287774) @@ -365,62 +365,35 @@ ctl_set_ua(struct ctl_scsiio *ctsio, int SSD_ELEM_NONE); } -ctl_ua_type -ctl_build_ua(struct ctl_lun *lun, uint32_t initidx, - struct scsi_sense_data *sense, scsi_sense_data_type sense_format) +static void +ctl_ua_to_acsq(ctl_ua_type ua_to_build, int *asc, int *ascq, + ctl_ua_type *ua_to_clear) { - ctl_ua_type *ua; - ctl_ua_type ua_to_build, ua_to_clear; - int asc, ascq; - uint32_t p, i; - - mtx_assert(&lun->lun_lock, MA_OWNED); - p = initidx / CTL_MAX_INIT_PER_PORT; - if ((ua = lun->pending_ua[p]) == NULL) { - mtx_unlock(&lun->lun_lock); - ua = malloc(sizeof(ctl_ua_type) * CTL_MAX_INIT_PER_PORT, - M_CTL, M_WAITOK); - mtx_lock(&lun->lun_lock); - if (lun->pending_ua[p] == NULL) { - lun->pending_ua[p] = ua; - for (i = 0; i < CTL_MAX_INIT_PER_PORT; i++) - ua[i] = CTL_UA_POWERON; - } else { - free(ua, M_CTL); - ua = lun->pending_ua[p]; - } - } - i = initidx % CTL_MAX_INIT_PER_PORT; - if (ua[i] == CTL_UA_NONE) - return (CTL_UA_NONE); - - ua_to_build = (1 << (ffs(ua[i]) - 1)); - ua_to_clear = ua_to_build; switch (ua_to_build) { case CTL_UA_POWERON: /* 29h/01h POWER ON OCCURRED */ - asc = 0x29; - ascq = 0x01; - ua_to_clear = ~0; + *asc = 0x29; + *ascq = 0x01; + *ua_to_clear = ~0; break; case CTL_UA_BUS_RESET: /* 29h/02h SCSI BUS RESET OCCURRED */ - asc = 0x29; - ascq = 0x02; - ua_to_clear = ~0; + *asc = 0x29; + *ascq = 0x02; + *ua_to_clear = ~0; break; case CTL_UA_TARG_RESET: /* 29h/03h BUS DEVICE RESET FUNCTION OCCURRED*/ - asc = 0x29; - ascq = 0x03; - ua_to_clear = ~0; + *asc = 0x29; + *ascq = 0x03; + *ua_to_clear = ~0; break; case CTL_UA_I_T_NEXUS_LOSS: /* 29h/07h I_T NEXUS LOSS OCCURRED */ - asc = 0x29; - ascq = 0x07; - ua_to_clear = ~0; + *asc = 0x29; + *ascq = 0x07; + *ua_to_clear = ~0; break; case CTL_UA_LUN_RESET: /* 29h/00h POWER ON, RESET, OR BUS DEVICE RESET OCCURRED */ @@ -428,62 +401,128 @@ ctl_build_ua(struct ctl_lun *lun, uint32 * Since we don't have a specific ASC/ASCQ pair for a LUN * reset, just return the generic reset code. */ - asc = 0x29; - ascq = 0x00; + *asc = 0x29; + *ascq = 0x00; break; case CTL_UA_LUN_CHANGE: /* 3Fh/0Eh REPORTED LUNS DATA HAS CHANGED */ - asc = 0x3F; - ascq = 0x0E; + *asc = 0x3F; + *ascq = 0x0E; break; case CTL_UA_MODE_CHANGE: /* 2Ah/01h MODE PARAMETERS CHANGED */ - asc = 0x2A; - ascq = 0x01; + *asc = 0x2A; + *ascq = 0x01; break; case CTL_UA_LOG_CHANGE: /* 2Ah/02h LOG PARAMETERS CHANGED */ - asc = 0x2A; - ascq = 0x02; + *asc = 0x2A; + *ascq = 0x02; break; case CTL_UA_INQ_CHANGE: /* 3Fh/03h INQUIRY DATA HAS CHANGED */ - asc = 0x3F; - ascq = 0x03; + *asc = 0x3F; + *ascq = 0x03; break; case CTL_UA_RES_PREEMPT: /* 2Ah/03h RESERVATIONS PREEMPTED */ - asc = 0x2A; - ascq = 0x03; + *asc = 0x2A; + *ascq = 0x03; break; case CTL_UA_RES_RELEASE: /* 2Ah/04h RESERVATIONS RELEASED */ - asc = 0x2A; - ascq = 0x04; + *asc = 0x2A; + *ascq = 0x04; break; case CTL_UA_REG_PREEMPT: /* 2Ah/05h REGISTRATIONS PREEMPTED */ - asc = 0x2A; - ascq = 0x05; + *asc = 0x2A; + *ascq = 0x05; break; case CTL_UA_ASYM_ACC_CHANGE: - /* 2Ah/06n ASYMMETRIC ACCESS STATE CHANGED */ - asc = 0x2A; - ascq = 0x06; + /* 2Ah/06h ASYMMETRIC ACCESS STATE CHANGED */ + *asc = 0x2A; + *ascq = 0x06; break; case CTL_UA_CAPACITY_CHANGED: - /* 2Ah/09n CAPACITY DATA HAS CHANGED */ - asc = 0x2A; - ascq = 0x09; + /* 2Ah/09h CAPACITY DATA HAS CHANGED */ + *asc = 0x2A; + *ascq = 0x09; break; case CTL_UA_THIN_PROV_THRES: - /* 38h/07n THIN PROVISIONING SOFT THRESHOLD REACHED */ - asc = 0x38; - ascq = 0x07; + /* 38h/07h THIN PROVISIONING SOFT THRESHOLD REACHED */ + *asc = 0x38; + *ascq = 0x07; break; default: - panic("ctl_build_ua: Unknown UA %x", ua_to_build); + panic("%s: Unknown UA %x", __func__, ua_to_build); + } +} + +ctl_ua_type +ctl_build_qae(struct ctl_lun *lun, uint32_t initidx, uint8_t *resp) +{ + ctl_ua_type ua; + ctl_ua_type ua_to_build, ua_to_clear; + int asc, ascq; + uint32_t p, i; + + mtx_assert(&lun->lun_lock, MA_OWNED); + p = initidx / CTL_MAX_INIT_PER_PORT; + i = initidx % CTL_MAX_INIT_PER_PORT; + if (lun->pending_ua[p] == NULL) + ua = CTL_UA_POWERON; + else + ua = lun->pending_ua[p][i]; + if (ua == CTL_UA_NONE) + return (CTL_UA_NONE); + + ua_to_build = (1 << (ffs(ua) - 1)); + ua_to_clear = ua_to_build; + ctl_ua_to_acsq(ua_to_build, &asc, &ascq, &ua_to_clear); + + resp[0] = SSD_KEY_UNIT_ATTENTION; + if (ua_to_build == ua) + resp[0] |= 0x10; + else + resp[0] |= 0x20; + resp[1] = asc; + resp[2] = ascq; + return (ua); +} + +ctl_ua_type +ctl_build_ua(struct ctl_lun *lun, uint32_t initidx, + struct scsi_sense_data *sense, scsi_sense_data_type sense_format) +{ + ctl_ua_type *ua; + ctl_ua_type ua_to_build, ua_to_clear; + int asc, ascq; + uint32_t p, i; + + mtx_assert(&lun->lun_lock, MA_OWNED); + p = initidx / CTL_MAX_INIT_PER_PORT; + if ((ua = lun->pending_ua[p]) == NULL) { + mtx_unlock(&lun->lun_lock); + ua = malloc(sizeof(ctl_ua_type) * CTL_MAX_INIT_PER_PORT, + M_CTL, M_WAITOK); + mtx_lock(&lun->lun_lock); + if (lun->pending_ua[p] == NULL) { + lun->pending_ua[p] = ua; + for (i = 0; i < CTL_MAX_INIT_PER_PORT; i++) + ua[i] = CTL_UA_POWERON; + } else { + free(ua, M_CTL); + ua = lun->pending_ua[p]; + } } + i = initidx % CTL_MAX_INIT_PER_PORT; + if (ua[i] == CTL_UA_NONE) + return (CTL_UA_NONE); + + ua_to_build = (1 << (ffs(ua[i]) - 1)); + ua_to_clear = ua_to_build; + ctl_ua_to_acsq(ua_to_build, &asc, &ascq, &ua_to_clear); ctl_set_sense_data(sense, /*lun*/ NULL, Modified: head/sys/cam/ctl/ctl_error.h ============================================================================== --- head/sys/cam/ctl/ctl_error.h Mon Sep 14 07:11:53 2015 (r287773) +++ head/sys/cam/ctl/ctl_error.h Mon Sep 14 08:01:05 2015 (r287774) @@ -57,6 +57,7 @@ void ctl_sense_to_desc(struct scsi_sense void ctl_sense_to_fixed(struct scsi_sense_data_desc *sense_src, struct scsi_sense_data_fixed *sense_dest); void ctl_set_ua(struct ctl_scsiio *ctsio, int asc, int ascq); +ctl_ua_type ctl_build_qae(struct ctl_lun *lun, uint32_t initidx, uint8_t *resp); ctl_ua_type ctl_build_ua(struct ctl_lun *lun, uint32_t initidx, struct scsi_sense_data *sense, scsi_sense_data_type sense_format); void ctl_set_overlapped_cmd(struct ctl_scsiio *ctsio); Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Mon Sep 14 07:11:53 2015 (r287773) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Mon Sep 14 08:01:05 2015 (r287774) @@ -663,12 +663,31 @@ cfiscsi_pdu_handle_task_request(struct i #endif io->taskio.task_action = CTL_TASK_TARGET_RESET; break; + case BHSTMR_FUNCTION_QUERY_TASK: +#if 0 + CFISCSI_SESSION_DEBUG(cs, "BHSTMR_FUNCTION_QUERY_TASK"); +#endif + io->taskio.task_action = CTL_TASK_QUERY_TASK; + io->taskio.tag_num = bhstmr->bhstmr_referenced_task_tag; + break; + case BHSTMR_FUNCTION_QUERY_TASK_SET: +#if 0 + CFISCSI_SESSION_DEBUG(cs, "BHSTMR_FUNCTION_QUERY_TASK_SET"); +#endif + io->taskio.task_action = CTL_TASK_QUERY_TASK_SET; + break; case BHSTMR_FUNCTION_I_T_NEXUS_RESET: #if 0 CFISCSI_SESSION_DEBUG(cs, "BHSTMR_FUNCTION_I_T_NEXUS_RESET"); #endif io->taskio.task_action = CTL_TASK_I_T_NEXUS_RESET; break; + case BHSTMR_FUNCTION_QUERY_ASYNC_EVENT: +#if 0 + CFISCSI_SESSION_DEBUG(cs, "BHSTMR_FUNCTION_QUERY_ASYNC_EVENT"); +#endif + io->taskio.task_action = CTL_TASK_QUERY_ASYNC_EVENT; + break; default: CFISCSI_SESSION_DEBUG(cs, "unsupported function 0x%x", bhstmr->bhstmr_function & ~0x80); @@ -2910,18 +2929,23 @@ cfiscsi_task_management_done(union ctl_i response->ip_bhs; bhstmr2->bhstmr_opcode = ISCSI_BHS_OPCODE_TASK_RESPONSE; bhstmr2->bhstmr_flags = 0x80; - if (io->io_hdr.status == CTL_SUCCESS) { + switch (io->taskio.task_status) { + case CTL_TASK_FUNCTION_COMPLETE: bhstmr2->bhstmr_response = BHSTMR_RESPONSE_FUNCTION_COMPLETE; - } else { - /* - * XXX: How to figure out what exactly went wrong? iSCSI spec - * expects us to provide detailed error, e.g. "Task does - * not exist" or "LUN does not exist". - */ - CFISCSI_SESSION_DEBUG(cs, "BHSTMR_RESPONSE_FUNCTION_NOT_SUPPORTED"); - bhstmr2->bhstmr_response = - BHSTMR_RESPONSE_FUNCTION_NOT_SUPPORTED; + break; + case CTL_TASK_FUNCTION_SUCCEEDED: + bhstmr2->bhstmr_response = BHSTMR_RESPONSE_FUNCTION_SUCCEEDED; + break; + case CTL_TASK_LUN_DOES_NOT_EXIST: + bhstmr2->bhstmr_response = BHSTMR_RESPONSE_LUN_DOES_NOT_EXIST; + break; + case CTL_TASK_FUNCTION_NOT_SUPPORTED: + default: + bhstmr2->bhstmr_response = BHSTMR_RESPONSE_FUNCTION_NOT_SUPPORTED; + break; } + memcpy(bhstmr2->bhstmr_additional_reponse_information, + io->taskio.task_resp, sizeof(io->taskio.task_resp)); bhstmr2->bhstmr_initiator_task_tag = bhstmr->bhstmr_initiator_task_tag; ctl_free_io(io); Modified: head/sys/cam/ctl/ctl_io.h ============================================================================== --- head/sys/cam/ctl/ctl_io.h Mon Sep 14 07:11:53 2015 (r287773) +++ head/sys/cam/ctl/ctl_io.h Mon Sep 14 08:01:05 2015 (r287774) @@ -328,9 +328,20 @@ typedef enum { CTL_TASK_TARGET_RESET, CTL_TASK_BUS_RESET, CTL_TASK_PORT_LOGIN, - CTL_TASK_PORT_LOGOUT + CTL_TASK_PORT_LOGOUT, + CTL_TASK_QUERY_TASK, + CTL_TASK_QUERY_TASK_SET, + CTL_TASK_QUERY_ASYNC_EVENT } ctl_task_type; +typedef enum { + CTL_TASK_FUNCTION_COMPLETE, + CTL_TASK_FUNCTION_SUCCEEDED, + CTL_TASK_FUNCTION_REJECTED, + CTL_TASK_LUN_DOES_NOT_EXIST, + CTL_TASK_FUNCTION_NOT_SUPPORTED +} ctl_task_status; + /* * Task management I/O structure. Aborts, bus resets, etc., are sent using * this structure. @@ -343,6 +354,8 @@ struct ctl_taskio { ctl_task_type task_action; /* Target Reset, Abort, etc. */ uint32_t tag_num; /* tag number */ ctl_tag_type tag_type; /* simple, ordered, etc. */ + uint8_t task_status; /* Complete, Succeeded, etc. */ + uint8_t task_resp[3];/* Response information */ }; typedef enum { Modified: head/sys/cam/ctl/ctl_util.c ============================================================================== --- head/sys/cam/ctl/ctl_util.c Mon Sep 14 07:11:53 2015 (r287773) +++ head/sys/cam/ctl/ctl_util.c Mon Sep 14 08:01:05 2015 (r287774) @@ -89,7 +89,10 @@ static struct ctl_task_desc ctl_task_tab {CTL_TASK_TARGET_RESET, "Target Reset"}, {CTL_TASK_BUS_RESET, "Bus Reset"}, {CTL_TASK_PORT_LOGIN, "Port Login"}, - {CTL_TASK_PORT_LOGOUT, "Port Logout"} + {CTL_TASK_PORT_LOGOUT, "Port Logout"}, + {CTL_TASK_QUERY_TASK, "Query Task"}, + {CTL_TASK_QUERY_TASK_SET, "Query Task Set"}, + {CTL_TASK_QUERY_ASYNC_EVENT, "Query Async Event"} }; void From owner-svn-src-head@freebsd.org Mon Sep 14 08:36:23 2015 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 A0D3E9CD87E; Mon, 14 Sep 2015 08:36:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 90B111A81; Mon, 14 Sep 2015 08:36:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8E8aNTT051336; Mon, 14 Sep 2015 08:36:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8E8aNXW051334; Mon, 14 Sep 2015 08:36:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201509140836.t8E8aNXW051334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 14 Sep 2015 08:36:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287775 - in head/sys: net netinet X-SVN-Group: head 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.20 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: Mon, 14 Sep 2015 08:36:23 -0000 Author: hselasky Date: Mon Sep 14 08:36:22 2015 New Revision: 287775 URL: https://svnweb.freebsd.org/changeset/base/287775 Log: Update TSO limits to include all headers. To make driver programming easier the TSO limits are changed to reflect the values used in the BUSDMA tag a network adapter driver is using. The TCP/IP network stack will subtract space for all linklevel and protocol level headers and ensure that the full mbuf chain passed to the network adapter fits within the given limits. Implementation notes: If a network adapter driver needs to fixup the first mbuf in order to support VLAN tag insertion, the size of the VLAN tag should be subtracted from the TSO limit. Else not. Network adapters which typically inline the complete header mbuf could technically transmit one more segment. This patch does not implement a mechanism to recover the last segment for data transmission. It is believed when sufficiently large mbuf clusters are used, the segment limit will not be reached and recovering the last segment will not have any effect. The current TSO algorithm tries to send MTU-sized packets, where the MTU typically is 1500 bytes, which gives 1448 bytes of TCP data payload per packet for IPv4. That means if the TSO length limitiation is set to 65536 bytes, there will be a data payload remainder of (65536 - 1500) mod 1448 bytes which is equal to 324 bytes. Trying to recover total TSO length due to inlining mbuf header data will not have any effect, because adding or removing the ETH/IP/TCP headers to or from 324 bytes will not cause more or less TCP payload to be TSO'ed. Existing network adapter limits will be updated separately. Differential Revision: https://reviews.freebsd.org/D3458 Reviewed by: rmacklem MFC after: 2 weeks Modified: head/sys/net/if_var.h head/sys/netinet/tcp_output.c Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Mon Sep 14 08:01:05 2015 (r287774) +++ head/sys/net/if_var.h Mon Sep 14 08:36:22 2015 (r287775) @@ -243,11 +243,12 @@ struct ifnet { * count limit does not apply. If all three fields are zero, * there is no TSO limit. * - * NOTE: The TSO limits only apply to the data payload part of - * a TCP/IP packet. That means there is no need to subtract - * space for ethernet-, vlan-, IP- or TCP- headers from the - * TSO limits unless the hardware driver in question requires - * so. + * NOTE: The TSO limits should reflect the values used in the + * BUSDMA tag a network adapter is using to load a mbuf chain + * for transmission. The TCP/IP network stack will subtract + * space for all linklevel and protocol level headers and + * ensure that the full mbuf chain passed to the network + * adapter fits within the given limits. */ u_int if_hw_tsomax; /* TSO maximum size in bytes */ u_int if_hw_tsomaxsegcount; /* TSO maximum segment count */ Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Mon Sep 14 08:01:05 2015 (r287774) +++ head/sys/netinet/tcp_output.c Mon Sep 14 08:36:22 2015 (r287775) @@ -811,7 +811,8 @@ send: */ if (if_hw_tsomax != 0) { /* compute maximum TSO length */ - max_len = (if_hw_tsomax - hdrlen); + max_len = (if_hw_tsomax - hdrlen - + max_linkhdr); if (max_len <= 0) { len = 0; } else if (len > max_len) { @@ -826,6 +827,15 @@ send: */ if (if_hw_tsomaxsegcount != 0 && if_hw_tsomaxsegsize != 0) { + /* + * Subtract one segment for the LINK + * and TCP/IP headers mbuf that will + * be prepended to this mbuf chain + * after the code in this section + * limits the number of mbufs in the + * chain to if_hw_tsomaxsegcount. + */ + if_hw_tsomaxsegcount -= 1; max_len = 0; mb = sbsndmbuf(&so->so_snd, off, &moff); From owner-svn-src-head@freebsd.org Mon Sep 14 08:49:09 2015 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 897F29CDF74; Mon, 14 Sep 2015 08:49:09 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from forward15p.cmail.yandex.net (forward15p.cmail.yandex.net [IPv6:2a02:6b8:0:1465::bd]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Certum Level IV CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 26AD0104D; Mon, 14 Sep 2015 08:49:08 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from web24g.yandex.ru (web24g.yandex.ru [95.108.253.233]) by forward15p.cmail.yandex.net (Yandex) with ESMTP id 377C5214B1; Mon, 14 Sep 2015 11:49:04 +0300 (MSK) Received: from 127.0.0.1 (localhost [127.0.0.1]) by web24g.yandex.ru (Yandex) with ESMTP id 087AF58E153D; Mon, 14 Sep 2015 11:49:01 +0300 (MSK) Received: by web24g.yandex.ru with HTTP; Mon, 14 Sep 2015 11:48:59 +0300 From: Alexander V. Chernikov Envelope-From: melifaro@ipfw.ru To: Hans Petter Selasky , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" In-Reply-To: <201509140836.t8E8aNXW051334@repo.freebsd.org> References: null <201509140836.t8E8aNXW051334@repo.freebsd.org> Subject: Re: svn commit: r287775 - in head/sys: net netinet MIME-Version: 1.0 Message-Id: <1482471442220539@web24g.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Mon, 14 Sep 2015 11:48:59 +0300 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=koi8-r X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Mon, 14 Sep 2015 08:49:09 -0000 14.09.2015, 11:36, "Hans Petter Selasky" : > Author: hselasky > Date: Mon Sep 14 08:36:22 2015 > New Revision: 287775 > URL: https://svnweb.freebsd.org/changeset/base/287775 > > Log: > ššUpdate TSO limits to include all headers. > > ššTo make driver programming easier the TSO limits are changed to > ššreflect the values used in the BUSDMA tag a network adapter driver is > ššusing. The TCP/IP network stack will subtract space for all linklevel > ššand protocol level headers and ensure that the full mbuf chain passed > ššto the network adapter fits within the given limits. > > ššImplementation notes: > > ššIf a network adapter driver needs to fixup the first mbuf in order to > ššsupport VLAN tag insertion, the size of the VLAN tag should be > ššsubtracted from the TSO limit. Else not. > > ššNetwork adapters which typically inline the complete header mbuf could > šštechnically transmit one more segment. This patch does not implement a > ššmechanism to recover the last segment for data transmission. It is > ššbelieved when sufficiently large mbuf clusters are used, the segment > ššlimit will not be reached and recovering the last segment will not > ššhave any effect. > > ššThe current TSO algorithm tries to send MTU-sized packets, where the > ššMTU typically is 1500 bytes, which gives 1448 bytes of TCP data > ššpayload per packet for IPv4. That means if the TSO length limitiation > ššis set to 65536 bytes, there will be a data payload remainder of > šš(65536 - 1500) mod 1448 bytes which is equal to 324 bytes. Trying to > ššrecover total TSO length due to inlining mbuf header data will not > ššhave any effect, because adding or removing the ETH/IP/TCP headers > ššto or from 324 bytes will not cause more or less TCP payload to be > ššTSO'ed. > > ššExisting network adapter limits will be updated separately. > > ššDifferential Revision: https://reviews.freebsd.org/D3458 Probably different revision id ? > ššReviewed by: rmacklem > ššMFC after: 2 weeks > > Modified: > ššhead/sys/net/if_var.h > ššhead/sys/netinet/tcp_output.c > > Modified: head/sys/net/if_var.h > ============================================================================== > --- head/sys/net/if_var.h Mon Sep 14 08:01:05 2015 (r287774) > +++ head/sys/net/if_var.h Mon Sep 14 08:36:22 2015 (r287775) > @@ -243,11 +243,12 @@ struct ifnet { > šššššššššš* count limit does not apply. If all three fields are zero, > šššššššššš* there is no TSO limit. > šššššššššš* > - * NOTE: The TSO limits only apply to the data payload part of > - * a TCP/IP packet. That means there is no need to subtract > - * space for ethernet-, vlan-, IP- or TCP- headers from the > - * TSO limits unless the hardware driver in question requires > - * so. > + * NOTE: The TSO limits should reflect the values used in the > + * BUSDMA tag a network adapter is using to load a mbuf chain > + * for transmission. The TCP/IP network stack will subtract > + * space for all linklevel and protocol level headers and > + * ensure that the full mbuf chain passed to the network > + * adapter fits within the given limits. > šššššššššš*/ > šššššššššu_int if_hw_tsomax; /* TSO maximum size in bytes */ > šššššššššu_int if_hw_tsomaxsegcount; /* TSO maximum segment count */ > > Modified: head/sys/netinet/tcp_output.c > ============================================================================== > --- head/sys/netinet/tcp_output.c Mon Sep 14 08:01:05 2015 (r287774) > +++ head/sys/netinet/tcp_output.c Mon Sep 14 08:36:22 2015 (r287775) > @@ -811,7 +811,8 @@ send: > šššššššššššššššššššššššššš*/ > šššššššššššššššššššššššššif (if_hw_tsomax != 0) { > ššššššššššššššššššššššššššššššššš/* compute maximum TSO length */ > - max_len = (if_hw_tsomax - hdrlen); > + max_len = (if_hw_tsomax - hdrlen - > + max_linkhdr); > šššššššššššššššššššššššššššššššššif (max_len <= 0) { > šššššššššššššššššššššššššššššššššššššššššlen = 0; > ššššššššššššššššššššššššššššššššš} else if (len > max_len) { > @@ -826,6 +827,15 @@ send: > šššššššššššššššššššššššššš*/ > šššššššššššššššššššššššššif (if_hw_tsomaxsegcount != 0 && > šššššššššššššššššššššššššššššif_hw_tsomaxsegsize != 0) { > + /* > + * Subtract one segment for the LINK > + * and TCP/IP headers mbuf that will > + * be prepended to this mbuf chain > + * after the code in this section > + * limits the number of mbufs in the > + * chain to if_hw_tsomaxsegcount. > + */ > + if_hw_tsomaxsegcount -= 1; > šššššššššššššššššššššššššššššššššmax_len = 0; > šššššššššššššššššššššššššššššššššmb = sbsndmbuf(&so->so_snd, off, &moff); From owner-svn-src-head@freebsd.org Mon Sep 14 09:00:58 2015 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 09FC8A019FE; Mon, 14 Sep 2015 09:00:58 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (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 C0DD4189B; Mon, 14 Sep 2015 09:00:57 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 42F8B1FE023; Mon, 14 Sep 2015 11:00:48 +0200 (CEST) Subject: Re: svn commit: r287775 - in head/sys: net netinet To: "Alexander V. Chernikov" , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" References: null <201509140836.t8E8aNXW051334@repo.freebsd.org> <1482471442220539@web24g.yandex.ru> From: Hans Petter Selasky Message-ID: <55F68D1F.7060806@selasky.org> Date: Mon, 14 Sep 2015 11:02:23 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1482471442220539@web24g.yandex.ru> Content-Type: text/plain; charset=koi8-r; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Mon, 14 Sep 2015 09:00:58 -0000 On 09/14/15 10:48, Alexander V. Chernikov wrote: >> Differential Revision:https://reviews.freebsd.org/D3458 > Probably different revision id ? > Yes, Should have been "https://reviews.freebsd.org/D3477" --HPS From owner-svn-src-head@freebsd.org Mon Sep 14 09:17:20 2015 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 84C45A034D1; Mon, 14 Sep 2015 09:17:20 +0000 (UTC) (envelope-from royger@gmail.com) Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) (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 2261B120E; Mon, 14 Sep 2015 09:17:20 +0000 (UTC) (envelope-from royger@gmail.com) Received: by wicge5 with SMTP id ge5so133381920wic.0; Mon, 14 Sep 2015 02:17:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=QbPRdPvzkpcHjz0gRdDGE6q7k9tqZ2ItAfW275Mm8ho=; b=sw3A3OPERgVfwprl639xaMpbMzjUIVNjKQcoX9kopsgKFKrpCzF70b5bds0zSBh/2+ pRjXMHLQbcCX9DPl8ygMyW+ZiTS4pPI5l8d2xsXrY33tChbGpEQ50l3xpOouMeSOLcb/ blpAZNV+i5ED+wsoPtSkMK1Dqq09CgxRcD1rPTGnTnm3SSxYIsLTa+7m9K/6w6rg7pVy oW4ZC4ChZplj9PoW39Wa7FziD+EsdXJkARw2OdXlcwHF7OpdtHOC56zjkrPYQCtDiWSx 7wCcUupVTRAB1KuEva9MGyxr/OGZ7Ul4tigGCJHNKilu6jVgZKD3/0HcIT6KyhZHx7aE IY3A== X-Received: by 10.194.108.4 with SMTP id hg4mr27079708wjb.45.1442222238651; Mon, 14 Sep 2015 02:17:18 -0700 (PDT) Received: from [172.16.1.30] (195.Red-83-39-7.dynamicIP.rima-tde.net. [83.39.7.195]) by smtp.gmail.com with ESMTPSA id d8sm18064538wiy.1.2015.09.14.02.17.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Sep 2015 02:17:17 -0700 (PDT) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Subject: Re: svn commit: r271946 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront kern net netinet ofed/drivers/net/mlx4 sys To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201409220827.s8M8RRHB031526@svn.freebsd.org> From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Message-ID: <55F69093.5050807@FreeBSD.org> Date: Mon, 14 Sep 2015 11:17:07 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <201409220827.s8M8RRHB031526@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Mon, 14 Sep 2015 09:17:20 -0000 El 22/09/14 a les 10.27, Hans Petter Selasky ha escrit: > Author: hselasky > Date: Mon Sep 22 08:27:27 2014 > New Revision: 271946 > URL: http://svnweb.freebsd.org/changeset/base/271946 > > Log: > Improve transmit sending offload, TSO, algorithm in general. > > The current TSO limitation feature only takes the total number of > bytes in an mbuf chain into account and does not limit by the number > of mbufs in a chain. Some kinds of hardware is limited by two > factors. One is the fragment length and the second is the fragment > count. Both of these limits need to be taken into account when doing > TSO. Else some kinds of hardware might have to drop completely valid > mbuf chains because they cannot loaded into the given hardware's DMA > engine. The new way of doing TSO limitation has been made backwards > compatible as input from other FreeBSD developers and will use > defaults for values not set. > > Reviewed by: adrian, rmacklem > Sponsored by: Mellanox Technologies This commit makes xen-netfront tx performance drop from ~5Gbits/sec (with debug options enabled) to 446 Mbits/sec. I'm currently looking, but if anyone has ideas they are welcome. Roger. From owner-svn-src-head@freebsd.org Mon Sep 14 09:27:28 2015 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 8C0C1A03AC2; Mon, 14 Sep 2015 09:27:28 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (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 4FCB71832; Mon, 14 Sep 2015 09:27:27 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 7A88B1FE023; Mon, 14 Sep 2015 11:27:25 +0200 (CEST) Subject: Re: svn commit: r271946 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront kern net netinet ofed/drivers/net/mlx4 sys To: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201409220827.s8M8RRHB031526@svn.freebsd.org> <55F69093.5050807@FreeBSD.org> From: Hans Petter Selasky Message-ID: <55F6935C.9000000@selasky.org> Date: Mon, 14 Sep 2015 11:29:00 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <55F69093.5050807@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Mon, 14 Sep 2015 09:27:28 -0000 On 09/14/15 11:17, Roger Pau Monné wrote: > El 22/09/14 a les 10.27, Hans Petter Selasky ha escrit: >> Author: hselasky >> Date: Mon Sep 22 08:27:27 2014 >> New Revision: 271946 >> URL: http://svnweb.freebsd.org/changeset/base/271946 >> >> Log: >> Improve transmit sending offload, TSO, algorithm in general. >> >> The current TSO limitation feature only takes the total number of >> bytes in an mbuf chain into account and does not limit by the number >> of mbufs in a chain. Some kinds of hardware is limited by two >> factors. One is the fragment length and the second is the fragment >> count. Both of these limits need to be taken into account when doing >> TSO. Else some kinds of hardware might have to drop completely valid >> mbuf chains because they cannot loaded into the given hardware's DMA >> engine. The new way of doing TSO limitation has been made backwards >> compatible as input from other FreeBSD developers and will use >> defaults for values not set. >> >> Reviewed by: adrian, rmacklem >> Sponsored by: Mellanox Technologies > > This commit makes xen-netfront tx performance drop from ~5Gbits/sec > (with debug options enabled) to 446 Mbits/sec. I'm currently looking, > but if anyone has ideas they are welcome. > Hi Roger, Looking at the netfront code you should subtract 1 from tsomaxsegcount prior to r287775. The reason might simply be that 2K clusters are used instead of 4K clusters, causing m_defrag() to be called. > ifp->if_hw_tsomax = 65536 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); > ifp->if_hw_tsomaxsegcount = MAX_TX_REQ_FRAGS; > ifp->if_hw_tsomaxsegsize = PAGE_SIZE; After r287775 can you try these settings: ifp->if_hw_tsomax = 65536; ifp->if_hw_tsomaxsegcount = MAX_TX_REQ_FRAGS; ifp->if_hw_tsomaxsegsize = PAGE_SIZE; And see if the performance is the same like before? Thank you! --HPS From owner-svn-src-head@freebsd.org Mon Sep 14 09:56:03 2015 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 3483AA03122; Mon, 14 Sep 2015 09:56:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 0BB4819B4; Mon, 14 Sep 2015 09:56:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8E9u2Kv083769; Mon, 14 Sep 2015 09:56:02 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8E9u2bO083767; Mon, 14 Sep 2015 09:56:02 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509140956.t8E9u2bO083767@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 14 Sep 2015 09:56:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287778 - head/sys/cam/ctl X-SVN-Group: head 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.20 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: Mon, 14 Sep 2015 09:56:03 -0000 Author: mav Date: Mon Sep 14 09:56:01 2015 New Revision: 287778 URL: https://svnweb.freebsd.org/changeset/base/287778 Log: Remove CTL_PRIV_LBA_LEN from HA messages. Previously it was used for statistics, but now just a 16 extra bytes. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_io.h Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Mon Sep 14 09:31:00 2015 (r287777) +++ head/sys/cam/ctl/ctl.c Mon Sep 14 09:56:01 2015 (r287778) @@ -516,8 +516,6 @@ ctl_isc_handler_finish_xfer(struct ctl_s ctsio->residual = msg_info->scsi.residual; memcpy(&ctsio->sense_data, &msg_info->scsi.sense_data, msg_info->scsi.sense_len); - memcpy(&ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, - &msg_info->scsi.lbalen, sizeof(msg_info->scsi.lbalen)); ctl_enqueue_isc((union ctl_io *)ctsio); } @@ -12976,15 +12974,6 @@ bailout: msg.scsi.residual = io->scsiio.residual; memcpy(&msg.scsi.sense_data, &io->scsiio.sense_data, io->scsiio.sense_len); - /* - * We copy this whether or not this is an I/O-related - * command. Otherwise, we'd have to go and check to see - * whether it's a read/write command, and it really isn't - * worth it. - */ - memcpy(&msg.scsi.lbalen, - &io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, - sizeof(msg.scsi.lbalen)); ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg, sizeof(msg.scsi) - sizeof(msg.scsi.sense_data) + Modified: head/sys/cam/ctl/ctl_io.h ============================================================================== --- head/sys/cam/ctl/ctl_io.h Mon Sep 14 09:31:00 2015 (r287777) +++ head/sys/cam/ctl/ctl_io.h Mon Sep 14 09:56:01 2015 (r287778) @@ -452,7 +452,6 @@ struct ctl_ha_msg_scsi { uint32_t residual; /* data residual length */ uint32_t fetd_status; /* trans status, set by FETD, 0 = good*/ - struct ctl_lba_len lbalen; /* used for stats */ struct scsi_sense_data sense_data; /* sense data */ }; From owner-svn-src-head@freebsd.org Mon Sep 14 10:28:48 2015 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 6C28EA04486; Mon, 14 Sep 2015 10:28:48 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 519871AF0; Mon, 14 Sep 2015 10:28:48 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8EASm9n096160; Mon, 14 Sep 2015 10:28:48 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8EASmUe096159; Mon, 14 Sep 2015 10:28:48 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201509141028.t8EASmUe096159@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Mon, 14 Sep 2015 10:28:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287779 - head/sys/netinet X-SVN-Group: head 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.20 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: Mon, 14 Sep 2015 10:28:48 -0000 Author: melifaro Date: Mon Sep 14 10:28:47 2015 New Revision: 287779 URL: https://svnweb.freebsd.org/changeset/base/287779 Log: * Improve error checking for arp messages. * Clean stale headers from if_ether.c. Reported by: rozhuk.im at gmail.com Reviewed by: ae MFC after: 2 weeks Modified: head/sys/netinet/if_ether.c Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Mon Sep 14 09:56:01 2015 (r287778) +++ head/sys/netinet/if_ether.c Mon Sep 14 10:28:47 2015 (r287779) @@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -71,9 +70,6 @@ __FBSDID("$FreeBSD$"); #include #endif -#include -#include - #include #define SIN(s) ((const struct sockaddr_in *)(s)) @@ -529,6 +525,8 @@ static void arpintr(struct mbuf *m) { struct arphdr *ar; + char *layer; + int hlen; if (m->m_len < sizeof(struct arphdr) && ((m = m_pullup(m, sizeof(struct arphdr))) == NULL)) { @@ -537,26 +535,56 @@ arpintr(struct mbuf *m) } ar = mtod(m, struct arphdr *); - if (ntohs(ar->ar_hrd) != ARPHRD_ETHER && - ntohs(ar->ar_hrd) != ARPHRD_IEEE802 && - ntohs(ar->ar_hrd) != ARPHRD_ARCNET && - ntohs(ar->ar_hrd) != ARPHRD_IEEE1394 && - ntohs(ar->ar_hrd) != ARPHRD_INFINIBAND) { - log(LOG_NOTICE, "arp: unknown hardware address format (0x%2D)" - " (from %*D to %*D)\n", (unsigned char *)&ar->ar_hrd, "", - ETHER_ADDR_LEN, (u_char *)ar_sha(ar), ":", - ETHER_ADDR_LEN, (u_char *)ar_tha(ar), ":"); + /* Check if length is sufficient */ + if ((m = m_pullup(m, arphdr_len(ar))) == NULL) { + log(LOG_NOTICE, "arp: short header received\n"); + return; + } + ar = mtod(m, struct arphdr *); + + hlen = 0; + layer = ""; + switch (ntohs(ar->ar_hrd)) { + case ARPHRD_ETHER: + hlen = ETHER_ADDR_LEN; /* RFC 826 */ + layer = "ethernet"; + break; + case ARPHRD_IEEE802: + hlen = 6; /* RFC 1390, FDDI_ADDR_LEN */ + layer = "fddi"; + break; + case ARPHRD_ARCNET: + hlen = 1; /* RFC 1201, ARC_ADDR_LEN */ + layer = "arcnet"; + break; + case ARPHRD_INFINIBAND: + hlen = 20; /* RFC 4391, INFINIBAND_ALEN */ + layer = "infiniband"; + break; + case ARPHRD_IEEE1394: + hlen = 0; /* SHALL be 16 */ /* RFC 2734 */ + layer = "firewire"; + + /* + * Restrict too long harware addresses. + * Currently we are capable of handling 20-byte + * addresses ( sizeof(lle->ll_addr) ) + */ + if (ar->ar_hln >= 20) + hlen = 16; + break; + default: + log(LOG_NOTICE, "arp: unknown hardware address format (0x%2d)\n", + htons(ar->ar_hrd)); m_freem(m); return; } - if (m->m_len < arphdr_len(ar)) { - if ((m = m_pullup(m, arphdr_len(ar))) == NULL) { - log(LOG_NOTICE, "arp: runt packet\n"); - m_freem(m); - return; - } - ar = mtod(m, struct arphdr *); + if (hlen != 0 && hlen != ar->ar_hln) { + log(LOG_NOTICE, "arp: bad %s header length: %d\n", layer, + ar->ar_hln); + m_freem(m); + return; } ARPSTAT_INC(received); From owner-svn-src-head@freebsd.org Mon Sep 14 10:51:05 2015 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 9A9D1A030CB; Mon, 14 Sep 2015 10:51:05 +0000 (UTC) (envelope-from royger@gmail.com) Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) (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 402121875; Mon, 14 Sep 2015 10:51:05 +0000 (UTC) (envelope-from royger@gmail.com) Received: by wiclk2 with SMTP id lk2so135075854wic.0; Mon, 14 Sep 2015 03:51:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=07+HMYWW8b2ZLxd0S9JCO3JAa4RjFwLqC5mMnnofCFQ=; b=nQDKhPewkjXks21j51MACkz/X1t3KEpQnfwoy6av9v6Ngf0rw8WzGmYSe3RAeyEsgg j6aee64FWl318mxzGrhfHi/umUT6f2yIOb8P1oxZvCQLziRVHpxVA3ySJSxUDCNroeuM 7BRAQBBaTwDtSTa+1APZvLLg3qIVzJPtY/3W1uWI3VT1z+TLP43mAVKrFV9cTP1sC979 NvsEMvitVVRCWVwIl98U3rEELUalOUyWiIFraSTkurvsFf0n3w+nrK/gCWEf0TUKpaUj EzaBW7WAVeP9fr2LoX6CykRtJLFQYhqNUT0iv2wQ/zs1mY1JQVcHYQKaibQLvTatksn5 9EKw== X-Received: by 10.194.7.197 with SMTP id l5mr29112949wja.153.1442227863721; Mon, 14 Sep 2015 03:51:03 -0700 (PDT) Received: from [172.16.1.30] (195.Red-83-39-7.dynamicIP.rima-tde.net. [83.39.7.195]) by smtp.gmail.com with ESMTPSA id ub7sm13671467wib.17.2015.09.14.03.51.02 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Sep 2015 03:51:03 -0700 (PDT) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Subject: Re: svn commit: r271946 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront kern net netinet ofed/drivers/net/mlx4 sys To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201409220827.s8M8RRHB031526@svn.freebsd.org> <55F69093.5050807@FreeBSD.org> <55F6935C.9000000@selasky.org> From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= X-Enigmail-Draft-Status: N1110 Message-ID: <55F6A694.7020404@FreeBSD.org> Date: Mon, 14 Sep 2015 12:51:00 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <55F6935C.9000000@selasky.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Mon, 14 Sep 2015 10:51:05 -0000 El 14/09/15 a les 11.29, Hans Petter Selasky ha escrit: > On 09/14/15 11:17, Roger Pau Monné wrote: >> El 22/09/14 a les 10.27, Hans Petter Selasky ha escrit: >>> Author: hselasky >>> Date: Mon Sep 22 08:27:27 2014 >>> New Revision: 271946 >>> URL: http://svnweb.freebsd.org/changeset/base/271946 >>> >>> Log: >>> Improve transmit sending offload, TSO, algorithm in general. >>> >>> The current TSO limitation feature only takes the total number of >>> bytes in an mbuf chain into account and does not limit by the number >>> of mbufs in a chain. Some kinds of hardware is limited by two >>> factors. One is the fragment length and the second is the fragment >>> count. Both of these limits need to be taken into account when doing >>> TSO. Else some kinds of hardware might have to drop completely valid >>> mbuf chains because they cannot loaded into the given hardware's DMA >>> engine. The new way of doing TSO limitation has been made backwards >>> compatible as input from other FreeBSD developers and will use >>> defaults for values not set. >>> >>> Reviewed by: adrian, rmacklem >>> Sponsored by: Mellanox Technologies >> >> This commit makes xen-netfront tx performance drop from ~5Gbits/sec >> (with debug options enabled) to 446 Mbits/sec. I'm currently looking, >> but if anyone has ideas they are welcome. >> > > Hi Roger, > > Looking at the netfront code you should subtract 1 from tsomaxsegcount > prior to r287775. The reason might simply be that 2K clusters are used > instead of 4K clusters, causing m_defrag() to be called. > >> ifp->if_hw_tsomax = 65536 - (ETHER_HDR_LEN + >> ETHER_VLAN_ENCAP_LEN); >> ifp->if_hw_tsomaxsegcount = MAX_TX_REQ_FRAGS; >> ifp->if_hw_tsomaxsegsize = PAGE_SIZE; > > After r287775 can you try these settings: > > ifp->if_hw_tsomax = 65536; > ifp->if_hw_tsomaxsegcount = MAX_TX_REQ_FRAGS; > ifp->if_hw_tsomaxsegsize = PAGE_SIZE; > > And see if the performance is the same like before? Yes, performance seems to be fine after setting if_hw_tsomax to 65536. Is there some documentation about the usage of if_hw_tsomax? Does the network subsystem already takes care of subtracting the space for ether header and the vlan encapsulation, so it's no longer needed to specify them in if_hw_tsomax? Also, this commit was MFC'ed to stable/10 and 10.2 suffers from the same problem. Can we issue and EN to get this fixed in 10.2? Roger. From owner-svn-src-head@freebsd.org Mon Sep 14 10:52:28 2015 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 785EEA032DD; Mon, 14 Sep 2015 10:52:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 5AEFF1AA1; Mon, 14 Sep 2015 10:52:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8EAqSSo008298; Mon, 14 Sep 2015 10:52:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8EAqRWf008293; Mon, 14 Sep 2015 10:52:27 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201509141052.t8EAqRWf008293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 14 Sep 2015 10:52:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287780 - in head: share/man/man9 sys/kern sys/sys X-SVN-Group: head 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.20 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: Mon, 14 Sep 2015 10:52:28 -0000 Author: hselasky Date: Mon Sep 14 10:52:26 2015 New Revision: 287780 URL: https://svnweb.freebsd.org/changeset/base/287780 Log: Implement callout_drain_async(), inspired by the projects/hps_head branch. This function is used to drain a callout via a callback instead of blocking the caller until the drain is complete. Refer to the callout_drain_async() manual page for a detailed description. Limitation: If a lock is used with the callout, the callout can only be drained asynchronously one time unless the callout_init_mtx() function is called again. This limitation is not present in projects/hps_head and will require more invasive changes to the timeout code, which was not in the scope of this patch. Differential Revision: https://reviews.freebsd.org/D3521 Reviewed by: wblock MFC after: 1 month Modified: head/share/man/man9/Makefile head/share/man/man9/timeout.9 head/sys/kern/kern_timeout.c head/sys/sys/_callout.h head/sys/sys/callout.h Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Mon Sep 14 10:28:47 2015 (r287779) +++ head/share/man/man9/Makefile Mon Sep 14 10:52:26 2015 (r287780) @@ -1641,6 +1641,7 @@ MLINKS+=timeout.9 callout.9 \ timeout.9 callout_active.9 \ timeout.9 callout_deactivate.9 \ timeout.9 callout_drain.9 \ + timeout.9 callout_drain_async.9 \ timeout.9 callout_handle_init.9 \ timeout.9 callout_init.9 \ timeout.9 callout_init_mtx.9 \ Modified: head/share/man/man9/timeout.9 ============================================================================== --- head/share/man/man9/timeout.9 Mon Sep 14 10:28:47 2015 (r287779) +++ head/share/man/man9/timeout.9 Mon Sep 14 10:52:26 2015 (r287780) @@ -36,6 +36,7 @@ .Nm callout_active , .Nm callout_deactivate , .Nm callout_drain , +.Nm callout_drain_async , .Nm callout_handle_init , .Nm callout_init , .Nm callout_init_mtx , @@ -70,6 +71,8 @@ typedef void timeout_t (void *); .Fn callout_deactivate "struct callout *c" .Ft int .Fn callout_drain "struct callout *c" +.Ft int +.Fn callout_drain_async "struct callout *c" "callout_func_t *fn" "void *arg" .Ft void .Fn callout_handle_init "struct callout_handle *handle" .Bd -literal @@ -264,6 +267,24 @@ fully stopped before .Fn callout_drain returns. .Pp +The function +.Fn callout_drain_async +is non-blocking and works the same as the +.Fn callout_stop +function. +When this function returns non-zero, do not call it again until the callback function given by +.Fa fn +has been called with argument +.Fa arg . +Only one of +.Fn callout_drain +or +.Fn callout_drain_async +should be called at a time to drain a callout. +If this function returns zero, it is safe to free the callout structure pointed to by the +.Fa c +argument immediately. +.Pp The .Fn callout_reset and Modified: head/sys/kern/kern_timeout.c ============================================================================== --- head/sys/kern/kern_timeout.c Mon Sep 14 10:28:47 2015 (r287779) +++ head/sys/kern/kern_timeout.c Mon Sep 14 10:52:26 2015 (r287780) @@ -1145,6 +1145,45 @@ callout_schedule(struct callout *c, int } int +callout_drain_async(struct callout *c, callout_func_t *func, void *arg) +{ + struct callout_cpu *cc; + struct lock_class *class; + int retval; + int direct; + + /* stop callout */ + callout_stop(c); + + /* check if callback is being called */ + cc = callout_lock(c); + if (c->c_iflags & CALLOUT_DIRECT) { + direct = 1; + } else { + direct = 0; + } + retval = (cc_exec_curr(cc, direct) == c); + + /* drop locks, if any */ + if (retval && c->c_lock != NULL && + c->c_lock != &Giant.lock_object) { + /* ensure we are properly locked */ + class = LOCK_CLASS(c->c_lock); + class->lc_assert(c->c_lock, LA_XLOCKED); + /* the final callback should not be called locked */ + c->c_lock = NULL; + c->c_iflags |= CALLOUT_RETURNUNLOCKED; + } + CC_UNLOCK(cc); + + /* check if we should queue final callback */ + if (retval) + callout_reset(c, 1, func, arg); + + return (retval); +} + +int _callout_stop_safe(struct callout *c, int safe) { struct callout_cpu *cc, *old_cc; Modified: head/sys/sys/_callout.h ============================================================================== --- head/sys/sys/_callout.h Mon Sep 14 10:28:47 2015 (r287779) +++ head/sys/sys/_callout.h Mon Sep 14 10:52:26 2015 (r287780) @@ -46,6 +46,8 @@ LIST_HEAD(callout_list, callout); SLIST_HEAD(callout_slist, callout); TAILQ_HEAD(callout_tailq, callout); +typedef void callout_func_t(void *); + struct callout { union { LIST_ENTRY(callout) le; Modified: head/sys/sys/callout.h ============================================================================== --- head/sys/sys/callout.h Mon Sep 14 10:28:47 2015 (r287779) +++ head/sys/sys/callout.h Mon Sep 14 10:52:26 2015 (r287780) @@ -82,6 +82,7 @@ struct callout_handle { #define callout_active(c) ((c)->c_flags & CALLOUT_ACTIVE) #define callout_deactivate(c) ((c)->c_flags &= ~CALLOUT_ACTIVE) #define callout_drain(c) _callout_stop_safe(c, 1) +int callout_drain_async(struct callout *, callout_func_t *, void *); void callout_init(struct callout *, int); void _callout_init_lock(struct callout *, struct lock_object *, int); #define callout_init_mtx(c, mtx, flags) \ From owner-svn-src-head@freebsd.org Mon Sep 14 11:00:08 2015 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 5BC8EA03672; Mon, 14 Sep 2015 11:00:08 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (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 E252D1D90; Mon, 14 Sep 2015 11:00:07 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 808F81FE023; Mon, 14 Sep 2015 13:00:05 +0200 (CEST) Subject: Re: svn commit: r271946 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront kern net netinet ofed/drivers/net/mlx4 sys To: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201409220827.s8M8RRHB031526@svn.freebsd.org> <55F69093.5050807@FreeBSD.org> <55F6935C.9000000@selasky.org> <55F6A694.7020404@FreeBSD.org> From: Hans Petter Selasky Message-ID: <55F6A914.6050109@selasky.org> Date: Mon, 14 Sep 2015 13:01:40 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <55F6A694.7020404@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Mon, 14 Sep 2015 11:00:08 -0000 On 09/14/15 12:51, Roger Pau Monné wrote: > El 14/09/15 a les 11.29, Hans Petter Selasky ha escrit: >> On 09/14/15 11:17, Roger Pau Monné wrote: >>> El 22/09/14 a les 10.27, Hans Petter Selasky ha escrit: >>>> Author: hselasky >>>> Date: Mon Sep 22 08:27:27 2014 >>>> New Revision: 271946 >>>> URL: http://svnweb.freebsd.org/changeset/base/271946 >>>> >>>> Log: >>>> Improve transmit sending offload, TSO, algorithm in general. >>>> >>>> The current TSO limitation feature only takes the total number of >>>> bytes in an mbuf chain into account and does not limit by the number >>>> of mbufs in a chain. Some kinds of hardware is limited by two >>>> factors. One is the fragment length and the second is the fragment >>>> count. Both of these limits need to be taken into account when doing >>>> TSO. Else some kinds of hardware might have to drop completely valid >>>> mbuf chains because they cannot loaded into the given hardware's DMA >>>> engine. The new way of doing TSO limitation has been made backwards >>>> compatible as input from other FreeBSD developers and will use >>>> defaults for values not set. >>>> >>>> Reviewed by: adrian, rmacklem >>>> Sponsored by: Mellanox Technologies >>> >>> This commit makes xen-netfront tx performance drop from ~5Gbits/sec >>> (with debug options enabled) to 446 Mbits/sec. I'm currently looking, >>> but if anyone has ideas they are welcome. >>> >> >> Hi Roger, >> >> Looking at the netfront code you should subtract 1 from tsomaxsegcount >> prior to r287775. The reason might simply be that 2K clusters are used >> instead of 4K clusters, causing m_defrag() to be called. >> >>> ifp->if_hw_tsomax = 65536 - (ETHER_HDR_LEN + >>> ETHER_VLAN_ENCAP_LEN); >>> ifp->if_hw_tsomaxsegcount = MAX_TX_REQ_FRAGS; >>> ifp->if_hw_tsomaxsegsize = PAGE_SIZE; >> >> After r287775 can you try these settings: >> >> ifp->if_hw_tsomax = 65536; >> ifp->if_hw_tsomaxsegcount = MAX_TX_REQ_FRAGS; >> ifp->if_hw_tsomaxsegsize = PAGE_SIZE; >> >> And see if the performance is the same like before? > Hi Roger, > Yes, performance seems to be fine after setting if_hw_tsomax to 65536. > Is there some documentation about the usage of if_hw_tsomax? Does the > network subsystem already takes care of subtracting the space for ether > header and the vlan encapsulation, so it's no longer needed to specify > them in if_hw_tsomax? In the past only the TCP and IP layers were accounted for by the TSO parameters. A the present all layers are accounted for. This might fit the kind of adapter you are using better, because it appears to me it is DMA'ing all of the mbuf chain. Some other network adapters only DMA the TCP payload data and copy the ETH/TCP/IP headers into a special DMA'able memory area. > > Also, this commit was MFC'ed to stable/10 and 10.2 suffers from the same > problem. Can we issue and EN to get this fixed in 10.2? When this patch has been given some time to settle, and more people have tested it, I can submit a request for re @ to do that. Please remind me if I forget. --HPS From owner-svn-src-head@freebsd.org Mon Sep 14 12:25:46 2015 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 B8A1E9CAB36; Mon, 14 Sep 2015 12:25:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 A9E8E1EF2; Mon, 14 Sep 2015 12:25:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8ECPkjQ055349; Mon, 14 Sep 2015 12:25:46 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8ECPkHw055348; Mon, 14 Sep 2015 12:25:46 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201509141225.t8ECPkHw055348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 14 Sep 2015 12:25:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287781 - head/tools/tools/usbtest X-SVN-Group: head 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.20 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: Mon, 14 Sep 2015 12:25:46 -0000 Author: hselasky Date: Mon Sep 14 12:25:45 2015 New Revision: 287781 URL: https://svnweb.freebsd.org/changeset/base/287781 Log: Add missing BINDIR variable. Modified: head/tools/tools/usbtest/Makefile Modified: head/tools/tools/usbtest/Makefile ============================================================================== --- head/tools/tools/usbtest/Makefile Mon Sep 14 10:52:26 2015 (r287780) +++ head/tools/tools/usbtest/Makefile Mon Sep 14 12:25:45 2015 (r287781) @@ -26,6 +26,7 @@ # PROG= usbtest MAN= +BINDIR?= /usr/sbin SRCS+= usbtest.c SRCS+= usb_msc_test.c SRCS+= usb_modem_test.c From owner-svn-src-head@freebsd.org Mon Sep 14 15:15:33 2015 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 D1C99A0366D; Mon, 14 Sep 2015 15:15:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 C2BC91359; Mon, 14 Sep 2015 15:15:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8EFFX86025124; Mon, 14 Sep 2015 15:15:33 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8EFFXK9025123; Mon, 14 Sep 2015 15:15:33 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509141515.t8EFFXK9025123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 14 Sep 2015 15:15:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287783 - head/sys/cam/ctl X-SVN-Group: head 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.20 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: Mon, 14 Sep 2015 15:15:33 -0000 Author: mav Date: Mon Sep 14 15:15:32 2015 New Revision: 287783 URL: https://svnweb.freebsd.org/changeset/base/287783 Log: Implement data/status aggregation for camsim backend. This is almost pointless for primary HA node, but useful for secondary, where between fe_datamove and fe_done calls goes another link roundtrip. Modified: head/sys/cam/ctl/ctl_frontend_cam_sim.c Modified: head/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_cam_sim.c Mon Sep 14 14:42:06 2015 (r287782) +++ head/sys/cam/ctl/ctl_frontend_cam_sim.c Mon Sep 14 15:15:32 2015 (r287783) @@ -435,6 +435,13 @@ cfcs_datamove(union ctl_io *io) io->scsiio.ext_data_filled += len_copied; + if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) { + io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = NULL; + io->io_hdr.flags |= CTL_FLAG_STATUS_SENT; + ccb->ccb_h.status = CAM_REQ_CMP; + xpt_done(ccb); + } + io->scsiio.be_move_done(io); } From owner-svn-src-head@freebsd.org Mon Sep 14 15:21:24 2015 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 3B05AA038B5; Mon, 14 Sep 2015 15:21:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 13B4B1966; Mon, 14 Sep 2015 15:21:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8EFLNEI027098; Mon, 14 Sep 2015 15:21:23 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8EFLNme027097; Mon, 14 Sep 2015 15:21:23 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509141521.t8EFLNme027097@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 14 Sep 2015 15:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287784 - head/sys/cam/ctl X-SVN-Group: head 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.20 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: Mon, 14 Sep 2015 15:21:24 -0000 Author: mav Date: Mon Sep 14 15:21:23 2015 New Revision: 287784 URL: https://svnweb.freebsd.org/changeset/base/287784 Log: Implement data/status aggregation for secondary HA node. For short read requests this reduces latency by 30%, reporting command completion after two interlink roundtrips instead of full three. Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Mon Sep 14 15:15:32 2015 (r287783) +++ head/sys/cam/ctl/ctl.c Mon Sep 14 15:21:23 2015 (r287784) @@ -978,6 +978,8 @@ ctl_isc_event_handler(ctl_ha_channel cha * when the datamove is complete. */ io->io_hdr.serializing_sc = msg->hdr.serializing_sc; + if (msg->hdr.status == CTL_SUCCESS) + io->io_hdr.status = msg->hdr.status; if (msg->dt.sg_sequence == 0) { i = msg->dt.kern_sg_entries + @@ -1060,6 +1062,8 @@ ctl_isc_event_handler(ctl_ha_channel cha memcpy(&io->scsiio.sense_data, &msg->scsi.sense_data, msg->scsi.sense_len); + if (msg->hdr.status == CTL_SUCCESS) + io->io_hdr.flags |= CTL_FLAG_STATUS_SENT; } ctl_enqueue_isc(io); break; @@ -12207,6 +12211,7 @@ ctl_datamove(union ctl_io *io) msg.hdr.original_sc = io->io_hdr.original_sc; msg.hdr.serializing_sc = io; msg.hdr.nexus = io->io_hdr.nexus; + msg.hdr.status = io->io_hdr.status; msg.dt.flags = io->io_hdr.flags; /* * We convert everything into a S/G list here. We can't @@ -12590,10 +12595,12 @@ ctl_datamove_remote_xfer(union ctl_io *i * failure. */ if ((rq == NULL) - && ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE)) + && ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE && + (io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)) ctl_set_busy(&io->scsiio); - if ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE) { + if ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE && + (io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS) { if (rq != NULL) ctl_dt_req_free(rq); From owner-svn-src-head@freebsd.org Mon Sep 14 15:37:20 2015 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 526A7A0416D; Mon, 14 Sep 2015 15:37:20 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 4326212A9; Mon, 14 Sep 2015 15:37:20 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8EFbK1I033509; Mon, 14 Sep 2015 15:37:20 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8EFbKM2033508; Mon, 14 Sep 2015 15:37:20 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201509141537.t8EFbKM2033508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 14 Sep 2015 15:37:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287785 - head/usr.bin/rctl X-SVN-Group: head 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.20 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: Mon, 14 Sep 2015 15:37:20 -0000 Author: trasz Date: Mon Sep 14 15:37:19 2015 New Revision: 287785 URL: https://svnweb.freebsd.org/changeset/base/287785 Log: Make it clear that 'swapuse' is swap reservation and not actual swap usage. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/rctl/rctl.8 Modified: head/usr.bin/rctl/rctl.8 ============================================================================== --- head/usr.bin/rctl/rctl.8 Mon Sep 14 15:21:23 2015 (r287784) +++ head/usr.bin/rctl/rctl.8 Mon Sep 14 15:37:19 2015 (r287785) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 11, 2014 +.Dd September 14, 2015 .Dt RCTL 8 .Os .Sh NAME @@ -193,7 +193,7 @@ resource would be .It Sy openfiles Ta "file descriptor table size" .It Sy vmemoryuse Ta "address space limit, in bytes" .It Sy pseudoterminals Ta "number of PTYs" -.It Sy swapuse Ta "swap usage, in bytes" +.It Sy swapuse Ta "swap space that may be reserved or used, in bytes" .It Sy nthr Ta "number of threads" .It Sy msgqqueued Ta "number of queued SysV messages" .It Sy msgqsize Ta "SysV message queue size, in bytes" From owner-svn-src-head@freebsd.org Mon Sep 14 15:53:56 2015 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 7DF65A04AA7; Mon, 14 Sep 2015 15:53:56 +0000 (UTC) (envelope-from royger@gmail.com) Received: from mail-wi0-x22f.google.com (mail-wi0-x22f.google.com [IPv6:2a00:1450:400c:c05::22f]) (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 0EB3E120C; Mon, 14 Sep 2015 15:53:56 +0000 (UTC) (envelope-from royger@gmail.com) Received: by wicfx3 with SMTP id fx3so146459983wic.1; Mon, 14 Sep 2015 08:53:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=kb41wCOunkJq1jcwo92d/Ti7g889K91mTBe4udgGpBA=; b=MUcFHwZoJ2MkWQZ1RdHgOWROVvuaCmLmAJaBSimqVpu4sFQUAgpCxlhCZOYnwfDpbe JwZKJozJn0TvfVTIzmWiLNpph1HS4UUl6ETmKEX7Nnwiw1YeAxVooyuVrOmUGdYvCVSk eJZHOH+U1Klwm6wMayzkBPhfnfevOhqIFO+EXIj7j4z1shYM1Ag1VtIjRnnuP4i11MGa LgoIg7U5CfEnIGp9IHXTvOByEYArTb7AOcctlUX9WMb1hsTRNZ/GXfj3UsTSLbp7pvwh zJGpKlr7Cc90gBT3Bfq1WOxnegQ2/hetsAARpLAD3xc8RCuZBEIqpDj3QIywOwEngUrb yJZw== X-Received: by 10.180.87.198 with SMTP id ba6mr28119366wib.39.1442246034558; Mon, 14 Sep 2015 08:53:54 -0700 (PDT) Received: from [172.16.1.30] (195.Red-83-39-7.dynamicIP.rima-tde.net. [83.39.7.195]) by smtp.gmail.com with ESMTPSA id ry1sm16218913wjb.24.2015.09.14.08.53.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Sep 2015 08:53:53 -0700 (PDT) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Subject: Re: svn commit: r271946 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront kern net netinet ofed/drivers/net/mlx4 sys To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201409220827.s8M8RRHB031526@svn.freebsd.org> <55F69093.5050807@FreeBSD.org> <55F6935C.9000000@selasky.org> <55F6A694.7020404@FreeBSD.org> <55F6A914.6050109@selasky.org> From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= X-Enigmail-Draft-Status: N1110 Message-ID: <55F6ED8F.5030402@FreeBSD.org> Date: Mon, 14 Sep 2015 17:53:51 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <55F6A914.6050109@selasky.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Mon, 14 Sep 2015 15:53:56 -0000 El 14/09/15 a les 13.01, Hans Petter Selasky ha escrit: > On 09/14/15 12:51, Roger Pau Monné wrote: >> El 14/09/15 a les 11.29, Hans Petter Selasky ha escrit: >>> On 09/14/15 11:17, Roger Pau Monné wrote: >>>> El 22/09/14 a les 10.27, Hans Petter Selasky ha escrit: >>>>> Author: hselasky >>>>> Date: Mon Sep 22 08:27:27 2014 >>>>> New Revision: 271946 >>>>> URL: http://svnweb.freebsd.org/changeset/base/271946 >>>>> >>>>> Log: >>>>> Improve transmit sending offload, TSO, algorithm in general. >>>>> >>>>> The current TSO limitation feature only takes the total number of >>>>> bytes in an mbuf chain into account and does not limit by the >>>>> number >>>>> of mbufs in a chain. Some kinds of hardware is limited by two >>>>> factors. One is the fragment length and the second is the fragment >>>>> count. Both of these limits need to be taken into account when >>>>> doing >>>>> TSO. Else some kinds of hardware might have to drop completely >>>>> valid >>>>> mbuf chains because they cannot loaded into the given >>>>> hardware's DMA >>>>> engine. The new way of doing TSO limitation has been made >>>>> backwards >>>>> compatible as input from other FreeBSD developers and will use >>>>> defaults for values not set. >>>>> >>>>> Reviewed by: adrian, rmacklem >>>>> Sponsored by: Mellanox Technologies >>>> >>>> This commit makes xen-netfront tx performance drop from ~5Gbits/sec >>>> (with debug options enabled) to 446 Mbits/sec. I'm currently looking, >>>> but if anyone has ideas they are welcome. >>>> >>> >>> Hi Roger, >>> >>> Looking at the netfront code you should subtract 1 from tsomaxsegcount >>> prior to r287775. The reason might simply be that 2K clusters are used >>> instead of 4K clusters, causing m_defrag() to be called. >>> >>>> ifp->if_hw_tsomax = 65536 - (ETHER_HDR_LEN + >>>> ETHER_VLAN_ENCAP_LEN); >>>> ifp->if_hw_tsomaxsegcount = MAX_TX_REQ_FRAGS; >>>> ifp->if_hw_tsomaxsegsize = PAGE_SIZE; >>> >>> After r287775 can you try these settings: >>> >>> ifp->if_hw_tsomax = 65536; >>> ifp->if_hw_tsomaxsegcount = MAX_TX_REQ_FRAGS; >>> ifp->if_hw_tsomaxsegsize = PAGE_SIZE; >>> >>> And see if the performance is the same like before? >> > > Hi Roger, > >> Yes, performance seems to be fine after setting if_hw_tsomax to 65536. >> Is there some documentation about the usage of if_hw_tsomax? Does the >> network subsystem already takes care of subtracting the space for ether >> header and the vlan encapsulation, so it's no longer needed to specify >> them in if_hw_tsomax? > > In the past only the TCP and IP layers were accounted for by the TSO > parameters. A the present all layers are accounted for. This might fit > the kind of adapter you are using better, because it appears to me it is > DMA'ing all of the mbuf chain. Some other network adapters only DMA the > TCP payload data and copy the ETH/TCP/IP headers into a special DMA'able > memory area. Thanks for the hint, I'm not sure where that DMA tag is coming from, xen-netfront doesn't define any DMA tag at all, and AFAICT none of it's parents do: nexus0 [...] xenpv0 granttable0 xen_et0 xenstore0 xenballoon0 xctrl0 xs_dev0 xenbusb_front0 xbd0 xn0 So I don't see where this bouncing requirement is coming from, although I'm sure I'm missing something... >> >> Also, this commit was MFC'ed to stable/10 and 10.2 suffers from the same >> problem. Can we issue and EN to get this fixed in 10.2? > > When this patch has been given some time to settle, and more people have > tested it, I can submit a request for re @ to do that. Please remind me > if I forget. No problem, will do so if needed :). Roger. From owner-svn-src-head@freebsd.org Mon Sep 14 16:48:23 2015 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 31095A0485B; Mon, 14 Sep 2015 16:48:23 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 185E51F9E; Mon, 14 Sep 2015 16:48:23 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8EGmNRY062503; Mon, 14 Sep 2015 16:48:23 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8EGmK0G062494; Mon, 14 Sep 2015 16:48:20 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201509141648.t8EGmK0G062494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Mon, 14 Sep 2015 16:48:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287789 - in head/sys: net netinet netinet6 X-SVN-Group: head 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.20 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: Mon, 14 Sep 2015 16:48:23 -0000 Author: melifaro Date: Mon Sep 14 16:48:19 2015 New Revision: 287789 URL: https://svnweb.freebsd.org/changeset/base/287789 Log: * Do more fine-grained locking: call eventhandlers/free_entry without holding afdata wlock * convert per-af delete_address callback to global lltable_delete_entry() and more low-level "delete this lle" per-af callback * fix some bugs/inconsistencies in IPv4/IPv6 ifscrub procedures Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D3573 Modified: head/sys/net/if_llatbl.c head/sys/net/if_llatbl.h head/sys/netinet/if_ether.c head/sys/netinet/if_ether.h head/sys/netinet/in.c head/sys/netinet/ip_carp.c head/sys/netinet6/in6.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6.h Modified: head/sys/net/if_llatbl.c ============================================================================== --- head/sys/net/if_llatbl.c Mon Sep 14 15:47:25 2015 (r287788) +++ head/sys/net/if_llatbl.c Mon Sep 14 16:48:19 2015 (r287789) @@ -186,7 +186,7 @@ htable_unlink_entry(struct llentry *lle) } struct prefix_match_data { - const struct sockaddr *prefix; + const struct sockaddr *addr; const struct sockaddr *mask; struct llentries dchain; u_int flags; @@ -199,7 +199,7 @@ htable_prefix_free_cb(struct lltable *ll pmd = (struct prefix_match_data *)farg; - if (llt->llt_match_prefix(pmd->prefix, pmd->mask, pmd->flags, lle)) { + if (llt->llt_match_prefix(pmd->addr, pmd->mask, pmd->flags, lle)) { LLE_WLOCK(lle); LIST_INSERT_HEAD(&pmd->dchain, lle, lle_chain); } @@ -208,14 +208,14 @@ htable_prefix_free_cb(struct lltable *ll } static void -htable_prefix_free(struct lltable *llt, const struct sockaddr *prefix, +htable_prefix_free(struct lltable *llt, const struct sockaddr *addr, const struct sockaddr *mask, u_int flags) { struct llentry *lle, *next; struct prefix_match_data pmd; bzero(&pmd, sizeof(pmd)); - pmd.prefix = prefix; + pmd.addr = addr; pmd.mask = mask; pmd.flags = flags; LIST_INIT(&pmd.dchain); @@ -427,8 +427,42 @@ lltable_drain(int af) } #endif +/* + * Deletes an address from given lltable. + * Used for userland interaction to remove + * individual entries. Skips entries added by OS. + */ +int +lltable_delete_addr(struct lltable *llt, u_int flags, + const struct sockaddr *l3addr) +{ + struct llentry *lle; + struct ifnet *ifp; + + ifp = llt->llt_ifp; + IF_AFDATA_WLOCK(ifp); + lle = lla_lookup(llt, LLE_EXCLUSIVE, l3addr); + + if (lle == NULL) { + IF_AFDATA_WUNLOCK(ifp); + return (ENOENT); + } + if ((lle->la_flags & LLE_IFADDR) != 0 && (flags & LLE_IFADDR) == 0) { + IF_AFDATA_WUNLOCK(ifp); + LLE_WUNLOCK(lle); + return (EPERM); + } + + lltable_unlink_entry(llt, lle); + IF_AFDATA_WUNLOCK(ifp); + + llt->llt_delete_entry(llt, lle); + + return (0); +} + void -lltable_prefix_free(int af, struct sockaddr *prefix, struct sockaddr *mask, +lltable_prefix_free(int af, struct sockaddr *addr, struct sockaddr *mask, u_int flags) { struct lltable *llt; @@ -438,7 +472,7 @@ lltable_prefix_free(int af, struct socka if (llt->llt_af != af) continue; - llt->llt_prefix_free(llt, prefix, mask, flags); + llt->llt_prefix_free(llt, addr, mask, flags); } LLTABLE_RUNLOCK(); } @@ -651,10 +685,7 @@ lla_rt_output(struct rt_msghdr *rtm, str break; case RTM_DELETE: - IF_AFDATA_WLOCK(ifp); - error = lla_delete(llt, 0, dst); - IF_AFDATA_WUNLOCK(ifp); - return (error == 0 ? 0 : ENOENT); + return (lltable_delete_addr(llt, 0, dst)); default: error = EINVAL; Modified: head/sys/net/if_llatbl.h ============================================================================== --- head/sys/net/if_llatbl.h Mon Sep 14 15:47:25 2015 (r287788) +++ head/sys/net/if_llatbl.h Mon Sep 14 16:48:19 2015 (r287789) @@ -135,10 +135,9 @@ typedef struct llentry *(llt_lookup_t)(s const struct sockaddr *l3addr); typedef struct llentry *(llt_alloc_t)(struct lltable *, u_int flags, const struct sockaddr *l3addr); -typedef int (llt_delete_t)(struct lltable *, u_int flags, - const struct sockaddr *l3addr); +typedef void (llt_delete_t)(struct lltable *, struct llentry *); typedef void (llt_prefix_free_t)(struct lltable *, - const struct sockaddr *prefix, const struct sockaddr *mask, u_int flags); + const struct sockaddr *addr, const struct sockaddr *mask, u_int flags); typedef int (llt_dump_entry_t)(struct lltable *, struct llentry *, struct sysctl_req *); typedef uint32_t (llt_hash_t)(const struct llentry *, uint32_t); @@ -162,7 +161,7 @@ struct lltable { llt_lookup_t *llt_lookup; llt_alloc_t *llt_alloc_entry; - llt_delete_t *llt_delete; + llt_delete_t *llt_delete_entry; llt_prefix_free_t *llt_prefix_free; llt_dump_entry_t *llt_dump_entry; llt_hash_t *llt_hash; @@ -212,6 +211,8 @@ size_t lltable_drop_entry_queue(struct l struct llentry *lltable_alloc_entry(struct lltable *llt, u_int flags, const struct sockaddr *l4addr); void lltable_free_entry(struct lltable *llt, struct llentry *lle); +int lltable_delete_addr(struct lltable *llt, u_int flags, + const struct sockaddr *l3addr); void lltable_link_entry(struct lltable *llt, struct llentry *lle); void lltable_unlink_entry(struct lltable *llt, struct llentry *lle); void lltable_fill_sa_entry(const struct llentry *lle, struct sockaddr *sa); @@ -230,14 +231,6 @@ lla_lookup(struct lltable *llt, u_int fl return (llt->llt_lookup(llt, flags, l3addr)); } -static __inline int -lla_delete(struct lltable *llt, u_int flags, const struct sockaddr *l3addr) -{ - - return (llt->llt_delete(llt, flags, l3addr)); -} - - int lla_rt_output(struct rt_msghdr *, struct rt_addrinfo *); #include Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Mon Sep 14 15:47:25 2015 (r287788) +++ head/sys/netinet/if_ether.c Mon Sep 14 16:48:19 2015 (r287789) @@ -140,26 +140,6 @@ static const struct netisr_handler arp_n .nh_policy = NETISR_POLICY_SOURCE, }; -#ifdef AF_INET -/* - * called by in_scrubprefix() to remove entry from the table when - * the interface goes away - */ -void -arp_ifscrub(struct ifnet *ifp, uint32_t addr) -{ - struct sockaddr_in addr4; - - bzero((void *)&addr4, sizeof(addr4)); - addr4.sin_len = sizeof(addr4); - addr4.sin_family = AF_INET; - addr4.sin_addr.s_addr = addr; - IF_AFDATA_WLOCK(ifp); - lla_delete(LLTABLE(ifp), LLE_IFADDR, (struct sockaddr *)&addr4); - IF_AFDATA_WUNLOCK(ifp); -} -#endif - /* * Timeout routine. Age arp_tab entries periodically. */ Modified: head/sys/netinet/if_ether.h ============================================================================== --- head/sys/netinet/if_ether.h Mon Sep 14 15:47:25 2015 (r287788) +++ head/sys/netinet/if_ether.h Mon Sep 14 16:48:19 2015 (r287789) @@ -120,7 +120,6 @@ void arprequest(struct ifnet *, const st const struct in_addr *, u_char *); void arp_ifinit(struct ifnet *, struct ifaddr *); void arp_ifinit2(struct ifnet *, struct ifaddr *, u_char *); -void arp_ifscrub(struct ifnet *, uint32_t); #endif #endif Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Mon Sep 14 15:47:25 2015 (r287788) +++ head/sys/netinet/in.c Mon Sep 14 16:48:19 2015 (r287789) @@ -724,6 +724,38 @@ in_addprefix(struct in_ifaddr *target, i } /* + * Removes either all lle entries for given @ia, or lle + * corresponding to @ia address. + */ +static void +in_scrubprefixlle(struct in_ifaddr *ia, int all, u_int flags) +{ + struct sockaddr_in addr, mask; + struct sockaddr *saddr, *smask; + struct ifnet *ifp; + + /* + * remove all L2 entries on the given prefix + */ + saddr = (struct sockaddr *)&addr; + bzero(&addr, sizeof(addr)); + addr.sin_len = sizeof(addr); + addr.sin_family = AF_INET; + addr.sin_addr.s_addr = ntohl(ia->ia_addr.sin_addr.s_addr); + smask = (struct sockaddr *)&mask; + bzero(&mask, sizeof(mask)); + mask.sin_len = sizeof(mask); + mask.sin_family = AF_INET; + mask.sin_addr.s_addr = ia->ia_subnetmask; + ifp = ia->ia_ifp; + + if (all) + lltable_prefix_free(AF_INET, saddr, smask, flags); + else + lltable_delete_addr(LLTABLE(ifp), LLE_IFADDR, saddr); +} + +/* * If there is no other address in the system that can serve a route to the * same prefix, remove the route. Hand over the route to the new address * otherwise. @@ -735,7 +767,6 @@ in_scrubprefix(struct in_ifaddr *target, struct in_ifaddr *ia; struct in_addr prefix, mask, p, m; int error = 0; - struct sockaddr_in prefix0, mask0; /* * Remove the loopback route to the interface address. @@ -757,11 +788,6 @@ in_scrubprefix(struct in_ifaddr *target, error = ifa_del_loopback_route((struct ifaddr *)target, (struct sockaddr *)&target->ia_addr); } - - if (!(target->ia_ifp->if_flags & IFF_NOARP)) - /* remove arp cache */ - arp_ifscrub(target->ia_ifp, - IA_SIN(target)->sin_addr.s_addr); } if (rtinitflags(target)) { @@ -817,6 +843,9 @@ in_scrubprefix(struct in_ifaddr *target, else log(LOG_INFO, "in_scrubprefix: err=%d, old prefix delete failed\n", error); + /* Scrub all entries IFF interface is different */ + in_scrubprefixlle(target, target->ia_ifp != ia->ia_ifp, + flags); error = rtinit(&ia->ia_ifa, (int)RTM_ADD, rtinitflags(ia) | RTF_UP); if (error == 0) @@ -833,16 +862,7 @@ in_scrubprefix(struct in_ifaddr *target, /* * remove all L2 entries on the given prefix */ - bzero(&prefix0, sizeof(prefix0)); - prefix0.sin_len = sizeof(prefix0); - prefix0.sin_family = AF_INET; - prefix0.sin_addr.s_addr = target->ia_subnet; - bzero(&mask0, sizeof(mask0)); - mask0.sin_len = sizeof(mask0); - mask0.sin_family = AF_INET; - mask0.sin_addr.s_addr = target->ia_subnetmask; - lltable_prefix_free(AF_INET, (struct sockaddr *)&prefix0, - (struct sockaddr *)&mask0, flags); + in_scrubprefixlle(target, 1, flags); /* * As no-one seem to have this prefix, we can remove the route. @@ -1001,22 +1021,38 @@ in_lltable_new(struct in_addr addr4, u_i return (&lle->base); } -#define IN_ARE_MASKED_ADDR_EQUAL(d, a, m) ( \ - (((ntohl((d).s_addr) ^ (a)->sin_addr.s_addr) & (m)->sin_addr.s_addr)) == 0 ) +#define IN_ARE_MASKED_ADDR_EQUAL(d, a, m) ( \ + ((((d).s_addr ^ (a).s_addr) & (m).s_addr)) == 0 ) static int -in_lltable_match_prefix(const struct sockaddr *prefix, - const struct sockaddr *mask, u_int flags, struct llentry *lle) +in_lltable_match_prefix(const struct sockaddr *saddr, + const struct sockaddr *smask, u_int flags, struct llentry *lle) { - const struct sockaddr_in *pfx = (const struct sockaddr_in *)prefix; - const struct sockaddr_in *msk = (const struct sockaddr_in *)mask; + struct in_addr addr, mask, lle_addr; - /* - * (flags & LLE_STATIC) means deleting all entries - * including static ARP entries. - */ - if (IN_ARE_MASKED_ADDR_EQUAL(lle->r_l3addr.addr4, pfx, msk) && - ((flags & LLE_STATIC) || !(lle->la_flags & LLE_STATIC))) + addr = ((const struct sockaddr_in *)saddr)->sin_addr; + mask = ((const struct sockaddr_in *)smask)->sin_addr; + lle_addr.s_addr = ntohl(lle->r_l3addr.addr4.s_addr); + + if (IN_ARE_MASKED_ADDR_EQUAL(lle_addr, addr, mask) == 0) + return (0); + + if (lle->la_flags & LLE_IFADDR) { + + /* + * Delete LLE_IFADDR records IFF address & flag matches. + * Note that addr is the interface address within prefix + * being matched. + * Note also we should handle 'ifdown' cases without removing + * ifaddr macs. + */ + if (addr.s_addr == lle_addr.s_addr && (flags & LLE_STATIC) != 0) + return (1); + return (0); + } + + /* flags & LLE_STATIC means deleting both dynamic and static entries */ + if ((flags & LLE_STATIC) || !(lle->la_flags & LLE_STATIC)) return (1); return (0); @@ -1166,39 +1202,16 @@ in_lltable_find_dst(struct lltable *llt, return (lle); } -static int -in_lltable_delete(struct lltable *llt, u_int flags, - const struct sockaddr *l3addr) +static void +in_lltable_delete_entry(struct lltable *llt, struct llentry *lle) { - const struct sockaddr_in *sin = (const struct sockaddr_in *)l3addr; - struct llentry *lle; - - IF_AFDATA_WLOCK_ASSERT(llt->llt_ifp); - KASSERT(l3addr->sa_family == AF_INET, - ("sin_family %d", l3addr->sa_family)); - lle = in_lltable_find_dst(llt, sin->sin_addr); - if (lle == NULL) { -#ifdef DIAGNOSTIC - log(LOG_INFO, "interface address is missing from cache = %p in delete\n", lle); -#endif - return (ENOENT); - } - - if (!(lle->la_flags & LLE_IFADDR) || (flags & LLE_IFADDR)) { - LLE_WLOCK(lle); - lle->la_flags |= LLE_DELETED; - EVENTHANDLER_INVOKE(lle_event, lle, LLENTRY_DELETED); + lle->la_flags |= LLE_DELETED; + EVENTHANDLER_INVOKE(lle_event, lle, LLENTRY_DELETED); #ifdef DIAGNOSTIC - log(LOG_INFO, "ifaddr cache = %p is deleted\n", lle); + log(LOG_INFO, "ifaddr cache = %p is deleted\n", lle); #endif - if ((lle->la_flags & (LLE_STATIC | LLE_IFADDR)) == LLE_STATIC) - llentry_free(lle); - else - LLE_WUNLOCK(lle); - } - - return (0); + llentry_free(lle); } static struct llentry * @@ -1334,7 +1347,7 @@ in_lltattach(struct ifnet *ifp) llt->llt_lookup = in_lltable_lookup; llt->llt_alloc_entry = in_lltable_alloc; - llt->llt_delete = in_lltable_delete; + llt->llt_delete_entry = in_lltable_delete_entry; llt->llt_dump_entry = in_lltable_dump_entry; llt->llt_hash = in_lltable_hash; llt->llt_fill_sa_entry = in_lltable_fill_sa_entry; Modified: head/sys/netinet/ip_carp.c ============================================================================== --- head/sys/netinet/ip_carp.c Mon Sep 14 15:47:25 2015 (r287788) +++ head/sys/netinet/ip_carp.c Mon Sep 14 16:48:19 2015 (r287789) @@ -985,7 +985,7 @@ carp_ifa_delroute(struct ifaddr *ifa) case AF_INET6: ifa_del_loopback_route(ifa, (struct sockaddr *)&ifatoia6(ifa)->ia_addr); - nd6_rem_ifa_lle(ifatoia6(ifa)); + nd6_rem_ifa_lle(ifatoia6(ifa), 1); break; #endif } Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Mon Sep 14 15:47:25 2015 (r287788) +++ head/sys/netinet6/in6.c Mon Sep 14 16:48:19 2015 (r287789) @@ -1307,9 +1307,6 @@ in6_purgeaddr(struct ifaddr *ifa) /* stop DAD processing */ nd6_dad_stop(ifa); - /* Remove local address entry from lltable. */ - nd6_rem_ifa_lle(ia); - /* Leave multicast groups. */ while ((imm = LIST_FIRST(&ia->ia6_memberships)) != NULL) { LIST_REMOVE(imm, i6mm_chain); @@ -1333,6 +1330,7 @@ static void in6_unlink_ifa(struct in6_ifaddr *ia, struct ifnet *ifp) { char ip6buf[INET6_ADDRSTRLEN]; + int remove_lle; IF_ADDR_WLOCK(ifp); TAILQ_REMOVE(&ifp->if_addrhead, &ia->ia_ifa, ifa_link); @@ -1353,15 +1351,21 @@ in6_unlink_ifa(struct in6_ifaddr *ia, st * Release the reference to the base prefix. There should be a * positive reference. */ + remove_lle = 0; if (ia->ia6_ndpr == NULL) { nd6log((LOG_NOTICE, "in6_unlink_ifa: autoconf'ed address " "%s has no prefix\n", ip6_sprintf(ip6buf, IA6_IN6(ia)))); } else { ia->ia6_ndpr->ndpr_refcnt--; + /* Do not delete lles within prefix if refcont != 0 */ + if (ia->ia6_ndpr->ndpr_refcnt == 0) + remove_lle = 1; ia->ia6_ndpr = NULL; } + nd6_rem_ifa_lle(ia, remove_lle); + /* * Also, if the address being removed is autoconf'ed, call * pfxlist_onlink_check() since the release might affect the status of @@ -2081,15 +2085,33 @@ in6_lltable_new(const struct in6_addr *a } static int -in6_lltable_match_prefix(const struct sockaddr *prefix, - const struct sockaddr *mask, u_int flags, struct llentry *lle) +in6_lltable_match_prefix(const struct sockaddr *saddr, + const struct sockaddr *smask, u_int flags, struct llentry *lle) { - const struct sockaddr_in6 *pfx = (const struct sockaddr_in6 *)prefix; - const struct sockaddr_in6 *msk = (const struct sockaddr_in6 *)mask; + const struct in6_addr *addr, *mask, *lle_addr; + + addr = &((const struct sockaddr_in6 *)saddr)->sin6_addr; + mask = &((const struct sockaddr_in6 *)smask)->sin6_addr; + lle_addr = &lle->r_l3addr.addr6; + + if (IN6_ARE_MASKED_ADDR_EQUAL(lle_addr, addr, mask) == 0) + return (0); + + if (lle->la_flags & LLE_IFADDR) { - if (IN6_ARE_MASKED_ADDR_EQUAL(&lle->r_l3addr.addr6, - &pfx->sin6_addr, &msk->sin6_addr) && - ((flags & LLE_STATIC) || !(lle->la_flags & LLE_STATIC))) + /* + * Delete LLE_IFADDR records IFF address & flag matches. + * Note that addr is the interface address within prefix + * being matched. + */ + if (IN6_ARE_ADDR_EQUAL(addr, lle_addr) && + (flags & LLE_STATIC) != 0) + return (1); + return (0); + } + + /* flags & LLE_STATIC means deleting both dynamic and static entries */ + if ((flags & LLE_STATIC) || !(lle->la_flags & LLE_STATIC)) return (1); return (0); @@ -2200,36 +2222,16 @@ in6_lltable_find_dst(struct lltable *llt return (lle); } -static int -in6_lltable_delete(struct lltable *llt, u_int flags, - const struct sockaddr *l3addr) +static void +in6_lltable_delete_entry(struct lltable *llt, struct llentry *lle) { - const struct sockaddr_in6 *sin6 = (const struct sockaddr_in6 *)l3addr; - struct llentry *lle; - - IF_AFDATA_LOCK_ASSERT(llt->llt_ifp); - KASSERT(l3addr->sa_family == AF_INET6, - ("sin_family %d", l3addr->sa_family)); - - lle = in6_lltable_find_dst(llt, &sin6->sin6_addr); - if (lle == NULL) - return (ENOENT); - - if (!(lle->la_flags & LLE_IFADDR) || (flags & LLE_IFADDR)) { - LLE_WLOCK(lle); - lle->la_flags |= LLE_DELETED; - EVENTHANDLER_INVOKE(lle_event, lle, LLENTRY_DELETED); + lle->la_flags |= LLE_DELETED; + EVENTHANDLER_INVOKE(lle_event, lle, LLENTRY_DELETED); #ifdef DIAGNOSTIC - log(LOG_INFO, "ifaddr cache = %p is deleted\n", lle); + log(LOG_INFO, "ifaddr cache = %p is deleted\n", lle); #endif - if ((lle->la_flags & (LLE_STATIC | LLE_IFADDR)) == LLE_STATIC) - llentry_free(lle); - else - LLE_WUNLOCK(lle); - } - - return (0); + llentry_free(lle); } static struct llentry * @@ -2369,7 +2371,7 @@ in6_lltattach(struct ifnet *ifp) llt->llt_lookup = in6_lltable_lookup; llt->llt_alloc_entry = in6_lltable_alloc; - llt->llt_delete = in6_lltable_delete; + llt->llt_delete_entry = in6_lltable_delete_entry; llt->llt_dump_entry = in6_lltable_dump_entry; llt->llt_hash = in6_lltable_hash; llt->llt_fill_sa_entry = in6_lltable_fill_sa_entry; Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Mon Sep 14 15:47:25 2015 (r287788) +++ head/sys/netinet6/nd6.c Mon Sep 14 16:48:19 2015 (r287789) @@ -2245,23 +2245,26 @@ nd6_add_ifa_lle(struct in6_ifaddr *ia) } /* - * Removes ALL lle records for interface address prefix. - * XXXME: That's probably not we really want to do, we need - * to remove address record only and keep other records - * until we determine if given prefix is really going - * to be removed. + * Removes either all lle entries for given @ia, or lle + * corresponding to @ia address. */ void -nd6_rem_ifa_lle(struct in6_ifaddr *ia) +nd6_rem_ifa_lle(struct in6_ifaddr *ia, int all) { struct sockaddr_in6 mask, addr; + struct sockaddr *saddr, *smask; struct ifnet *ifp; ifp = ia->ia_ifa.ifa_ifp; memcpy(&addr, &ia->ia_addr, sizeof(ia->ia_addr)); memcpy(&mask, &ia->ia_prefixmask, sizeof(ia->ia_prefixmask)); - lltable_prefix_free(AF_INET6, (struct sockaddr *)&addr, - (struct sockaddr *)&mask, LLE_STATIC); + saddr = (struct sockaddr *)&addr; + smask = (struct sockaddr *)&mask; + + if (all != 0) + lltable_prefix_free(AF_INET6, saddr, smask, LLE_STATIC); + else + lltable_delete_addr(LLTABLE6(ifp), LLE_IFADDR, saddr); } /* Modified: head/sys/netinet6/nd6.h ============================================================================== --- head/sys/netinet6/nd6.h Mon Sep 14 15:47:25 2015 (r287788) +++ head/sys/netinet6/nd6.h Mon Sep 14 16:48:19 2015 (r287789) @@ -427,7 +427,7 @@ int nd6_flush_holdchain(struct ifnet *, struct sockaddr_in6 *); int nd6_need_cache(struct ifnet *); int nd6_add_ifa_lle(struct in6_ifaddr *); -void nd6_rem_ifa_lle(struct in6_ifaddr *); +void nd6_rem_ifa_lle(struct in6_ifaddr *, int); int nd6_storelladdr(struct ifnet *, struct mbuf *, const struct sockaddr *, u_char *, uint32_t *); From owner-svn-src-head@freebsd.org Mon Sep 14 18:35:38 2015 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 931DEA03DC5; Mon, 14 Sep 2015 18:35:38 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x234.google.com (mail-io0-x234.google.com [IPv6:2607:f8b0:4001:c06::234]) (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 5CE721768; Mon, 14 Sep 2015 18:35:38 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by ioiz6 with SMTP id z6so175591344ioi.2; Mon, 14 Sep 2015 11:35:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=+uIjFRjrz3WCVRUTKPx+NU9UQfSYCfXnkeiNQrrovas=; b=pRYDRHIQuo0RKahxkGIFI/2Om0UU7lVn357Lmv1Xa23R2gt9yIkAr9a5kLzLTbmtBC ABNKFpSLRoSLh+AQ78NbGGXolWdFMDElCKID7H6p8JVsKnJk6orN+JrU/U91EcW5Vvae AT6qD1DbnMAJCpq33Wwh7cW5I9oJjuZ05P2TtOaqUMSPVWK06dcYn0g6L96S+vkis7WE sKkqoXSr8QoN5rIKg5dhJt0jgBDziGm9YC3k0Hs9bkg/s/hKDIbbMwgMmeMLVpH6jChR SndVQBlVEdidu5FhhVs+GbbFDU77gYXLhxkBWaUHmrPqnxyFNMGASgc8a9Kf+sNPF5y9 amAQ== MIME-Version: 1.0 X-Received: by 10.107.46.228 with SMTP id u97mr26200772iou.165.1442255737654; Mon, 14 Sep 2015 11:35:37 -0700 (PDT) Received: by 10.36.28.208 with HTTP; Mon, 14 Sep 2015 11:35:37 -0700 (PDT) In-Reply-To: <55F6ED8F.5030402@FreeBSD.org> References: <201409220827.s8M8RRHB031526@svn.freebsd.org> <55F69093.5050807@FreeBSD.org> <55F6935C.9000000@selasky.org> <55F6A694.7020404@FreeBSD.org> <55F6A914.6050109@selasky.org> <55F6ED8F.5030402@FreeBSD.org> Date: Mon, 14 Sep 2015 11:35:37 -0700 Message-ID: Subject: Re: svn commit: r271946 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront kern net netinet ofed/drivers/net/mlx4 sys From: Adrian Chadd To: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Cc: Hans Petter Selasky , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Mon, 14 Sep 2015 18:35:38 -0000 Hi, So what's the actual behaviour of the new tso logic before and after the above change in tsomax? like, what are the actual packet sizes being sent up to the hardware? Is TSO or the TCP stack so fragile that a slight change in how packets are broken up results in ridiculously less throughput? It's only a few bytes. -adrian On 14 September 2015 at 08:53, Roger Pau Monn=C3=A9 wr= ote: > El 14/09/15 a les 13.01, Hans Petter Selasky ha escrit: >> On 09/14/15 12:51, Roger Pau Monn=C3=A9 wrote: >>> El 14/09/15 a les 11.29, Hans Petter Selasky ha escrit: >>>> On 09/14/15 11:17, Roger Pau Monn=C3=A9 wrote: >>>>> El 22/09/14 a les 10.27, Hans Petter Selasky ha escrit: >>>>>> Author: hselasky >>>>>> Date: Mon Sep 22 08:27:27 2014 >>>>>> New Revision: 271946 >>>>>> URL: http://svnweb.freebsd.org/changeset/base/271946 >>>>>> >>>>>> Log: >>>>>> Improve transmit sending offload, TSO, algorithm in general. >>>>>> >>>>>> The current TSO limitation feature only takes the total number o= f >>>>>> bytes in an mbuf chain into account and does not limit by the >>>>>> number >>>>>> of mbufs in a chain. Some kinds of hardware is limited by two >>>>>> factors. One is the fragment length and the second is the fragme= nt >>>>>> count. Both of these limits need to be taken into account when >>>>>> doing >>>>>> TSO. Else some kinds of hardware might have to drop completely >>>>>> valid >>>>>> mbuf chains because they cannot loaded into the given >>>>>> hardware's DMA >>>>>> engine. The new way of doing TSO limitation has been made >>>>>> backwards >>>>>> compatible as input from other FreeBSD developers and will use >>>>>> defaults for values not set. >>>>>> >>>>>> Reviewed by: adrian, rmacklem >>>>>> Sponsored by: Mellanox Technologies >>>>> >>>>> This commit makes xen-netfront tx performance drop from ~5Gbits/sec >>>>> (with debug options enabled) to 446 Mbits/sec. I'm currently looking, >>>>> but if anyone has ideas they are welcome. >>>>> >>>> >>>> Hi Roger, >>>> >>>> Looking at the netfront code you should subtract 1 from tsomaxsegcount >>>> prior to r287775. The reason might simply be that 2K clusters are used >>>> instead of 4K clusters, causing m_defrag() to be called. >>>> >>>>> ifp->if_hw_tsomax =3D 65536 - (ETHER_HDR_LEN + >>>>> ETHER_VLAN_ENCAP_LEN); >>>>> ifp->if_hw_tsomaxsegcount =3D MAX_TX_REQ_FRAGS; >>>>> ifp->if_hw_tsomaxsegsize =3D PAGE_SIZE; >>>> >>>> After r287775 can you try these settings: >>>> >>>> ifp->if_hw_tsomax =3D 65536; >>>> ifp->if_hw_tsomaxsegcount =3D MAX_TX_REQ_FRAGS; >>>> ifp->if_hw_tsomaxsegsize =3D PAGE_SIZE; >>>> >>>> And see if the performance is the same like before? >>> >> >> Hi Roger, >> >>> Yes, performance seems to be fine after setting if_hw_tsomax to 65536. >>> Is there some documentation about the usage of if_hw_tsomax? Does the >>> network subsystem already takes care of subtracting the space for ether >>> header and the vlan encapsulation, so it's no longer needed to specify >>> them in if_hw_tsomax? >> >> In the past only the TCP and IP layers were accounted for by the TSO >> parameters. A the present all layers are accounted for. This might fit >> the kind of adapter you are using better, because it appears to me it is >> DMA'ing all of the mbuf chain. Some other network adapters only DMA the >> TCP payload data and copy the ETH/TCP/IP headers into a special DMA'able >> memory area. > > Thanks for the hint, I'm not sure where that DMA tag is coming from, > xen-netfront doesn't define any DMA tag at all, and AFAICT none of it's > parents do: > > nexus0 > [...] > xenpv0 > granttable0 > xen_et0 > xenstore0 > xenballoon0 > xctrl0 > xs_dev0 > xenbusb_front0 > xbd0 > xn0 > > So I don't see where this bouncing requirement is coming from, although > I'm sure I'm missing something... > >>> >>> Also, this commit was MFC'ed to stable/10 and 10.2 suffers from the sam= e >>> problem. Can we issue and EN to get this fixed in 10.2? >> >> When this patch has been given some time to settle, and more people have >> tested it, I can submit a request for re @ to do that. Please remind me >> if I forget. > > No problem, will do so if needed :). > > Roger. > From owner-svn-src-head@freebsd.org Mon Sep 14 18:44:17 2015 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 2A28BA041C8; Mon, 14 Sep 2015 18:44:17 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 0F1321D98; Mon, 14 Sep 2015 18:44:17 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8EIiG9h013050; Mon, 14 Sep 2015 18:44:16 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8EIiEdL013041; Mon, 14 Sep 2015 18:44:14 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201509141844.t8EIiEdL013041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Mon, 14 Sep 2015 18:44:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287793 - in head/lib/libc: gen gmon stdlib X-SVN-Group: head 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.20 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: Mon, 14 Sep 2015 18:44:17 -0000 Author: rodrigc Date: Mon Sep 14 18:44:13 2015 New Revision: 287793 URL: https://svnweb.freebsd.org/changeset/base/287793 Log: Use ANSI C prototypes. Eliminates gcc 4.9 warnings. Modified: head/lib/libc/gen/fts-compat.c head/lib/libc/gen/getloadavg.c head/lib/libc/gen/getmntinfo.c head/lib/libc/gen/nlist.c head/lib/libc/gen/strtofflags.c head/lib/libc/gmon/gmon.c head/lib/libc/stdlib/heapsort.c head/lib/libc/stdlib/merge.c head/lib/libc/stdlib/radixsort.c Modified: head/lib/libc/gen/fts-compat.c ============================================================================== --- head/lib/libc/gen/fts-compat.c Mon Sep 14 18:05:27 2015 (r287792) +++ head/lib/libc/gen/fts-compat.c Mon Sep 14 18:44:13 2015 (r287793) @@ -635,9 +635,7 @@ __fts_set_clientptr_44bsd(FTS *sp, void * been found, cutting the stat calls by about 2/3. */ static FTSENT * -fts_build(sp, type) - FTS *sp; - int type; +fts_build(FTS *sp, int type) { struct dirent *dp; FTSENT *p, *head; @@ -901,10 +899,7 @@ mem1: saved_errno = errno; } static u_short -fts_stat(sp, p, follow) - FTS *sp; - FTSENT *p; - int follow; +fts_stat(FTS *sp, FTSENT *p, int follow) { FTSENT *t; dev_t dev; @@ -999,10 +994,7 @@ fts_compar(const void *a, const void *b) } static FTSENT * -fts_sort(sp, head, nitems) - FTS *sp; - FTSENT *head; - int nitems; +fts_sort(FTS *sp, FTSENT *head, int nitems) { FTSENT **ap, *p; @@ -1031,10 +1023,7 @@ fts_sort(sp, head, nitems) } static FTSENT * -fts_alloc(sp, name, namelen) - FTS *sp; - char *name; - int namelen; +fts_alloc(FTS *sp, char *name, int namelen) { FTSENT *p; size_t len; @@ -1081,8 +1070,7 @@ fts_alloc(sp, name, namelen) } static void -fts_lfree(head) - FTSENT *head; +fts_lfree(FTSENT *head) { FTSENT *p; @@ -1100,9 +1088,7 @@ fts_lfree(head) * plus 256 bytes so don't realloc the path 2 bytes at a time. */ static int -fts_palloc(sp, more) - FTS *sp; - size_t more; +fts_palloc(FTS *sp, size_t more) { sp->fts_pathlen += more + 256; @@ -1127,9 +1113,7 @@ fts_palloc(sp, more) * already returned. */ static void -fts_padjust(sp, head) - FTS *sp; - FTSENT *head; +fts_padjust(FTS *sp, FTSENT *head) { FTSENT *p; char *addr = sp->fts_path; @@ -1153,8 +1137,7 @@ fts_padjust(sp, head) } static size_t -fts_maxarglen(argv) - char * const *argv; +fts_maxarglen(char * const *argv) { size_t len, max; @@ -1170,11 +1153,7 @@ fts_maxarglen(argv) * Assumes p->fts_dev and p->fts_ino are filled in. */ static int -fts_safe_changedir(sp, p, fd, path) - FTS *sp; - FTSENT *p; - int fd; - char *path; +fts_safe_changedir(FTS *sp, FTSENT *p, int fd, char *path) { int ret, oerrno, newfd; struct stat sb; Modified: head/lib/libc/gen/getloadavg.c ============================================================================== --- head/lib/libc/gen/getloadavg.c Mon Sep 14 18:05:27 2015 (r287792) +++ head/lib/libc/gen/getloadavg.c Mon Sep 14 18:44:13 2015 (r287793) @@ -48,9 +48,7 @@ __FBSDID("$FreeBSD$"); * Return number of samples retrieved, or -1 on error. */ int -getloadavg(loadavg, nelem) - double loadavg[]; - int nelem; +getloadavg(double loadavg[], int nelem) { struct loadavg loadinfo; int i, mib[2]; Modified: head/lib/libc/gen/getmntinfo.c ============================================================================== --- head/lib/libc/gen/getmntinfo.c Mon Sep 14 18:05:27 2015 (r287792) +++ head/lib/libc/gen/getmntinfo.c Mon Sep 14 18:44:13 2015 (r287793) @@ -42,9 +42,7 @@ __FBSDID("$FreeBSD$"); * Return information about mounted filesystems. */ int -getmntinfo(mntbufp, flags) - struct statfs **mntbufp; - int flags; +getmntinfo(struct statfs **mntbufp, int flags) { static struct statfs *mntbuf; static int mntsize; Modified: head/lib/libc/gen/nlist.c ============================================================================== --- head/lib/libc/gen/nlist.c Mon Sep 14 18:05:27 2015 (r287792) +++ head/lib/libc/gen/nlist.c Mon Sep 14 18:44:13 2015 (r287793) @@ -63,9 +63,7 @@ int __aout_fdnlist(int, struct nlist *); int __elf_fdnlist(int, struct nlist *); int -nlist(name, list) - const char *name; - struct nlist *list; +nlist(const char *name, struct nlist *list) { int fd, n; @@ -89,11 +87,10 @@ static struct nlist_handlers { }; int -__fdnlist(fd, list) - int fd; - struct nlist *list; +__fdnlist(int fd, struct nlist *list) { - int n = -1, i; + int n = -1; + unsigned int i; for (i = 0; i < sizeof(nlist_fn) / sizeof(nlist_fn[0]); i++) { n = (nlist_fn[i].fn)(fd, list); @@ -107,9 +104,7 @@ __fdnlist(fd, list) #ifdef _NLIST_DO_AOUT int -__aout_fdnlist(fd, list) - int fd; - struct nlist *list; +__aout_fdnlist(int fd, struct nlist *list) { struct nlist *p, *symtab; caddr_t strtab, a_out_mmap; @@ -235,9 +230,7 @@ __elf_is_okay__(Elf_Ehdr *ehdr) } int -__elf_fdnlist(fd, list) - int fd; - struct nlist *list; +__elf_fdnlist(int fd, struct nlist *list) { struct nlist *p; Elf_Off symoff = 0, symstroff = 0; @@ -377,11 +370,7 @@ __elf_fdnlist(fd, list) * n_value and n_type members. */ static void -elf_sym_to_nlist(nl, s, shdr, shnum) - struct nlist *nl; - Elf_Sym *s; - Elf_Shdr *shdr; - int shnum; +elf_sym_to_nlist(struct nlist *nl, Elf_Sym *s, Elf_Shdr *shdr, int shnum) { nl->n_value = s->st_value; Modified: head/lib/libc/gen/strtofflags.c ============================================================================== --- head/lib/libc/gen/strtofflags.c Mon Sep 14 18:05:27 2015 (r287792) +++ head/lib/libc/gen/strtofflags.c Mon Sep 14 18:44:13 2015 (r287793) @@ -94,8 +94,7 @@ static struct { * are set, return the empty string. */ char * -fflagstostr(flags) - u_long flags; +fflagstostr(u_long flags) { char *string; const char *sp; @@ -128,9 +127,7 @@ fflagstostr(flags) * to the offending token. */ int -strtofflags(stringp, setp, clrp) - char **stringp; - u_long *setp, *clrp; +strtofflags(char **stringp, u_long *setp, u_long *clrp) { char *string, *p; int i; Modified: head/lib/libc/gmon/gmon.c ============================================================================== --- head/lib/libc/gmon/gmon.c Mon Sep 14 18:05:27 2015 (r287792) +++ head/lib/libc/gmon/gmon.c Mon Sep 14 18:44:13 2015 (r287793) @@ -70,9 +70,7 @@ void moncontrol(int); static int hertz(void); void -monstartup(lowpc, highpc) - u_long lowpc; - u_long highpc; +monstartup(u_long lowpc, u_long highpc) { int o; char *cp; @@ -218,8 +216,7 @@ _mcleanup(void) * all the data structures are ready. */ void -moncontrol(mode) - int mode; +moncontrol(int mode) { struct gmonparam *p = &_gmonparam; @@ -239,7 +236,7 @@ moncontrol(mode) * if something goes wrong, we return 0, an impossible hertz. */ static int -hertz() +hertz(void) { struct itimerval tim; Modified: head/lib/libc/stdlib/heapsort.c ============================================================================== --- head/lib/libc/stdlib/heapsort.c Mon Sep 14 18:05:27 2015 (r287792) +++ head/lib/libc/stdlib/heapsort.c Mon Sep 14 18:44:13 2015 (r287793) @@ -147,16 +147,11 @@ typedef DECLARE_BLOCK(int, heapsort_bloc */ #ifdef I_AM_HEAPSORT_B int -heapsort_b(vbase, nmemb, size, compar) - void *vbase; - size_t nmemb, size; - heapsort_block compar; +heapsort_b(void *vbase, size_t nmemb, size_t size, heapsort_block compar) #else int -heapsort(vbase, nmemb, size, compar) - void *vbase; - size_t nmemb, size; - int (*compar)(const void *, const void *); +heapsort(void *vbase, size_t nmemb, size_t size, + int (*compar)(const void *, const void *)) #endif { size_t cnt, i, j, l; Modified: head/lib/libc/stdlib/merge.c ============================================================================== --- head/lib/libc/stdlib/merge.c Mon Sep 14 18:05:27 2015 (r287792) +++ head/lib/libc/stdlib/merge.c Mon Sep 14 18:44:13 2015 (r287793) @@ -104,14 +104,10 @@ static void insertionsort(u_char *, size */ int #ifdef I_AM_MERGESORT_B -mergesort_b(base, nmemb, size, cmp) +mergesort_b(void *base, size_t nmemb, size_t size, cmp_t cmp) #else -mergesort(base, nmemb, size, cmp) +mergesort(void *base, size_t nmemb, size_t size, cmp_t cmp) #endif - void *base; - size_t nmemb; - size_t size; - cmp_t cmp; { size_t i; int sense; @@ -271,10 +267,7 @@ COPY: b = t; * is defined. Otherwise simple pairwise merging is used.) */ void -setup(list1, list2, n, size, cmp) - size_t n, size; - u_char *list1, *list2; - cmp_t cmp; +setup(u_char *list1, u_char *list2, size_t n, size_t size, cmp_t cmp) { int i, length, size2, tmp, sense; u_char *f1, *f2, *s, *l2, *last, *p2; @@ -345,10 +338,7 @@ setup(list1, list2, n, size, cmp) * last 4 elements. */ static void -insertionsort(a, n, size, cmp) - u_char *a; - size_t n, size; - cmp_t cmp; +insertionsort(u_char *a, size_t n, size_t size, cmp_t cmp) { u_char *ai, *s, *t, *u, tmp; int i; Modified: head/lib/libc/stdlib/radixsort.c ============================================================================== --- head/lib/libc/stdlib/radixsort.c Mon Sep 14 18:05:27 2015 (r287792) +++ head/lib/libc/stdlib/radixsort.c Mon Sep 14 18:44:13 2015 (r287793) @@ -88,10 +88,7 @@ static void r_sort_b(const u_char **, co } int -radixsort(a, n, tab, endch) - const u_char **a, *tab; - int n; - u_int endch; +radixsort(const u_char **a, int n, const u_char *tab, u_int endch) { const u_char *tr; int c; @@ -103,10 +100,7 @@ radixsort(a, n, tab, endch) } int -sradixsort(a, n, tab, endch) - const u_char **a, *tab; - int n; - u_int endch; +sradixsort(const u_char **a, int n, const u_char *tab, u_int endch) { const u_char *tr, **ta; int c; @@ -131,11 +125,7 @@ sradixsort(a, n, tab, endch) /* Unstable, in-place sort. */ static void -r_sort_a(a, n, i, tr, endch) - const u_char **a; - int n, i; - const u_char *tr; - u_int endch; +r_sort_a(const u_char **a, int n, int i, const u_char *tr, u_int endch) { static int count[256], nc, bmin; int c; @@ -233,11 +223,8 @@ r_sort_a(a, n, i, tr, endch) /* Stable sort, requiring additional memory. */ static void -r_sort_b(a, ta, n, i, tr, endch) - const u_char **a, **ta; - int n, i; - const u_char *tr; - u_int endch; +r_sort_b(const u_char **a, const u_char **ta, int n, int i, const u_char *tr, + u_int endch) { static int count[256], nc, bmin; int c; @@ -304,12 +291,9 @@ r_sort_b(a, ta, n, i, tr, endch) } } +/* insertion sort */ static inline void -simplesort(a, n, b, tr, endch) /* insertion sort */ - const u_char **a; - int n, b; - const u_char *tr; - u_int endch; +simplesort(const u_char **a, int n, int b, const u_char *tr, u_int endch) { u_char ch; const u_char **ak, **ai, *s, *t; From owner-svn-src-head@freebsd.org Mon Sep 14 18:59:02 2015 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 F0E0EA04A30; Mon, 14 Sep 2015 18:59:02 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 C794A1C4B; Mon, 14 Sep 2015 18:59:02 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8EIx2A2017784; Mon, 14 Sep 2015 18:59:02 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8EIx2Hn017780; Mon, 14 Sep 2015 18:59:02 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201509141859.t8EIx2Hn017780@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Mon, 14 Sep 2015 18:59:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287797 - head/lib/libc/gen X-SVN-Group: head 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.20 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: Mon, 14 Sep 2015 18:59:03 -0000 Author: rodrigc Date: Mon Sep 14 18:59:01 2015 New Revision: 287797 URL: https://svnweb.freebsd.org/changeset/base/287797 Log: Use unsigned variables in a few places. Eliminates gcc 4.9 warnings. Modified: head/lib/libc/gen/getgrent.c head/lib/libc/gen/getpwent.c head/lib/libc/gen/strtofflags.c Modified: head/lib/libc/gen/getgrent.c ============================================================================== --- head/lib/libc/gen/getgrent.c Mon Sep 14 18:58:30 2015 (r287796) +++ head/lib/libc/gen/getgrent.c Mon Sep 14 18:59:01 2015 (r287797) @@ -1238,7 +1238,7 @@ compat_setgrent(void *retval, void *mdat int rv, stayopen; #define set_setent(x, y) do { \ - int i; \ + unsigned int i; \ \ for (i = 0; i < (sizeof(x)/sizeof(x[0])) - 1; i++) \ x[i].mdata = (void *)y; \ @@ -1308,7 +1308,7 @@ compat_group(void *retval, void *mdata, int rv, stayopen, *errnop; #define set_lookup_type(x, y) do { \ - int i; \ + unsigned int i; \ \ for (i = 0; i < (sizeof(x)/sizeof(x[0])) - 1; i++) \ x[i].mdata = (void *)y; \ Modified: head/lib/libc/gen/getpwent.c ============================================================================== --- head/lib/libc/gen/getpwent.c Mon Sep 14 18:58:30 2015 (r287796) +++ head/lib/libc/gen/getpwent.c Mon Sep 14 18:59:01 2015 (r287797) @@ -1607,7 +1607,8 @@ compat_redispatch(struct compat_state *s { NULL, NULL, NULL } }; void *discard; - int rv, e, i; + int rv, e; + unsigned int i; for (i = 0; i < sizeof(dtab)/sizeof(dtab[0]) - 1; i++) dtab[i].mdata = (void *)lookup_how; @@ -1702,7 +1703,7 @@ compat_setpwent(void *retval, void *mdat int rv, stayopen; #define set_setent(x, y) do { \ - int i; \ + unsigned int i; \ \ for (i = 0; i < (sizeof(x)/sizeof(x[0])) - 1; i++) \ x[i].mdata = (void *)y; \ Modified: head/lib/libc/gen/strtofflags.c ============================================================================== --- head/lib/libc/gen/strtofflags.c Mon Sep 14 18:58:30 2015 (r287796) +++ head/lib/libc/gen/strtofflags.c Mon Sep 14 18:59:01 2015 (r287797) @@ -100,7 +100,7 @@ fflagstostr(u_long flags) const char *sp; char *dp; u_long setflags; - int i; + u_int i; if ((string = (char *)malloc(nmappings * (longestflaglen + 1))) == NULL) return (NULL); From owner-svn-src-head@freebsd.org Mon Sep 14 19:17:28 2015 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 DBCE1A0337F; Mon, 14 Sep 2015 19:17:27 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 CBD341A4A; Mon, 14 Sep 2015 19:17:27 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8EJHRmt026215; Mon, 14 Sep 2015 19:17:27 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8EJHQIg026210; Mon, 14 Sep 2015 19:17:26 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201509141917.t8EJHQIg026210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Mon, 14 Sep 2015 19:17:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287798 - in head/sys: net netinet6 X-SVN-Group: head 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.20 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: Mon, 14 Sep 2015 19:17:28 -0000 Author: vangyzen Date: Mon Sep 14 19:17:25 2015 New Revision: 287798 URL: https://svnweb.freebsd.org/changeset/base/287798 Log: Fix the handling of IPv6 On-Link Redirects. On receipt of a redirect message, install an interface route for the redirected destination. On removal of the corresponding Neighbor Cache entry, remove the interface route. This requires changes in rtredirect_fib() to cope with an AF_LINK address for the gateway and with the absence of RTF_GATEWAY. This fixes the "Redirected On-Link" test cases in the Tahi IPv6 Ready Logo Phase 2 test suite. Unrelated to the above, fix a recursion on the radix node head lock triggered by the Tahi Redirected to Alternate Router test cases. When I first wrote this patch in October 2012, all Section 2 (Neighbor Discovery) test cases passed on 10-CURRENT, 9-STABLE, and 8-STABLE. cem@ recently rebased the 10.x patch onto head and reported that it passes Tahi. (Thanks!) These other test cases also passed in 2012: * the RTF_MODIFIED case, with IPv4 and IPv6 (using a RTF_HOST|RTF_GATEWAY route for the destination) * the redirected-to-self case, with IPv4 and IPv6 * a valid IPv4 redirect All testing in 2012 was done with WITNESS and INVARIANTS. Tested by: EMC / Isilon Storage Division via Conrad Meyer (cem) in 2015, Mark Kelley in 2012, TC Telkamp in 2012 PR: 152791 Reviewed by: melifaro (current rev), bz (earlier rev) Approved by: kib (mentor) MFC after: 1 month Relnotes: yes Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D3602 Modified: head/sys/net/if_llatbl.h head/sys/net/route.c head/sys/netinet6/icmp6.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6_rtr.c Modified: head/sys/net/if_llatbl.h ============================================================================== --- head/sys/net/if_llatbl.h Mon Sep 14 18:59:01 2015 (r287797) +++ head/sys/net/if_llatbl.h Mon Sep 14 19:17:25 2015 (r287798) @@ -183,6 +183,7 @@ MALLOC_DECLARE(M_LLTABLE); #define LLE_STATIC 0x0002 /* entry is static */ #define LLE_IFADDR 0x0004 /* entry is interface addr */ #define LLE_VALID 0x0008 /* ll_addr is valid */ +#define LLE_REDIRECT 0x0010 /* installed by redirect; has host rtentry */ #define LLE_PUB 0x0020 /* publish entry ??? */ #define LLE_LINKED 0x0040 /* linked to lookup structure */ /* LLE request flags */ Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Mon Sep 14 18:59:01 2015 (r287797) +++ head/sys/net/route.c Mon Sep 14 19:17:25 2015 (r287798) @@ -584,13 +584,20 @@ rtredirect_fib(struct sockaddr *dst, * we have a routing loop, perhaps as a result of an interface * going down recently. */ - if (!(flags & RTF_DONE) && rt && - (!sa_equal(src, rt->rt_gateway) || rt->rt_ifa != ifa)) - error = EINVAL; - else if (ifa_ifwithaddr_check(gateway)) + if (!(flags & RTF_DONE) && rt) { + if (!sa_equal(src, rt->rt_gateway)) { + error = EINVAL; + goto done; + } + if (rt->rt_ifa != ifa && ifa->ifa_addr->sa_family != AF_LINK) { + error = EINVAL; + goto done; + } + } + if ((flags & RTF_GATEWAY) && ifa_ifwithaddr_check(gateway)) { error = EHOSTUNREACH; - if (error) goto done; + } /* * Create a new entry if we just got back a wildcard entry * or the lookup failed. This is necessary for hosts @@ -613,7 +620,7 @@ rtredirect_fib(struct sockaddr *dst, rt0 = rt; rt = NULL; - flags |= RTF_GATEWAY | RTF_DYNAMIC; + flags |= RTF_DYNAMIC; bzero((caddr_t)&info, sizeof(info)); info.rti_info[RTAX_DST] = dst; info.rti_info[RTAX_GATEWAY] = gateway; @@ -640,6 +647,8 @@ rtredirect_fib(struct sockaddr *dst, * Smash the current notion of the gateway to * this destination. Should check about netmask!!! */ + if ((flags & RTF_GATEWAY) == 0) + rt->rt_flags &= ~RTF_GATEWAY; rt->rt_flags |= RTF_MODIFIED; flags |= RTF_MODIFIED; stat = &V_rtstat.rts_newgateway; @@ -653,7 +662,8 @@ rtredirect_fib(struct sockaddr *dst, gwrt = rtalloc1(gateway, 1, RTF_RNH_LOCKED); RADIX_NODE_HEAD_UNLOCK(rnh); EVENTHANDLER_INVOKE(route_redirect_event, rt, gwrt, dst); - RTFREE_LOCKED(gwrt); + if (gwrt) + RTFREE_LOCKED(gwrt); } } else error = EHOSTUNREACH; Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Mon Sep 14 18:59:01 2015 (r287797) +++ head/sys/netinet6/icmp6.c Mon Sep 14 19:17:25 2015 (r287798) @@ -2434,27 +2434,39 @@ icmp6_redirect_input(struct mbuf *m, int nd6_cache_lladdr(ifp, &redtgt6, lladdr, lladdrlen, ND_REDIRECT, is_onlink ? ND_REDIRECT_ONLINK : ND_REDIRECT_ROUTER); - if (!is_onlink) { /* better router case. perform rtredirect. */ - /* perform rtredirect */ + /* + * Install a gateway route in the better-router case or an interface + * route in the on-link-destination case. + */ + { struct sockaddr_in6 sdst; struct sockaddr_in6 sgw; struct sockaddr_in6 ssrc; + struct sockaddr *gw; + int rt_flags; u_int fibnum; bzero(&sdst, sizeof(sdst)); - bzero(&sgw, sizeof(sgw)); bzero(&ssrc, sizeof(ssrc)); - sdst.sin6_family = sgw.sin6_family = ssrc.sin6_family = AF_INET6; - sdst.sin6_len = sgw.sin6_len = ssrc.sin6_len = - sizeof(struct sockaddr_in6); - bcopy(&redtgt6, &sgw.sin6_addr, sizeof(struct in6_addr)); + sdst.sin6_family = ssrc.sin6_family = AF_INET6; + sdst.sin6_len = ssrc.sin6_len = sizeof(struct sockaddr_in6); bcopy(&reddst6, &sdst.sin6_addr, sizeof(struct in6_addr)); bcopy(&src6, &ssrc.sin6_addr, sizeof(struct in6_addr)); + rt_flags = RTF_HOST; + if (is_router) { + bzero(&sgw, sizeof(sgw)); + sgw.sin6_family = AF_INET6; + sgw.sin6_len = sizeof(struct sockaddr_in6); + bcopy(&redtgt6, &sgw.sin6_addr, + sizeof(struct in6_addr)); + gw = (struct sockaddr *)&sgw; + rt_flags |= RTF_GATEWAY; + } else + gw = ifp->if_addr->ifa_addr; for (fibnum = 0; fibnum < rt_numfibs; fibnum++) - in6_rtredirect((struct sockaddr *)&sdst, - (struct sockaddr *)&sgw, (struct sockaddr *)NULL, - RTF_GATEWAY | RTF_HOST, (struct sockaddr *)&ssrc, - fibnum); + in6_rtredirect((struct sockaddr *)&sdst, gw, + (struct sockaddr *)NULL, rt_flags, + (struct sockaddr *)&ssrc, fibnum); } /* finally update cached route in each socket via pfctlinput */ { Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Mon Sep 14 18:59:01 2015 (r287797) +++ head/sys/netinet6/nd6.c Mon Sep 14 19:17:25 2015 (r287798) @@ -132,6 +132,7 @@ static void nd6_setmtu0(struct ifnet *, static void nd6_slowtimo(void *); static int regen_tmpaddr(struct in6_ifaddr *); static struct llentry *nd6_free(struct llentry *, int); +static void nd6_free_redirect(const struct llentry *); static void nd6_llinfo_timer(void *); static void clear_llinfo_pqueue(struct llentry *); static void nd6_rtrequest(int, struct rtentry *, struct rt_addrinfo *); @@ -1223,6 +1224,13 @@ nd6_free(struct llentry *ln, int gc) defrouter_select(); } + /* + * If this entry was added by an on-link redirect, remove the + * corresponding host route. + */ + if (ln->la_flags & LLE_REDIRECT) + nd6_free_redirect(ln); + if (ln->ln_router || dr) LLE_WLOCK(ln); } @@ -1256,6 +1264,36 @@ nd6_free(struct llentry *ln, int gc) } /* + * Remove the rtentry for the given llentry, + * both of which were installed by a redirect. + */ +static void +nd6_free_redirect(const struct llentry *ln) +{ + int fibnum; + struct rtentry *rt; + struct radix_node_head *rnh; + struct sockaddr_in6 sin6; + + lltable_fill_sa_entry(ln, (struct sockaddr *)&sin6); + for (fibnum = 0; fibnum < rt_numfibs; fibnum++) { + rnh = rt_tables_get_rnh(fibnum, AF_INET6); + if (rnh == NULL) + continue; + + RADIX_NODE_HEAD_LOCK(rnh); + rt = in6_rtalloc1((struct sockaddr *)&sin6, 0, + RTF_RNH_LOCKED, fibnum); + if (rt) { + if (rt->rt_flags == (RTF_UP | RTF_HOST | RTF_DYNAMIC)) + rt_expunge(rnh, rt); + RTFREE_LOCKED(rt); + } + RADIX_NODE_HEAD_UNLOCK(rnh); + } +} + +/* * Upper-layer reachability hint for Neighbor Unreachability Detection. * * XXX cost-effective methods? @@ -1746,8 +1784,11 @@ nd6_cache_lladdr(struct ifnet *ifp, stru */ if (code == ND_REDIRECT_ROUTER) ln->ln_router = 1; - else if (is_newentry) /* (6-7) */ - ln->ln_router = 0; + else { + if (is_newentry) /* (6-7) */ + ln->ln_router = 0; + ln->la_flags |= LLE_REDIRECT; + } break; case ND_ROUTER_SOLICIT: /* Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Mon Sep 14 18:59:01 2015 (r287797) +++ head/sys/netinet6/nd6_rtr.c Mon Sep 14 19:17:25 2015 (r287798) @@ -2105,7 +2105,7 @@ rt6_deleteroute(struct rtentry *rt, void return (0); return (in6_rtrequest(RTM_DELETE, rt_key(rt), rt->rt_gateway, - rt_mask(rt), rt->rt_flags, NULL, rt->rt_fibnum)); + rt_mask(rt), rt->rt_flags | RTF_RNH_LOCKED, NULL, rt->rt_fibnum)); #undef SIN6 } From owner-svn-src-head@freebsd.org Mon Sep 14 19:23:00 2015 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 E284BA037BF; Mon, 14 Sep 2015 19:23:00 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 D34531EDD; Mon, 14 Sep 2015 19:23:00 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8EJN0fh030107; Mon, 14 Sep 2015 19:23:00 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8EJN073030106; Mon, 14 Sep 2015 19:23:00 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201509141923.t8EJN073030106@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 14 Sep 2015 19:23:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287799 - head/usr.sbin/pw X-SVN-Group: head 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.20 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: Mon, 14 Sep 2015 19:23:01 -0000 Author: bapt Date: Mon Sep 14 19:23:00 2015 New Revision: 287799 URL: https://svnweb.freebsd.org/changeset/base/287799 Log: Regression: fix usershow -7 Submitted by: Dan McGregor (via IRC) MFC after: 2 days Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Mon Sep 14 19:17:25 2015 (r287798) +++ head/usr.sbin/pw/pw_user.c Mon Sep 14 19:23:00 2015 (r287799) @@ -804,7 +804,7 @@ pw_user_show(int argc, char **argv, char case 'a': all = true; break; - case 7: + case '7': v7 = true; break; } From owner-svn-src-head@freebsd.org Mon Sep 14 21:26:49 2015 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 A99C0A0342E; Mon, 14 Sep 2015 21:26:49 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 988671AE8; Mon, 14 Sep 2015 21:26:49 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8ELQnhk079407; Mon, 14 Sep 2015 21:26:49 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8ELQna9079406; Mon, 14 Sep 2015 21:26:49 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201509142126.t8ELQna9079406@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 14 Sep 2015 21:26:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287803 - head/usr.sbin/bsdconfig/share X-SVN-Group: head 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.20 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: Mon, 14 Sep 2015 21:26:49 -0000 Author: dteske Date: Mon Sep 14 21:26:48 2015 New Revision: 287803 URL: https://svnweb.freebsd.org/changeset/base/287803 Log: Fix code typo (no functional change) MFC after: 3 days X-MFC-to: stable/10 Modified: head/usr.sbin/bsdconfig/share/common.subr Modified: head/usr.sbin/bsdconfig/share/common.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/common.subr Mon Sep 14 19:37:51 2015 (r287802) +++ head/usr.sbin/bsdconfig/share/common.subr Mon Sep 14 21:26:48 2015 (r287803) @@ -1,7 +1,7 @@ if [ ! "$_COMMON_SUBR" ]; then _COMMON_SUBR=1 # # Copyright (c) 2012 Ron McDowell -# Copyright (c) 2012-2014 Devin Teske +# Copyright (c) 2012-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -33,8 +33,8 @@ if [ ! "$_COMMON_SUBR" ]; then _COMMON_S # Default file descriptors to link to stdout/stderr for passthru allowing # redirection within a sub-shell to bypass directly to the terminal. # -: ${TERMINAL_STDOUT_PASSTHRU:=3}} -: ${TERMINAL_STDERR_PASSTHRU:=4}} +: ${TERMINAL_STDOUT_PASSTHRU:=3} +: ${TERMINAL_STDERR_PASSTHRU:=4} ############################################################ GLOBALS From owner-svn-src-head@freebsd.org Tue Sep 15 00:38:09 2015 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 846C8A01C61; Tue, 15 Sep 2015 00:38:09 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AF3321911; Tue, 15 Sep 2015 00:38:07 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.15.2/8.15.2) with ESMTPS id t8F0bv4c099810 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 15 Sep 2015 03:37:57 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.15.2/8.15.2/Submit) id t8F0bvHv099809; Tue, 15 Sep 2015 03:37:57 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 15 Sep 2015 03:37:57 +0300 From: Gleb Smirnoff To: Alexander Motin , Dmitry Luhtionov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r287654 - head/sys/netgraph Message-ID: <20150915003757.GW1023@FreeBSD.org> References: <201509110915.t8B9FSMJ036344@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201509110915.t8B9FSMJ036344@repo.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Tue, 15 Sep 2015 00:38:09 -0000 Hi! The change definitely lacks the documentation change :) On Fri, Sep 11, 2015 at 09:15:28AM +0000, Alexander Motin wrote: A> Author: mav A> Date: Fri Sep 11 09:15:27 2015 A> New Revision: 287654 A> URL: https://svnweb.freebsd.org/changeset/base/287654 A> A> Log: A> Add support for PPP-Max-Payload PPPoE tag (RFC4638). A> A> Submitted by: Dmitry Luhtionov A> MFC after: 2 weeks A> A> Modified: A> head/sys/netgraph/ng_pppoe.c A> head/sys/netgraph/ng_pppoe.h A> A> Modified: head/sys/netgraph/ng_pppoe.c A> ============================================================================== A> --- head/sys/netgraph/ng_pppoe.c Fri Sep 11 08:48:16 2015 (r287653) A> +++ head/sys/netgraph/ng_pppoe.c Fri Sep 11 09:15:27 2015 (r287654) A> @@ -168,6 +168,13 @@ static const struct ng_cmdlist ng_pppoe_ A> &ng_parse_enaddr_type, A> NULL A> }, A> + { A> + NGM_PPPOE_COOKIE, A> + NGM_PPPOE_SETMAXP, A> + "setmaxp", A> + &ng_parse_uint16_type, A> + NULL A> + }, A> { 0 } A> }; A> A> @@ -262,6 +269,7 @@ struct PPPoE { A> struct ether_header eh; A> LIST_HEAD(, sess_con) listeners; A> struct sess_hash_entry sesshash[SESSHASHSIZE]; A> + struct maxptag max_payload; /* PPP-Max-Payload (RFC4638) */ A> }; A> typedef struct PPPoE *priv_p; A> A> @@ -1004,6 +1012,13 @@ ng_pppoe_rcvmsg(node_p node, item_p item A> bcopy(msg->data, &privp->eh.ether_shost, A> ETHER_ADDR_LEN); A> break; A> + case NGM_PPPOE_SETMAXP: A> + if (msg->header.arglen != sizeof(uint16_t)) A> + LEAVE(EINVAL); A> + privp->max_payload.hdr.tag_type = PTT_MAX_PAYL; A> + privp->max_payload.hdr.tag_len = htons(sizeof(uint16_t)); A> + privp->max_payload.data = htons(*((uint16_t *)msg->data)); A> + break; A> default: A> LEAVE(EINVAL); A> } A> @@ -1071,6 +1086,8 @@ pppoe_start(sessp sp) A> init_tags(sp); A> insert_tag(sp, &uniqtag.hdr); A> insert_tag(sp, &neg->service.hdr); A> + if (privp->max_payload.data != 0) A> + insert_tag(sp, &privp->max_payload.hdr); A> make_packet(sp); A> /* A> * Send packet and prepare to retransmit it after timeout. A> @@ -1124,6 +1141,28 @@ send_sessionid(sessp sp) A> return (error); A> } A> A> +static int A> +send_maxp(sessp sp, const struct pppoe_tag *tag) A> +{ A> + int error; A> + struct ng_mesg *msg; A> + struct ngpppoe_maxp *maxp; A> + A> + CTR2(KTR_NET, "%20s: called %d", __func__, sp->Session_ID); A> + A> + NG_MKMESSAGE(msg, NGM_PPPOE_COOKIE, NGM_PPPOE_SETMAXP, A> + sizeof(struct ngpppoe_maxp), M_NOWAIT); A> + if (msg == NULL) A> + return (ENOMEM); A> + A> + maxp = (struct ngpppoe_maxp *)msg->data; A> + strncpy(maxp->hook, NG_HOOK_NAME(sp->hook), NG_HOOKSIZ); A> + maxp->data = ntohs(((const struct maxptag *)tag)->data); A> + NG_SEND_MSG_ID(error, NG_HOOK_NODE(sp->hook), msg, sp->creator, 0); A> + A> + return (error); A> +} A> + A> /* A> * Receive data from session hook and do something with it. A> */ A> @@ -1464,6 +1503,9 @@ ng_pppoe_rcvdata_ether(hook_p hook, item A> insert_tag(sp, tag); /* return it */ A> send_acname(sp, tag); A> } A> + if ((tag = get_tag(ph, PTT_MAX_PAYL)) && A> + (privp->max_payload.data != 0)) A> + insert_tag(sp, tag); /* return it */ A> insert_tag(sp, &neg->service.hdr); /* Service */ A> scan_tags(sp, ph); A> make_packet(sp); A> @@ -1602,6 +1644,9 @@ ng_pppoe_rcvdata_ether(hook_p hook, item A> m_freem(neg->m); A> free(sp->neg, M_NETGRAPH_PPPOE); A> sp->neg = NULL; A> + if ((tag = get_tag(ph, PTT_MAX_PAYL)) && A> + (privp->max_payload.data != 0)) A> + send_maxp(sp, tag); A> pppoe_send_event(sp, NGM_PPPOE_SUCCESS); A> break; A> case PADT_CODE: A> A> Modified: head/sys/netgraph/ng_pppoe.h A> ============================================================================== A> --- head/sys/netgraph/ng_pppoe.h Fri Sep 11 08:48:16 2015 (r287653) A> +++ head/sys/netgraph/ng_pppoe.h Fri Sep 11 09:15:27 2015 (r287654) A> @@ -51,6 +51,7 @@ A> #define NG_PPPOE_NODE_TYPE "pppoe" A> A> #define NGM_PPPOE_COOKIE 1089893072 A> +#define NGM_PPPOE_SETMAXP_COOKIE 1441624322 A> A> #define PPPOE_SERVICE_NAME_SIZE 64 /* for now */ A> A> @@ -83,6 +84,7 @@ enum cmd { A> NGM_PPPOE_SETMODE = 12, /* set to standard or compat modes */ A> NGM_PPPOE_GETMODE = 13, /* see current mode */ A> NGM_PPPOE_SETENADDR = 14, /* set Ethernet address */ A> + NGM_PPPOE_SETMAXP = 15 /* Set PPP-Max-Payload value */ A> }; A> A> /*********************** A> @@ -147,6 +149,13 @@ struct ngpppoe_sts { A> { NULL } \ A> } A> A> +/* A> + * This structure is used to send PPP-Max-Payload value from server to client. A> + */ A> +struct ngpppoe_maxp { A> + char hook[NG_HOOKSIZ]; /* hook associated with event session */ A> + uint16_t data; A> +}; A> A> /******************************************************************** A> * Constants and definitions specific to pppoe A> @@ -229,6 +238,10 @@ struct datatag { A> u_int8_t data[PPPOE_SERVICE_NAME_SIZE]; A> }; A> A> +struct maxptag { A> + struct pppoe_tag hdr; A> + uint16_t data; A> +}; A> A> /* A> * Define the order in which we will place tags in packets A> _______________________________________________ A> svn-src-all@freebsd.org mailing list A> https://lists.freebsd.org/mailman/listinfo/svn-src-all A> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" -- Totus tuus, Glebius. From owner-svn-src-head@freebsd.org Tue Sep 15 01:08:19 2015 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 16DBCA03C82; Tue, 15 Sep 2015 01:08:19 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A8DBF145B; Tue, 15 Sep 2015 01:08:17 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.15.2/8.15.2) with ESMTPS id t8F18F3P099940 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 15 Sep 2015 04:08:15 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.15.2/8.15.2/Submit) id t8F18FKc099939; Tue, 15 Sep 2015 04:08:15 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 15 Sep 2015 04:08:15 +0300 From: Gleb Smirnoff To: "Alexander V. Chernikov" Cc: rozhuk.im@gmail.com, ae@FreeBSD.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r287779 - head/sys/netinet Message-ID: <20150915010815.GX1023@FreeBSD.org> References: <201509141028.t8EASmUe096159@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201509141028.t8EASmUe096159@repo.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Tue, 15 Sep 2015 01:08:19 -0000 Hi! On Mon, Sep 14, 2015 at 10:28:48AM +0000, Alexander V. Chernikov wrote: A> Author: melifaro A> Date: Mon Sep 14 10:28:47 2015 A> New Revision: 287779 A> URL: https://svnweb.freebsd.org/changeset/base/287779 A> A> Log: A> * Improve error checking for arp messages. A> * Clean stale headers from if_ether.c. A> A> Reported by: rozhuk.im at gmail.com A> Reviewed by: ae It would be nice if arpintr() uses ARP_LOG() as in_arpinput() does. All these messages can be triggered remotely. Please do this before merging to a stable branch. A> A> Modified: A> head/sys/netinet/if_ether.c A> A> Modified: head/sys/netinet/if_ether.c A> ============================================================================== A> --- head/sys/netinet/if_ether.c Mon Sep 14 09:56:01 2015 (r287778) A> +++ head/sys/netinet/if_ether.c Mon Sep 14 10:28:47 2015 (r287779) A> @@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$"); A> #include A> #include A> #include A> -#include A> #include A> #include A> #include A> @@ -71,9 +70,6 @@ __FBSDID("$FreeBSD$"); A> #include A> #endif A> A> -#include A> -#include A> - A> #include A> A> #define SIN(s) ((const struct sockaddr_in *)(s)) A> @@ -529,6 +525,8 @@ static void A> arpintr(struct mbuf *m) A> { A> struct arphdr *ar; A> + char *layer; A> + int hlen; A> A> if (m->m_len < sizeof(struct arphdr) && A> ((m = m_pullup(m, sizeof(struct arphdr))) == NULL)) { A> @@ -537,26 +535,56 @@ arpintr(struct mbuf *m) A> } A> ar = mtod(m, struct arphdr *); A> A> - if (ntohs(ar->ar_hrd) != ARPHRD_ETHER && A> - ntohs(ar->ar_hrd) != ARPHRD_IEEE802 && A> - ntohs(ar->ar_hrd) != ARPHRD_ARCNET && A> - ntohs(ar->ar_hrd) != ARPHRD_IEEE1394 && A> - ntohs(ar->ar_hrd) != ARPHRD_INFINIBAND) { A> - log(LOG_NOTICE, "arp: unknown hardware address format (0x%2D)" A> - " (from %*D to %*D)\n", (unsigned char *)&ar->ar_hrd, "", A> - ETHER_ADDR_LEN, (u_char *)ar_sha(ar), ":", A> - ETHER_ADDR_LEN, (u_char *)ar_tha(ar), ":"); A> + /* Check if length is sufficient */ A> + if ((m = m_pullup(m, arphdr_len(ar))) == NULL) { A> + log(LOG_NOTICE, "arp: short header received\n"); A> + return; A> + } A> + ar = mtod(m, struct arphdr *); A> + A> + hlen = 0; A> + layer = ""; A> + switch (ntohs(ar->ar_hrd)) { A> + case ARPHRD_ETHER: A> + hlen = ETHER_ADDR_LEN; /* RFC 826 */ A> + layer = "ethernet"; A> + break; A> + case ARPHRD_IEEE802: A> + hlen = 6; /* RFC 1390, FDDI_ADDR_LEN */ A> + layer = "fddi"; A> + break; A> + case ARPHRD_ARCNET: A> + hlen = 1; /* RFC 1201, ARC_ADDR_LEN */ A> + layer = "arcnet"; A> + break; A> + case ARPHRD_INFINIBAND: A> + hlen = 20; /* RFC 4391, INFINIBAND_ALEN */ A> + layer = "infiniband"; A> + break; A> + case ARPHRD_IEEE1394: A> + hlen = 0; /* SHALL be 16 */ /* RFC 2734 */ A> + layer = "firewire"; A> + A> + /* A> + * Restrict too long harware addresses. A> + * Currently we are capable of handling 20-byte A> + * addresses ( sizeof(lle->ll_addr) ) A> + */ A> + if (ar->ar_hln >= 20) A> + hlen = 16; A> + break; A> + default: A> + log(LOG_NOTICE, "arp: unknown hardware address format (0x%2d)\n", A> + htons(ar->ar_hrd)); A> m_freem(m); A> return; A> } A> A> - if (m->m_len < arphdr_len(ar)) { A> - if ((m = m_pullup(m, arphdr_len(ar))) == NULL) { A> - log(LOG_NOTICE, "arp: runt packet\n"); A> - m_freem(m); A> - return; A> - } A> - ar = mtod(m, struct arphdr *); A> + if (hlen != 0 && hlen != ar->ar_hln) { A> + log(LOG_NOTICE, "arp: bad %s header length: %d\n", layer, A> + ar->ar_hln); A> + m_freem(m); A> + return; A> } A> A> ARPSTAT_INC(received); A> _______________________________________________ A> svn-src-all@freebsd.org mailing list A> https://lists.freebsd.org/mailman/listinfo/svn-src-all A> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" -- Totus tuus, Glebius. From owner-svn-src-head@freebsd.org Tue Sep 15 03:01:42 2015 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 03837A03C84; Tue, 15 Sep 2015 03:01:42 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 C5DCF19DF; Tue, 15 Sep 2015 03:01:41 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8F31f89015621; Tue, 15 Sep 2015 03:01:41 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8F31foB015620; Tue, 15 Sep 2015 03:01:41 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509150301.t8F31foB015620@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 15 Sep 2015 03:01:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287804 - head/sys/dev/usb/wlan X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 03:01:42 -0000 Author: adrian Date: Tue Sep 15 03:01:40 2015 New Revision: 287804 URL: https://svnweb.freebsd.org/changeset/base/287804 Log: Replace the scan event input path hack with the new rx-stats based method. This allows for arbitrary channel info to be placed in the input call rather than the totally gross hack of overriding ic_curchan. Without this I'm sure ic_curchan setting was racing with the scan code setting the channel itself.. Modified: head/sys/dev/usb/wlan/if_rsu.c Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Mon Sep 14 21:26:48 2015 (r287803) +++ head/sys/dev/usb/wlan/if_rsu.c Tue Sep 15 03:01:40 2015 (r287804) @@ -1151,8 +1151,8 @@ rsu_event_survey(struct rsu_softc *sc, u { struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_frame *wh; - struct ieee80211_channel *c; struct ndis_wlan_bssid_ex *bss; + struct ieee80211_rx_stats rxs; struct mbuf *m; int pktlen; @@ -1192,17 +1192,19 @@ rsu_event_survey(struct rsu_softc *sc, u /* Finalize mbuf. */ m->m_pkthdr.len = m->m_len = pktlen; - /* Fix the channel. */ - c = ieee80211_find_channel_byieee(ic, - le32toh(bss->config.dsconfig), - IEEE80211_CHAN_G); - if (c) { - ic->ic_curchan = c; - ieee80211_radiotap_chan_change(ic); - } + + /* Set channel flags for input path */ + bzero(&rxs, sizeof(rxs)); + rxs.r_flags |= IEEE80211_R_IEEE | IEEE80211_R_FREQ; + rxs.r_flags |= IEEE80211_R_NF | IEEE80211_R_RSSI; + rxs.c_ieee = le32toh(bss->config.dsconfig); + rxs.c_freq = ieee80211_ieee2mhz(rxs.c_ieee, IEEE80211_CHAN_2GHZ); + rxs.rssi = le32toh(bss->rssi); + rxs.nf = 0; /* XXX */ + /* XXX avoid a LOR */ RSU_UNLOCK(sc); - ieee80211_input_all(ic, m, le32toh(bss->rssi), 0); + ieee80211_input_mimo_all(ic, m, &rxs); RSU_LOCK(sc); } From owner-svn-src-head@freebsd.org Tue Sep 15 05:01:45 2015 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 5C623A034CD; Tue, 15 Sep 2015 05:01:45 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 4DAA21CEA; Tue, 15 Sep 2015 05:01:45 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8F51j5K069306; Tue, 15 Sep 2015 05:01:45 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8F51jum069305; Tue, 15 Sep 2015 05:01:45 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201509150501.t8F51jum069305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 15 Sep 2015 05:01:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287805 - head X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 05:01:45 -0000 Author: markj Date: Tue Sep 15 05:01:44 2015 New Revision: 287805 URL: https://svnweb.freebsd.org/changeset/base/287805 Log: Unconditionally build CTF tools in the bootstrap-tools phase of the build. Stale CTF tools are a frequent source of DTrace issues, and they compile quickly enough that the increase in build time is negligible. Reviewed by: emaste, imp Differential Revision: https://reviews.freebsd.org/D3670 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Sep 15 03:01:40 2015 (r287804) +++ head/Makefile.inc1 Tue Sep 15 05:01:44 2015 (r287805) @@ -1355,11 +1355,8 @@ ${_bt}-usr.bin/clang/clang-tblgen: ${_bt ${_bt}-usr.bin/clang/tblgen: ${_bt}-lib/clang/libllvmtablegen ${_bt}-lib/clang/libllvmsupport .endif -# ELF Tool Chain libraries are needed for ELF tools and dtrace tools. -# dtrace tools are required for older bootstrap env and cross-build -# pre libdwarf -.if ${BOOTSTRAPPING} < 1100006 || (${MACHINE} != ${TARGET} || \ - ${MACHINE_ARCH} != ${TARGET_ARCH}) +# Rebuild ctfconvert and ctfmerge to avoid difficult-to-diagnose failures +# resulting from missing bug fixes or ELF Toolchain updates. .if ${MK_CDDL} != "no" _dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf cddl/usr.bin/ctfconvert \ cddl/usr.bin/ctfmerge @@ -1367,7 +1364,6 @@ _dtrace_tools= cddl/usr.bin/sgsmsg cddl/ ${_bt}-cddl/usr.bin/ctfconvert: ${_bt}-cddl/lib/libctf ${_bt}-cddl/usr.bin/ctfmerge: ${_bt}-cddl/lib/libctf .endif -.endif # Default to building the GPL DTC, but build the BSDL one if users explicitly # request it. From owner-svn-src-head@freebsd.org Tue Sep 15 05:09:18 2015 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 424E1A03902; Tue, 15 Sep 2015 05:09:18 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 3306A1FFB; Tue, 15 Sep 2015 05:09:18 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8F59IsC069638; Tue, 15 Sep 2015 05:09:18 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8F59IhJ069637; Tue, 15 Sep 2015 05:09:18 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201509150509.t8F59IhJ069637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 15 Sep 2015 05:09:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287806 - head/sys/cam/scsi X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 05:09:18 -0000 Author: markj Date: Tue Sep 15 05:09:17 2015 New Revision: 287806 URL: https://svnweb.freebsd.org/changeset/base/287806 Log: Preserve the device queue status before retrying a sense request in chdone(). Previously, the retry could clear the CAM_DEV_QFRZN bit in the CCB status, leaving the queue frozen. Submitted by: Jeff Miller Reviewed by: ken MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/sys/cam/scsi/scsi_ch.c Modified: head/sys/cam/scsi/scsi_ch.c ============================================================================== --- head/sys/cam/scsi/scsi_ch.c Tue Sep 15 05:01:44 2015 (r287805) +++ head/sys/cam/scsi/scsi_ch.c Tue Sep 15 05:09:17 2015 (r287806) @@ -655,11 +655,13 @@ chdone(struct cam_periph *periph, union */ return; } else if (error != 0) { - int retry_scheduled; struct scsi_mode_sense_6 *sms; + int frozen, retry_scheduled; sms = (struct scsi_mode_sense_6 *) done_ccb->csio.cdb_io.cdb_bytes; + frozen = (done_ccb->ccb_h.status & + CAM_DEV_QFRZN) != 0; /* * Check to see if block descriptors were @@ -670,7 +672,8 @@ chdone(struct cam_periph *periph, union * block descriptors were disabled, enable * them and re-send the command. */ - if (sms->byte2 & SMS_DBD) { + if ((sms->byte2 & SMS_DBD) != 0 && + (periph->flags & CAM_PERIPH_INVALID) == 0) { sms->byte2 &= ~SMS_DBD; xpt_action(done_ccb); softc->quirks |= CH_Q_NO_DBD; @@ -679,7 +682,7 @@ chdone(struct cam_periph *periph, union retry_scheduled = 0; /* Don't wedge this device's queue */ - if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) + if (frozen) cam_release_devq(done_ccb->ccb_h.path, /*relsim_flags*/0, /*reduction*/0, From owner-svn-src-head@freebsd.org Tue Sep 15 05:16:28 2015 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 29B3DA03D84; Tue, 15 Sep 2015 05:16:28 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 0095C13E5; Tue, 15 Sep 2015 05:16:28 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8F5GRwR073593; Tue, 15 Sep 2015 05:16:27 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8F5GRh8073591; Tue, 15 Sep 2015 05:16:27 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201509150516.t8F5GRh8073591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 15 Sep 2015 05:16:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287807 - in head: cddl/lib/libdtrace share/man/man4 X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 05:16:28 -0000 Author: markj Date: Tue Sep 15 05:16:26 2015 New Revision: 287807 URL: https://svnweb.freebsd.org/changeset/base/287807 Log: Remove an unneeded typedef of ip6_t from the DTrace ip provider library. It causes an error when ipfilter is enabled, since ipl.ko contains an identical typedef. PR: 203092 MFC after: 1 week Modified: head/cddl/lib/libdtrace/ip.d head/share/man/man4/dtrace_ip.4 Modified: head/cddl/lib/libdtrace/ip.d ============================================================================== --- head/cddl/lib/libdtrace/ip.d Tue Sep 15 05:09:17 2015 (r287806) +++ head/cddl/lib/libdtrace/ip.d Tue Sep 15 05:16:26 2015 (r287807) @@ -110,7 +110,6 @@ typedef struct ipv4info { * These values are NULL if the packet is not IPv6. */ typedef struct in6_addr in6_addr_t; -typedef struct ip6_hdr ip6_t; typedef struct ipv6info { uint8_t ipv6_ver; /* IP version (6) */ uint8_t ipv6_tclass; /* traffic class */ @@ -123,7 +122,7 @@ typedef struct ipv6info { in6_addr_t *ipv6_dst; /* destination address */ string ipv6_saddr; /* source address, string */ string ipv6_daddr; /* destination address, string */ - ip6_t *ipv6_hdr; /* pointer to raw header */ + struct ip6_hdr *ipv6_hdr; /* pointer to raw header */ } ipv6info_t; #pragma D binding "1.5" IPPROTO_IP @@ -282,5 +281,5 @@ translator ipv6info_t < struct ip6_hdr * ipv6_dst = p == NULL ? 0 : (in6_addr_t *)&p->ip6_dst; ipv6_saddr = p == NULL ? 0 : inet_ntoa6(&p->ip6_src); ipv6_daddr = p == NULL ? 0 : inet_ntoa6(&p->ip6_dst); - ipv6_hdr = (ip6_t *)p; + ipv6_hdr = p; }; Modified: head/share/man/man4/dtrace_ip.4 ============================================================================== --- head/share/man/man4/dtrace_ip.4 Tue Sep 15 05:09:17 2015 (r287806) +++ head/share/man/man4/dtrace_ip.4 Tue Sep 15 05:16:26 2015 (r287807) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 18, 2015 +.Dd September 14, 2015 .Dt DTRACE_IP 4 .Os .Sh NAME @@ -212,7 +212,7 @@ IPv6 destination address. A string representation of the source address. .It Vt string ipv6_daddr A string representation of the destination address. -.It Vt ip6_t *ipv6_hdr +.It Vt struct ip6_hdr *ipv6_hdr A pointer to the raw IPv6 header. .El .Sh FILES From owner-svn-src-head@freebsd.org Tue Sep 15 06:48:21 2015 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 2C526A04202; Tue, 15 Sep 2015 06:48:21 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 111201DA8; Tue, 15 Sep 2015 06:48:21 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8F6mKgg013604; Tue, 15 Sep 2015 06:48:20 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8F6mKWk013600; Tue, 15 Sep 2015 06:48:20 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201509150648.t8F6mKWk013600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Tue, 15 Sep 2015 06:48:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287813 - in head/sys: net netinet netinet6 X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 06:48:21 -0000 Author: melifaro Date: Tue Sep 15 06:48:19 2015 New Revision: 287813 URL: https://svnweb.freebsd.org/changeset/base/287813 Log: * Require explicitl lle unlink prior to calling llentry_delete(). This one slightly decreases time of holding afdata wlock. * While here, make nd6_free() return void. No one has used its return value since r186119. Modified: head/sys/net/if_llatbl.c head/sys/netinet/if_ether.c head/sys/netinet6/nd6.c Modified: head/sys/net/if_llatbl.c ============================================================================== --- head/sys/net/if_llatbl.c Tue Sep 15 06:22:50 2015 (r287812) +++ head/sys/net/if_llatbl.c Tue Sep 15 06:48:19 2015 (r287813) @@ -291,17 +291,11 @@ lltable_drop_entry_queue(struct llentry size_t llentry_free(struct llentry *lle) { - struct lltable *llt; size_t pkts_dropped; LLE_WLOCK_ASSERT(lle); - if ((lle->la_flags & LLE_LINKED) != 0) { - llt = lle->lle_tbl; - - IF_AFDATA_WLOCK_ASSERT(llt->llt_ifp); - llt->llt_unlink_entry(lle); - } + KASSERT((lle->la_flags & LLE_LINKED) == 0, ("freeing linked lle")); pkts_dropped = lltable_drop_entry_queue(lle); Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Tue Sep 15 06:22:50 2015 (r287812) +++ head/sys/netinet/if_ether.c Tue Sep 15 06:48:19 2015 (r287813) @@ -194,16 +194,14 @@ arptimer(void *arg) /* Guard against race with other llentry_free(). */ if (lle->la_flags & LLE_LINKED) { - - size_t pkts_dropped; LLE_REMREF(lle); - pkts_dropped = llentry_free(lle); - ARPSTAT_ADD(dropped, pkts_dropped); - } else - LLE_FREE_LOCKED(lle); - + lltable_unlink_entry(lle->lle_tbl, lle); + } IF_AFDATA_UNLOCK(ifp); + size_t pkts_dropped = llentry_free(lle); + + ARPSTAT_ADD(dropped, pkts_dropped); ARPSTAT_INC(timeouts); CURVNET_RESTORE(); Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Tue Sep 15 06:22:50 2015 (r287812) +++ head/sys/netinet6/nd6.c Tue Sep 15 06:48:19 2015 (r287813) @@ -131,7 +131,7 @@ static int nd6_is_new_addr_neighbor(stru static void nd6_setmtu0(struct ifnet *, struct nd_ifinfo *); static void nd6_slowtimo(void *); static int regen_tmpaddr(struct in6_ifaddr *); -static struct llentry *nd6_free(struct llentry *, int); +static void nd6_free(struct llentry *, int); static void nd6_free_redirect(const struct llentry *); static void nd6_llinfo_timer(void *); static void clear_llinfo_pqueue(struct llentry *); @@ -603,7 +603,7 @@ nd6_llinfo_timer(void *arg) } if (ln->la_flags & LLE_DELETED) { - (void)nd6_free(ln, 0); + nd6_free(ln, 0); ln = NULL; goto done; } @@ -630,7 +630,7 @@ nd6_llinfo_timer(void *arg) clear_llinfo_pqueue(ln); } EVENTHANDLER_INVOKE(lle_event, ln, LLENTRY_TIMEDOUT); - (void)nd6_free(ln, 0); + nd6_free(ln, 0); ln = NULL; if (m != NULL) icmp6_error2(m, ICMP6_DST_UNREACH, @@ -648,7 +648,7 @@ nd6_llinfo_timer(void *arg) /* Garbage Collection(RFC 2461 5.3) */ if (!ND6_LLINFO_PERMANENT(ln)) { EVENTHANDLER_INVOKE(lle_event, ln, LLENTRY_EXPIRED); - (void)nd6_free(ln, 1); + nd6_free(ln, 1); ln = NULL; } break; @@ -670,7 +670,7 @@ nd6_llinfo_timer(void *arg) send_ns = 1; } else { EVENTHANDLER_INVOKE(lle_event, ln, LLENTRY_EXPIRED); - (void)nd6_free(ln, 0); + nd6_free(ln, 0); ln = NULL; } break; @@ -1125,10 +1125,9 @@ nd6_is_addr_neighbor(struct sockaddr_in6 * make it global, unless you have a strong reason for the change, and are sure * that the change is safe. */ -static struct llentry * +static void nd6_free(struct llentry *ln, int gc) { - struct llentry *next; struct nd_defrouter *dr; struct ifnet *ifp; @@ -1168,10 +1167,9 @@ nd6_free(struct llentry *ln, int gc) nd6_llinfo_settimer_locked(ln, (long)V_nd6_gctimer * hz); - next = LIST_NEXT(ln, lle_next); LLE_REMREF(ln); LLE_WUNLOCK(ln); - return (next); + return; } if (dr) { @@ -1236,31 +1234,21 @@ nd6_free(struct llentry *ln, int gc) } /* - * Before deleting the entry, remember the next entry as the - * return value. We need this because pfxlist_onlink_check() above - * might have freed other entries (particularly the old next entry) as - * a side effect (XXX). - */ - next = LIST_NEXT(ln, lle_next); - - /* * Save to unlock. We still hold an extra reference and will not * free(9) in llentry_free() if someone else holds one as well. */ LLE_WUNLOCK(ln); IF_AFDATA_LOCK(ifp); LLE_WLOCK(ln); - /* Guard against race with other llentry_free(). */ if (ln->la_flags & LLE_LINKED) { + /* Remove callout reference */ LLE_REMREF(ln); - llentry_free(ln); - } else - LLE_FREE_LOCKED(ln); - + lltable_unlink_entry(ln->lle_tbl, ln); + } IF_AFDATA_UNLOCK(ifp); - return (next); + llentry_free(ln); } /* From owner-svn-src-head@freebsd.org Tue Sep 15 08:32:23 2015 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 07610A03437; Tue, 15 Sep 2015 08:32:23 +0000 (UTC) (envelope-from royger@gmail.com) Received: from mail-wi0-x22f.google.com (mail-wi0-x22f.google.com [IPv6:2a00:1450:400c:c05::22f]) (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 91D8C1B0D; Tue, 15 Sep 2015 08:32:22 +0000 (UTC) (envelope-from royger@gmail.com) Received: by wiclk2 with SMTP id lk2so17587347wic.0; Tue, 15 Sep 2015 01:32:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=HRmqDr61snTkstS9DwRJr/XOzUP7mwrL26rHYkIaJw8=; b=SkOtSKIQc+u4fxIsH+0+QIu3zYqw84Riz3SeG90emMV316fcXid4FwhJvEtsWsiJ7r O+LMeOMRjxHMtZHen1VaTY2an/JjrT6b16JmJ8AQKe1ic93n0vz+JYk7R+MkrvheAxri +eZLp10Z/T9fid6iWJ4DpkMn/9ipSyx3h961JF9A7h8qfaG4hE9OhOZUfe4J9KJlSdnk TntB3ocDFbmHZ+m+tgQKAhtoxOp8GPhtuwK57nsytPg0ptw7rF9Hxcx6uSKa6/pt1mR1 9sUEVSQ2XewCMl0nnB6hn/9U3q/Qv7x4ZbDPTanWsxpq0eIhrSdfEkc2te0k0on5Er8F NBTQ== X-Received: by 10.180.103.72 with SMTP id fu8mr4901235wib.7.1442305940100; Tue, 15 Sep 2015 01:32:20 -0700 (PDT) Received: from [172.16.1.30] (195.Red-83-39-7.dynamicIP.rima-tde.net. [83.39.7.195]) by smtp.gmail.com with ESMTPSA id lu5sm19794536wjb.9.2015.09.15.01.32.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Sep 2015 01:32:19 -0700 (PDT) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Subject: Re: svn commit: r271946 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront kern net netinet ofed/drivers/net/mlx4 sys To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201409220827.s8M8RRHB031526@svn.freebsd.org> <55F69093.5050807@FreeBSD.org> <55F6935C.9000000@selasky.org> From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Message-ID: <55F7D783.1080406@FreeBSD.org> Date: Tue, 15 Sep 2015 10:32:03 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <55F6935C.9000000@selasky.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Tue, 15 Sep 2015 08:32:23 -0000 El 14/09/15 a les 11.29, Hans Petter Selasky ha escrit: > On 09/14/15 11:17, Roger Pau Monné wrote: >> El 22/09/14 a les 10.27, Hans Petter Selasky ha escrit: >>> Author: hselasky >>> Date: Mon Sep 22 08:27:27 2014 >>> New Revision: 271946 >>> URL: http://svnweb.freebsd.org/changeset/base/271946 >>> >>> Log: >>> Improve transmit sending offload, TSO, algorithm in general. >>> >>> The current TSO limitation feature only takes the total number of >>> bytes in an mbuf chain into account and does not limit by the number >>> of mbufs in a chain. Some kinds of hardware is limited by two >>> factors. One is the fragment length and the second is the fragment >>> count. Both of these limits need to be taken into account when doing >>> TSO. Else some kinds of hardware might have to drop completely valid >>> mbuf chains because they cannot loaded into the given hardware's DMA >>> engine. The new way of doing TSO limitation has been made backwards >>> compatible as input from other FreeBSD developers and will use >>> defaults for values not set. >>> >>> Reviewed by: adrian, rmacklem >>> Sponsored by: Mellanox Technologies >> >> This commit makes xen-netfront tx performance drop from ~5Gbits/sec >> (with debug options enabled) to 446 Mbits/sec. I'm currently looking, >> but if anyone has ideas they are welcome. >> > > Hi Roger, > > Looking at the netfront code you should subtract 1 from tsomaxsegcount > prior to r287775. The reason might simply be that 2K clusters are used > instead of 4K clusters, causing m_defrag() to be called. > >> ifp->if_hw_tsomax = 65536 - (ETHER_HDR_LEN + >> ETHER_VLAN_ENCAP_LEN); >> ifp->if_hw_tsomaxsegcount = MAX_TX_REQ_FRAGS; >> ifp->if_hw_tsomaxsegsize = PAGE_SIZE; > > After r287775 can you try these settings: > > ifp->if_hw_tsomax = 65536; > ifp->if_hw_tsomaxsegcount = MAX_TX_REQ_FRAGS; > ifp->if_hw_tsomaxsegsize = PAGE_SIZE; > > And see if the performance is the same like before? FWIW, just using r287775 seems to solve the problem, even if I leave if_hw_tsomax with it's current value. Roger. From owner-svn-src-head@freebsd.org Tue Sep 15 08:40:55 2015 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 E0DF5A03AC6; Tue, 15 Sep 2015 08:40:55 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (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 A6134113F; Tue, 15 Sep 2015 08:40:55 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 626671FE023; Tue, 15 Sep 2015 10:40:52 +0200 (CEST) Subject: Re: svn commit: r271946 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront kern net netinet ofed/drivers/net/mlx4 sys To: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201409220827.s8M8RRHB031526@svn.freebsd.org> <55F69093.5050807@FreeBSD.org> <55F6935C.9000000@selasky.org> <55F7D783.1080406@FreeBSD.org> From: Hans Petter Selasky Message-ID: <55F7D9F2.3020207@selasky.org> Date: Tue, 15 Sep 2015 10:42:26 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <55F7D783.1080406@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Tue, 15 Sep 2015 08:40:56 -0000 On 09/15/15 10:32, Roger Pau Monné wrote: > El 14/09/15 a les 11.29, Hans Petter Selasky ha escrit: >> On 09/14/15 11:17, Roger Pau Monné wrote: >>> El 22/09/14 a les 10.27, Hans Petter Selasky ha escrit: >> Hi Roger, >> >> Looking at the netfront code you should subtract 1 from tsomaxsegcount >> prior to r287775. The reason might simply be that 2K clusters are used >> instead of 4K clusters, causing m_defrag() to be called. >> >>> ifp->if_hw_tsomax = 65536 - (ETHER_HDR_LEN + >>> ETHER_VLAN_ENCAP_LEN); >>> ifp->if_hw_tsomaxsegcount = MAX_TX_REQ_FRAGS; >>> ifp->if_hw_tsomaxsegsize = PAGE_SIZE; >> >> After r287775 can you try these settings: >> >> ifp->if_hw_tsomax = 65536; >> ifp->if_hw_tsomaxsegcount = MAX_TX_REQ_FRAGS; >> ifp->if_hw_tsomaxsegsize = PAGE_SIZE; >> >> And see if the performance is the same like before? > > FWIW, just using r287775 seems to solve the problem, even if I leave > if_hw_tsomax with it's current value. > That's expected. Thank you for testing. --HPS From owner-svn-src-head@freebsd.org Tue Sep 15 08:50:45 2015 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 66D0FA020A6; Tue, 15 Sep 2015 08:50:45 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 4C67915E8; Tue, 15 Sep 2015 08:50:45 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8F8ojK4070098; Tue, 15 Sep 2015 08:50:45 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8F8ojex070096; Tue, 15 Sep 2015 08:50:45 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201509150850.t8F8ojex070096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Tue, 15 Sep 2015 08:50:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287815 - head/sys/netinet X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 08:50:45 -0000 Author: melifaro Date: Tue Sep 15 08:50:44 2015 New Revision: 287815 URL: https://svnweb.freebsd.org/changeset/base/287815 Log: * Improve logging invalid arp messages * Remove redundant check in ip_arpinput Suggested by: glebius MFC after: 2 weeks Modified: head/sys/netinet/if_ether.c Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Tue Sep 15 08:34:32 2015 (r287814) +++ head/sys/netinet/if_ether.c Tue Sep 15 08:50:44 2015 (r287815) @@ -73,7 +73,10 @@ __FBSDID("$FreeBSD$"); #include #define SIN(s) ((const struct sockaddr_in *)(s)) -#define SDL(s) ((struct sockaddr_dl *)s) + +static struct timeval arp_lastlog; +static int arp_curpps; +static int arp_maxpps = 1; SYSCTL_DECL(_net_link_ether); static SYSCTL_NODE(_net_link_ether, PF_INET, inet, CTLFLAG_RW, 0, ""); @@ -118,6 +121,16 @@ SYSCTL_VNET_PCPUSTAT(_net_link_ether_arp SYSCTL_INT(_net_link_ether_inet, OID_AUTO, maxhold, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(arp_maxhold), 0, "Number of packets to hold per ARP entry"); +SYSCTL_INT(_net_link_ether_inet, OID_AUTO, max_log_per_second, + CTLFLAG_RW, &arp_maxpps, 0, + "Maximum number of remotely triggered ARP messages that can be " + "logged per second"); + +#define ARP_LOG(pri, ...) do { \ + if (ppsratecheck(&arp_lastlog, &arp_curpps, arp_maxpps)) \ + log((pri), "arp: " __VA_ARGS__); \ +} while (0) + static void arp_init(void); static void arpintr(struct mbuf *); @@ -503,19 +516,24 @@ static void arpintr(struct mbuf *m) { struct arphdr *ar; + struct ifnet *ifp; char *layer; int hlen; + ifp = m->m_pkthdr.rcvif; + if (m->m_len < sizeof(struct arphdr) && ((m = m_pullup(m, sizeof(struct arphdr))) == NULL)) { - log(LOG_NOTICE, "arp: runt packet -- m_pullup failed\n"); + ARP_LOG(LOG_NOTICE, "packet with short header received on %s\n", + if_name(ifp)); return; } ar = mtod(m, struct arphdr *); /* Check if length is sufficient */ if ((m = m_pullup(m, arphdr_len(ar))) == NULL) { - log(LOG_NOTICE, "arp: short header received\n"); + ARP_LOG(LOG_NOTICE, "short packet received on %s\n", + if_name(ifp)); return; } ar = mtod(m, struct arphdr *); @@ -552,15 +570,17 @@ arpintr(struct mbuf *m) hlen = 16; break; default: - log(LOG_NOTICE, "arp: unknown hardware address format (0x%2d)\n", - htons(ar->ar_hrd)); + ARP_LOG(LOG_NOTICE, + "packet with unknown harware format 0x%02d received on %s\n", + ntohs(ar->ar_hrd), if_name(ifp)); m_freem(m); return; } if (hlen != 0 && hlen != ar->ar_hln) { - log(LOG_NOTICE, "arp: bad %s header length: %d\n", layer, - ar->ar_hln); + ARP_LOG(LOG_NOTICE, + "packet with invalid %s address length %d received on %s\n", + layer, ar->ar_hln, if_name(ifp)); m_freem(m); return; } @@ -595,9 +615,6 @@ static int log_arp_wrong_iface = 1; static int log_arp_movements = 1; static int log_arp_permanent_modify = 1; static int allow_multicast = 0; -static struct timeval arp_lastlog; -static int arp_curpps; -static int arp_maxpps = 1; SYSCTL_INT(_net_link_ether_inet, OID_AUTO, log_arp_wrong_iface, CTLFLAG_RW, &log_arp_wrong_iface, 0, @@ -610,15 +627,6 @@ SYSCTL_INT(_net_link_ether_inet, OID_AUT "log arp replies from MACs different than the one in the permanent arp entry"); SYSCTL_INT(_net_link_ether_inet, OID_AUTO, allow_multicast, CTLFLAG_RW, &allow_multicast, 0, "accept multicast addresses"); -SYSCTL_INT(_net_link_ether_inet, OID_AUTO, max_log_per_second, - CTLFLAG_RW, &arp_maxpps, 0, - "Maximum number of remotely triggered ARP messages that can be " - "logged per second"); - -#define ARP_LOG(pri, ...) do { \ - if (ppsratecheck(&arp_lastlog, &arp_curpps, arp_maxpps)) \ - log((pri), "arp: " __VA_ARGS__); \ -} while (0) static void in_arpinput(struct mbuf *m) @@ -634,7 +642,6 @@ in_arpinput(struct mbuf *m) struct in_addr isaddr, itaddr, myaddr; u_int8_t *enaddr = NULL; int op; - int req_len; int bridged = 0, is_bridge = 0; int carped; struct sockaddr_in sin; @@ -648,13 +655,12 @@ in_arpinput(struct mbuf *m) if (ifp->if_type == IFT_BRIDGE) is_bridge = 1; - req_len = arphdr_len2(ifp->if_addrlen, sizeof(struct in_addr)); - if (m->m_len < req_len && (m = m_pullup(m, req_len)) == NULL) { - ARP_LOG(LOG_NOTICE, "runt packet -- m_pullup failed\n"); - return; - } - + /* + * We already have checked that mbuf contains enough contiguous data + * to hold entire arp message according to the arp header. + */ ah = mtod(m, struct arphdr *); + /* * ARP is only for IPv4 so we can reject packets with * a protocol length not equal to an IPv4 address. From owner-svn-src-head@freebsd.org Tue Sep 15 09:36:47 2015 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 F3083A043B5; Tue, 15 Sep 2015 09:36:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 CA6C910EB; Tue, 15 Sep 2015 09:36:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8F9alGu089562; Tue, 15 Sep 2015 09:36:47 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8F9alLJ089561; Tue, 15 Sep 2015 09:36:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509150936.t8F9alLJ089561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 15 Sep 2015 09:36:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287816 - head/sys/cam/ctl X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 09:36:48 -0000 Author: mav Date: Tue Sep 15 09:36:46 2015 New Revision: 287816 URL: https://svnweb.freebsd.org/changeset/base/287816 Log: Close potential race between datamove and HA failover. Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Tue Sep 15 08:50:44 2015 (r287815) +++ head/sys/cam/ctl/ctl.c Tue Sep 15 09:36:46 2015 (r287816) @@ -10950,6 +10950,7 @@ ctl_failover_lun(struct ctl_lun *lun) if (io->flags & CTL_FLAG_FROM_OTHER_SC) { if (io->flags & CTL_FLAG_IO_ACTIVE) { io->flags |= CTL_FLAG_ABORT; + io->flags |= CTL_FLAG_FAILOVER; } else { /* This can be only due to DATAMOVE */ io->msg_type = CTL_MSG_DATAMOVE_DONE; io->flags |= CTL_FLAG_IO_ACTIVE; @@ -12102,12 +12103,14 @@ ctl_datamove_timer_wakeup(void *arg) void ctl_datamove(union ctl_io *io) { + struct ctl_lun *lun; void (*fe_datamove)(union ctl_io *io); mtx_assert(&control_softc->ctl_lock, MA_NOTOWNED); CTL_DEBUG_PRINT(("ctl_datamove\n")); + lun = (struct ctl_lun *)io->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; #ifdef CTL_TIME_IO if ((time_uptime - io->io_hdr.start_time) > ctl_time_io_secs) { char str[256]; @@ -12148,9 +12151,6 @@ ctl_datamove(union ctl_io *io) if (io->io_hdr.flags & CTL_FLAG_DELAY_DONE) { io->io_hdr.flags &= ~CTL_FLAG_DELAY_DONE; } else { - struct ctl_lun *lun; - - lun =(struct ctl_lun *)io->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; if ((lun != NULL) && (lun->delay_info.datamove_delay > 0)) { @@ -12326,7 +12326,24 @@ ctl_datamove(union ctl_io *io) msg.dt.sent_sg_entries = sg_entries_sent; } + + /* + * Officially handover the request from us to peer. + * If failover has just happened, then we must return error. + * If failover happen just after, then it is not our problem. + */ + if (lun) + mtx_lock(&lun->lun_lock); + if (io->io_hdr.flags & CTL_FLAG_FAILOVER) { + if (lun) + mtx_unlock(&lun->lun_lock); + io->io_hdr.port_status = 31342; + io->scsiio.be_move_done(io); + return; + } io->io_hdr.flags &= ~CTL_FLAG_IO_ACTIVE; + if (lun) + mtx_unlock(&lun->lun_lock); } else { /* From owner-svn-src-head@freebsd.org Tue Sep 15 10:42:54 2015 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 0C074A02BE2; Tue, 15 Sep 2015 10:42:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 D4D4A195F; Tue, 15 Sep 2015 10:42:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8FAgreH020690; Tue, 15 Sep 2015 10:42:53 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8FAgrmf020689; Tue, 15 Sep 2015 10:42:53 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509151042.t8FAgrmf020689@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 15 Sep 2015 10:42:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287818 - head/sys/cam/ctl X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 10:42:54 -0000 Author: mav Date: Tue Sep 15 10:42:53 2015 New Revision: 287818 URL: https://svnweb.freebsd.org/changeset/base/287818 Log: Fix completion/error status reporting. Modified: head/sys/cam/ctl/ctl_frontend_cam_sim.c Modified: head/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_cam_sim.c Tue Sep 15 09:59:13 2015 (r287817) +++ head/sys/cam/ctl/ctl_frontend_cam_sim.c Tue Sep 15 10:42:53 2015 (r287818) @@ -438,7 +438,8 @@ cfcs_datamove(union ctl_io *io) if ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS) { io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = NULL; io->io_hdr.flags |= CTL_FLAG_STATUS_SENT; - ccb->ccb_h.status = CAM_REQ_CMP; + ccb->ccb_h.status &= ~CAM_STATUS_MASK; + ccb->ccb_h.status |= CAM_REQ_CMP; xpt_done(ccb); } @@ -465,12 +466,13 @@ cfcs_done(union ctl_io *io) /* * Translate CTL status to CAM status. */ + ccb->ccb_h.status &= ~CAM_STATUS_MASK; switch (io->io_hdr.status & CTL_STATUS_MASK) { case CTL_SUCCESS: - ccb->ccb_h.status = CAM_REQ_CMP; + ccb->ccb_h.status |= CAM_REQ_CMP; break; case CTL_SCSI_ERROR: - ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR | CAM_AUTOSNS_VALID; + ccb->ccb_h.status |= CAM_SCSI_STATUS_ERROR | CAM_AUTOSNS_VALID; ccb->csio.scsi_status = io->scsiio.scsi_status; bcopy(&io->scsiio.sense_data, &ccb->csio.sense_data, min(io->scsiio.sense_len, ccb->csio.sense_len)); @@ -486,14 +488,18 @@ cfcs_done(union ctl_io *io) } break; case CTL_CMD_ABORTED: - ccb->ccb_h.status = CAM_REQ_ABORTED; + ccb->ccb_h.status |= CAM_REQ_ABORTED; break; case CTL_ERROR: default: - ccb->ccb_h.status = CAM_REQ_CMP_ERR; + ccb->ccb_h.status |= CAM_REQ_CMP_ERR; break; } - + if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP && + (ccb->ccb_h.status & CAM_DEV_QFRZN) == 0) { + xpt_freeze_devq(ccb->ccb_h.path, 1); + ccb->ccb_h.status |= CAM_DEV_QFRZN; + } xpt_done(ccb); ctl_free_io(io); } From owner-svn-src-head@freebsd.org Tue Sep 15 10:57:17 2015 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 DFDF4A03788; Tue, 15 Sep 2015 10:57:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 B730C14DD; Tue, 15 Sep 2015 10:57:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8FAvH5w025745; Tue, 15 Sep 2015 10:57:17 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8FAvHID025743; Tue, 15 Sep 2015 10:57:17 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509151057.t8FAvHID025743@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 15 Sep 2015 10:57:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287819 - head/sys/cam/scsi X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 10:57:18 -0000 Author: mav Date: Tue Sep 15 10:57:16 2015 New Revision: 287819 URL: https://svnweb.freebsd.org/changeset/base/287819 Log: Make CAM log errors that make it wait. Waiting can take minutes, and it would be good for user to know what is going on. MFC after: 2 weeks Modified: head/sys/cam/scsi/scsi_all.c head/sys/cam/scsi/scsi_all.h Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Tue Sep 15 10:42:53 2015 (r287818) +++ head/sys/cam/scsi/scsi_all.c Tue Sep 15 10:57:16 2015 (r287819) @@ -1080,7 +1080,7 @@ static struct asc_table_entry asc_table[ { SST(0x04, 0x00, SS_RDEF, "Logical unit not ready, cause not reportable") }, /* DTLPWROMAEBKVF */ - { SST(0x04, 0x01, SS_TUR | SSQ_MANY | SSQ_DECREMENT_COUNT | EBUSY, + { SST(0x04, 0x01, SS_WAIT | EBUSY, "Logical unit is in process of becoming ready") }, /* DTLPWROMAEBKVF */ { SST(0x04, 0x02, SS_START | SSQ_DECREMENT_COUNT | ENXIO, @@ -1107,7 +1107,7 @@ static struct asc_table_entry asc_table[ { SST(0x04, 0x09, SS_RDEF, /* XXX TBD */ "Logical unit not ready, self-test in progress") }, /* DTLPWROMAEBKVF */ - { SST(0x04, 0x0A, SS_TUR | SSQ_MANY | SSQ_DECREMENT_COUNT | ENXIO, + { SST(0x04, 0x0A, SS_WAIT | ENXIO, "Logical unit not accessible, asymmetric access state transition")}, /* DTLPWROMAEBKVF */ { SST(0x04, 0x0B, SS_FATAL | ENXIO, @@ -1122,7 +1122,7 @@ static struct asc_table_entry asc_table[ { SST(0x04, 0x10, SS_RDEF, /* XXX TBD */ "Logical unit not ready, auxiliary memory not accessible") }, /* DT WRO AEB VF */ - { SST(0x04, 0x11, SS_TUR | SSQ_MANY | SSQ_DECREMENT_COUNT | EBUSY, + { SST(0x04, 0x11, SS_WAIT | EBUSY, "Logical unit not ready, notify (enable spinup) required") }, /* M V */ { SST(0x04, 0x12, SS_RDEF, /* XXX TBD */ Modified: head/sys/cam/scsi/scsi_all.h ============================================================================== --- head/sys/cam/scsi/scsi_all.h Tue Sep 15 10:42:53 2015 (r287818) +++ head/sys/cam/scsi/scsi_all.h Tue Sep 15 10:57:16 2015 (r287819) @@ -103,6 +103,9 @@ typedef enum { /* The retyable, error action, with table specified error code */ #define SS_RET SS_RETRY|SSQ_DECREMENT_COUNT|SSQ_PRINT_SENSE +/* Wait for transient error status to change */ +#define SS_WAIT SS_TUR|SSQ_MANY|SSQ_DECREMENT_COUNT|SSQ_PRINT_SENSE + /* Fatal error action, with table specified error code */ #define SS_FATAL SS_FAIL|SSQ_PRINT_SENSE From owner-svn-src-head@freebsd.org Tue Sep 15 11:15:09 2015 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 A406CA0433E; Tue, 15 Sep 2015 11:15:09 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (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 645F31078; Tue, 15 Sep 2015 11:15:09 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 663D81FE023; Tue, 15 Sep 2015 13:15:07 +0200 (CEST) Subject: Re: svn commit: r271946 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront kern net netinet ofed/drivers/net/mlx4 sys To: Adrian Chadd , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= References: <201409220827.s8M8RRHB031526@svn.freebsd.org> <55F69093.5050807@FreeBSD.org> <55F6935C.9000000@selasky.org> <55F6A694.7020404@FreeBSD.org> <55F6A914.6050109@selasky.org> <55F6ED8F.5030402@FreeBSD.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Hans Petter Selasky Message-ID: <55F7FE1A.3050500@selasky.org> Date: Tue, 15 Sep 2015 13:16:42 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Tue, 15 Sep 2015 11:15:09 -0000 On 09/14/15 20:35, Adrian Chadd wrote: > Hi, > > So what's the actual behaviour of the new tso logic before and after > the above change in tsomax? Hi, The behaviour is the same, only the limits have changed a bit. > like, what are the actual packet sizes > being sent up to the hardware? It is not about the packet sizes, it is about the number of packets we transmit per TSO block. > Is TSO or the TCP stack so fragile that > a slight change in how packets are broken up results in ridiculously > less throughput? It's only a few bytes. Network adapters which support TSO typically has a hard limit on the number of mbufs it can load. When we exceed this limit, m_defrag() or packet drop is next. It is the responsibility of the TCP stack to generated mbuf chains which are within the network adapter given limits. Previously only the length was accounted for. Now we also account for the number of segments, because there are many ways a 64K bytes long mbuf chain can be generated. --HPS From owner-svn-src-head@freebsd.org Tue Sep 15 11:21:17 2015 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 AED13A046AA; Tue, 15 Sep 2015 11:21:17 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 9FA6F144D; Tue, 15 Sep 2015 11:21:17 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8FBLHEG035647; Tue, 15 Sep 2015 11:21:17 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8FBLH1w035646; Tue, 15 Sep 2015 11:21:17 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201509151121.t8FBLH1w035646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Tue, 15 Sep 2015 11:21:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287820 - head/usr.sbin/i2c X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 11:21:17 -0000 Author: zbb Date: Tue Sep 15 11:21:16 2015 New Revision: 287820 URL: https://svnweb.freebsd.org/changeset/base/287820 Log: Perform I2C transmission in a single burst when mode is "none" or not set Some more automated I2C controllers cannot explicitly create START/STOP/etc. conditions on the bus. Instead, the correct condition is set automatically according to the pending transfer status. This particular behavior can cause trouble if some I2C slave requires sending address offset within the chip followed by the actual data or command. In that case we cannot assume that the driver will not STOP immediately after sending offset. To avoid that, do not split offset transfer from data transfer for default transmission modes and do exactly that if requested in command line (stop-start and repeated-start modes). This more generic approach should cover special cases like the one described. Reviewed by: imp Submitted by: Marcin Mazurek Obtained from: Semihalf Modified: head/usr.sbin/i2c/i2c.c Modified: head/usr.sbin/i2c/i2c.c ============================================================================== --- head/usr.sbin/i2c/i2c.c Tue Sep 15 10:57:16 2015 (r287819) +++ head/usr.sbin/i2c/i2c.c Tue Sep 15 11:21:16 2015 (r287820) @@ -280,9 +280,6 @@ i2c_write(char *dev, struct options i2c_ err(1, "open failed"); } - /* - * Write offset where the data will go - */ cmd.slave = i2c_opt.addr; error = ioctl(fd, I2CSTART, &cmd); if (error == -1) { @@ -297,20 +294,24 @@ i2c_write(char *dev, struct options i2c_ err_msg = "error: offset malloc"; goto err1; } + } - cmd.count = bufsize; - cmd.buf = buf; - error = ioctl(fd, I2CWRITE, &cmd); - free(buf); - if (error == -1) { - err_msg = "ioctl: error when write offset"; - goto err1; + switch(i2c_opt.mode) { + case I2C_MODE_STOP_START: + /* + * Write offset where the data will go + */ + if (i2c_opt.width) { + cmd.count = bufsize; + cmd.buf = buf; + error = ioctl(fd, I2CWRITE, &cmd); + free(buf); + if (error == -1) { + err_msg = "ioctl: error when write offset"; + goto err1; + } } - } - /* Mode - stop start */ - if (i2c_opt.mode == I2C_MODE_STOP_START) { - cmd.slave = i2c_opt.addr; error = ioctl(fd, I2CSTOP, &cmd); if (error == -1) { err_msg = "ioctl: error sending stop condition"; @@ -322,9 +323,35 @@ i2c_write(char *dev, struct options i2c_ err_msg = "ioctl: error sending start condition"; goto err1; } - } - /* Mode - repeated start */ - if (i2c_opt.mode == I2C_MODE_REPEATED_START) { + + /* + * Write the data + */ + cmd.count = i2c_opt.count; + cmd.buf = i2c_buf; + cmd.last = 0; + error = ioctl(fd, I2CWRITE, &cmd); + if (error == -1) { + err_msg = "ioctl: error when write"; + goto err1; + } + break; + + case I2C_MODE_REPEATED_START: + /* + * Write offset where the data will go + */ + if (i2c_opt.width) { + cmd.count = bufsize; + cmd.buf = buf; + error = ioctl(fd, I2CWRITE, &cmd); + free(buf); + if (error == -1) { + err_msg = "ioctl: error when write offset"; + goto err1; + } + } + cmd.slave = i2c_opt.addr; error = ioctl(fd, I2CRPTSTART, &cmd); if (error == -1) { @@ -332,18 +359,42 @@ i2c_write(char *dev, struct options i2c_ "condition"; goto err1; } - } - /* - * Write the data - */ - cmd.count = i2c_opt.count; - cmd.buf = i2c_buf; - cmd.last = 0; - error = ioctl(fd, I2CWRITE, &cmd); - if (error == -1) { - err_msg = "ioctl: error when write"; - goto err1; + /* + * Write the data + */ + cmd.count = i2c_opt.count; + cmd.buf = i2c_buf; + cmd.last = 0; + error = ioctl(fd, I2CWRITE, &cmd); + if (error == -1) { + err_msg = "ioctl: error when write"; + goto err1; + } + break; + + case I2C_MODE_NONE: /* fall through */ + default: + buf = realloc(buf, bufsize + i2c_opt.count); + if (buf == NULL) { + err_msg = "error: data malloc"; + goto err1; + } + + memcpy(buf + bufsize, i2c_buf, i2c_opt.count); + /* + * Write offset and data + */ + cmd.count = bufsize + i2c_opt.count; + cmd.buf = buf; + cmd.last = 0; + error = ioctl(fd, I2CWRITE, &cmd); + free(buf); + if (error == -1) { + err_msg = "ioctl: error when write"; + goto err1; + } + break; } cmd.slave = i2c_opt.addr; error = ioctl(fd, I2CSTOP, &cmd); From owner-svn-src-head@freebsd.org Tue Sep 15 12:19:02 2015 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 F3B02A0494F; Tue, 15 Sep 2015 12:19:01 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 E4C6A1FCF; Tue, 15 Sep 2015 12:19:01 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8FCJ1As061712; Tue, 15 Sep 2015 12:19:01 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8FCJ1hM061711; Tue, 15 Sep 2015 12:19:01 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201509151219.t8FCJ1hM061711@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 15 Sep 2015 12:19:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287821 - head/share/man/man4 X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 12:19:02 -0000 Author: glebius Date: Tue Sep 15 12:19:01 2015 New Revision: 287821 URL: https://svnweb.freebsd.org/changeset/base/287821 Log: Document NGM_PPPOE_SETMAXP. Submitted by: Dmitry Luhtionov Modified: head/share/man/man4/ng_pppoe.4 Modified: head/share/man/man4/ng_pppoe.4 ============================================================================== --- head/share/man/man4/ng_pppoe.4 Tue Sep 15 11:21:16 2015 (r287820) +++ head/share/man/man4/ng_pppoe.4 Tue Sep 15 12:19:01 2015 (r287821) @@ -35,7 +35,7 @@ .\" $FreeBSD$ .\" $Whistle: ng_pppoe.8,v 1.1 1999/01/25 23:46:27 archie Exp $ .\" -.Dd November 13, 2012 +.Dd September 15, 2015 .Dt NG_PPPOE 4 .Os .Sh NAME @@ -187,7 +187,7 @@ above messages, and reports the Access C The four commands above use a common data structure: .Bd -literal -offset 4n struct ngpppoe_sts { - char hook[NG_HOOKSIZ]; /* hook associated with event session */ + char hook[NG_HOOKSIZ]; }; .Ed .Bl -tag -width 3n @@ -244,6 +244,20 @@ hook, or when user wants to override thi .Tn ASCII form of this message is .Qq Li setenaddr . +.It Dv NGM_PPPOE_SETMAXP Pq Ic setmaxp +Set the node PPP-Max-Payload value as described in RFC 4638. +This message applies only to a client configuration. +.Tn ASCII +form of this message is +.Qq Li setmaxp . +.Pp +Data structure returned to client is: +.Bd -literal -offset 4n +struct ngpppoe_maxp { + char hook[NG_HOOKSIZ]; + uint16_t data; +}; +.Ed .El .Sh SHUTDOWN This node shuts down upon receipt of a From owner-svn-src-head@freebsd.org Tue Sep 15 13:24:53 2015 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 174DCA04265; Tue, 15 Sep 2015 13:24:53 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 0860A187F; Tue, 15 Sep 2015 13:24:53 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8FDOquo092525; Tue, 15 Sep 2015 13:24:52 GMT (envelope-from pluknet@FreeBSD.org) Received: (from pluknet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8FDOqpK092524; Tue, 15 Sep 2015 13:24:52 GMT (envelope-from pluknet@FreeBSD.org) Message-Id: <201509151324.t8FDOqpK092524@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pluknet set sender to pluknet@FreeBSD.org using -f From: Sergey Kandaurov Date: Tue, 15 Sep 2015 13:24:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287822 - head/share/man/man9 X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 13:24:53 -0000 Author: pluknet Date: Tue Sep 15 13:24:52 2015 New Revision: 287822 URL: https://svnweb.freebsd.org/changeset/base/287822 Log: Bump .Dd. Modified: head/share/man/man9/timeout.9 Modified: head/share/man/man9/timeout.9 ============================================================================== --- head/share/man/man9/timeout.9 Tue Sep 15 12:19:01 2015 (r287821) +++ head/share/man/man9/timeout.9 Tue Sep 15 13:24:52 2015 (r287822) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 8, 2014 +.Dd September 14, 2015 .Dt TIMEOUT 9 .Os .Sh NAME From owner-svn-src-head@freebsd.org Tue Sep 15 13:37:50 2015 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 51BABA048E6; Tue, 15 Sep 2015 13:37:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 429561062; Tue, 15 Sep 2015 13:37:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8FDboXB097470; Tue, 15 Sep 2015 13:37:50 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8FDbmAs097462; Tue, 15 Sep 2015 13:37:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509151337.t8FDbmAs097462@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 15 Sep 2015 13:37:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287823 - head/usr.sbin/ctld X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 13:37:50 -0000 Author: mav Date: Tue Sep 15 13:37:48 2015 New Revision: 287823 URL: https://svnweb.freebsd.org/changeset/base/287823 Log: Add ctl-lun config option for consistency in HA setups. Modified: head/usr.sbin/ctld/ctl.conf.5 head/usr.sbin/ctld/ctld.c head/usr.sbin/ctld/kernel.c head/usr.sbin/ctld/parse.y head/usr.sbin/ctld/token.l Modified: head/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- head/usr.sbin/ctld/ctl.conf.5 Tue Sep 15 13:24:52 2015 (r287822) +++ head/usr.sbin/ctld/ctl.conf.5 Tue Sep 15 13:37:48 2015 (r287823) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 7, 2015 +.Dd September 15, 2015 .Dt CTL.CONF 5 .Os .Sh NAME @@ -388,6 +388,10 @@ The default backend is block. .It Ic blocksize Ar size The blocksize visible to the initiator. The default blocksize is 512. +.It Ic ctl-lun Ar lun_id +Global numeric identifier to use for a given LUN inside CTL. +By default CTL allocates those IDs dynamically, but explicit specification +may be needed for consistency in HA configurations. .It Ic device-id Ar string The SCSI Device Identification string presented to the initiator. .It Ic option Ar name Ar value Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Tue Sep 15 13:24:52 2015 (r287822) +++ head/usr.sbin/ctld/ctld.c Tue Sep 15 13:37:48 2015 (r287823) @@ -1397,6 +1397,7 @@ lun_new(struct conf *conf, const char *n lun->l_name = checked_strdup(name); TAILQ_INIT(&lun->l_options); TAILQ_INSERT_TAIL(&conf->conf_luns, lun, l_next); + lun->l_ctl_lun = -1; return (lun); } Modified: head/usr.sbin/ctld/kernel.c ============================================================================== --- head/usr.sbin/ctld/kernel.c Tue Sep 15 13:24:52 2015 (r287822) +++ head/usr.sbin/ctld/kernel.c Tue Sep 15 13:37:48 2015 (r287823) @@ -656,6 +656,11 @@ kernel_lun_add(struct lun *lun) if (lun->l_size != 0) req.reqdata.create.lun_size_bytes = lun->l_size; + if (lun->l_ctl_lun >= 0) { + req.reqdata.create.req_lun_id = lun->l_ctl_lun; + req.reqdata.create.flags |= CTL_LUN_FLAG_ID_REQ; + } + req.reqdata.create.flags |= CTL_LUN_FLAG_DEV_TYPE; req.reqdata.create.device_type = T_DIRECT; Modified: head/usr.sbin/ctld/parse.y ============================================================================== --- head/usr.sbin/ctld/parse.y Tue Sep 15 13:24:52 2015 (r287822) +++ head/usr.sbin/ctld/parse.y Tue Sep 15 13:37:48 2015 (r287823) @@ -57,8 +57,8 @@ extern void yyrestart(FILE *); %} %token ALIAS AUTH_GROUP AUTH_TYPE BACKEND BLOCKSIZE CHAP CHAP_MUTUAL -%token CLOSING_BRACKET DEBUG DEVICE_ID DISCOVERY_AUTH_GROUP DISCOVERY_FILTER -%token FOREIGN +%token CLOSING_BRACKET CTL_LUN DEBUG DEVICE_ID DISCOVERY_AUTH_GROUP +%token DISCOVERY_FILTER FOREIGN %token INITIATOR_NAME INITIATOR_PORTAL ISNS_SERVER ISNS_PERIOD ISNS_TIMEOUT %token LISTEN LISTEN_ISER LUN MAXPROC OFFLOAD OPENING_BRACKET OPTION %token PATH PIDFILE PORT PORTAL_GROUP REDIRECT SEMICOLON SERIAL SIZE STR @@ -855,6 +855,8 @@ lun_entry: | lun_device_id | + lun_ctl_lun + | lun_option | lun_path @@ -912,6 +914,26 @@ lun_device_id: DEVICE_ID STR } ; +lun_ctl_lun: CTL_LUN STR + { + uint64_t tmp; + + if (expand_number($2, &tmp) != 0) { + yyerror("invalid numeric value"); + free($2); + return (1); + } + + if (lun->l_ctl_lun >= 0) { + log_warnx("ctl_lun for lun \"%s\" " + "specified more than once", + lun->l_name); + return (1); + } + lun_set_ctl_lun(lun, tmp); + } + ; + lun_option: OPTION STR STR { struct lun_option *clo; Modified: head/usr.sbin/ctld/token.l ============================================================================== --- head/usr.sbin/ctld/token.l Tue Sep 15 13:24:52 2015 (r287822) +++ head/usr.sbin/ctld/token.l Tue Sep 15 13:37:48 2015 (r287823) @@ -54,6 +54,7 @@ backend { return BACKEND; } blocksize { return BLOCKSIZE; } chap { return CHAP; } chap-mutual { return CHAP_MUTUAL; } +ctl-lun { return CTL_LUN; } debug { return DEBUG; } device-id { return DEVICE_ID; } discovery-auth-group { return DISCOVERY_AUTH_GROUP; } From owner-svn-src-head@freebsd.org Tue Sep 15 14:24:20 2015 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 A426BA0410E; Tue, 15 Sep 2015 14:24:20 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 958BE1CF6; Tue, 15 Sep 2015 14:24:20 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8FEOKEn019634; Tue, 15 Sep 2015 14:24:20 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8FEOKUs019633; Tue, 15 Sep 2015 14:24:20 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201509151424.t8FEOKUs019633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Tue, 15 Sep 2015 14:24:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287824 - head X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 14:24:20 -0000 Author: brd (doc,ports committer) Date: Tue Sep 15 14:24:19 2015 New Revision: 287824 URL: https://svnweb.freebsd.org/changeset/base/287824 Log: Fix grammer in an error message PR: 202310 Submitted by: Chris Petrik Approved by: will Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Sep 15 13:37:48 2015 (r287823) +++ head/Makefile.inc1 Tue Sep 15 14:24:19 2015 (r287824) @@ -1258,7 +1258,7 @@ _elftoolchain_libs= lib/libelf lib/libdw legacy: .if ${BOOTSTRAPPING} < 800107 && ${BOOTSTRAPPING} != 0 - @echo "ERROR: Source upgrades from versions prior to 8.0 not supported."; \ + @echo "ERROR: Source upgrades from versions prior to 8.0 are not supported."; \ false .endif .for _tool in tools/build ${_elftoolchain_libs} From owner-svn-src-head@freebsd.org Tue Sep 15 16:08:25 2015 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 F109EA03AE2; Tue, 15 Sep 2015 16:08:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 E1F1C1A6E; Tue, 15 Sep 2015 16:08:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8FG8PVR066520; Tue, 15 Sep 2015 16:08:25 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8FG8P2G066519; Tue, 15 Sep 2015 16:08:25 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201509151608.t8FG8P2G066519@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 15 Sep 2015 16:08:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287825 - head/sys/dev/usb/controller X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 16:08:26 -0000 Author: emaste Date: Tue Sep 15 16:08:25 2015 New Revision: 287825 URL: https://svnweb.freebsd.org/changeset/base/287825 Log: Add Cavium ThunderX xHCI controller PCI ID There is an issue with interrupts at the moment, but it works with polling mode set (hw.usb.xhci.use_polling=1). Reviewed by: hselasky Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3665 Modified: head/sys/dev/usb/controller/xhci_pci.c Modified: head/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- head/sys/dev/usb/controller/xhci_pci.c Tue Sep 15 14:24:19 2015 (r287824) +++ head/sys/dev/usb/controller/xhci_pci.c Tue Sep 15 16:08:25 2015 (r287825) @@ -113,6 +113,9 @@ xhci_pci_match(device_t self) case 0x8cb18086: return ("Intel Wildcat Point USB 3.0 controller"); + case 0xa01b177d: + return ("Cavium ThunderX USB 3.0 controller"); + default: break; } From owner-svn-src-head@freebsd.org Tue Sep 15 17:13:03 2015 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 35F1DA030E8; Tue, 15 Sep 2015 17:13:03 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x22b.google.com (mail-ig0-x22b.google.com [IPv6:2607:f8b0:4001:c05::22b]) (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 F16451622; Tue, 15 Sep 2015 17:13:02 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igcpb10 with SMTP id pb10so18782270igc.1; Tue, 15 Sep 2015 10:13:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=eH8D/0tQ9YvFQ7Tb4KPP4RzgkKTG3ptRr3uoAEA2RyI=; b=gEbJPFgIT2a+sKBKAkfIUispDnUtwxucM/faALtz3kexT/4in+/J7YZ7XlEr3h4UVD KexmUuh9HCydYtDD4GcpPb3RwZDaYb7cVoaPjMo1J5k0ciBr2E76PHCzolwHaek1MCU0 W3yOa9atvTMU5J8vSRSvg4zTQo3FEJLBKAdOUMkcsBwU388m052PE7rVaBl6WfqjG4dR oVr7ejsYUGTYYa+Ng+9gQkOk02T63dC2SJ5zoY7+O6baejp/IGn1PXE6xguBPLOIUxWj EF+gq606k+IRjjxXjwwU5R6xduKT6GBqTkj6HiomyIE6AeLUwsaBz2xpqcR7HXli+Ft9 7kfA== MIME-Version: 1.0 X-Received: by 10.50.45.33 with SMTP id j1mr7584940igm.61.1442337182163; Tue, 15 Sep 2015 10:13:02 -0700 (PDT) Received: by 10.36.28.208 with HTTP; Tue, 15 Sep 2015 10:13:02 -0700 (PDT) In-Reply-To: <55F7FE1A.3050500@selasky.org> References: <201409220827.s8M8RRHB031526@svn.freebsd.org> <55F69093.5050807@FreeBSD.org> <55F6935C.9000000@selasky.org> <55F6A694.7020404@FreeBSD.org> <55F6A914.6050109@selasky.org> <55F6ED8F.5030402@FreeBSD.org> <55F7FE1A.3050500@selasky.org> Date: Tue, 15 Sep 2015 10:13:02 -0700 Message-ID: Subject: Re: svn commit: r271946 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront kern net netinet ofed/drivers/net/mlx4 sys From: Adrian Chadd To: Hans Petter Selasky Cc: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Tue, 15 Sep 2015 17:13:03 -0000 On 15 September 2015 at 04:16, Hans Petter Selasky wrote: > On 09/14/15 20:35, Adrian Chadd wrote: >> >> Hi, >> >> So what's the actual behaviour of the new tso logic before and after >> the above change in tsomax? > > > Hi, > > The behaviour is the same, only the limits have changed a bit. > >> like, what are the actual packet sizes >> >> being sent up to the hardware? > > > It is not about the packet sizes, it is about the number of packets we > transmit per TSO block. > >> Is TSO or the TCP stack so fragile that >> a slight change in how packets are broken up results in ridiculously >> less throughput? It's only a few bytes. > > > Network adapters which support TSO typically has a hard limit on the number > of mbufs it can load. When we exceed this limit, m_defrag() or packet drop > is next. It is the responsibility of the TCP stack to generated mbuf chains > which are within the network adapter given limits. Previously only the > length was accounted for. Now we also account for the number of segments, > because there are many ways a 64K bytes long mbuf chain can be generated. I know all of this. What I'm asking is different - what about the change(s) that broke/fixed the Xen network performance actually caused the change in behaviour? I know things are sensitive to how the mbufs are broken up - I'd like to see exactly this. Whilst futzing around at Netflix on TCP behaviour, I found with everything lined up correctly I'd get 40gbit TCP over a lot of sockets on sandy bridge hardware - but only as long as the TCP send buffer size resulted in nicely 4k segments. Some (larger) send buffer sizes resulted in the stack settling on non-4k segments for whatever reason, which drastically changed TSO performance. So, subtle changes had much bigger effects. I'm asking what specifically is going on here. +1 on the "going to make things more correct" path, but -2 on the "subtle changes and big unintended, un-described effects" results :( -adrian From owner-svn-src-head@freebsd.org Tue Sep 15 17:16:32 2015 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 5AC40A032FD; Tue, 15 Sep 2015 17:16:32 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 3F2DD19A5; Tue, 15 Sep 2015 17:16:32 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8FHGWw5096165; Tue, 15 Sep 2015 17:16:32 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8FHGV1W096163; Tue, 15 Sep 2015 17:16:31 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201509151716.t8FHGV1W096163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Tue, 15 Sep 2015 17:16:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287826 - head/sys/netinet6 X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 17:16:32 -0000 Author: melifaro Date: Tue Sep 15 17:16:31 2015 New Revision: 287826 URL: https://svnweb.freebsd.org/changeset/base/287826 Log: Simplify nd6_cache_lladdr: * Move isRouter calculation code to separate nd6_is_router() function. * Make nd6_cache_lladdr() return void: its return value hasn't been used since r53541 KAME import in 1999. Sponsored by: Yandex LLC Modified: head/sys/netinet6/nd6.c head/sys/netinet6/nd6.h Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Tue Sep 15 16:08:25 2015 (r287825) +++ head/sys/netinet6/nd6.c Tue Sep 15 17:16:31 2015 (r287826) @@ -1593,17 +1593,93 @@ nd6_ioctl(u_long cmd, caddr_t data, stru } /* + * Calculates new isRouter value based on provided parameters and + * returns it. + */ +static int +nd6_is_router(int type, int code, int is_new, int old_addr, int new_addr, + int ln_router) +{ + + /* + * ICMP6 type dependent behavior. + * + * NS: clear IsRouter if new entry + * RS: clear IsRouter + * RA: set IsRouter if there's lladdr + * redir: clear IsRouter if new entry + * + * RA case, (1): + * The spec says that we must set IsRouter in the following cases: + * - If lladdr exist, set IsRouter. This means (1-5). + * - If it is old entry (!newentry), set IsRouter. This means (7). + * So, based on the spec, in (1-5) and (7) cases we must set IsRouter. + * A quetion arises for (1) case. (1) case has no lladdr in the + * neighbor cache, this is similar to (6). + * This case is rare but we figured that we MUST NOT set IsRouter. + * + * newentry olladdr lladdr llchange NS RS RA redir + * D R + * 0 n n -- (1) c ? s + * 0 y n -- (2) c s s + * 0 n y -- (3) c s s + * 0 y y n (4) c s s + * 0 y y y (5) c s s + * 1 -- n -- (6) c c c s + * 1 -- y -- (7) c c s c s + * + * (c=clear s=set) + */ + switch (type & 0xff) { + case ND_NEIGHBOR_SOLICIT: + /* + * New entry must have is_router flag cleared. + */ + if (is_new) /* (6-7) */ + ln_router = 0; + break; + case ND_REDIRECT: + /* + * If the icmp is a redirect to a better router, always set the + * is_router flag. Otherwise, if the entry is newly created, + * clear the flag. [RFC 2461, sec 8.3] + */ + if (code == ND_REDIRECT_ROUTER) + ln_router = 1; + else { + if (is_new) /* (6-7) */ + ln_router = 0; + } + break; + case ND_ROUTER_SOLICIT: + /* + * is_router flag must always be cleared. + */ + ln_router = 0; + break; + case ND_ROUTER_ADVERT: + /* + * Mark an entry with lladdr as a router. + */ + if ((!is_new && (old_addr || new_addr)) || /* (2-5) */ + (is_new && new_addr)) { /* (7) */ + ln_router = 1; + } + break; + } + + return (ln_router); +} + +/* * Create neighbor cache entry and cache link-layer address, * on reception of inbound ND6 packets. (RS/RA/NS/redirect) * * type - ICMP6 type * code - type dependent information * - * XXXXX - * The caller of this function already acquired the ndp - * cache table lock because the cache entry is returned. */ -struct llentry * +void nd6_cache_lladdr(struct ifnet *ifp, struct in6_addr *from, char *lladdr, int lladdrlen, int type, int code) { @@ -1617,7 +1693,6 @@ nd6_cache_lladdr(struct ifnet *ifp, stru uint16_t router = 0; struct sockaddr_in6 sin6; struct mbuf *chain = NULL; - int static_route = 0; IF_AFDATA_UNLOCK_ASSERT(ifp); @@ -1626,7 +1701,7 @@ nd6_cache_lladdr(struct ifnet *ifp, stru /* nothing must be updated for unspecified address */ if (IN6_IS_ADDR_UNSPECIFIED(from)) - return NULL; + return; /* * Validation about ifp->if_addrlen and lladdrlen must be done in @@ -1646,7 +1721,7 @@ nd6_cache_lladdr(struct ifnet *ifp, stru flags |= ND6_EXCLUSIVE; ln = nd6_alloc(from, 0, ifp); if (ln == NULL) - return (NULL); + return; IF_AFDATA_WLOCK(ifp); LLE_WLOCK(ln); /* Prefer any existing lle over newly-created one */ @@ -1665,8 +1740,11 @@ nd6_cache_lladdr(struct ifnet *ifp, stru } /* do nothing if static ndp is set */ if ((ln->la_flags & LLE_STATIC)) { - static_route = 1; - goto done; + if (flags & ND6_EXCLUSIVE) + LLE_WUNLOCK(ln); + else + LLE_RUNLOCK(ln); + return; } olladdr = (ln->la_flags & LLE_VALID) ? 1 : 0; @@ -1727,85 +1805,20 @@ nd6_cache_lladdr(struct ifnet *ifp, stru } } - /* - * ICMP6 type dependent behavior. - * - * NS: clear IsRouter if new entry - * RS: clear IsRouter - * RA: set IsRouter if there's lladdr - * redir: clear IsRouter if new entry - * - * RA case, (1): - * The spec says that we must set IsRouter in the following cases: - * - If lladdr exist, set IsRouter. This means (1-5). - * - If it is old entry (!newentry), set IsRouter. This means (7). - * So, based on the spec, in (1-5) and (7) cases we must set IsRouter. - * A quetion arises for (1) case. (1) case has no lladdr in the - * neighbor cache, this is similar to (6). - * This case is rare but we figured that we MUST NOT set IsRouter. - * - * newentry olladdr lladdr llchange NS RS RA redir - * D R - * 0 n n -- (1) c ? s - * 0 y n -- (2) c s s - * 0 n y -- (3) c s s - * 0 y y n (4) c s s - * 0 y y y (5) c s s - * 1 -- n -- (6) c c c s - * 1 -- y -- (7) c c s c s - * - * (c=clear s=set) - */ - switch (type & 0xff) { - case ND_NEIGHBOR_SOLICIT: - /* - * New entry must have is_router flag cleared. - */ - if (is_newentry) /* (6-7) */ - ln->ln_router = 0; - break; - case ND_REDIRECT: - /* - * If the icmp is a redirect to a better router, always set the - * is_router flag. Otherwise, if the entry is newly created, - * clear the flag. [RFC 2461, sec 8.3] - */ - if (code == ND_REDIRECT_ROUTER) - ln->ln_router = 1; - else { - if (is_newentry) /* (6-7) */ - ln->ln_router = 0; - ln->la_flags |= LLE_REDIRECT; - } - break; - case ND_ROUTER_SOLICIT: - /* - * is_router flag must always be cleared. - */ - ln->ln_router = 0; - break; - case ND_ROUTER_ADVERT: - /* - * Mark an entry with lladdr as a router. - */ - if ((!is_newentry && (olladdr || lladdr)) || /* (2-5) */ - (is_newentry && lladdr)) { /* (7) */ - ln->ln_router = 1; - } - break; - } + /* Calculates new router status */ + router = nd6_is_router(type, code, is_newentry, olladdr, + lladdr != NULL ? 1 : 0, ln->ln_router); + + ln->ln_router = router; + /* Mark non-router redirects with special flag */ + if ((type & 0xFF) == ND_REDIRECT && code != ND_REDIRECT_ROUTER) + ln->la_flags |= LLE_REDIRECT; - if (ln != NULL) { - static_route = (ln->la_flags & LLE_STATIC); - router = ln->ln_router; + if (flags & ND6_EXCLUSIVE) + LLE_WUNLOCK(ln); + else + LLE_RUNLOCK(ln); - if (flags & ND6_EXCLUSIVE) - LLE_WUNLOCK(ln); - else - LLE_RUNLOCK(ln); - if (static_route) - ln = NULL; - } if (chain != NULL) nd6_flush_holdchain(ifp, ifp, chain, &sin6); @@ -1831,18 +1844,6 @@ nd6_cache_lladdr(struct ifnet *ifp, stru */ defrouter_select(); } - - return (ln); -done: - if (ln != NULL) { - if (flags & ND6_EXCLUSIVE) - LLE_WUNLOCK(ln); - else - LLE_RUNLOCK(ln); - if (static_route) - ln = NULL; - } - return (ln); } static void Modified: head/sys/netinet6/nd6.h ============================================================================== --- head/sys/netinet6/nd6.h Tue Sep 15 16:08:25 2015 (r287825) +++ head/sys/netinet6/nd6.h Tue Sep 15 17:16:31 2015 (r287826) @@ -417,7 +417,7 @@ void nd6_nud_hint(struct rtentry *, stru int nd6_resolve(struct ifnet *, struct rtentry *, struct mbuf *, struct sockaddr *, u_char *); int nd6_ioctl(u_long, caddr_t, struct ifnet *); -struct llentry *nd6_cache_lladdr(struct ifnet *, struct in6_addr *, +void nd6_cache_lladdr(struct ifnet *, struct in6_addr *, char *, int, int, int); int nd6_output(struct ifnet *, struct ifnet *, struct mbuf *, struct sockaddr_in6 *, struct rtentry *); From owner-svn-src-head@freebsd.org Tue Sep 15 18:02:01 2015 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 0EE0EA04C8B; Tue, 15 Sep 2015 18:02:01 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 F2F9A12AD; Tue, 15 Sep 2015 18:02:00 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8FI205X019174; Tue, 15 Sep 2015 18:02:00 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8FI1xNA018338; Tue, 15 Sep 2015 18:01:59 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201509151801.t8FI1xNA018338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 15 Sep 2015 18:01:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287827 - in head: sbin/geom/class/nop sys/geom/nop X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 18:02:01 -0000 Author: trasz Date: Tue Sep 15 18:01:59 2015 New Revision: 287827 URL: https://svnweb.freebsd.org/changeset/base/287827 Log: Add a way to specify stripesize and stripeoffset to gnop(8). This makes it possible to "simulate" 4K media, to eg test alignment handling. Reviewed by: mav@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3664 Modified: head/sbin/geom/class/nop/geom_nop.c head/sbin/geom/class/nop/gnop.8 head/sys/geom/nop/g_nop.c head/sys/geom/nop/g_nop.h Modified: head/sbin/geom/class/nop/geom_nop.c ============================================================================== --- head/sbin/geom/class/nop/geom_nop.c Tue Sep 15 17:16:31 2015 (r287826) +++ head/sbin/geom/class/nop/geom_nop.c Tue Sep 15 18:01:59 2015 (r287827) @@ -43,14 +43,16 @@ struct g_command class_commands[] = { { { 'e', "error", "-1", G_TYPE_NUMBER }, { 'o', "offset", "0", G_TYPE_NUMBER }, + { 'p', "stripesize", "0", G_TYPE_NUMBER }, + { 'P', "stripeoffset", "0", G_TYPE_NUMBER }, { 'r', "rfailprob", "-1", G_TYPE_NUMBER }, { 's', "size", "0", G_TYPE_NUMBER }, { 'S', "secsize", "0", G_TYPE_NUMBER }, { 'w', "wfailprob", "-1", G_TYPE_NUMBER }, G_OPT_SENTINEL }, - "[-v] [-e error] [-o offset] [-r rfailprob] [-s size] " - "[-S secsize] [-w wfailprob] dev ..." + "[-v] [-e error] [-o offset] [-p stripesize] [-P stripeoffset] " + "[-r rfailprob] [-s size] [-S secsize] [-w wfailprob] dev ..." }, { "configure", G_FLAG_VERBOSE, NULL, { Modified: head/sbin/geom/class/nop/gnop.8 ============================================================================== --- head/sbin/geom/class/nop/gnop.8 Tue Sep 15 17:16:31 2015 (r287826) +++ head/sbin/geom/class/nop/gnop.8 Tue Sep 15 18:01:59 2015 (r287827) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 14, 2013 +.Dd September 15, 2015 .Dt GNOP 8 .Os .Sh NAME @@ -36,6 +36,8 @@ .Op Fl v .Op Fl e Ar error .Op Fl o Ar offset +.Op Fl p Ar stripesize +.Op Fl P Ar stripeoffset .Op Fl r Ar rfailprob .Op Fl s Ar size .Op Fl S Ar secsize @@ -115,6 +117,10 @@ Specifies the error number to return on Force the removal of the specified provider. .It Fl o Ar offset Where to begin on the original provider. +.It Fl p Ar stripesize +Value of the stripesize property of the transparent provider. +.It Fl P Ar stripeoffset +Value of the stripeoffset property of the transparent provider. .It Fl r Ar rfailprob Specifies read failure probability in percent. .It Fl s Ar size Modified: head/sys/geom/nop/g_nop.c ============================================================================== --- head/sys/geom/nop/g_nop.c Tue Sep 15 17:16:31 2015 (r287826) +++ head/sys/geom/nop/g_nop.c Tue Sep 15 18:01:59 2015 (r287827) @@ -162,7 +162,7 @@ g_nop_access(struct g_provider *pp, int static int g_nop_create(struct gctl_req *req, struct g_class *mp, struct g_provider *pp, int ioerror, u_int rfailprob, u_int wfailprob, off_t offset, off_t size, - u_int secsize) + u_int secsize, u_int stripesize, u_int stripeoffset) { struct g_nop_softc *sc; struct g_geom *gp; @@ -208,6 +208,18 @@ g_nop_create(struct gctl_req *req, struc return (EINVAL); } size -= size % secsize; + if ((stripesize % pp->sectorsize) != 0) { + gctl_error(req, "Invalid stripesize for provider %s.", pp->name); + return (EINVAL); + } + if ((stripeoffset % pp->sectorsize) != 0) { + gctl_error(req, "Invalid stripeoffset for provider %s.", pp->name); + return (EINVAL); + } + if (stripesize != 0 && stripeoffset >= stripesize) { + gctl_error(req, "stripeoffset is too big."); + return (EINVAL); + } snprintf(name, sizeof(name), "%s%s", pp->name, G_NOP_SUFFIX); LIST_FOREACH(gp, &mp->geom, geom) { if (strcmp(gp->name, name) == 0) { @@ -219,6 +231,8 @@ g_nop_create(struct gctl_req *req, struc sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO); sc->sc_offset = offset; sc->sc_explicitsize = explicitsize; + sc->sc_stripesize = stripesize; + sc->sc_stripeoffset = stripeoffset; sc->sc_error = ioerror; sc->sc_rfailprob = rfailprob; sc->sc_wfailprob = wfailprob; @@ -238,6 +252,8 @@ g_nop_create(struct gctl_req *req, struc newpp->flags |= G_PF_DIRECT_SEND | G_PF_DIRECT_RECEIVE; newpp->mediasize = size; newpp->sectorsize = secsize; + newpp->stripesize = stripesize; + newpp->stripeoffset = stripeoffset; cp = g_new_consumer(gp); cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE; @@ -304,7 +320,8 @@ static void g_nop_ctl_create(struct gctl_req *req, struct g_class *mp) { struct g_provider *pp; - intmax_t *error, *rfailprob, *wfailprob, *offset, *secsize, *size; + intmax_t *error, *rfailprob, *wfailprob, *offset, *secsize, *size, + *stripesize, *stripeoffset; const char *name; char param[16]; int i, *nargs; @@ -370,6 +387,24 @@ g_nop_ctl_create(struct gctl_req *req, s gctl_error(req, "Invalid '%s' argument", "secsize"); return; } + stripesize = gctl_get_paraml(req, "stripesize", sizeof(*stripesize)); + if (stripesize == NULL) { + gctl_error(req, "No '%s' argument", "stripesize"); + return; + } + if (*stripesize < 0) { + gctl_error(req, "Invalid '%s' argument", "stripesize"); + return; + } + stripeoffset = gctl_get_paraml(req, "stripeoffset", sizeof(*stripeoffset)); + if (stripeoffset == NULL) { + gctl_error(req, "No '%s' argument", "stripeoffset"); + return; + } + if (*stripeoffset < 0) { + gctl_error(req, "Invalid '%s' argument", "stripeoffset"); + return; + } for (i = 0; i < *nargs; i++) { snprintf(param, sizeof(param), "arg%d", i); @@ -390,7 +425,8 @@ g_nop_ctl_create(struct gctl_req *req, s *error == -1 ? EIO : (int)*error, *rfailprob == -1 ? 0 : (u_int)*rfailprob, *wfailprob == -1 ? 0 : (u_int)*wfailprob, - (off_t)*offset, (off_t)*size, (u_int)*secsize) != 0) { + (off_t)*offset, (off_t)*size, (u_int)*secsize, + (u_int)*stripesize, (u_int)*stripeoffset) != 0) { return; } } Modified: head/sys/geom/nop/g_nop.h ============================================================================== --- head/sys/geom/nop/g_nop.h Tue Sep 15 17:16:31 2015 (r287826) +++ head/sys/geom/nop/g_nop.h Tue Sep 15 18:01:59 2015 (r287827) @@ -59,6 +59,8 @@ struct g_nop_softc { int sc_error; off_t sc_offset; off_t sc_explicitsize; + off_t sc_stripesize; + off_t sc_stripeoffset; u_int sc_rfailprob; u_int sc_wfailprob; uintmax_t sc_reads; From owner-svn-src-head@freebsd.org Tue Sep 15 18:21:57 2015 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 C0DD9A047A1; Tue, 15 Sep 2015 18:21:57 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 AE5C01F77; Tue, 15 Sep 2015 18:21:57 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8FILviD028396; Tue, 15 Sep 2015 18:21:57 GMT (envelope-from garga@FreeBSD.org) Received: (from garga@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8FILvuZ028394; Tue, 15 Sep 2015 18:21:57 GMT (envelope-from garga@FreeBSD.org) Message-Id: <201509151821.t8FILvuZ028394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: garga set sender to garga@FreeBSD.org using -f From: Renato Botelho Date: Tue, 15 Sep 2015 18:21:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287828 - in head/sys/dev/usb: . serial X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 18:21:57 -0000 Author: garga (ports committer) Date: Tue Sep 15 18:21:56 2015 New Revision: 287828 URL: https://svnweb.freebsd.org/changeset/base/287828 Log: Add support for Sierra MC7355 card Submitted by: Jeremy Porter Approved by: loos Obtained from: pfSense MFC after: 1 week Sponsored by: Rubicon Communications (Netgate) Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Tue Sep 15 18:01:59 2015 (r287827) +++ head/sys/dev/usb/serial/u3g.c Tue Sep 15 18:21:56 2015 (r287828) @@ -525,6 +525,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(SIERRA, MC5727_2, 0), U3G_DEV(SIERRA, MC5728, 0), U3G_DEV(SIERRA, MC7354, 0), + U3G_DEV(SIERRA, MC7355, 0), U3G_DEV(SIERRA, MC8700, 0), U3G_DEV(SIERRA, MC8755, 0), U3G_DEV(SIERRA, MC8755_2, 0), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Sep 15 18:01:59 2015 (r287827) +++ head/sys/dev/usb/usbdevs Tue Sep 15 18:21:56 2015 (r287828) @@ -4044,6 +4044,7 @@ product SIERRA E6892 0x6892 E6892 product SIERRA E6893 0x6893 E6893 product SIERRA MC8700 0x68A3 MC8700 product SIERRA MC7354 0x68C0 MC7354 +product SIERRA MC7355 0x9041 MC7355 product SIERRA AC313U 0x68aa Sierra Wireless AirCard 313U product SIERRA TRUINSTALL 0x0fff Aircard Tru Installer From owner-svn-src-head@freebsd.org Tue Sep 15 18:33:12 2015 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 E114DA04D63; Tue, 15 Sep 2015 18:33:12 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (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 9B0D1182E; Tue, 15 Sep 2015 18:33:12 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id B650D1FE023; Tue, 15 Sep 2015 20:33:08 +0200 (CEST) Subject: Re: svn commit: r271946 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront kern net netinet ofed/drivers/net/mlx4 sys To: Adrian Chadd References: <201409220827.s8M8RRHB031526@svn.freebsd.org> <55F69093.5050807@FreeBSD.org> <55F6935C.9000000@selasky.org> <55F6A694.7020404@FreeBSD.org> <55F6A914.6050109@selasky.org> <55F6ED8F.5030402@FreeBSD.org> <55F7FE1A.3050500@selasky.org> Cc: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Hans Petter Selasky Message-ID: <55F864C2.9030102@selasky.org> Date: Tue, 15 Sep 2015 20:34:42 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Tue, 15 Sep 2015 18:33:13 -0000 Hi Adrian, On 09/15/15 19:13, Adrian Chadd wrote: > I know all of this. What I'm asking is different - what about the > change(s) that broke/fixed the Xen network performance actually caused > the change in behaviour? I know things are sensitive to how the mbufs > are broken up - I'd like to see exactly this. You need to add statistic counters to the network drivers in question, how frequently packets are defragged and/or dropped in the TX path to figure that out. Can we continue this discussion elsewhere? --HPS From owner-svn-src-head@freebsd.org Tue Sep 15 18:40:28 2015 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 42739A0509D; Tue, 15 Sep 2015 18:40:28 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x22a.google.com (mail-ig0-x22a.google.com [IPv6:2607:f8b0:4001:c05::22a]) (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 0AFCA1CAA; Tue, 15 Sep 2015 18:40:28 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igxx6 with SMTP id x6so18382237igx.1; Tue, 15 Sep 2015 11:40:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=kbV+IcwmNIgaKTzfr3+dDTUeK75WcTj3dKpkvh2avxM=; b=Gr9Gvno8vcf8p4vjKv8sg8Kmcf070YKRN0KJxpbPZGe76kze2DOsMRMXsCfrYbgpjV BwDagL+Ewh8jxfsA9J7D9j9xW21dDGAzF5ciQCaMjNiifHaRxJgirqdy3WTyx8Exw/nB hDRfSSuD0oD8lqt8wQ5yOe3y30wG6FyKkF8M3i0P3dgZMdjdnrBRnG3wST1pJ9p8BQXB c7vVHoU14pb+NWZEJ2vUtNNt1s6mqJXoZ4L4OGIuddUOL3f8sK7gY/ANjuajYiu54w3i 2XXPh3XGDujatBDnqpd9PrdYA1duRR3Av7NU0xF+u4DLUg4xJvk497eUEn1Z0GPJllm6 gm0g== MIME-Version: 1.0 X-Received: by 10.50.1.44 with SMTP id 12mr8316799igj.61.1442342427168; Tue, 15 Sep 2015 11:40:27 -0700 (PDT) Received: by 10.36.28.208 with HTTP; Tue, 15 Sep 2015 11:40:27 -0700 (PDT) In-Reply-To: <55F864C2.9030102@selasky.org> References: <201409220827.s8M8RRHB031526@svn.freebsd.org> <55F69093.5050807@FreeBSD.org> <55F6935C.9000000@selasky.org> <55F6A694.7020404@FreeBSD.org> <55F6A914.6050109@selasky.org> <55F6ED8F.5030402@FreeBSD.org> <55F7FE1A.3050500@selasky.org> <55F864C2.9030102@selasky.org> Date: Tue, 15 Sep 2015 11:40:27 -0700 Message-ID: Subject: Re: svn commit: r271946 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront kern net netinet ofed/drivers/net/mlx4 sys From: Adrian Chadd To: Hans Petter Selasky Cc: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Tue, 15 Sep 2015 18:40:28 -0000 On 15 September 2015 at 11:34, Hans Petter Selasky wrote: > Hi Adrian, > > On 09/15/15 19:13, Adrian Chadd wrote: >> >> I know all of this. What I'm asking is different - what about the >> change(s) that broke/fixed the Xen network performance actually caused >> the change in behaviour? I know things are sensitive to how the mbufs >> are broken up - I'd like to see exactly this. > > > You need to add statistic counters to the network drivers in question, how > frequently packets are defragged and/or dropped in the TX path to figure > that out. Can we continue this discussion elsewhere? Sure thing. Yes, maybe having a per-interface histogram of mbuf / segment sizes would be good - something we can run live on a box rather than trying to use dtrace. I wonder how difficult it'd be to slip something in as part of if_transmit and ifnet.. -adrian From owner-svn-src-head@freebsd.org Tue Sep 15 19:59:36 2015 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 0A054A058CE; Tue, 15 Sep 2015 19:59:36 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 EF00118A5; Tue, 15 Sep 2015 19:59:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8FJxZEt066006; Tue, 15 Sep 2015 19:59:35 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8FJxZY7066005; Tue, 15 Sep 2015 19:59:35 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201509151959.t8FJxZY7066005@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 15 Sep 2015 19:59:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287829 - head/sys/arm64/conf X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 19:59:36 -0000 Author: emaste Date: Tue Sep 15 19:59:35 2015 New Revision: 287829 URL: https://svnweb.freebsd.org/changeset/base/287829 Log: arm64: add xhci driver and umass/ukbd to GENERIC for Cavium ThunderX Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/conf/GENERIC Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Tue Sep 15 18:21:56 2015 (r287828) +++ head/sys/arm64/conf/GENERIC Tue Sep 15 19:59:35 2015 (r287829) @@ -119,7 +119,10 @@ device pl011 # USB support options USB_DEBUG # enable debug msgs device dwcotg # DWC OTG controller +device xhci # XHCI PCI->USB interface (USB 3.0) device usb # USB Bus (required) +device ukbd # Keyboard +device umass # Disks/Mass storage - Requires scbus and da # Pseudo devices. device loop # Network loopback From owner-svn-src-head@freebsd.org Tue Sep 15 20:04:31 2015 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 B9F7AA05B1F; Tue, 15 Sep 2015 20:04:31 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 AAB5E1CDF; Tue, 15 Sep 2015 20:04:31 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8FK4V59069892; Tue, 15 Sep 2015 20:04:31 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8FK4V1f069891; Tue, 15 Sep 2015 20:04:31 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201509152004.t8FK4V1f069891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Tue, 15 Sep 2015 20:04:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287830 - head/sys/netinet X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 20:04:31 -0000 Author: hiren Date: Tue Sep 15 20:04:30 2015 New Revision: 287830 URL: https://svnweb.freebsd.org/changeset/base/287830 Log: Remove unnecessary tcp state transition call. Differential Revision: D3451 Reviewed by: markj MFC after: 2 weeks Sponsored by: Limelight Networks Modified: head/sys/netinet/tcp_usrreq.c Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Tue Sep 15 19:59:35 2015 (r287829) +++ head/sys/netinet/tcp_usrreq.c Tue Sep 15 20:04:30 2015 (r287830) @@ -1765,9 +1765,9 @@ tcp_usrclosed(struct tcpcb *tp) #ifdef TCP_OFFLOAD tcp_offload_listen_stop(tp); #endif + tcp_state_change(tp, TCPS_CLOSED); /* FALLTHROUGH */ case TCPS_CLOSED: - tcp_state_change(tp, TCPS_CLOSED); tp = tcp_close(tp); /* * tcp_close() should never return NULL here as the socket is From owner-svn-src-head@freebsd.org Tue Sep 15 20:22:32 2015 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 136589C24A6; Tue, 15 Sep 2015 20:22:32 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 EBA121AF9; Tue, 15 Sep 2015 20:22:31 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8FKMVTq078304; Tue, 15 Sep 2015 20:22:31 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8FKMVaD078301; Tue, 15 Sep 2015 20:22:31 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201509152022.t8FKMVaD078301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 15 Sep 2015 20:22:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287831 - in head/sys: kern sys X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 20:22:32 -0000 Author: cem Date: Tue Sep 15 20:22:30 2015 New Revision: 287831 URL: https://svnweb.freebsd.org/changeset/base/287831 Log: kevent(2): Note DOOMED vnodes with NOTE_REVOKE In poll mode, check for and wake VBAD vnodes. (Vnodes that are VBAD at registration will never be woken by the RECLAIM trigger.) Add post-VOP_RECLAIM hook to trigger notes on vnode reclamation. (Vnodes that were fine at registration but are vgoned while being monitored should signal waiters.) Reviewed by: kib Approved by: markj (mentor) Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D3675 Modified: head/sys/kern/vfs_subr.c head/sys/kern/vnode_if.src head/sys/sys/vnode.h Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Tue Sep 15 20:04:30 2015 (r287830) +++ head/sys/kern/vfs_subr.c Tue Sep 15 20:22:30 2015 (r287831) @@ -4345,6 +4345,15 @@ vop_mknod_post(void *ap, int rc) } void +vop_reclaim_post(void *ap, int rc) +{ + struct vop_reclaim_args *a = ap; + + if (!rc) + VFS_KNOTE_LOCKED(a->a_vp, NOTE_REVOKE); +} + +void vop_remove_post(void *ap, int rc) { struct vop_remove_args *a = ap; @@ -4624,7 +4633,7 @@ filt_vfsread(struct knote *kn, long hint * filesystem is gone, so set the EOF flag and schedule * the knote for deletion. */ - if (hint == NOTE_REVOKE) { + if (hint == NOTE_REVOKE || (hint == 0 && vp->v_type == VBAD)) { VI_LOCK(vp); kn->kn_flags |= (EV_EOF | EV_ONESHOT); VI_UNLOCK(vp); @@ -4653,7 +4662,7 @@ filt_vfswrite(struct knote *kn, long hin * filesystem is gone, so set the EOF flag and schedule * the knote for deletion. */ - if (hint == NOTE_REVOKE) + if (hint == NOTE_REVOKE || (hint == 0 && vp->v_type == VBAD)) kn->kn_flags |= (EV_EOF | EV_ONESHOT); kn->kn_data = 0; @@ -4670,7 +4679,7 @@ filt_vfsvnode(struct knote *kn, long hin VI_LOCK(vp); if (kn->kn_sfflags & hint) kn->kn_fflags |= hint; - if (hint == NOTE_REVOKE) { + if (hint == NOTE_REVOKE || (hint == 0 && vp->v_type == VBAD)) { kn->kn_flags |= EV_EOF; VI_UNLOCK(vp); return (1); Modified: head/sys/kern/vnode_if.src ============================================================================== --- head/sys/kern/vnode_if.src Tue Sep 15 20:04:30 2015 (r287830) +++ head/sys/kern/vnode_if.src Tue Sep 15 20:22:30 2015 (r287831) @@ -355,6 +355,7 @@ vop_inactive { %% reclaim vp E E E +%! reclaim post vop_reclaim_post vop_reclaim { IN struct vnode *vp; Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Tue Sep 15 20:04:30 2015 (r287830) +++ head/sys/sys/vnode.h Tue Sep 15 20:22:30 2015 (r287831) @@ -781,6 +781,7 @@ void vop_lookup_post(void *a, int rc); void vop_lookup_pre(void *a); void vop_mkdir_post(void *a, int rc); void vop_mknod_post(void *a, int rc); +void vop_reclaim_post(void *a, int rc); void vop_remove_post(void *a, int rc); void vop_rename_post(void *a, int rc); void vop_rename_pre(void *a); From owner-svn-src-head@freebsd.org Tue Sep 15 21:16:46 2015 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 D1C779C2756; Tue, 15 Sep 2015 21:16:46 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 C29A21AEE; Tue, 15 Sep 2015 21:16:46 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8FLGk9H099018; Tue, 15 Sep 2015 21:16:46 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8FLGkZU099017; Tue, 15 Sep 2015 21:16:46 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201509152116.t8FLGkZU099017@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Tue, 15 Sep 2015 21:16:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287832 - head/sys/netinet X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 21:16:46 -0000 Author: brd (doc,ports committer) Date: Tue Sep 15 21:16:45 2015 New Revision: 287832 URL: https://svnweb.freebsd.org/changeset/base/287832 Log: Remove redundant 'man page' Reviewed by: allanjude Modified: head/sys/netinet/sctp_sysctl.h Modified: head/sys/netinet/sctp_sysctl.h ============================================================================== --- head/sys/netinet/sctp_sysctl.h Tue Sep 15 20:22:30 2015 (r287831) +++ head/sys/netinet/sctp_sysctl.h Tue Sep 15 21:16:45 2015 (r287832) @@ -545,7 +545,7 @@ struct sctp_sysctl { #define SCTPCTL_RTTVAR_DCCCECN_MAX 1 #define SCTPCTL_RTTVAR_DCCCECN_DEFAULT 1 /* 0 means disable feature */ -#define SCTPCTL_BLACKHOLE_DESC "Enable SCTP blackholing. See blackhole(4) man page for more details." +#define SCTPCTL_BLACKHOLE_DESC "Enable SCTP blackholing. See blackhole(4) for more details." #define SCTPCTL_BLACKHOLE_MIN 0 #define SCTPCTL_BLACKHOLE_MAX 2 #define SCTPCTL_BLACKHOLE_DEFAULT SCTPCTL_BLACKHOLE_MIN From owner-svn-src-head@freebsd.org Tue Sep 15 22:16:21 2015 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 E501B9C2C84; Tue, 15 Sep 2015 22:16:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 D5C1A10C3; Tue, 15 Sep 2015 22:16:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8FMGLGx023520; Tue, 15 Sep 2015 22:16:21 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8FMGL74023519; Tue, 15 Sep 2015 22:16:21 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201509152216.t8FMGL74023519@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 15 Sep 2015 22:16:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287833 - head/sys/kern X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 22:16:22 -0000 Author: jhb Date: Tue Sep 15 22:16:21 2015 New Revision: 287833 URL: https://svnweb.freebsd.org/changeset/base/287833 Log: Threads holding a read lock of a sleepable rm lock are not permitted to sleep. The rmlock implementation enforces this by disabling sleeping when a read lock is acquired. To simplify the implementation, sleeping is disabled for most of the duration of rm_rlock. However, it doesn't need to be disabled until the lock is acquired. If a sleepable rm lock is contested, then rm_rlock may need to acquire the backing sx lock. This tripped the overly-broad assertion. Fix by relaxing the assertion around the call to sx_xlock(). Reported by: mjg Reviewed by: kib, mjg MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D3324 Modified: head/sys/kern/kern_rmlock.c Modified: head/sys/kern/kern_rmlock.c ============================================================================== --- head/sys/kern/kern_rmlock.c Tue Sep 15 21:16:45 2015 (r287832) +++ head/sys/kern/kern_rmlock.c Tue Sep 15 22:16:21 2015 (r287833) @@ -407,9 +407,11 @@ _rm_rlock_hard(struct rmlock *rm, struct return (0); } } else { - if (rm->lock_object.lo_flags & LO_SLEEPABLE) + if (rm->lock_object.lo_flags & LO_SLEEPABLE) { + THREAD_SLEEPING_OK(); sx_xlock(&rm->rm_lock_sx); - else + THREAD_NO_SLEEPING(); + } else mtx_lock(&rm->rm_lock_mtx); } From owner-svn-src-head@freebsd.org Tue Sep 15 23:06:58 2015 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 5943C9C2FDB; Tue, 15 Sep 2015 23:06:58 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 49375139C; Tue, 15 Sep 2015 23:06:58 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8FN6wjP044038; Tue, 15 Sep 2015 23:06:58 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8FN6vrk044034; Tue, 15 Sep 2015 23:06:57 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201509152306.t8FN6vrk044034@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 15 Sep 2015 23:06:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287835 - in head/sys: kern sys X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 23:06:58 -0000 Author: mjg Date: Tue Sep 15 23:06:56 2015 New Revision: 287835 URL: https://svnweb.freebsd.org/changeset/base/287835 Log: sysctl: switch sysctllock to a sleepable rmlock, take 2 This restores r285125. Previous attempt was reverted due to a bug in rmlocks, which is fixed since r287833. Modified: head/sys/kern/kern_linker.c head/sys/kern/kern_sysctl.c head/sys/kern/vfs_init.c head/sys/sys/sysctl.h Modified: head/sys/kern/kern_linker.c ============================================================================== --- head/sys/kern/kern_linker.c Tue Sep 15 22:59:55 2015 (r287834) +++ head/sys/kern/kern_linker.c Tue Sep 15 23:06:56 2015 (r287835) @@ -292,10 +292,10 @@ linker_file_register_sysctls(linker_file return; sx_xunlock(&kld_sx); - sysctl_xlock(); + sysctl_wlock(); for (oidp = start; oidp < stop; oidp++) sysctl_register_oid(*oidp); - sysctl_xunlock(); + sysctl_wunlock(); sx_xlock(&kld_sx); } @@ -313,10 +313,10 @@ linker_file_unregister_sysctls(linker_fi return; sx_xunlock(&kld_sx); - sysctl_xlock(); + sysctl_wlock(); for (oidp = start; oidp < stop; oidp++) sysctl_unregister_oid(*oidp); - sysctl_xunlock(); + sysctl_wunlock(); sx_xlock(&kld_sx); } Modified: head/sys/kern/kern_sysctl.c ============================================================================== --- head/sys/kern/kern_sysctl.c Tue Sep 15 22:59:55 2015 (r287834) +++ head/sys/kern/kern_sysctl.c Tue Sep 15 23:06:56 2015 (r287835) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -77,7 +78,7 @@ static MALLOC_DEFINE(M_SYSCTLTMP, "sysct * The sysctllock protects the MIB tree. It also protects sysctl * contexts used with dynamic sysctls. The sysctl_register_oid() and * sysctl_unregister_oid() routines require the sysctllock to already - * be held, so the sysctl_xlock() and sysctl_xunlock() routines are + * be held, so the sysctl_wlock() and sysctl_wunlock() routines are * provided for the few places in the kernel which need to use that * API rather than using the dynamic API. Use of the dynamic API is * strongly encouraged for most code. @@ -86,20 +87,21 @@ static MALLOC_DEFINE(M_SYSCTLTMP, "sysct * sysctl requests. This is implemented by serializing any userland * sysctl requests larger than a single page via an exclusive lock. */ -static struct sx sysctllock; +static struct rmlock sysctllock; static struct sx sysctlmemlock; -#define SYSCTL_XLOCK() sx_xlock(&sysctllock) -#define SYSCTL_XUNLOCK() sx_xunlock(&sysctllock) -#define SYSCTL_SLOCK() sx_slock(&sysctllock) -#define SYSCTL_SUNLOCK() sx_sunlock(&sysctllock) -#define SYSCTL_XLOCKED() sx_xlocked(&sysctllock) -#define SYSCTL_ASSERT_LOCKED() sx_assert(&sysctllock, SA_LOCKED) -#define SYSCTL_ASSERT_XLOCKED() sx_assert(&sysctllock, SA_XLOCKED) -#define SYSCTL_ASSERT_SLOCKED() sx_assert(&sysctllock, SA_SLOCKED) -#define SYSCTL_INIT() sx_init(&sysctllock, "sysctl lock") +#define SYSCTL_WLOCK() rm_wlock(&sysctllock) +#define SYSCTL_WUNLOCK() rm_wunlock(&sysctllock) +#define SYSCTL_RLOCK(tracker) rm_rlock(&sysctllock, (tracker)) +#define SYSCTL_RUNLOCK(tracker) rm_runlock(&sysctllock, (tracker)) +#define SYSCTL_WLOCKED() rm_wowned(&sysctllock) +#define SYSCTL_ASSERT_LOCKED() rm_assert(&sysctllock, RA_LOCKED) +#define SYSCTL_ASSERT_WLOCKED() rm_assert(&sysctllock, RA_WLOCKED) +#define SYSCTL_ASSERT_RLOCKED() rm_assert(&sysctllock, RA_RLOCKED) +#define SYSCTL_INIT() rm_init_flags(&sysctllock, "sysctl lock", \ + RM_SLEEPABLE) #define SYSCTL_SLEEP(ch, wmesg, timo) \ - sx_sleep(ch, &sysctllock, 0, wmesg, timo) + rm_sleep(ch, &sysctllock, 0, wmesg, timo) static int sysctl_root(SYSCTL_HANDLER_ARGS); @@ -111,29 +113,6 @@ static int sysctl_remove_oid_locked(stru static int sysctl_old_kernel(struct sysctl_req *, const void *, size_t); static int sysctl_new_kernel(struct sysctl_req *, void *, size_t); -static void -sysctl_lock(bool xlock) -{ - - if (xlock) - SYSCTL_XLOCK(); - else - SYSCTL_SLOCK(); -} - -static bool -sysctl_unlock(void) -{ - bool xlocked; - - xlocked = SYSCTL_XLOCKED(); - if (xlocked) - SYSCTL_XUNLOCK(); - else - SYSCTL_SUNLOCK(); - return (xlocked); -} - static struct sysctl_oid * sysctl_find_oidname(const char *name, struct sysctl_oid_list *list) { @@ -154,29 +133,32 @@ sysctl_find_oidname(const char *name, st * Order by number in each list. */ void -sysctl_xlock(void) +sysctl_wlock(void) { - SYSCTL_XLOCK(); + SYSCTL_WLOCK(); } void -sysctl_xunlock(void) +sysctl_wunlock(void) { - SYSCTL_XUNLOCK(); + SYSCTL_WUNLOCK(); } static int sysctl_root_handler_locked(struct sysctl_oid *oid, void *arg1, intptr_t arg2, - struct sysctl_req *req) + struct sysctl_req *req, struct rm_priotracker *tracker) { int error; - bool xlocked; if (oid->oid_kind & CTLFLAG_DYN) atomic_add_int(&oid->oid_running, 1); - xlocked = sysctl_unlock(); + + if (tracker != NULL) + SYSCTL_RUNLOCK(tracker); + else + SYSCTL_WUNLOCK(); if (!(oid->oid_kind & CTLFLAG_MPSAFE)) mtx_lock(&Giant); @@ -184,7 +166,11 @@ sysctl_root_handler_locked(struct sysctl if (!(oid->oid_kind & CTLFLAG_MPSAFE)) mtx_unlock(&Giant); - sysctl_lock(xlocked); + if (tracker != NULL) + SYSCTL_RLOCK(tracker); + else + SYSCTL_WLOCK(); + if (oid->oid_kind & CTLFLAG_DYN) { if (atomic_fetchadd_int(&oid->oid_running, -1) == 1 && (oid->oid_kind & CTLFLAG_DYING) != 0) @@ -283,7 +269,7 @@ sysctl_load_tunable_by_oid_locked(struct return; } error = sysctl_root_handler_locked(oidp, oidp->oid_arg1, - oidp->oid_arg2, &req); + oidp->oid_arg2, &req, NULL); if (error != 0) printf("Setting sysctl %s failed: %d\n", path + rem, error); if (penv != NULL) @@ -303,7 +289,7 @@ sysctl_register_oid(struct sysctl_oid *o * First check if another oid with the same name already * exists in the parent's list. */ - SYSCTL_ASSERT_XLOCKED(); + SYSCTL_ASSERT_WLOCKED(); p = sysctl_find_oidname(oidp->oid_name, parent); if (p != NULL) { if ((p->oid_kind & CTLTYPE) == CTLTYPE_NODE) { @@ -397,7 +383,7 @@ sysctl_unregister_oid(struct sysctl_oid struct sysctl_oid *p; int error; - SYSCTL_ASSERT_XLOCKED(); + SYSCTL_ASSERT_WLOCKED(); error = ENOENT; if (oidp->oid_number == OID_AUTO) { error = EINVAL; @@ -453,7 +439,7 @@ sysctl_ctx_free(struct sysctl_ctx_list * * XXX This algorithm is a hack. But I don't know any * XXX better solution for now... */ - SYSCTL_XLOCK(); + SYSCTL_WLOCK(); TAILQ_FOREACH(e, clist, link) { error = sysctl_remove_oid_locked(e->entry, 0, 0); if (error) @@ -473,7 +459,7 @@ sysctl_ctx_free(struct sysctl_ctx_list * e1 = TAILQ_PREV(e1, sysctl_ctx_list, link); } if (error) { - SYSCTL_XUNLOCK(); + SYSCTL_WUNLOCK(); return(EBUSY); } /* Now really delete the entries */ @@ -487,7 +473,7 @@ sysctl_ctx_free(struct sysctl_ctx_list * free(e, M_SYSCTLOID); e = e1; } - SYSCTL_XUNLOCK(); + SYSCTL_WUNLOCK(); return (error); } @@ -497,7 +483,7 @@ sysctl_ctx_entry_add(struct sysctl_ctx_l { struct sysctl_ctx_entry *e; - SYSCTL_ASSERT_XLOCKED(); + SYSCTL_ASSERT_WLOCKED(); if (clist == NULL || oidp == NULL) return(NULL); e = malloc(sizeof(struct sysctl_ctx_entry), M_SYSCTLOID, M_WAITOK); @@ -512,7 +498,7 @@ sysctl_ctx_entry_find(struct sysctl_ctx_ { struct sysctl_ctx_entry *e; - SYSCTL_ASSERT_XLOCKED(); + SYSCTL_ASSERT_WLOCKED(); if (clist == NULL || oidp == NULL) return(NULL); TAILQ_FOREACH(e, clist, link) { @@ -534,15 +520,15 @@ sysctl_ctx_entry_del(struct sysctl_ctx_l if (clist == NULL || oidp == NULL) return (EINVAL); - SYSCTL_XLOCK(); + SYSCTL_WLOCK(); e = sysctl_ctx_entry_find(clist, oidp); if (e != NULL) { TAILQ_REMOVE(clist, e, link); - SYSCTL_XUNLOCK(); + SYSCTL_WUNLOCK(); free(e, M_SYSCTLOID); return (0); } else { - SYSCTL_XUNLOCK(); + SYSCTL_WUNLOCK(); return (ENOENT); } } @@ -558,9 +544,9 @@ sysctl_remove_oid(struct sysctl_oid *oid { int error; - SYSCTL_XLOCK(); + SYSCTL_WLOCK(); error = sysctl_remove_oid_locked(oidp, del, recurse); - SYSCTL_XUNLOCK(); + SYSCTL_WUNLOCK(); return (error); } @@ -572,14 +558,14 @@ sysctl_remove_name(struct sysctl_oid *pa int error; error = ENOENT; - SYSCTL_XLOCK(); + SYSCTL_WLOCK(); SLIST_FOREACH_SAFE(p, SYSCTL_CHILDREN(parent), oid_link, tmp) { if (strcmp(p->oid_name, name) == 0) { error = sysctl_remove_oid_locked(p, del, recurse); break; } } - SYSCTL_XUNLOCK(); + SYSCTL_WUNLOCK(); return (error); } @@ -591,7 +577,7 @@ sysctl_remove_oid_locked(struct sysctl_o struct sysctl_oid *p, *tmp; int error; - SYSCTL_ASSERT_XLOCKED(); + SYSCTL_ASSERT_WLOCKED(); if (oidp == NULL) return(EINVAL); if ((oidp->oid_kind & CTLFLAG_DYN) == 0) { @@ -666,7 +652,7 @@ sysctl_add_oid(struct sysctl_ctx_list *c if (parent == NULL) return(NULL); /* Check if the node already exists, otherwise create it */ - SYSCTL_XLOCK(); + SYSCTL_WLOCK(); oidp = sysctl_find_oidname(name, parent); if (oidp != NULL) { if ((oidp->oid_kind & CTLTYPE) == CTLTYPE_NODE) { @@ -674,10 +660,10 @@ sysctl_add_oid(struct sysctl_ctx_list *c /* Update the context */ if (clist != NULL) sysctl_ctx_entry_add(clist, oidp); - SYSCTL_XUNLOCK(); + SYSCTL_WUNLOCK(); return (oidp); } else { - SYSCTL_XUNLOCK(); + SYSCTL_WUNLOCK(); printf("can't re-use a leaf (%s)!\n", name); return (NULL); } @@ -700,7 +686,7 @@ sysctl_add_oid(struct sysctl_ctx_list *c sysctl_ctx_entry_add(clist, oidp); /* Register this oid */ sysctl_register_oid(oidp); - SYSCTL_XUNLOCK(); + SYSCTL_WUNLOCK(); return (oidp); } @@ -714,10 +700,10 @@ sysctl_rename_oid(struct sysctl_oid *oid char *oldname; newname = strdup(name, M_SYSCTLOID); - SYSCTL_XLOCK(); + SYSCTL_WLOCK(); oldname = __DECONST(char *, oidp->oid_name); oidp->oid_name = newname; - SYSCTL_XUNLOCK(); + SYSCTL_WUNLOCK(); free(oldname, M_SYSCTLOID); } @@ -729,21 +715,21 @@ sysctl_move_oid(struct sysctl_oid *oid, { struct sysctl_oid *oidp; - SYSCTL_XLOCK(); + SYSCTL_WLOCK(); if (oid->oid_parent == parent) { - SYSCTL_XUNLOCK(); + SYSCTL_WUNLOCK(); return (0); } oidp = sysctl_find_oidname(oid->oid_name, parent); if (oidp != NULL) { - SYSCTL_XUNLOCK(); + SYSCTL_WUNLOCK(); return (EEXIST); } sysctl_unregister_oid(oid); oid->oid_parent = parent; oid->oid_number = OID_AUTO; sysctl_register_oid(oid); - SYSCTL_XUNLOCK(); + SYSCTL_WUNLOCK(); return (0); } @@ -759,10 +745,10 @@ sysctl_register_all(void *arg) sx_init(&sysctlmemlock, "sysctl mem"); SYSCTL_INIT(); - SYSCTL_XLOCK(); + SYSCTL_WLOCK(); SET_FOREACH(oidp, sysctl_set) sysctl_register_oid(*oidp); - SYSCTL_XUNLOCK(); + SYSCTL_WUNLOCK(); } SYSINIT(sysctl, SI_SUB_KMEM, SI_ORDER_FIRST, sysctl_register_all, 0); @@ -832,14 +818,15 @@ sysctl_sysctl_debug_dump_node(struct sys static int sysctl_sysctl_debug(SYSCTL_HANDLER_ARGS) { + struct rm_priotracker tracker; int error; error = priv_check(req->td, PRIV_SYSCTL_DEBUG); if (error) return (error); - SYSCTL_SLOCK(); + SYSCTL_RLOCK(&tracker); sysctl_sysctl_debug_dump_node(&sysctl__children, 0); - SYSCTL_SUNLOCK(); + SYSCTL_RUNLOCK(&tracker); return (ENOENT); } @@ -855,9 +842,10 @@ sysctl_sysctl_name(SYSCTL_HANDLER_ARGS) int error = 0; struct sysctl_oid *oid; struct sysctl_oid_list *lsp = &sysctl__children, *lsp2; + struct rm_priotracker tracker; char buf[10]; - SYSCTL_SLOCK(); + SYSCTL_RLOCK(&tracker); while (namelen) { if (!lsp) { snprintf(buf,sizeof(buf),"%d",*name); @@ -900,7 +888,7 @@ sysctl_sysctl_name(SYSCTL_HANDLER_ARGS) } error = SYSCTL_OUT(req, "", 1); out: - SYSCTL_SUNLOCK(); + SYSCTL_RUNLOCK(&tracker); return (error); } @@ -979,11 +967,12 @@ sysctl_sysctl_next(SYSCTL_HANDLER_ARGS) int i, j, error; struct sysctl_oid *oid; struct sysctl_oid_list *lsp = &sysctl__children; + struct rm_priotracker tracker; int newoid[CTL_MAXNAME]; - SYSCTL_SLOCK(); + SYSCTL_RLOCK(&tracker); i = sysctl_sysctl_next_ls(lsp, name, namelen, newoid, &j, 1, &oid); - SYSCTL_SUNLOCK(); + SYSCTL_RUNLOCK(&tracker); if (i) return (ENOENT); error = SYSCTL_OUT(req, newoid, j * sizeof (int)); @@ -1042,6 +1031,7 @@ sysctl_sysctl_name2oid(SYSCTL_HANDLER_AR char *p; int error, oid[CTL_MAXNAME], len = 0; struct sysctl_oid *op = 0; + struct rm_priotracker tracker; if (!req->newlen) return (ENOENT); @@ -1058,9 +1048,9 @@ sysctl_sysctl_name2oid(SYSCTL_HANDLER_AR p [req->newlen] = '\0'; - SYSCTL_SLOCK(); + SYSCTL_RLOCK(&tracker); error = name2oid(p, oid, &len, &op); - SYSCTL_SUNLOCK(); + SYSCTL_RUNLOCK(&tracker); free(p, M_SYSCTL); @@ -1083,9 +1073,10 @@ static int sysctl_sysctl_oidfmt(SYSCTL_HANDLER_ARGS) { struct sysctl_oid *oid; + struct rm_priotracker tracker; int error; - SYSCTL_SLOCK(); + SYSCTL_RLOCK(&tracker); error = sysctl_find_oid(arg1, arg2, &oid, NULL, req); if (error) goto out; @@ -1099,7 +1090,7 @@ sysctl_sysctl_oidfmt(SYSCTL_HANDLER_ARGS goto out; error = SYSCTL_OUT(req, oid->oid_fmt, strlen(oid->oid_fmt) + 1); out: - SYSCTL_SUNLOCK(); + SYSCTL_RUNLOCK(&tracker); return (error); } @@ -1111,9 +1102,10 @@ static int sysctl_sysctl_oiddescr(SYSCTL_HANDLER_ARGS) { struct sysctl_oid *oid; + struct rm_priotracker tracker; int error; - SYSCTL_SLOCK(); + SYSCTL_RLOCK(&tracker); error = sysctl_find_oid(arg1, arg2, &oid, NULL, req); if (error) goto out; @@ -1124,7 +1116,7 @@ sysctl_sysctl_oiddescr(SYSCTL_HANDLER_AR } error = SYSCTL_OUT(req, oid->oid_descr, strlen(oid->oid_descr) + 1); out: - SYSCTL_SUNLOCK(); + SYSCTL_RUNLOCK(&tracker); return (error); } @@ -1429,9 +1421,7 @@ kernel_sysctl(struct thread *td, int *na req.newfunc = sysctl_new_kernel; req.lock = REQ_UNWIRED; - SYSCTL_SLOCK(); error = sysctl_root(0, name, namelen, &req); - SYSCTL_SUNLOCK(); if (req.lock == REQ_WIRED && req.validlen > 0) vsunlock(req.oldptr, req.validlen); @@ -1608,13 +1598,14 @@ static int sysctl_root(SYSCTL_HANDLER_ARGS) { struct sysctl_oid *oid; + struct rm_priotracker tracker; int error, indx, lvl; - SYSCTL_ASSERT_SLOCKED(); + SYSCTL_RLOCK(&tracker); error = sysctl_find_oid(arg1, arg2, &oid, &indx, req); if (error) - return (error); + goto out; if ((oid->oid_kind & CTLTYPE) == CTLTYPE_NODE) { /* @@ -1622,13 +1613,17 @@ sysctl_root(SYSCTL_HANDLER_ARGS) * no handler. Inform the user that it's a node. * The indx may or may not be the same as namelen. */ - if (oid->oid_handler == NULL) - return (EISDIR); + if (oid->oid_handler == NULL) { + error = EISDIR; + goto out; + } } /* Is this sysctl writable? */ - if (req->newptr && !(oid->oid_kind & CTLFLAG_WR)) - return (EPERM); + if (req->newptr && !(oid->oid_kind & CTLFLAG_WR)) { + error = EPERM; + goto out; + } KASSERT(req->td != NULL, ("sysctl_root(): req->td == NULL")); @@ -1638,10 +1633,11 @@ sysctl_root(SYSCTL_HANDLER_ARGS) * writing unless specifically granted for the node. */ if (IN_CAPABILITY_MODE(req->td)) { - if (req->oldptr && !(oid->oid_kind & CTLFLAG_CAPRD)) - return (EPERM); - if (req->newptr && !(oid->oid_kind & CTLFLAG_CAPWR)) - return (EPERM); + if ((req->oldptr && !(oid->oid_kind & CTLFLAG_CAPRD)) || + (req->newptr && !(oid->oid_kind & CTLFLAG_CAPWR))) { + error = EPERM; + goto out; + } } #endif @@ -1650,7 +1646,7 @@ sysctl_root(SYSCTL_HANDLER_ARGS) lvl = (oid->oid_kind & CTLMASK_SECURE) >> CTLSHIFT_SECURE; error = securelevel_gt(req->td->td_ucred, lvl); if (error) - return (error); + goto out; } /* Is this sysctl writable by only privileged users? */ @@ -1668,11 +1664,13 @@ sysctl_root(SYSCTL_HANDLER_ARGS) priv = PRIV_SYSCTL_WRITE; error = priv_check(req->td, priv); if (error) - return (error); + goto out; } - if (!oid->oid_handler) - return (EINVAL); + if (!oid->oid_handler) { + error = EINVAL; + goto out; + } if ((oid->oid_kind & CTLTYPE) == CTLTYPE_NODE) { arg1 = (int *)arg1 + indx; @@ -1685,16 +1683,18 @@ sysctl_root(SYSCTL_HANDLER_ARGS) error = mac_system_check_sysctl(req->td->td_ucred, oid, arg1, arg2, req); if (error != 0) - return (error); + goto out; #endif #ifdef VIMAGE if ((oid->oid_kind & CTLFLAG_VNET) && arg1 != NULL) arg1 = (void *)(curvnet->vnet_data_base + (uintptr_t)arg1); #endif - error = sysctl_root_handler_locked(oid, arg1, arg2, req); + error = sysctl_root_handler_locked(oid, arg1, arg2, req, &tracker); KFAIL_POINT_ERROR(_debug_fail_point, sysctl_running, error); +out: + SYSCTL_RUNLOCK(&tracker); return (error); } @@ -1794,9 +1794,7 @@ userland_sysctl(struct thread *td, int * for (;;) { req.oldidx = 0; req.newidx = 0; - SYSCTL_SLOCK(); error = sysctl_root(0, name, namelen, &req); - SYSCTL_SUNLOCK(); if (error != EAGAIN) break; kern_yield(PRI_USER); Modified: head/sys/kern/vfs_init.c ============================================================================== --- head/sys/kern/vfs_init.c Tue Sep 15 22:59:55 2015 (r287834) +++ head/sys/kern/vfs_init.c Tue Sep 15 23:06:56 2015 (r287835) @@ -291,7 +291,7 @@ vfs_register(struct vfsconf *vfc) * preserved by re-registering the oid after modifying its * number. */ - sysctl_xlock(); + sysctl_wlock(); SLIST_FOREACH(oidp, SYSCTL_CHILDREN(&sysctl___vfs), oid_link) { if (strcmp(oidp->oid_name, vfc->vfc_name) == 0) { sysctl_unregister_oid(oidp); @@ -300,7 +300,7 @@ vfs_register(struct vfsconf *vfc) break; } } - sysctl_xunlock(); + sysctl_wunlock(); return (0); } Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Tue Sep 15 22:59:55 2015 (r287834) +++ head/sys/sys/sysctl.h Tue Sep 15 23:06:56 2015 (r287835) @@ -807,8 +807,8 @@ int userland_sysctl(struct thread *td, i size_t *retval, int flags); int sysctl_find_oid(int *name, u_int namelen, struct sysctl_oid **noid, int *nindx, struct sysctl_req *req); -void sysctl_xlock(void); -void sysctl_xunlock(void); +void sysctl_wlock(void); +void sysctl_wunlock(void); int sysctl_wire_old_buffer(struct sysctl_req *req, size_t len); struct sbuf; From owner-svn-src-head@freebsd.org Tue Sep 15 23:44:19 2015 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 E43679C25D3; Tue, 15 Sep 2015 23:44:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 D51251605; Tue, 15 Sep 2015 23:44:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8FNiJ3T060400; Tue, 15 Sep 2015 23:44:19 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8FNiJeN060399; Tue, 15 Sep 2015 23:44:19 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201509152344.t8FNiJeN060399@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 15 Sep 2015 23:44:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287836 - head/sys/conf X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 23:44:20 -0000 Author: emaste Date: Tue Sep 15 23:44:19 2015 New Revision: 287836 URL: https://svnweb.freebsd.org/changeset/base/287836 Log: arm64: add kbd.c to the build for ukbd to fix the build Pointy hat to: emaste Modified: head/sys/conf/files.arm64 Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Tue Sep 15 23:06:56 2015 (r287835) +++ head/sys/conf/files.arm64 Tue Sep 15 23:44:19 2015 (r287836) @@ -59,6 +59,7 @@ dev/acpica/acpi_if.m optional acpi dev/fdt/fdt_arm64.c optional fdt dev/hwpmc/hwpmc_arm64.c optional hwpmc dev/hwpmc/hwpmc_arm64_md.c optional hwpmc +dev/kbd/kbd.c optional atkbd | sc | ukbd | vt dev/mmc/host/dwmmc.c optional dwmmc dev/mmc/host/dwmmc_hisi.c optional dwmmc soc_hisi_hi6220 dev/ofw/ofw_cpu.c optional fdt From owner-svn-src-head@freebsd.org Tue Sep 15 23:56:32 2015 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 0B7D29C2D48; Tue, 15 Sep 2015 23:56:32 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 F08651D2B; Tue, 15 Sep 2015 23:56:31 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8FNuVl0064570; Tue, 15 Sep 2015 23:56:31 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8FNuVqA064569; Tue, 15 Sep 2015 23:56:31 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201509152356.t8FNuVqA064569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 15 Sep 2015 23:56:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287837 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head 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.20 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: Tue, 15 Sep 2015 23:56:32 -0000 Author: markj Date: Tue Sep 15 23:56:31 2015 New Revision: 287837 URL: https://svnweb.freebsd.org/changeset/base/287837 Log: Ensure that the MAD agent's delayed taskqueue is completely stopped before proceeding. Otherwise, nothing prevents it from running after the MAD agent struct has been been freed, and this results in a use-after-free when the task's ta_pending count is incremented in the callout handler. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/sys/ofed/drivers/infiniband/core/mad.c Modified: head/sys/ofed/drivers/infiniband/core/mad.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/mad.c Tue Sep 15 23:44:19 2015 (r287836) +++ head/sys/ofed/drivers/infiniband/core/mad.c Tue Sep 15 23:56:31 2015 (r287837) @@ -1053,7 +1053,7 @@ static void unregister_mad_agent(struct */ cancel_mads(mad_agent_priv); port_priv = mad_agent_priv->qp_info->port_priv; - cancel_delayed_work(&mad_agent_priv->timed_work); + cancel_delayed_work_sync(&mad_agent_priv->timed_work); spin_lock_irqsave(&port_priv->reg_lock, flags); remove_mad_reg_req(mad_agent_priv); From owner-svn-src-head@freebsd.org Wed Sep 16 00:16:00 2015 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 854289CDBB5; Wed, 16 Sep 2015 00:16:00 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62B5C1E15; Wed, 16 Sep 2015 00:16:00 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E1DF5B953; Tue, 15 Sep 2015 20:15:58 -0400 (EDT) From: John Baldwin To: Marius Strobl Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r287726 - in head/sys: conf sparc64/pci Date: Mon, 14 Sep 2015 14:44:59 -0700 Message-ID: <3802200.abqUpJRte4@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-PRERELEASE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201509122249.t8CMnXpH089068@repo.freebsd.org> References: <201509122249.t8CMnXpH089068@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 15 Sep 2015 20:15:59 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 16 Sep 2015 00:16:00 -0000 On Saturday, September 12, 2015 10:49:33 PM Marius Strobl wrote: > Author: marius > Date: Sat Sep 12 22:49:32 2015 > New Revision: 287726 > URL: https://svnweb.freebsd.org/changeset/base/287726 > > Log: > - Factor out the common and generic parts of the sparc64 host-PCI-bridge > drivers into the revived sys/sparc64/pci/ofw_pci.c, previously already > serving a similar purpose. This has been done with sun4v in mind, which > explains a) the otherwise not that obvious scheme employed and b) why > reusing sys/powerpc/ofw/ofw_pci.c was even lesser an option. > - Add a workaround for QEMU once again not emulating real machines, in > this case by not providing the OFW_PCI_CS_MEM64 range. [1] > > Submitted by: jhb [1] > MFC after: 1 week Thanks! -- John Baldwin From owner-svn-src-head@freebsd.org Wed Sep 16 01:44:12 2015 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 8F14E9CD4D5; Wed, 16 Sep 2015 01:44:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 7DD161E85; Wed, 16 Sep 2015 01:44:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8G1iCiZ010933; Wed, 16 Sep 2015 01:44:12 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8G1iCR7010932; Wed, 16 Sep 2015 01:44:12 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509160144.t8G1iCR7010932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 16 Sep 2015 01:44:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287841 - head/sys/x86/acpica X-SVN-Group: head 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.20 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, 16 Sep 2015 01:44:12 -0000 Author: adrian Date: Wed Sep 16 01:44:11 2015 New Revision: 287841 URL: https://svnweb.freebsd.org/changeset/base/287841 Log: Add ASUS Sandybridge laptops to the similar x2apic disable logic that was recently added for Lenovo laptops. This is a prime candidate for conversion into a table and also checking other fields like "product". Tested: * ASUS UX31E Modified: head/sys/x86/acpica/madt.c Modified: head/sys/x86/acpica/madt.c ============================================================================== --- head/sys/x86/acpica/madt.c Wed Sep 16 00:45:48 2015 (r287840) +++ head/sys/x86/acpica/madt.c Wed Sep 16 01:44:11 2015 (r287841) @@ -182,7 +182,19 @@ madt_setup_local(void) CPUID_TO_FAMILY(cpu_id) == 0x6 && CPUID_TO_MODEL(cpu_id) == 0x2a) { x2apic_mode = 0; - reason = "for a suspected Lenovo SandyBridge BIOS bug"; + reason = + "for a suspected Lenovo SandyBridge BIOS bug"; + } + /* + * Same reason, ASUS SandyBridge. + */ + if (hw_vendor != NULL && + !strcmp(hw_vendor, "ASUSTeK Computer Inc.") && + CPUID_TO_FAMILY(cpu_id) == 0x6 && + CPUID_TO_MODEL(cpu_id) == 0x2a) { + x2apic_mode = 0; + reason = + "for a suspected ASUS SandyBridge BIOS bug"; } freeenv(hw_vendor); } From owner-svn-src-head@freebsd.org Wed Sep 16 02:02:50 2015 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 2F5609C219F; Wed, 16 Sep 2015 02:02:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 18B4519FB; Wed, 16 Sep 2015 02:02:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 114221B04; Wed, 16 Sep 2015 02:02:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id A849D11B48; Wed, 16 Sep 2015 02:02:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id I8vNfK4THvzY; Wed, 16 Sep 2015 02:02:43 +0000 (UTC) Subject: Re: svn commit: r287841 - head/sys/x86/acpica DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 07FB011B43 To: Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201509160144.t8G1iCR7010932@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <55F8CDCC.5020101@FreeBSD.org> Date: Tue, 15 Sep 2015 19:02:52 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <201509160144.t8G1iCR7010932@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="038iQC3FME798bS8M6eoBor2LkTbKalWA" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 16 Sep 2015 02:02:50 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --038iQC3FME798bS8M6eoBor2LkTbKalWA Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 9/15/2015 6:44 PM, Adrian Chadd wrote: > + !strcmp(hw_vendor, "ASUSTeK Computer Inc.") && Style bug! --=20 Regards, Bryan Drewery --038iQC3FME798bS8M6eoBor2LkTbKalWA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJV+M3MAAoJEDXXcbtuRpfPec8H/AzMf7uizg18kMDjUVMhvi1R +Fe1PQqmkknXMrq7+/0krH1u5+7Nk3TACXgtXTMw/PxoI/wLXDqxuPDmWzf20GW4 b228GlrlgOC3o4FBCAyOgiElMiGOpCQzoH0AXrp/K0pp/bTGIjIRj0J3hezJZdEx S2Q2t9kaQdZu7/yG0HrSCVe4leaRFOZ7hagZNSozbT3VyIIpsGOLJMYlB0b/o+YC 9neAP4Uj9+kavtM6LdFE5C8C4c3W3b1YPAKlK5Ti/6Jiie7WVf9oaHO8j7khFtsv 7J3+22fYPwt2zVHJs+EIl1mWHTb3fSYJ5EH6yb1si3ngvjFuQNmyXNIy/zc7/Xs= =k5Tt -----END PGP SIGNATURE----- --038iQC3FME798bS8M6eoBor2LkTbKalWA-- From owner-svn-src-head@freebsd.org Wed Sep 16 02:22:07 2015 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 39AAF9C2E88; Wed, 16 Sep 2015 02:22:07 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x22c.google.com (mail-qk0-x22c.google.com [IPv6:2607:f8b0:400d:c09::22c]) (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 ECDF9128D; Wed, 16 Sep 2015 02:22:06 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qkcf65 with SMTP id f65so80952974qkc.3; Tue, 15 Sep 2015 19:22:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=lmyIe7EeIB+p57aSSC828XXWnwJPaEoWQZwwBu2Rq2E=; b=txJZ/HxN0oEIJUha3JHVER5ws+qf66eMO6LLZl2cbaWdccf1D+tpFHIsE3zdvAKC6p Bdrtep5HKmdvuq/LkJZUNYVaQThiT5gNPw0h4RvnhvCvFVLn2EB+3tBWOaY23jC6uu24 z12YYfy9zJ0bXhDGdrtyRTfXJqMJ6dQ84fh9qj3uHg6IlXQ7o2zao2z7CppuMANN6Tlf 70FyCNsTafS5kxuU314/UBYVM69M21DwQgDu+HsVi6wd9fJJ3C2u+oCdZmt2rOzD/m6o s5iXnmqWsustohOGErn6VJz9z98W7C6NoS7l4jnDARJ9s6BJJaYlwSGISYxGHzyIxYB5 1lzw== MIME-Version: 1.0 X-Received: by 10.55.33.222 with SMTP id f91mr37023091qki.64.1442370126021; Tue, 15 Sep 2015 19:22:06 -0700 (PDT) Received: by 10.140.94.33 with HTTP; Tue, 15 Sep 2015 19:22:05 -0700 (PDT) In-Reply-To: <55F8CDCC.5020101@FreeBSD.org> References: <201509160144.t8G1iCR7010932@repo.freebsd.org> <55F8CDCC.5020101@FreeBSD.org> Date: Tue, 15 Sep 2015 19:22:05 -0700 Message-ID: Subject: Re: svn commit: r287841 - head/sys/x86/acpica From: NGie Cooper To: Bryan Drewery Cc: Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 16 Sep 2015 02:22:07 -0000 On Tue, Sep 15, 2015 at 7:02 PM, Bryan Drewery wrote: > On 9/15/2015 6:44 PM, Adrian Chadd wrote: >> + !strcmp(hw_vendor, "ASUSTeK Computer Inc.") && > > Style bug! kib committed the original style bug: https://svnweb.freebsd.org/base/head/sys/x86/acpica/madt.c?r1=286993&r2=286994&pathrev=287841& From owner-svn-src-head@freebsd.org Wed Sep 16 02:23:38 2015 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 132C79C2F4A; Wed, 16 Sep 2015 02:23:38 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x22b.google.com (mail-ig0-x22b.google.com [IPv6:2607:f8b0:4001:c05::22b]) (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 D312C13E4; Wed, 16 Sep 2015 02:23:37 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igcrk20 with SMTP id rk20so26243345igc.1; Tue, 15 Sep 2015 19:23:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Uujv+7VSmEH5lMvdGwF6hvGxPT2v4ZTLOw4vipYXM0E=; b=MLUROqOwRxcSPeFhOV4KEBLvaW9yp4kFYTV85Czsvvu+jjEC5GDt2/DwQUUhXc8ptv bZ4Xap+LNaqt78BO4NqGkqKmDY5AJp66fE7qQ0D+8Vyvlf2bJJW6ULlmbIaKXtL1UnvM IAnDanli3rPfhOY6tI5eTscGV47ya4bMjfwyEO32KAI2r27VdAJ3MmVMxktVdNdkq5wo LTk/JOvZzTc63Eb4/+nvDPbBezPN9I1xHSHnsvkMwXMPGlR3W17xcqVrRlp4NfzYAT/K 2KD0B0Qli7VhCoy06w7tAVCXAgaQgJ20XMyq1Fs3rPgGTK/d/GrpsvU/CUBAjao2P6mD eY9A== MIME-Version: 1.0 X-Received: by 10.50.45.33 with SMTP id j1mr11199802igm.61.1442370217204; Tue, 15 Sep 2015 19:23:37 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.28.208 with HTTP; Tue, 15 Sep 2015 19:23:37 -0700 (PDT) In-Reply-To: References: <201509160144.t8G1iCR7010932@repo.freebsd.org> <55F8CDCC.5020101@FreeBSD.org> Date: Tue, 15 Sep 2015 19:23:37 -0700 X-Google-Sender-Auth: iO75jjZgGfcbWDT74ULyIiHYbAk Message-ID: Subject: Re: svn commit: r287841 - head/sys/x86/acpica From: Adrian Chadd To: NGie Cooper Cc: Bryan Drewery , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 16 Sep 2015 02:23:38 -0000 Hi, This is definitely mini-project space - we should just have a table and a lookup function to check for the quirk. -adrian From owner-svn-src-head@freebsd.org Wed Sep 16 03:03:20 2015 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 536AB9CE9BE; Wed, 16 Sep 2015 03:03:20 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 2AC361021; Wed, 16 Sep 2015 03:03:20 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8G33K4x044492; Wed, 16 Sep 2015 03:03:20 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8G33Kl3044491; Wed, 16 Sep 2015 03:03:20 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201509160303.t8G33Kl3044491@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Wed, 16 Sep 2015 03:03:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287842 - head/sbin/ifconfig X-SVN-Group: head 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.20 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, 16 Sep 2015 03:03:20 -0000 Author: allanjude Date: Wed Sep 16 03:03:19 2015 New Revision: 287842 URL: https://svnweb.freebsd.org/changeset/base/287842 Log: Make ifconfig always exit with an error code if an important ioctl fails PR: 203062 Arm Twisting by: Kristof Provost Reviewed by: kp Approved by: bapt (mentor) MFC after: 2 weeks Relnotes: yes Sponsored by: ScaleEngine Inc. Sponsored by: vBSDCon Differential Revision: https://reviews.freebsd.org/D3644 Modified: head/sbin/ifconfig/ifconfig.c Modified: head/sbin/ifconfig/ifconfig.c ============================================================================== --- head/sbin/ifconfig/ifconfig.c Wed Sep 16 01:44:11 2015 (r287841) +++ head/sbin/ifconfig/ifconfig.c Wed Sep 16 03:03:19 2015 (r287842) @@ -995,7 +995,7 @@ setifmetric(const char *val, int dummy _ strncpy(ifr.ifr_name, name, sizeof (ifr.ifr_name)); ifr.ifr_metric = atoi(val); if (ioctl(s, SIOCSIFMETRIC, (caddr_t)&ifr) < 0) - warn("ioctl (set metric)"); + err(1, "ioctl SIOCSIFMETRIC (set metric)"); } static void @@ -1005,7 +1005,7 @@ setifmtu(const char *val, int dummy __un strncpy(ifr.ifr_name, name, sizeof (ifr.ifr_name)); ifr.ifr_mtu = atoi(val); if (ioctl(s, SIOCSIFMTU, (caddr_t)&ifr) < 0) - warn("ioctl (set mtu)"); + err(1, "ioctl SIOCSIFMTU (set mtu)"); } static void @@ -1015,15 +1015,12 @@ setifname(const char *val, int dummy __u char *newname; newname = strdup(val); - if (newname == NULL) { - warn("no memory to set ifname"); - return; - } + if (newname == NULL) + err(1, "no memory to set ifname"); ifr.ifr_data = newname; if (ioctl(s, SIOCSIFNAME, (caddr_t)&ifr) < 0) { - warn("ioctl (set name)"); free(newname); - return; + err(1, "ioctl SIOCSIFNAME (set name)"); } strlcpy(name, newname, sizeof(name)); free(newname); @@ -1050,7 +1047,7 @@ setifdescr(const char *val, int dummy __ } if (ioctl(s, SIOCSIFDESCR, (caddr_t)&ifr) < 0) - warn("ioctl (set descr)"); + err(1, "ioctl SIOCSIFDESCR (set descr)"); free(newdescr); } From owner-svn-src-head@freebsd.org Wed Sep 16 03:32:28 2015 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 A31D19C292B; Wed, 16 Sep 2015 03:32:28 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 93F351E38; Wed, 16 Sep 2015 03:32:28 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8G3WS2t057341; Wed, 16 Sep 2015 03:32:28 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8G3WSdw057340; Wed, 16 Sep 2015 03:32:28 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201509160332.t8G3WSdw057340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Wed, 16 Sep 2015 03:32:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287843 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head 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.20 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, 16 Sep 2015 03:32:28 -0000 Author: allanjude Date: Wed Sep 16 03:32:27 2015 New Revision: 287843 URL: https://svnweb.freebsd.org/changeset/base/287843 Log: Add a number of models to the bsdinstall GPT hack blacklist PR: 194359 Approved by: bapt (mentor) MFC after: 2 weeks Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D3525 Modified: head/usr.sbin/bsdinstall/scripts/auto Modified: head/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- head/usr.sbin/bsdinstall/scripts/auto Wed Sep 16 03:03:19 2015 (r287842) +++ head/usr.sbin/bsdinstall/scripts/auto Wed Sep 16 03:32:27 2015 (r287843) @@ -201,6 +201,19 @@ if f_interactive; then ;; esac ;; + "Hewlett-Packard") + case "$sys_model" in + "HP ProBook 4330s") + dialog_workaround "$msg_gpt_active_fix" + retval=$? + f_dprintf "gpt_active_fix_prompt=[%s]" "$retval" + if [ $retval -eq $DIALOG_OK ]; then + export ZFSBOOT_PARTITION_SCHEME="GPT + Active" + export WORKAROUND_GPTACTIVE=1 + fi + ;; + esac + ;; esac # # Motherboard Models @@ -208,7 +221,20 @@ if f_interactive; then case "$sys_mb_maker" in "Intel Corporation") case "$sys_mb_product" in - "DP965LT") + "DP965LT"|"D510MO") + dialog_workaround "$msg_gpt_active_fix" + retval=$? + f_dprintf "gpt_active_fix_prompt=[%s]" "$retval" + if [ $retval -eq $DIALOG_OK ]; then + export ZFSBOOT_PARTITION_SCHEME="GPT + Active" + export WORKAROUND_GPTACTIVE=1 + fi + ;; + esac + ;; + "Acer") + case "$sys_mb_product" in + "Veriton M6630G") dialog_workaround "$msg_gpt_active_fix" retval=$? f_dprintf "gpt_active_fix_prompt=[%s]" "$retval" From owner-svn-src-head@freebsd.org Wed Sep 16 04:07:40 2015 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 8A92B9CDDBF; Wed, 16 Sep 2015 04:07:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 7627A1CAF; Wed, 16 Sep 2015 04:07:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8G47exF069825; Wed, 16 Sep 2015 04:07:40 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8G47e9C069824; Wed, 16 Sep 2015 04:07:40 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509160407.t8G47e9C069824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 16 Sep 2015 04:07:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287844 - head/include X-SVN-Group: head 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.20 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, 16 Sep 2015 04:07:40 -0000 Author: bdrewery Date: Wed Sep 16 04:07:39 2015 New Revision: 287844 URL: https://svnweb.freebsd.org/changeset/base/287844 Log: Create 'copies' cookie in proper place in META_MODE. With -j the cookie would be created in CURDIR/sys/teken rather than OBJDIR. Sponsored by: EMC / Isilon Storage Division Modified: head/include/Makefile Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Wed Sep 16 03:32:27 2015 (r287843) +++ head/include/Makefile Wed Sep 16 04:07:39 2015 (r287844) @@ -255,6 +255,7 @@ copies: ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 teken.h \ ${DESTDIR}${INCLUDEDIR}/teken .if ${MK_META_MODE} == "yes" + cd ${.OBJDIR} touch ${.TARGET} .endif From owner-svn-src-head@freebsd.org Wed Sep 16 04:27:13 2015 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 978F89C2C84; Wed, 16 Sep 2015 04:27:13 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 87DE619FF; Wed, 16 Sep 2015 04:27:13 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8G4RDlW078221; Wed, 16 Sep 2015 04:27:13 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8G4RD5N078220; Wed, 16 Sep 2015 04:27:13 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509160427.t8G4RD5N078220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 16 Sep 2015 04:27:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287848 - head/include X-SVN-Group: head 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.20 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, 16 Sep 2015 04:27:13 -0000 Author: bdrewery Date: Wed Sep 16 04:27:12 2015 New Revision: 287848 URL: https://svnweb.freebsd.org/changeset/base/287848 Log: Similar to r287844, create 'symlinks' cookie in proper place with -j and META_MODE. Sponsored by: EMC / Isilon Storage Division Modified: head/include/Makefile Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Wed Sep 16 04:23:08 2015 (r287847) +++ head/include/Makefile Wed Sep 16 04:27:12 2015 (r287848) @@ -373,6 +373,7 @@ symlinks: ${DESTDIR}${INCLUDEDIR}/rpc; \ done .if ${MK_META_MODE} == "yes" + cd ${.OBJDIR} touch ${.TARGET} .endif From owner-svn-src-head@freebsd.org Wed Sep 16 06:22:43 2015 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 3E5739CEDBD; Wed, 16 Sep 2015 06:22:43 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D4311D3B; Wed, 16 Sep 2015 06:22:42 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from zeppelin.tachypleus.net (75-101-50-44.static.sonic.net [75.101.50.44]) (authenticated bits=0) by c.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id t8G6CX8a012461 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 15 Sep 2015 23:12:33 -0700 Subject: Re: svn commit: r287843 - head/usr.sbin/bsdinstall/scripts To: Allan Jude , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201509160332.t8G3WSdw057340@repo.freebsd.org> From: Nathan Whitehorn Message-ID: <55F90851.2030504@freebsd.org> Date: Tue, 15 Sep 2015 23:12:33 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <201509160332.t8G3WSdw057340@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVbF0c5H54ZJMhY2JNE5TPjCRI9R0OzVwz44hSNwXLhZllE55rLnHRUBaxtmpuRAAUzydcJeUEi36AX9Ky6qpyOO+/jaDdCpDuU= X-Sonic-ID: C;yDsv6zlc5RG9u70U9jFv0A== M;yJeC6zlc5RG9u70U9jFv0A== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 16 Sep 2015 06:22:43 -0000 Can we please fix this elsewhere? Like in gpart? As it is, this mechanism is super-fragile: it applies only for one of the two ways of configuring ZFS systems, and that only when running an interactive install. It's somewhat alleviated by the fact that the other cases can set up UEFI boot, but still... Putting it here also causes various spam messages when running on non-x86 systems. At the very least, it should be in zfsboot, not the auto script. That will clean this up and make the fix apply to scripted installations as well. -Nathan On 09/15/15 20:32, Allan Jude wrote: > Author: allanjude > Date: Wed Sep 16 03:32:27 2015 > New Revision: 287843 > URL: https://svnweb.freebsd.org/changeset/base/287843 > > Log: > Add a number of models to the bsdinstall GPT hack blacklist > > PR: 194359 > Approved by: bapt (mentor) > MFC after: 2 weeks > Sponsored by: ScaleEngine Inc. > Differential Revision: https://reviews.freebsd.org/D3525 > > Modified: > head/usr.sbin/bsdinstall/scripts/auto > > Modified: head/usr.sbin/bsdinstall/scripts/auto > ============================================================================== > --- head/usr.sbin/bsdinstall/scripts/auto Wed Sep 16 03:03:19 2015 (r287842) > +++ head/usr.sbin/bsdinstall/scripts/auto Wed Sep 16 03:32:27 2015 (r287843) > @@ -201,6 +201,19 @@ if f_interactive; then > ;; > esac > ;; > + "Hewlett-Packard") > + case "$sys_model" in > + "HP ProBook 4330s") > + dialog_workaround "$msg_gpt_active_fix" > + retval=$? > + f_dprintf "gpt_active_fix_prompt=[%s]" "$retval" > + if [ $retval -eq $DIALOG_OK ]; then > + export ZFSBOOT_PARTITION_SCHEME="GPT + Active" > + export WORKAROUND_GPTACTIVE=1 > + fi > + ;; > + esac > + ;; > esac > # > # Motherboard Models > @@ -208,7 +221,20 @@ if f_interactive; then > case "$sys_mb_maker" in > "Intel Corporation") > case "$sys_mb_product" in > - "DP965LT") > + "DP965LT"|"D510MO") > + dialog_workaround "$msg_gpt_active_fix" > + retval=$? > + f_dprintf "gpt_active_fix_prompt=[%s]" "$retval" > + if [ $retval -eq $DIALOG_OK ]; then > + export ZFSBOOT_PARTITION_SCHEME="GPT + Active" > + export WORKAROUND_GPTACTIVE=1 > + fi > + ;; > + esac > + ;; > + "Acer") > + case "$sys_mb_product" in > + "Veriton M6630G") > dialog_workaround "$msg_gpt_active_fix" > retval=$? > f_dprintf "gpt_active_fix_prompt=[%s]" "$retval" > From owner-svn-src-head@freebsd.org Wed Sep 16 06:23:17 2015 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 3C9E39CEE04; Wed, 16 Sep 2015 06:23:17 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 21DA11E88; Wed, 16 Sep 2015 06:23:17 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8G6NHPl027084; Wed, 16 Sep 2015 06:23:17 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8G6NGsg027081; Wed, 16 Sep 2015 06:23:16 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201509160623.t8G6NGsg027081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Wed, 16 Sep 2015 06:23:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287851 - in head/sys: net netinet X-SVN-Group: head 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.20 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, 16 Sep 2015 06:23:17 -0000 Author: melifaro Date: Wed Sep 16 06:23:15 2015 New Revision: 287851 URL: https://svnweb.freebsd.org/changeset/base/287851 Log: Unify loopback route switching: * prepare gateway before insertion * use RTM_CHANGE instead of explicit find/change route * Remove fib argument from ifa_switch_loopback_route added in r264887: if old ifp fib differes from new one, that the caller is doing something wrong * Make ifa_*_loopback_route call single ifa_maintain_loopback_route(). Modified: head/sys/net/if.c head/sys/net/if_var.h head/sys/netinet/in.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Wed Sep 16 04:38:07 2015 (r287850) +++ head/sys/net/if.c Wed Sep 16 06:23:15 2015 (r287851) @@ -1545,76 +1545,53 @@ ifa_free(struct ifaddr *ifa) } } -int -ifa_add_loopback_route(struct ifaddr *ifa, struct sockaddr *ia) +static int +ifa_maintain_loopback_route(int cmd, const char *otype, struct ifaddr *ifa, + struct sockaddr *ia) { - int error = 0; - struct rtentry *rt = NULL; + int error; struct rt_addrinfo info; - static struct sockaddr_dl null_sdl = {sizeof(null_sdl), AF_LINK}; + struct sockaddr_dl null_sdl; + struct ifnet *ifp; + + ifp = ifa->ifa_ifp; bzero(&info, sizeof(info)); - info.rti_ifp = V_loif; + if (cmd != RTM_DELETE) + info.rti_ifp = V_loif; info.rti_flags = ifa->ifa_flags | RTF_HOST | RTF_STATIC; info.rti_info[RTAX_DST] = ia; info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&null_sdl; - error = rtrequest1_fib(RTM_ADD, &info, &rt, ifa->ifa_ifp->if_fib); + link_init_sdl(ifp, (struct sockaddr *)&null_sdl, ifp->if_type); + + error = rtrequest1_fib(cmd, &info, NULL, ifp->if_fib); - if (error == 0 && rt != NULL) { - RT_LOCK(rt); - ((struct sockaddr_dl *)rt->rt_gateway)->sdl_type = - ifa->ifa_ifp->if_type; - ((struct sockaddr_dl *)rt->rt_gateway)->sdl_index = - ifa->ifa_ifp->if_index; - RT_REMREF(rt); - RT_UNLOCK(rt); - } else if (error != 0) - log(LOG_DEBUG, "%s: insertion failed: %u\n", __func__, error); + if (error != 0) + log(LOG_DEBUG, "%s: %s failed for interface %s: %u\n", + __func__, otype, if_name(ifp), error); return (error); } int -ifa_del_loopback_route(struct ifaddr *ifa, struct sockaddr *ia) +ifa_add_loopback_route(struct ifaddr *ifa, struct sockaddr *ia) { - int error = 0; - struct rt_addrinfo info; - struct sockaddr_dl null_sdl; - bzero(&null_sdl, sizeof(null_sdl)); - null_sdl.sdl_len = sizeof(null_sdl); - null_sdl.sdl_family = AF_LINK; - null_sdl.sdl_type = ifa->ifa_ifp->if_type; - null_sdl.sdl_index = ifa->ifa_ifp->if_index; - bzero(&info, sizeof(info)); - info.rti_flags = ifa->ifa_flags | RTF_HOST | RTF_STATIC; - info.rti_info[RTAX_DST] = ia; - info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&null_sdl; - error = rtrequest1_fib(RTM_DELETE, &info, NULL, ifa->ifa_ifp->if_fib); + return (ifa_maintain_loopback_route(RTM_ADD, "insertion", ifa, ia)); +} - if (error != 0) - log(LOG_DEBUG, "%s: deletion failed: %u\n", __func__, error); +int +ifa_del_loopback_route(struct ifaddr *ifa, struct sockaddr *ia) +{ - return (error); + return (ifa_maintain_loopback_route(RTM_DELETE, "deletion", ifa, ia)); } int -ifa_switch_loopback_route(struct ifaddr *ifa, struct sockaddr *sa, int fib) +ifa_switch_loopback_route(struct ifaddr *ifa, struct sockaddr *ia) { - struct rtentry *rt; - - rt = rtalloc1_fib(sa, 0, 0, fib); - if (rt == NULL) { - log(LOG_DEBUG, "%s: fail", __func__); - return (EHOSTUNREACH); - } - ((struct sockaddr_dl *)rt->rt_gateway)->sdl_type = - ifa->ifa_ifp->if_type; - ((struct sockaddr_dl *)rt->rt_gateway)->sdl_index = - ifa->ifa_ifp->if_index; - RTFREE_LOCKED(rt); - return (0); + return (ifa_maintain_loopback_route(RTM_CHANGE, "switch", ifa, ia)); } /* Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Wed Sep 16 04:38:07 2015 (r287850) +++ head/sys/net/if_var.h Wed Sep 16 06:23:15 2015 (r287851) @@ -504,7 +504,7 @@ struct ifnet *ifunit_ref(const char *); int ifa_add_loopback_route(struct ifaddr *, struct sockaddr *); int ifa_del_loopback_route(struct ifaddr *, struct sockaddr *); -int ifa_switch_loopback_route(struct ifaddr *, struct sockaddr *, int fib); +int ifa_switch_loopback_route(struct ifaddr *, struct sockaddr *); struct ifaddr *ifa_ifwithaddr(const struct sockaddr *); int ifa_ifwithaddr_check(const struct sockaddr *); Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Wed Sep 16 04:38:07 2015 (r287850) +++ head/sys/netinet/in.c Wed Sep 16 06:23:15 2015 (r287851) @@ -776,13 +776,16 @@ in_scrubprefix(struct in_ifaddr *target, (flags & LLE_STATIC)) { struct in_ifaddr *eia; + /* + * XXXME: add fib-aware in_localip. + * We definitely don't want to switch between + * prefixes in different fibs. + */ eia = in_localip_more(target); if (eia != NULL) { - int fibnum = target->ia_ifp->if_fib; - error = ifa_switch_loopback_route((struct ifaddr *)eia, - (struct sockaddr *)&target->ia_addr, fibnum); + (struct sockaddr *)&target->ia_addr); ifa_free(&eia->ia_ifa); } else { error = ifa_del_loopback_route((struct ifaddr *)target, From owner-svn-src-head@freebsd.org Wed Sep 16 06:29:27 2015 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 A138D9C20EB; Wed, 16 Sep 2015 06:29:27 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) by mx1.freebsd.org (Postfix) with ESMTP id 4C37710F5; Wed, 16 Sep 2015 06:29:26 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (unknown [10.1.1.2]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 0D517916A; Wed, 16 Sep 2015 06:29:26 +0000 (UTC) Subject: Re: svn commit: r287843 - head/usr.sbin/bsdinstall/scripts To: Nathan Whitehorn , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201509160332.t8G3WSdw057340@repo.freebsd.org> <55F90851.2030504@freebsd.org> From: Allan Jude Message-ID: <55F90C9C.1010508@freebsd.org> Date: Wed, 16 Sep 2015 02:30:52 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <55F90851.2030504@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XFsntvfRuUwIqxVs46DwxPIgJKMEhtavs" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 16 Sep 2015 06:29:27 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --XFsntvfRuUwIqxVs46DwxPIgJKMEhtavs Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2015-09-16 02:12, Nathan Whitehorn wrote: > Can we please fix this elsewhere? Like in gpart? As it is, this > mechanism is super-fragile: it applies only for one of the two ways of > configuring ZFS systems, and that only when running an interactive > install. It's somewhat alleviated by the fact that the other cases can > set up UEFI boot, but still... Putting it here also causes various spam= > messages when running on non-x86 systems. >=20 > At the very least, it should be in zfsboot, not the auto script. That > will clean this up and make the fix apply to scripted installations as > well. > -Nathan It is setup in scripts/auto specifically because it DOES apply to both modes (zfsboot and partedit). It applies to UFS in partedit as well. The various spam messages on non-x86 are from the missing kenv? I should be able to fix that. >=20 > On 09/15/15 20:32, Allan Jude wrote: >> Author: allanjude >> Date: Wed Sep 16 03:32:27 2015 >> New Revision: 287843 >> URL: https://svnweb.freebsd.org/changeset/base/287843 >> >> Log: >> Add a number of models to the bsdinstall GPT hack blacklist >> PR: 194359 >> Approved by: bapt (mentor) >> MFC after: 2 weeks >> Sponsored by: ScaleEngine Inc. >> Differential Revision: https://reviews.freebsd.org/D3525 >> >> Modified: >> head/usr.sbin/bsdinstall/scripts/auto >> >> Modified: head/usr.sbin/bsdinstall/scripts/auto >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> >> --- head/usr.sbin/bsdinstall/scripts/auto Wed Sep 16 03:03:19 >> 2015 (r287842) >> +++ head/usr.sbin/bsdinstall/scripts/auto Wed Sep 16 03:32:27 >> 2015 (r287843) >> @@ -201,6 +201,19 @@ if f_interactive; then >> ;; >> esac >> ;; >> + "Hewlett-Packard") >> + case "$sys_model" in >> + "HP ProBook 4330s") >> + dialog_workaround "$msg_gpt_active_fix" >> + retval=3D$? >> + f_dprintf "gpt_active_fix_prompt=3D[%s]" "$retval" >> + if [ $retval -eq $DIALOG_OK ]; then >> + export ZFSBOOT_PARTITION_SCHEME=3D"GPT + Active" >> + export WORKAROUND_GPTACTIVE=3D1 >> + fi >> + ;; >> + esac >> + ;; >> esac >> # >> # Motherboard Models >> @@ -208,7 +221,20 @@ if f_interactive; then >> case "$sys_mb_maker" in >> "Intel Corporation") >> case "$sys_mb_product" in >> - "DP965LT") >> + "DP965LT"|"D510MO") >> + dialog_workaround "$msg_gpt_active_fix" >> + retval=3D$? >> + f_dprintf "gpt_active_fix_prompt=3D[%s]" "$retval" >> + if [ $retval -eq $DIALOG_OK ]; then >> + export ZFSBOOT_PARTITION_SCHEME=3D"GPT + Active" >> + export WORKAROUND_GPTACTIVE=3D1 >> + fi >> + ;; >> + esac >> + ;; >> + "Acer") >> + case "$sys_mb_product" in >> + "Veriton M6630G") >> dialog_workaround "$msg_gpt_active_fix" >> retval=3D$? >> f_dprintf "gpt_active_fix_prompt=3D[%s]" "$retval" >> >=20 >=20 --=20 Allan Jude --XFsntvfRuUwIqxVs46DwxPIgJKMEhtavs Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJV+QyfAAoJEBmVNT4SmAt+btcQAI0kgaIzQef47uKM5TlvaxRk 98pDXMitdig6EIwJdKBR/+4x7VYItZBHLr7MFXtlLrmA5UWVyAopui6BuDkZyIoP s5RUh73SJtrP3IhjIhwLQ72tK7xnjclTE1Jt8GHxNF18v/smsRtumSkD6RPNJ7wC RYCuEKWt+IpsX7ScSx2LCITyzSH0eHDcB3ZZadCZLWX8is0J3SY5977Gg+o0V9OE qAggL73HMtB5GNG9Cf/Kdich13tt4Sitl6R0pv24fq3cjLd4JIAuV4gAXIa/eSqA RE7cgq7ZjJfykt+P8JuW0XIDu+APTojBryuOB0uX+HEG9a9vf6+XPJwQIuM8kdfZ 96SLY8Zs0rzK9ByS6kC6c0XJAnAnRH3+95kzK2pVjvasA6/tW7OHsIfs5dJzFFQB fOeQ6lAi7J9/AQnrEtPQmLOBa7GUKr1sExCbcagp3xxZgoNdxBOUFWcIIh51s7tf X2BVtjXRjgMYJdgd3+Y0sTJgQGn/+Yo4sTYPLcz5yfZVppBvQOcAOut5BOGzZtQy +mK3bFAtp4R4oUaB0Lx/2TaR9ZsIxqLP72deyp2IMpLaMqqdJYJz6BpwvrPqUCgv 0MTbXQgZOLI5rq6oGEcWFCdz2SvC0CS7x3A3niPdvli/Na6zOlKYwOSGTLBDDuJP yz0m3iI9rnMvDSOm7d4x =ffEL -----END PGP SIGNATURE----- --XFsntvfRuUwIqxVs46DwxPIgJKMEhtavs-- From owner-svn-src-head@freebsd.org Wed Sep 16 06:46:17 2015 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 73DC29C2E32; Wed, 16 Sep 2015 06:46:17 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id 40EDA1A98; Wed, 16 Sep 2015 06:46:17 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from [192.168.0.29] (c34-205.i07-9.onvol.net [92.251.34.205]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id 560C5D7907; Wed, 16 Sep 2015 06:45:40 +0000 (UTC) User-Agent: K-9 Mail for Android In-Reply-To: <201509152344.t8FNiJeN060399@repo.freebsd.org> References: <201509152344.t8FNiJeN060399@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: svn commit: r287836 - head/sys/conf From: Andrew Turner Date: Wed, 16 Sep 2015 08:45:35 +0200 To: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <258A339C-B951-4A4F-98FC-C5CC4C1940F5@fubar.geek.nz> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 16 Sep 2015 06:46:17 -0000 On 16 September 2015 01:44:19 CEST, Ed Maste wrote: >Author: emaste >Date: Tue Sep 15 23:44:19 2015 >New Revision: 287836 >URL: https://svnweb.freebsd.org/changeset/base/287836 > >Log: > arm64: add kbd.c to the build for ukbd to fix the build > > Pointy hat to: emaste > >Modified: > head/sys/conf/files.arm64 > >Modified: head/sys/conf/files.arm64 >============================================================================== >--- head/sys/conf/files.arm64 Tue Sep 15 23:06:56 2015 (r287835) >+++ head/sys/conf/files.arm64 Tue Sep 15 23:44:19 2015 (r287836) >@@ -59,6 +59,7 @@ dev/acpica/acpi_if.m optional acpi > dev/fdt/fdt_arm64.c optional fdt > dev/hwpmc/hwpmc_arm64.c optional hwpmc > dev/hwpmc/hwpmc_arm64_md.c optional hwpmc >+dev/kbd/kbd.c optional atkbd | sc | ukbd | vt > dev/mmc/host/dwmmc.c optional dwmmc > dev/mmc/host/dwmmc_hisi.c optional dwmmc soc_hisi_hi6220 > dev/ofw/ofw_cpu.c optional fdt Are we expecting atkbd or sc to be used on arm64? Andrew -- Sent from my Android device with K-9 Mail. Please excuse my brevity. From owner-svn-src-head@freebsd.org Wed Sep 16 07:16:22 2015 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 663469CDF9B; Wed, 16 Sep 2015 07:16:22 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 5706115FB; Wed, 16 Sep 2015 07:16:22 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8G7GMCZ047730; Wed, 16 Sep 2015 07:16:22 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8G7GM9v047729; Wed, 16 Sep 2015 07:16:22 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201509160716.t8G7GM9v047729@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Wed, 16 Sep 2015 07:16:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287852 - head/sys/dev/usb/wlan X-SVN-Group: head 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.20 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, 16 Sep 2015 07:16:22 -0000 Author: kevlo Date: Wed Sep 16 07:16:21 2015 New Revision: 287852 URL: https://svnweb.freebsd.org/changeset/base/287852 Log: Remove checks for a NULL return value from M_WAITOK allocations. Modified: head/sys/dev/usb/wlan/if_ural.c Modified: head/sys/dev/usb/wlan/if_ural.c ============================================================================== --- head/sys/dev/usb/wlan/if_ural.c Wed Sep 16 06:23:15 2015 (r287851) +++ head/sys/dev/usb/wlan/if_ural.c Wed Sep 16 07:16:21 2015 (r287852) @@ -566,10 +566,7 @@ ural_vap_create(struct ieee80211com *ic, if (!TAILQ_EMPTY(&ic->ic_vaps)) /* only one at a time */ return NULL; - uvp = (struct ural_vap *) malloc(sizeof(struct ural_vap), - M_80211_VAP, M_NOWAIT | M_ZERO); - if (uvp == NULL) - return NULL; + uvp = malloc(sizeof(struct ural_vap), M_80211_VAP, M_NOWAIT | M_ZERO); vap = &uvp->vap; /* enable s/w bmiss handling for sta mode */ From owner-svn-src-head@freebsd.org Wed Sep 16 07:18:56 2015 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 2945A9CE140; Wed, 16 Sep 2015 07:18:56 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 19BF1191D; Wed, 16 Sep 2015 07:18:56 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8G7ItY3047930; Wed, 16 Sep 2015 07:18:55 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8G7Ithv047928; Wed, 16 Sep 2015 07:18:55 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201509160718.t8G7Ithv047928@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Wed, 16 Sep 2015 07:18:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287853 - in head/sys/dev: ral usb/wlan X-SVN-Group: head 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.20 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, 16 Sep 2015 07:18:56 -0000 Author: kevlo Date: Wed Sep 16 07:18:54 2015 New Revision: 287853 URL: https://svnweb.freebsd.org/changeset/base/287853 Log: Fix a debug message which didn't quite get it right about eeprom version. Modified: head/sys/dev/ral/rt2860.c head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/ral/rt2860.c ============================================================================== --- head/sys/dev/ral/rt2860.c Wed Sep 16 07:16:21 2015 (r287852) +++ head/sys/dev/ral/rt2860.c Wed Sep 16 07:18:54 2015 (r287853) @@ -3351,7 +3351,7 @@ rt2860_read_eeprom(struct rt2860_softc * /* read EEPROM version */ val = rt2860_srom_read(sc, RT2860_EEPROM_VERSION); - DPRINTF(("EEPROM rev=%d, FAE=%d\n", val & 0xff, val >> 8)); + DPRINTF(("EEPROM rev=%d, FAE=%d\n", val >> 8, val & 0xff)); /* read MAC address */ val = rt2860_srom_read(sc, RT2860_EEPROM_MAC01); Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Wed Sep 16 07:16:21 2015 (r287852) +++ head/sys/dev/usb/wlan/if_run.c Wed Sep 16 07:18:54 2015 (r287853) @@ -1730,7 +1730,7 @@ run_read_eeprom(struct run_softc *sc) /* read ROM version */ run_srom_read(sc, RT2860_EEPROM_VERSION, &val); - DPRINTF("EEPROM rev=%d, FAE=%d\n", val & 0xff, val >> 8); + DPRINTF("EEPROM rev=%d, FAE=%d\n", val >> 8, val & 0xff); /* read MAC address */ run_srom_read(sc, RT2860_EEPROM_MAC01, &val); From owner-svn-src-head@freebsd.org Wed Sep 16 07:20:07 2015 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 913079CE286; Wed, 16 Sep 2015 07:20:07 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::236]) (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 32BA81ADB; Wed, 16 Sep 2015 07:20:07 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by wicfx3 with SMTP id fx3so59101128wic.1; Wed, 16 Sep 2015 00:20:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=9mGMx0bA5gZiMCZ9tttQ1zuoJ4qluOnbfCj7E+pbEIA=; b=Eb5OShxtKoMHaZJ3fpxYpFQQ03Im3OfRkx8FyU58k5SnE660DFVZJB6HdrWHG0J9KO 2JZ6y71NMbbnqVdqh86pCMLUz1f5HIH9fi+VLOEmUiKh3Q6c1DCqb+q1dzDTn8ltAu1h 3BufQWE/yV4sXwz4YyNrlCncm2T8F5UYO762zmNEl8WwdYgq7MCOOAS8qdk6erjlca6a 4dBBH8SXcrRtij8fnYfgqtzfpMRDlbhVF3VmvLDJYkGdBN5U/K72irQe4sV96U7zzxtL 4w0rKhjW/VuPj1IQTovCMFl0f33Ei3AeSAXx/wmGNkAwwuw7M+WT2D4DzG/AuBIvIZeF uofg== X-Received: by 10.194.184.136 with SMTP id eu8mr20338783wjc.151.1442388005658; Wed, 16 Sep 2015 00:20:05 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id bu19sm24937918wjb.45.2015.09.16.00.20.04 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 16 Sep 2015 00:20:04 -0700 (PDT) Date: Wed, 16 Sep 2015 09:20:02 +0200 From: Mateusz Guzik To: Kevin Lo Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r287852 - head/sys/dev/usb/wlan Message-ID: <20150916072002.GA32476@dft-labs.eu> References: <201509160716.t8G7GM9v047729@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201509160716.t8G7GM9v047729@repo.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 16 Sep 2015 07:20:07 -0000 On Wed, Sep 16, 2015 at 07:16:22AM +0000, Kevin Lo wrote: > Author: kevlo > Date: Wed Sep 16 07:16:21 2015 > New Revision: 287852 > URL: https://svnweb.freebsd.org/changeset/base/287852 > > Log: > Remove checks for a NULL return value from M_WAITOK allocations. > > Modified: > head/sys/dev/usb/wlan/if_ural.c > > Modified: head/sys/dev/usb/wlan/if_ural.c > ============================================================================== > --- head/sys/dev/usb/wlan/if_ural.c Wed Sep 16 06:23:15 2015 (r287851) > +++ head/sys/dev/usb/wlan/if_ural.c Wed Sep 16 07:16:21 2015 (r287852) > @@ -566,10 +566,7 @@ ural_vap_create(struct ieee80211com *ic, > > if (!TAILQ_EMPTY(&ic->ic_vaps)) /* only one at a time */ > return NULL; > - uvp = (struct ural_vap *) malloc(sizeof(struct ural_vap), > - M_80211_VAP, M_NOWAIT | M_ZERO); > - if (uvp == NULL) > - return NULL; > + uvp = malloc(sizeof(struct ural_vap), M_80211_VAP, M_NOWAIT | M_ZERO); > vap = &uvp->vap; > /* enable s/w bmiss handling for sta mode */ > > This looks like M_NOWAIT prior to and after the commit. I have no idea if the context here allows sleeping though. -- Mateusz Guzik From owner-svn-src-head@freebsd.org Wed Sep 16 07:26:19 2015 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 473749CE626; Wed, 16 Sep 2015 07:26:19 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 37FE91F49; Wed, 16 Sep 2015 07:26:19 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8G7QJue051886; Wed, 16 Sep 2015 07:26:19 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8G7QJ2g051885; Wed, 16 Sep 2015 07:26:19 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201509160726.t8G7QJ2g051885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Wed, 16 Sep 2015 07:26:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287854 - head/sys/dev/usb/wlan X-SVN-Group: head 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.20 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, 16 Sep 2015 07:26:19 -0000 Author: kevlo Date: Wed Sep 16 07:26:18 2015 New Revision: 287854 URL: https://svnweb.freebsd.org/changeset/base/287854 Log: Use M_WAITOK rather than M_NOWAIT since it's not used within interrupt context. Modified: head/sys/dev/usb/wlan/if_ural.c Modified: head/sys/dev/usb/wlan/if_ural.c ============================================================================== --- head/sys/dev/usb/wlan/if_ural.c Wed Sep 16 07:18:54 2015 (r287853) +++ head/sys/dev/usb/wlan/if_ural.c Wed Sep 16 07:26:18 2015 (r287854) @@ -566,7 +566,7 @@ ural_vap_create(struct ieee80211com *ic, if (!TAILQ_EMPTY(&ic->ic_vaps)) /* only one at a time */ return NULL; - uvp = malloc(sizeof(struct ural_vap), M_80211_VAP, M_NOWAIT | M_ZERO); + uvp = malloc(sizeof(struct ural_vap), M_80211_VAP, M_WAITOK | M_ZERO); vap = &uvp->vap; /* enable s/w bmiss handling for sta mode */ From owner-svn-src-head@freebsd.org Wed Sep 16 07:28:16 2015 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 0A9E09CE726; Wed, 16 Sep 2015 07:28:16 +0000 (UTC) (envelope-from kevlo@ns.kevlo.org) Received: from ns.kevlo.org (220-135-115-6.HINET-IP.hinet.net [220.135.115.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ns.kevlo.org", Issuer "ns.kevlo.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7E64E10BD; Wed, 16 Sep 2015 07:28:14 +0000 (UTC) (envelope-from kevlo@ns.kevlo.org) Received: from ns.kevlo.org (localhost [127.0.0.1]) by ns.kevlo.org (8.14.9/8.14.9) with ESMTP id t8G7RmjV030076 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 16 Sep 2015 15:27:49 +0800 (CST) (envelope-from kevlo@ns.kevlo.org) Received: (from kevlo@localhost) by ns.kevlo.org (8.14.9/8.14.9/Submit) id t8G7RmAs030075; Wed, 16 Sep 2015 15:27:48 +0800 (CST) (envelope-from kevlo) Date: Wed, 16 Sep 2015 15:27:47 +0800 From: Kevin Lo To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r287852 - head/sys/dev/usb/wlan Message-ID: <20150916072747.GA30042@ns.kevlo.org> References: <201509160716.t8G7GM9v047729@repo.freebsd.org> <20150916072002.GA32476@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150916072002.GA32476@dft-labs.eu> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 16 Sep 2015 07:28:16 -0000 On Wed, Sep 16, 2015 at 09:20:02AM +0200, Mateusz Guzik wrote: > On Wed, Sep 16, 2015 at 07:16:22AM +0000, Kevin Lo wrote: > > Author: kevlo > > Date: Wed Sep 16 07:16:21 2015 > > New Revision: 287852 > > URL: https://svnweb.freebsd.org/changeset/base/287852 > > > > Log: > > Remove checks for a NULL return value from M_WAITOK allocations. > > > > Modified: > > head/sys/dev/usb/wlan/if_ural.c > > > > Modified: head/sys/dev/usb/wlan/if_ural.c > > ============================================================================== > > --- head/sys/dev/usb/wlan/if_ural.c Wed Sep 16 06:23:15 2015 (r287851) > > +++ head/sys/dev/usb/wlan/if_ural.c Wed Sep 16 07:16:21 2015 (r287852) > > @@ -566,10 +566,7 @@ ural_vap_create(struct ieee80211com *ic, > > > > if (!TAILQ_EMPTY(&ic->ic_vaps)) /* only one at a time */ > > return NULL; > > - uvp = (struct ural_vap *) malloc(sizeof(struct ural_vap), > > - M_80211_VAP, M_NOWAIT | M_ZERO); > > - if (uvp == NULL) > > - return NULL; > > + uvp = malloc(sizeof(struct ural_vap), M_80211_VAP, M_NOWAIT | M_ZERO); > > vap = &uvp->vap; > > /* enable s/w bmiss handling for sta mode */ > > > > > > This looks like M_NOWAIT prior to and after the commit. > > I have no idea if the context here allows sleeping though. Thanks for spotting this out. This functionality is not used within interrupt context, so we could use M_WAITOK to allocate memory. > > -- > Mateusz Guzik Kevin From owner-svn-src-head@freebsd.org Wed Sep 16 09:59:06 2015 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 6C0119CDB43; Wed, 16 Sep 2015 09:59:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 5D519158F; Wed, 16 Sep 2015 09:59:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8G9x6FS013990; Wed, 16 Sep 2015 09:59:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8G9x660013989; Wed, 16 Sep 2015 09:59:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509160959.t8G9x660013989@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 16 Sep 2015 09:59:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287855 - head/sys/cam/ctl X-SVN-Group: head 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.20 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, 16 Sep 2015 09:59:06 -0000 Author: mav Date: Wed Sep 16 09:59:05 2015 New Revision: 287855 URL: https://svnweb.freebsd.org/changeset/base/287855 Log: Don't flap the HA link if sysctl is reset to the same value. Modified: head/sys/cam/ctl/ctl_ha.c Modified: head/sys/cam/ctl/ctl_ha.c ============================================================================== --- head/sys/cam/ctl/ctl_ha.c Wed Sep 16 07:26:18 2015 (r287854) +++ head/sys/cam/ctl/ctl_ha.c Wed Sep 16 09:59:05 2015 (r287855) @@ -622,28 +622,33 @@ ctl_ha_peer_sysctl(SYSCTL_HANDLER_ARGS) struct ha_softc *softc = (struct ha_softc *)arg1; struct sockaddr_in *sa; int error, b1, b2, b3, b4, p, num; + char buf[128]; - error = sysctl_handle_string(oidp, softc->ha_peer, - sizeof(softc->ha_peer), req); - if ((error != 0) || (req->newptr == NULL)) + strlcpy(buf, softc->ha_peer, sizeof(buf)); + error = sysctl_handle_string(oidp, buf, sizeof(buf), req); + if ((error != 0) || (req->newptr == NULL) || + strncmp(buf, softc->ha_peer, sizeof(buf)) == 0) return (error); sa = &softc->ha_peer_in; mtx_lock(&softc->ha_lock); - if ((num = sscanf(softc->ha_peer, "connect %d.%d.%d.%d:%d", + if ((num = sscanf(buf, "connect %d.%d.%d.%d:%d", &b1, &b2, &b3, &b4, &p)) >= 4) { softc->ha_connect = 1; softc->ha_listen = 0; - } else if ((num = sscanf(softc->ha_peer, "listen %d.%d.%d.%d:%d", + } else if ((num = sscanf(buf, "listen %d.%d.%d.%d:%d", &b1, &b2, &b3, &b4, &p)) >= 4) { softc->ha_connect = 0; softc->ha_listen = 1; } else { softc->ha_connect = 0; softc->ha_listen = 0; - if (softc->ha_peer[0] != 0) + if (buf[0] != 0) { + buf[0] = 0; error = EINVAL; + } } + strlcpy(softc->ha_peer, buf, sizeof(softc->ha_peer)); if (softc->ha_connect || softc->ha_listen) { memset(sa, 0, sizeof(*sa)); sa->sin_len = sizeof(struct sockaddr_in); From owner-svn-src-head@freebsd.org Wed Sep 16 10:07:46 2015 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 829779CE14B; Wed, 16 Sep 2015 10:07:46 +0000 (UTC) (envelope-from oleg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 7432B1BE2; Wed, 16 Sep 2015 10:07:46 +0000 (UTC) (envelope-from oleg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8GA7kxB018061; Wed, 16 Sep 2015 10:07:46 GMT (envelope-from oleg@FreeBSD.org) Received: (from oleg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8GA7kJ9018060; Wed, 16 Sep 2015 10:07:46 GMT (envelope-from oleg@FreeBSD.org) Message-Id: <201509161007.t8GA7kJ9018060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oleg set sender to oleg@FreeBSD.org using -f From: Oleg Bulyzhin Date: Wed, 16 Sep 2015 10:07:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287856 - head/sys/net X-SVN-Group: head 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.20 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, 16 Sep 2015 10:07:46 -0000 Author: oleg Date: Wed Sep 16 10:07:45 2015 New Revision: 287856 URL: https://svnweb.freebsd.org/changeset/base/287856 Log: Remove superfluous m_freem(). MFC after: 1 month Modified: head/sys/net/if_ethersubr.c Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Wed Sep 16 09:59:05 2015 (r287855) +++ head/sys/net/if_ethersubr.c Wed Sep 16 10:07:45 2015 (r287856) @@ -499,7 +499,6 @@ ether_input_internal(struct ifnet *ifp, if_printf(ifp, "cannot pullup VLAN header\n"); #endif if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); - m_freem(m); CURVNET_RESTORE(); return; } From owner-svn-src-head@freebsd.org Wed Sep 16 11:06:09 2015 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 E5F299CD9BA; Wed, 16 Sep 2015 11:06:08 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 D68A7130E; Wed, 16 Sep 2015 11:06:08 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8GB68J5043627; Wed, 16 Sep 2015 11:06:08 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8GB68vA043624; Wed, 16 Sep 2015 11:06:08 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201509161106.t8GB68vA043624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Wed, 16 Sep 2015 11:06:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287857 - head/sys/netinet6 X-SVN-Group: head 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.20 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, 16 Sep 2015 11:06:09 -0000 Author: melifaro Date: Wed Sep 16 11:06:07 2015 New Revision: 287857 URL: https://svnweb.freebsd.org/changeset/base/287857 Log: Constantify lookup key in several nd6_* functions. Modified: head/sys/netinet6/nd6.c head/sys/netinet6/nd6.h Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Wed Sep 16 10:07:45 2015 (r287856) +++ head/sys/netinet6/nd6.c Wed Sep 16 11:06:07 2015 (r287857) @@ -126,7 +126,7 @@ VNET_DEFINE(int, nd6_recalc_reachtm_inte int (*send_sendso_input_hook)(struct mbuf *, struct ifnet *, int, int); -static int nd6_is_new_addr_neighbor(struct sockaddr_in6 *, +static int nd6_is_new_addr_neighbor(const struct sockaddr_in6 *, struct ifnet *); static void nd6_setmtu0(struct ifnet *, struct nd_ifinfo *); static void nd6_slowtimo(void *); @@ -953,7 +953,7 @@ nd6_purge(struct ifnet *ifp) * Returns the llentry locked */ struct llentry * -nd6_lookup(struct in6_addr *addr6, int flags, struct ifnet *ifp) +nd6_lookup(const struct in6_addr *addr6, int flags, struct ifnet *ifp) { struct sockaddr_in6 sin6; struct llentry *ln; @@ -973,7 +973,7 @@ nd6_lookup(struct in6_addr *addr6, int f } struct llentry * -nd6_alloc(struct in6_addr *addr6, int flags, struct ifnet *ifp) +nd6_alloc(const struct in6_addr *addr6, int flags, struct ifnet *ifp) { struct sockaddr_in6 sin6; struct llentry *ln; @@ -996,7 +996,7 @@ nd6_alloc(struct in6_addr *addr6, int fl * to not reenter the routing code from within itself. */ static int -nd6_is_new_addr_neighbor(struct sockaddr_in6 *addr, struct ifnet *ifp) +nd6_is_new_addr_neighbor(const struct sockaddr_in6 *addr, struct ifnet *ifp) { struct nd_prefix *pr; struct ifaddr *dstaddr; @@ -1069,7 +1069,7 @@ nd6_is_new_addr_neighbor(struct sockaddr * If the address is assigned on the node of the other side of * a p2p interface, the address should be a neighbor. */ - dstaddr = ifa_ifwithdstaddr((struct sockaddr *)addr, RT_ALL_FIBS); + dstaddr = ifa_ifwithdstaddr((const struct sockaddr *)addr, RT_ALL_FIBS); if (dstaddr != NULL) { if (dstaddr->ifa_ifp == ifp) { ifa_free(dstaddr); @@ -1097,7 +1097,7 @@ nd6_is_new_addr_neighbor(struct sockaddr * XXX: should take care of the destination of a p2p link? */ int -nd6_is_addr_neighbor(struct sockaddr_in6 *addr, struct ifnet *ifp) +nd6_is_addr_neighbor(const struct sockaddr_in6 *addr, struct ifnet *ifp) { struct llentry *lle; int rc = 0; Modified: head/sys/netinet6/nd6.h ============================================================================== --- head/sys/netinet6/nd6.h Wed Sep 16 10:07:45 2015 (r287856) +++ head/sys/netinet6/nd6.h Wed Sep 16 11:06:07 2015 (r287857) @@ -402,12 +402,12 @@ void nd6_destroy(void); #endif struct nd_ifinfo *nd6_ifattach(struct ifnet *); void nd6_ifdetach(struct nd_ifinfo *); -int nd6_is_addr_neighbor(struct sockaddr_in6 *, struct ifnet *); +int nd6_is_addr_neighbor(const struct sockaddr_in6 *, struct ifnet *); void nd6_option_init(void *, int, union nd_opts *); struct nd_opt_hdr *nd6_option(union nd_opts *); int nd6_options(union nd_opts *); -struct llentry *nd6_lookup(struct in6_addr *, int, struct ifnet *); -struct llentry *nd6_alloc(struct in6_addr *, int, struct ifnet *); +struct llentry *nd6_lookup(const struct in6_addr *, int, struct ifnet *); +struct llentry *nd6_alloc(const struct in6_addr *, int, struct ifnet *); void nd6_setmtu(struct ifnet *); void nd6_llinfo_settimer(struct llentry *, long); void nd6_llinfo_settimer_locked(struct llentry *, long); From owner-svn-src-head@freebsd.org Wed Sep 16 13:17:01 2015 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 04B809CD846; Wed, 16 Sep 2015 13:17:01 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 E6D421099; Wed, 16 Sep 2015 13:17:00 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8GDH0t1000187; Wed, 16 Sep 2015 13:17:00 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8GDH06h000186; Wed, 16 Sep 2015 13:17:00 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201509161317.t8GDH06h000186@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 16 Sep 2015 13:17:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287859 - head/sys/net X-SVN-Group: head 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.20 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, 16 Sep 2015 13:17:01 -0000 Author: ae Date: Wed Sep 16 13:17:00 2015 New Revision: 287859 URL: https://svnweb.freebsd.org/changeset/base/287859 Log: Use KASSERT for some checks, that are late to do. Discussed with: melifaro, glebius Modified: head/sys/net/if_ethersubr.c Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Wed Sep 16 11:32:28 2015 (r287858) +++ head/sys/net/if_ethersubr.c Wed Sep 16 13:17:00 2015 (r287859) @@ -392,16 +392,6 @@ ether_input_internal(struct ifnet *ifp, return; } #endif - /* - * Do consistency checks to verify assumptions - * made by code past this point. - */ - if ((m->m_flags & M_PKTHDR) == 0) { - if_printf(ifp, "discard frame w/o packet header\n"); - if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); - m_freem(m); - return; - } if (m->m_len < ETHER_HDR_LEN) { /* XXX maybe should pullup? */ if_printf(ifp, "discard frame w/o leading ethernet " @@ -413,19 +403,6 @@ ether_input_internal(struct ifnet *ifp, } eh = mtod(m, struct ether_header *); etype = ntohs(eh->ether_type); - if (m->m_pkthdr.rcvif == NULL) { - if_printf(ifp, "discard frame w/o interface pointer\n"); - if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); - m_freem(m); - return; - } -#ifdef DIAGNOSTIC - if (m->m_pkthdr.rcvif != ifp) { - if_printf(ifp, "Warning, frame marked as received on %s\n", - m->m_pkthdr.rcvif->if_xname); - } -#endif - random_harvest_queue(m, sizeof(*m), 2, RANDOM_NET_ETHER); CURVNET_SET_QUIET(ifp->if_vnet); @@ -598,6 +575,9 @@ static void ether_nh_input(struct mbuf *m) { + M_ASSERTPKTHDR(m); + KASSERT(m->m_pkthdr.rcvif != NULL, + ("%s: NULL interface pointer", __func__)); ether_input_internal(m->m_pkthdr.rcvif, m); } From owner-svn-src-head@freebsd.org Wed Sep 16 13:25:36 2015 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 7C1D89CDD90; Wed, 16 Sep 2015 13:25:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 6CF331772; Wed, 16 Sep 2015 13:25:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8GDPaF8004333; Wed, 16 Sep 2015 13:25:36 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8GDPafO004332; Wed, 16 Sep 2015 13:25:36 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509161325.t8GDPafO004332@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 16 Sep 2015 13:25:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287860 - head/sys/cam/ctl X-SVN-Group: head 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.20 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, 16 Sep 2015 13:25:36 -0000 Author: mav Date: Wed Sep 16 13:25:35 2015 New Revision: 287860 URL: https://svnweb.freebsd.org/changeset/base/287860 Log: Frontends don't need to set errors themselves. Modified: head/sys/cam/ctl/ctl_frontend_ioctl.c Modified: head/sys/cam/ctl/ctl_frontend_ioctl.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_ioctl.c Wed Sep 16 13:17:00 2015 (r287859) +++ head/sys/cam/ctl/ctl_frontend_ioctl.c Wed Sep 16 13:25:35 2015 (r287860) @@ -157,11 +157,8 @@ ctl_ioctl_do_datamove(struct ctl_scsiio ext_sglist = (struct ctl_sg_entry *)malloc(ext_sglen, M_CTL, M_WAITOK); ext_sglist_malloced = 1; - if (copyin(ctsio->ext_data_ptr, ext_sglist, - ext_sglen) != 0) { - ctl_set_internal_failure(ctsio, - /*sks_valid*/ 0, - /*retry_count*/ 0); + if (copyin(ctsio->ext_data_ptr, ext_sglist, ext_sglen) != 0) { + ctsio->io_hdr.port_status = 31343; goto bailout; } ext_sg_entries = ctsio->ext_sg_entries; @@ -229,9 +226,7 @@ ctl_ioctl_do_datamove(struct ctl_scsiio CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: from %p " "to %p\n", kern_ptr, ext_ptr)); if (copyout(kern_ptr, ext_ptr, len_to_copy) != 0) { - ctl_set_internal_failure(ctsio, - /*sks_valid*/ 0, - /*retry_count*/ 0); + ctsio->io_hdr.port_status = 31344; goto bailout; } } else { @@ -240,9 +235,7 @@ ctl_ioctl_do_datamove(struct ctl_scsiio CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: from %p " "to %p\n", ext_ptr, kern_ptr)); if (copyin(ext_ptr, kern_ptr, len_to_copy)!= 0){ - ctl_set_internal_failure(ctsio, - /*sks_valid*/ 0, - /*retry_count*/0); + ctsio->io_hdr.port_status = 31345; goto bailout; } } From owner-svn-src-head@freebsd.org Wed Sep 16 14:26:32 2015 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 328999C2BD6; Wed, 16 Sep 2015 14:26:32 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 217E8180A; Wed, 16 Sep 2015 14:26:32 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8GEQW9o028685; Wed, 16 Sep 2015 14:26:32 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8GEQTPJ028672; Wed, 16 Sep 2015 14:26:29 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201509161426.t8GEQTPJ028672@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Wed, 16 Sep 2015 14:26:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287861 - in head/sys: net netinet6 netpfil/pf ofed/drivers/infiniband/ulp/ipoib X-SVN-Group: head 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.20 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, 16 Sep 2015 14:26:32 -0000 Author: melifaro Date: Wed Sep 16 14:26:28 2015 New Revision: 287861 URL: https://svnweb.freebsd.org/changeset/base/287861 Log: Simplify the way of attaching IPv6 link-layer header. Problem description: How do we currently perform layer 2 resolution and header imposition: For IPv4 we have the following chain: ip_output() -> (ether|atm|whatever)_output() -> arpresolve() Lookup is done in proper place (link-layer output routine) and it is possible to provide cached lle data. For IPv6 situation is more complex: ip6_output() -> nd6_output() -> nd6_output_ifp() -> (whatever)_output() -> nd6_storelladdr() We have ip6_ouput() which calls nd6_output() instead of link output routine. nd6_output() does the following: * checks if lle exists, creates it if needed (similar to arpresolve()) * performes lle state transitions (similar to arpresolve()) * calls nd6_output_ifp() which pushes packets to link output routine along with running SeND/MAC hooks regardless of lle state (e.g. works as run-hooks placeholder). After that, iface output routine like ether_output() calls nd6_storelladdr() which performs lle lookup once again. As a result, we perform lookup twice for each outgoing packet for most types of interfaces. We also need to maintain runtime-checked table of 'nd6-free' interfaces (see nd6_need_cache()). Fix this behavior by eliminating first ND lookup. To be more specific: * make all nd6_output() consumers use nd6_output_ifp() instead * rename nd6_output[_slow]() to nd6_resolve_[slow]() * convert nd6_resolve() and nd6_resolve_slow() to arpresolve() semantics, e.g. copy L2 address to buffer instead of pushing packet towards lower layers * Make all nd6_storelladdr() users use nd6_resolve() * eliminate nd6_storelladdr() The resulting callchain is the following: ip6_output() -> nd6_output_ifp() -> (whatever)_output() -> nd6_resolve() Error handling: Currently sending packet to non-existing la results in ip6_ -> nd6_output() -> nd6_output _lle() which returns 0. In new scenario packet is propagated to _output() -> nd6_resolve() which will return EWOULDBLOCK, and that result will be converted to 0. (And EWOULDBLOCK is actually used by IB/TOE code). Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D1469 Modified: head/sys/net/if_arcsubr.c head/sys/net/if_ethersubr.c head/sys/net/if_fddisubr.c head/sys/net/if_fwsubr.c head/sys/net/if_iso88025subr.c head/sys/netinet6/ip6_forward.c head/sys/netinet6/ip6_output.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6.h head/sys/netpfil/pf/pf.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Modified: head/sys/net/if_arcsubr.c ============================================================================== --- head/sys/net/if_arcsubr.c Wed Sep 16 13:25:35 2015 (r287860) +++ head/sys/net/if_arcsubr.c Wed Sep 16 14:26:28 2015 (r287861) @@ -103,8 +103,8 @@ arc_output(struct ifnet *ifp, struct mbu u_int8_t atype, adst; int loop_copy = 0; int isphds; -#ifdef INET - int is_gw; +#if defined(INET) || defined(INET6) + int is_gw = 0; #endif if (!((ifp->if_flags & IFF_UP) && @@ -112,6 +112,11 @@ arc_output(struct ifnet *ifp, struct mbu return(ENETDOWN); /* m, m1 aren't initialized yet */ error = 0; +#if defined(INET) || defined(INET6) + if (ro != NULL && ro->ro_rt != NULL && + (ro->ro_rt->rt_flags & RTF_GATEWAY) != 0) + is_gw = 1; +#endif switch (dst->sa_family) { #ifdef INET @@ -125,10 +130,6 @@ arc_output(struct ifnet *ifp, struct mbu else if (ifp->if_flags & IFF_NOARP) adst = ntohl(SIN(dst)->sin_addr.s_addr) & 0xFF; else { - is_gw = 0; - if (ro != NULL && ro->ro_rt != NULL && - (ro->ro_rt->rt_flags & RTF_GATEWAY) != 0) - is_gw = 1; error = arpresolve(ifp, is_gw, m, dst, &adst, NULL); if (error) return (error == EWOULDBLOCK ? 0 : error); @@ -169,10 +170,11 @@ arc_output(struct ifnet *ifp, struct mbu case AF_INET6: if ((m->m_flags & M_MCAST) != 0) adst = arcbroadcastaddr; /* ARCnet broadcast address */ - else - error = nd6_storelladdr(ifp, m, dst, (u_char *)&adst, NULL); - if (error) - return (error); + else { + error = nd6_resolve(ifp, is_gw, m, dst, &adst, NULL); + if (error != 0) + return (error == EWOULDBLOCK ? 0 : error); + } atype = ARCTYPE_INET6; break; #endif Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Wed Sep 16 13:25:35 2015 (r287860) +++ head/sys/net/if_ethersubr.c Wed Sep 16 14:26:28 2015 (r287861) @@ -225,10 +225,10 @@ ether_output(struct ifnet *ifp, struct m if (lle != NULL && (pflags & LLE_VALID)) memcpy(edst, &lle->ll_addr.mac16, sizeof(edst)); else - error = nd6_storelladdr(ifp, m, dst, (u_char *)edst, + error = nd6_resolve(ifp, is_gw, m, dst, (u_char *)edst, &pflags); if (error) - return error; + return (error == EWOULDBLOCK ? 0 : error); type = htons(ETHERTYPE_IPV6); break; #endif Modified: head/sys/net/if_fddisubr.c ============================================================================== --- head/sys/net/if_fddisubr.c Wed Sep 16 13:25:35 2015 (r287860) +++ head/sys/net/if_fddisubr.c Wed Sep 16 14:26:28 2015 (r287861) @@ -101,8 +101,8 @@ fddi_output(struct ifnet *ifp, struct mb int loop_copy = 0, error = 0, hdrcmplt = 0; u_char esrc[FDDI_ADDR_LEN], edst[FDDI_ADDR_LEN]; struct fddi_header *fh; -#ifdef INET - int is_gw; +#if defined(INET) || defined(INET6) + int is_gw = 0; #endif #ifdef MAC @@ -118,13 +118,15 @@ fddi_output(struct ifnet *ifp, struct mb senderr(ENETDOWN); getmicrotime(&ifp->if_lastchange); +#if defined(INET) || defined(INET6) + if (ro != NULL && ro->ro_rt != NULL && + (ro->ro_rt->rt_flags & RTF_GATEWAY) != 0) + is_gw = 1; +#endif + switch (dst->sa_family) { #ifdef INET case AF_INET: { - is_gw = 0; - if (ro != NULL && ro->ro_rt != NULL && - (ro->ro_rt->rt_flags & RTF_GATEWAY) != 0) - is_gw = 1; error = arpresolve(ifp, is_gw, m, dst, edst, NULL); if (error) return (error == EWOULDBLOCK ? 0 : error); @@ -161,9 +163,9 @@ fddi_output(struct ifnet *ifp, struct mb #endif /* INET */ #ifdef INET6 case AF_INET6: - error = nd6_storelladdr(ifp, m, dst, (u_char *)edst, NULL); + error = nd6_resolve(ifp, is_gw, m, dst, edst, NULL); if (error) - return (error); /* Something bad happened */ + return (error == EWOULDBLOCK ? 0 : error); type = htons(ETHERTYPE_IPV6); break; #endif /* INET6 */ Modified: head/sys/net/if_fwsubr.c ============================================================================== --- head/sys/net/if_fwsubr.c Wed Sep 16 13:25:35 2015 (r287860) +++ head/sys/net/if_fwsubr.c Wed Sep 16 14:26:28 2015 (r287861) @@ -89,8 +89,8 @@ firewire_output(struct ifnet *ifp, struc struct mbuf *mtail; int unicast, dgl, foff; static int next_dgl; -#ifdef INET - int is_gw; +#if defined(INET) || defined(INET6) + int is_gw = 0; #endif #ifdef MAC @@ -105,6 +105,11 @@ firewire_output(struct ifnet *ifp, struc goto bad; } +#if defined(INET) || defined(INET6) + if (ro != NULL && ro->ro_rt != NULL && + (ro->ro_rt->rt_flags & RTF_GATEWAY) != 0) + is_gw = 1; +#endif /* * For unicast, we make a tag to store the lladdr of the * destination. This might not be the first time we have seen @@ -173,10 +178,10 @@ firewire_output(struct ifnet *ifp, struc #ifdef INET6 case AF_INET6: if (unicast) { - error = nd6_storelladdr(fc->fc_ifp, m, dst, + error = nd6_resolve(fc->fc_ifp, is_gw, m, dst, (u_char *) destfw, NULL); if (error) - return (error); + return (error == EWOULDBLOCK ? 0 : error); } type = ETHERTYPE_IPV6; break; Modified: head/sys/net/if_iso88025subr.c ============================================================================== --- head/sys/net/if_iso88025subr.c Wed Sep 16 13:25:35 2015 (r287860) +++ head/sys/net/if_iso88025subr.c Wed Sep 16 14:26:28 2015 (r287861) @@ -293,9 +293,9 @@ iso88025_output(struct ifnet *ifp, struc #endif /* INET */ #ifdef INET6 case AF_INET6: - error = nd6_storelladdr(ifp, m, dst, (u_char *)edst, NULL); + error = nd6_resolve(ifp, is_gw, m, dst, edst, NULL); if (error) - return (error); + return (error == EWOULDBLOCK ? 0 : error); snap_type = ETHERTYPE_IPV6; break; #endif /* INET6 */ Modified: head/sys/netinet6/ip6_forward.c ============================================================================== --- head/sys/netinet6/ip6_forward.c Wed Sep 16 13:25:35 2015 (r287860) +++ head/sys/netinet6/ip6_forward.c Wed Sep 16 14:26:28 2015 (r287861) @@ -571,7 +571,7 @@ pass: goto bad; } - error = nd6_output(rt->rt_ifp, origifp, m, dst, rt); + error = nd6_output_ifp(rt->rt_ifp, origifp, m, dst); if (error) { in6_ifstat_inc(rt->rt_ifp, ifs6_out_discard); IP6STAT_INC(ip6s_cantforward); Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Wed Sep 16 13:25:35 2015 (r287860) +++ head/sys/netinet6/ip6_output.c Wed Sep 16 14:26:28 2015 (r287861) @@ -935,7 +935,7 @@ passout: m->m_pkthdr.len); ifa_free(&ia6->ia_ifa); } - error = nd6_output(ifp, origifp, m, dst, ro->ro_rt); + error = nd6_output_ifp(ifp, origifp, m, dst); goto done; } @@ -1034,7 +1034,7 @@ sendorfree: counter_u64_add(ia->ia_ifa.ifa_obytes, m->m_pkthdr.len); } - error = nd6_output(ifp, origifp, m, dst, ro->ro_rt); + error = nd6_output_ifp(ifp, origifp, m, dst); } else m_freem(m); } Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Wed Sep 16 13:25:35 2015 (r287860) +++ head/sys/netinet6/nd6.c Wed Sep 16 14:26:28 2015 (r287861) @@ -136,10 +136,10 @@ static void nd6_free_redirect(const stru static void nd6_llinfo_timer(void *); static void clear_llinfo_pqueue(struct llentry *); static void nd6_rtrequest(int, struct rtentry *, struct rt_addrinfo *); -static int nd6_output_lle(struct ifnet *, struct ifnet *, struct mbuf *, - struct sockaddr_in6 *); -static int nd6_output_ifp(struct ifnet *, struct ifnet *, struct mbuf *, - struct sockaddr_in6 *); +static int nd6_resolve_slow(struct ifnet *, struct mbuf *, + const struct sockaddr_in6 *, u_char *, uint32_t *); +static int nd6_need_cache(struct ifnet *); + static VNET_DEFINE(struct callout, nd6_slowtimo_ch); #define V_nd6_slowtimo_ch VNET(nd6_slowtimo_ch) @@ -1904,7 +1904,7 @@ nd6_grab_holdchain(struct llentry *ln, s } } -static int +int nd6_output_ifp(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m, struct sockaddr_in6 *dst) { @@ -1950,16 +1950,29 @@ nd6_output_ifp(struct ifnet *ifp, struct } /* - * IPv6 packet output - light version. - * Checks if destination LLE exists and is in proper state - * (e.g no modification required). If not true, fall back to - * "heavy" version. + * Do L2 address resolution for @sa_dst address. Stores found + * address in @desten buffer. Copy of lle ln_flags can be also + * saved in @pflags if @pflags is non-NULL. + * + * If destination LLE does not exists or lle state modification + * is required, call "slow" version. + * + * Return values: + * - 0 on success (address copied to buffer). + * - EWOULDBLOCK (no local error, but address is still unresolved) + * - other errors (alloc failure, etc) */ int -nd6_output(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m, - struct sockaddr_in6 *dst, struct rtentry *rt0) +nd6_resolve(struct ifnet *ifp, int is_gw, struct mbuf *m, + const struct sockaddr *sa_dst, u_char *desten, uint32_t *pflags) { struct llentry *ln = NULL; + const struct sockaddr_in6 *dst6; + + if (pflags != NULL) + *pflags = 0; + + dst6 = (const struct sockaddr_in6 *)sa_dst; /* discard the packet if IPv6 operation is disabled on the interface */ if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED)) { @@ -1967,14 +1980,25 @@ nd6_output(struct ifnet *ifp, struct ifn return (ENETDOWN); /* better error? */ } - if (IN6_IS_ADDR_MULTICAST(&dst->sin6_addr)) - goto sendpkt; - - if (nd6_need_cache(ifp) == 0) - goto sendpkt; + if (m != NULL && m->m_flags & M_MCAST) { + switch (ifp->if_type) { + case IFT_ETHER: + case IFT_FDDI: + case IFT_L2VLAN: + case IFT_IEEE80211: + case IFT_BRIDGE: + case IFT_ISO88025: + ETHER_MAP_IPV6_MULTICAST(&dst6->sin6_addr, + desten); + return (0); + default: + m_freem(m); + return (EAFNOSUPPORT); + } + } IF_AFDATA_RLOCK(ifp); - ln = nd6_lookup(&dst->sin6_addr, 0, ifp); + ln = nd6_lookup(&dst6->sin6_addr, 0, ifp); IF_AFDATA_RUNLOCK(ifp); /* @@ -1990,45 +2014,33 @@ nd6_output(struct ifnet *ifp, struct ifn /* Fall back to slow processing path */ if (ln != NULL) LLE_RUNLOCK(ln); - return (nd6_output_lle(ifp, origifp, m, dst)); + return (nd6_resolve_slow(ifp, m, dst6, desten, pflags)); } -sendpkt: - if (ln != NULL) - LLE_RUNLOCK(ln); - return (nd6_output_ifp(ifp, origifp, m, dst)); + bcopy(&ln->ll_addr, desten, ifp->if_addrlen); + if (pflags != NULL) + *pflags = ln->la_flags; + LLE_RUNLOCK(ln); + return (0); } /* - * Output IPv6 packet - heavy version. - * Function assume that either - * 1) destination LLE does not exist, is invalid or stale, so - * ND6_EXCLUSIVE lock needs to be acquired - * 2) destination lle is provided (with ND6_EXCLUSIVE lock), - * in that case packets are queued in &chain. + * Do L2 address resolution for @sa_dst address. Stores found + * address in @desten buffer. Copy of lle ln_flags can be also + * saved in @pflags if @pflags is non-NULL. * + * Heavy version. + * Function assume that destination LLE does not exist, + * is invalid or stale, so ND6_EXCLUSIVE lock needs to be acquired. */ static int -nd6_output_lle(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m, - struct sockaddr_in6 *dst) +nd6_resolve_slow(struct ifnet *ifp, struct mbuf *m, + const struct sockaddr_in6 *dst, u_char *desten, uint32_t *pflags) { struct llentry *lle = NULL, *lle_tmp; - KASSERT(m != NULL, ("NULL mbuf, nothing to send")); - /* discard the packet if IPv6 operation is disabled on the interface */ - if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED)) { - m_freem(m); - return (ENETDOWN); /* better error? */ - } - - if (IN6_IS_ADDR_MULTICAST(&dst->sin6_addr)) - goto sendpkt; - - if (nd6_need_cache(ifp) == 0) - goto sendpkt; - /* * Address resolution or Neighbor Unreachability Detection * for the next hop. @@ -2072,23 +2084,18 @@ nd6_output_lle(struct ifnet *ifp, struct } } if (lle == NULL) { - if ((ifp->if_flags & IFF_POINTOPOINT) == 0 && - !(ND_IFINFO(ifp)->flags & ND6_IFF_PERFORMNUD)) { + if (!(ND_IFINFO(ifp)->flags & ND6_IFF_PERFORMNUD)) { m_freem(m); return (ENOBUFS); } - goto sendpkt; /* send anyway */ + + if (m != NULL) + m_freem(m); + return (ENOBUFS); } LLE_WLOCK_ASSERT(lle); - /* We don't have to do link-layer address resolution on a p2p link. */ - if ((ifp->if_flags & IFF_POINTOPOINT) != 0 && - lle->ln_state < ND6_LLINFO_REACHABLE) { - lle->ln_state = ND6_LLINFO_STALE; - nd6_llinfo_settimer_locked(lle, (long)V_nd6_gctimer * hz); - } - /* * The first time we send a packet to a neighbor whose entry is * STALE, we have to change the state to DELAY and a sets a timer to @@ -2107,8 +2114,13 @@ nd6_output_lle(struct ifnet *ifp, struct * (i.e. its link-layer address is already resolved), just * send the packet. */ - if (lle->ln_state > ND6_LLINFO_INCOMPLETE) - goto sendpkt; + if (lle->ln_state > ND6_LLINFO_INCOMPLETE) { + bcopy(&lle->ll_addr, desten, ifp->if_addrlen); + if (pflags != NULL) + *pflags = lle->la_flags; + LLE_WUNLOCK(lle); + return (0); + } /* * There is a neighbor cache entry, but no ethernet address @@ -2160,13 +2172,7 @@ nd6_output_lle(struct ifnet *ifp, struct LLE_WUNLOCK(lle); } - return (0); - - sendpkt: - if (lle != NULL) - LLE_WUNLOCK(lle); - - return (nd6_output_ifp(ifp, origifp, m, dst)); + return (EWOULDBLOCK); } @@ -2192,15 +2198,12 @@ nd6_flush_holdchain(struct ifnet *ifp, s /* * XXX - * note that intermediate errors are blindly ignored - but this is - * the same convention as used with nd6_output when called by - * nd6_cache_lladdr + * note that intermediate errors are blindly ignored */ return (error); } - -int +static int nd6_need_cache(struct ifnet *ifp) { /* @@ -2297,61 +2300,6 @@ nd6_rem_ifa_lle(struct in6_ifaddr *ia, i lltable_delete_addr(LLTABLE6(ifp), LLE_IFADDR, saddr); } -/* - * the callers of this function need to be re-worked to drop - * the lle lock, drop here for now - */ -int -nd6_storelladdr(struct ifnet *ifp, struct mbuf *m, - const struct sockaddr *dst, u_char *desten, uint32_t *pflags) -{ - struct llentry *ln; - - if (pflags != NULL) - *pflags = 0; - IF_AFDATA_UNLOCK_ASSERT(ifp); - if (m != NULL && m->m_flags & M_MCAST) { - switch (ifp->if_type) { - case IFT_ETHER: - case IFT_FDDI: - case IFT_L2VLAN: - case IFT_IEEE80211: - case IFT_BRIDGE: - case IFT_ISO88025: - ETHER_MAP_IPV6_MULTICAST(&SIN6(dst)->sin6_addr, - desten); - return (0); - default: - m_freem(m); - return (EAFNOSUPPORT); - } - } - - - /* - * the entry should have been created in nd6_store_lladdr - */ - IF_AFDATA_RLOCK(ifp); - ln = lla_lookup(LLTABLE6(ifp), 0, dst); - IF_AFDATA_RUNLOCK(ifp); - if ((ln == NULL) || !(ln->la_flags & LLE_VALID)) { - if (ln != NULL) - LLE_RUNLOCK(ln); - /* this could happen, if we could not allocate memory */ - m_freem(m); - return (1); - } - - bcopy(&ln->ll_addr, desten, ifp->if_addrlen); - if (pflags != NULL) - *pflags = ln->la_flags; - LLE_RUNLOCK(ln); - /* - * A *small* use after free race exists here - */ - return (0); -} - static void clear_llinfo_pqueue(struct llentry *ln) { Modified: head/sys/netinet6/nd6.h ============================================================================== --- head/sys/netinet6/nd6.h Wed Sep 16 13:25:35 2015 (r287860) +++ head/sys/netinet6/nd6.h Wed Sep 16 14:26:28 2015 (r287861) @@ -414,22 +414,19 @@ void nd6_llinfo_settimer_locked(struct l void nd6_timer(void *); void nd6_purge(struct ifnet *); void nd6_nud_hint(struct rtentry *, struct in6_addr *, int); -int nd6_resolve(struct ifnet *, struct rtentry *, struct mbuf *, - struct sockaddr *, u_char *); +int nd6_resolve(struct ifnet *, int, struct mbuf *, + const struct sockaddr *, u_char *, uint32_t *); int nd6_ioctl(u_long, caddr_t, struct ifnet *); void nd6_cache_lladdr(struct ifnet *, struct in6_addr *, char *, int, int, int); -int nd6_output(struct ifnet *, struct ifnet *, struct mbuf *, - struct sockaddr_in6 *, struct rtentry *); void nd6_grab_holdchain(struct llentry *, struct mbuf **, struct sockaddr_in6 *); int nd6_flush_holdchain(struct ifnet *, struct ifnet *, struct mbuf *, struct sockaddr_in6 *); -int nd6_need_cache(struct ifnet *); int nd6_add_ifa_lle(struct in6_ifaddr *); void nd6_rem_ifa_lle(struct in6_ifaddr *, int); -int nd6_storelladdr(struct ifnet *, struct mbuf *, - const struct sockaddr *, u_char *, uint32_t *); +int nd6_output_ifp(struct ifnet *, struct ifnet *, struct mbuf *, + struct sockaddr_in6 *); /* nd6_nbr.c */ void nd6_na_input(struct mbuf *, int, int); Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Wed Sep 16 13:25:35 2015 (r287860) +++ head/sys/netpfil/pf/pf.c Wed Sep 16 14:26:28 2015 (r287861) @@ -5534,7 +5534,7 @@ pf_route6(struct mbuf **m, struct pf_rul if (IN6_IS_SCOPE_EMBED(&dst.sin6_addr)) dst.sin6_addr.s6_addr16[1] = htons(ifp->if_index); if ((u_long)m0->m_pkthdr.len <= ifp->if_mtu) - nd6_output(ifp, ifp, m0, &dst, NULL); + nd6_output_ifp(ifp, ifp, m0, &dst); else { in6_ifstat_inc(ifp, ifs6_in_toobig); if (r->rt != PF_DUPTO) Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Wed Sep 16 13:25:35 2015 (r287860) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Wed Sep 16 14:26:28 2015 (r287861) @@ -1333,7 +1333,7 @@ ipoib_output(struct ifnet *ifp, struct m else if (m->m_flags & M_MCAST) ipv6_ib_mc_map(&((struct sockaddr_in6 *)dst)->sin6_addr, ifp->if_broadcastaddr, edst); else - error = nd6_storelladdr(ifp, m, dst, (u_char *)edst, NULL); + error = nd6_resolve(ifp, is_gw, m, dst, edst, NULL); if (error) return error; type = htons(ETHERTYPE_IPV6); From owner-svn-src-head@freebsd.org Wed Sep 16 14:38:32 2015 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 AA3019CD112; Wed, 16 Sep 2015 14:38:32 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94FA31DC7; Wed, 16 Sep 2015 14:38:32 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from zeppelin.tachypleus.net (75-101-50-44.static.sonic.net [75.101.50.44]) (authenticated bits=0) by c.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id t8GEcTGm016251 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 16 Sep 2015 07:38:29 -0700 Subject: Re: svn commit: r287843 - head/usr.sbin/bsdinstall/scripts To: Allan Jude , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201509160332.t8G3WSdw057340@repo.freebsd.org> <55F90851.2030504@freebsd.org> <55F90C9C.1010508@freebsd.org> From: Nathan Whitehorn Message-ID: <55F97EE5.4020408@freebsd.org> Date: Wed, 16 Sep 2015 07:38:29 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <55F90C9C.1010508@freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVbZQYqrpOtMst7amkbjpXyPv05GuAQ9MT4tW/xK72lfzt/f1pEYZzjVAFnvHB27PZeqy2MpRI8cJexjzsaIDT+DMuWSEm/oQUM= X-Sonic-ID: C;bJ7PmIBc5RGmKb0U9jFv0A== M;OGQVmYBc5RGmKb0U9jFv0A== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 16 Sep 2015 14:38:32 -0000 On 09/15/15 23:30, Allan Jude wrote: > On 2015-09-16 02:12, Nathan Whitehorn wrote: >> Can we please fix this elsewhere? Like in gpart? As it is, this >> mechanism is super-fragile: it applies only for one of the two ways of >> configuring ZFS systems, and that only when running an interactive >> install. It's somewhat alleviated by the fact that the other cases can >> set up UEFI boot, but still... Putting it here also causes various spam >> messages when running on non-x86 systems. >> >> At the very least, it should be in zfsboot, not the auto script. That >> will clean this up and make the fix apply to scripted installations as >> well. >> -Nathan > It is setup in scripts/auto specifically because it DOES apply to both > modes (zfsboot and partedit). It applies to UFS in partedit as well. I missed that, sorry (could you add me to reviews on partitioning in the future?). There's still the issue that it doesn't apply to scripted installs. The mechanism used in gpart_ops.c also causes silent changes to disks that are already partitioned, which it should not do, since it sets these properties at the wrong time (completion of installation, rather than creation of the partition map). > The various spam messages on non-x86 are from the missing kenv? I should > be able to fix that. Yes. Could you please fix the following? 1. Set the scheme properties in partedit when the scheme is created (in gpart_create(), potentially through a callback into partedit_x86.c). 2. Come up with an autodetection scheme that does not rely on putting things in scripts/auto. Doing it there breaks scripted installs on these systems as well as interactive disk setup through sade(8). All scripts/auto is supposed to do is run the other tools in sequence and give the user some menus. 3. Only run these tests on x86 systems. They are unnecessary/harmful on other platforms and the kenvs you are checking don't exist there anyway. -Nathan >> On 09/15/15 20:32, Allan Jude wrote: >>> Author: allanjude >>> Date: Wed Sep 16 03:32:27 2015 >>> New Revision: 287843 >>> URL: https://svnweb.freebsd.org/changeset/base/287843 >>> >>> Log: >>> Add a number of models to the bsdinstall GPT hack blacklist >>> PR: 194359 >>> Approved by: bapt (mentor) >>> MFC after: 2 weeks >>> Sponsored by: ScaleEngine Inc. >>> Differential Revision: https://reviews.freebsd.org/D3525 >>> >>> Modified: >>> head/usr.sbin/bsdinstall/scripts/auto >>> >>> Modified: head/usr.sbin/bsdinstall/scripts/auto >>> ============================================================================== >>> >>> --- head/usr.sbin/bsdinstall/scripts/auto Wed Sep 16 03:03:19 >>> 2015 (r287842) >>> +++ head/usr.sbin/bsdinstall/scripts/auto Wed Sep 16 03:32:27 >>> 2015 (r287843) >>> @@ -201,6 +201,19 @@ if f_interactive; then >>> ;; >>> esac >>> ;; >>> + "Hewlett-Packard") >>> + case "$sys_model" in >>> + "HP ProBook 4330s") >>> + dialog_workaround "$msg_gpt_active_fix" >>> + retval=$? >>> + f_dprintf "gpt_active_fix_prompt=[%s]" "$retval" >>> + if [ $retval -eq $DIALOG_OK ]; then >>> + export ZFSBOOT_PARTITION_SCHEME="GPT + Active" >>> + export WORKAROUND_GPTACTIVE=1 >>> + fi >>> + ;; >>> + esac >>> + ;; >>> esac >>> # >>> # Motherboard Models >>> @@ -208,7 +221,20 @@ if f_interactive; then >>> case "$sys_mb_maker" in >>> "Intel Corporation") >>> case "$sys_mb_product" in >>> - "DP965LT") >>> + "DP965LT"|"D510MO") >>> + dialog_workaround "$msg_gpt_active_fix" >>> + retval=$? >>> + f_dprintf "gpt_active_fix_prompt=[%s]" "$retval" >>> + if [ $retval -eq $DIALOG_OK ]; then >>> + export ZFSBOOT_PARTITION_SCHEME="GPT + Active" >>> + export WORKAROUND_GPTACTIVE=1 >>> + fi >>> + ;; >>> + esac >>> + ;; >>> + "Acer") >>> + case "$sys_mb_product" in >>> + "Veriton M6630G") >>> dialog_workaround "$msg_gpt_active_fix" >>> retval=$? >>> f_dprintf "gpt_active_fix_prompt=[%s]" "$retval" >>> >> > From owner-svn-src-head@freebsd.org Wed Sep 16 15:40:09 2015 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 D98639CEE0C; Wed, 16 Sep 2015 15:40:09 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 CA97B1FBD; Wed, 16 Sep 2015 15:40:09 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8GFe937057923; Wed, 16 Sep 2015 15:40:09 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8GFe99I057922; Wed, 16 Sep 2015 15:40:09 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201509161540.t8GFe99I057922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Wed, 16 Sep 2015 15:40:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287862 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head 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.20 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, 16 Sep 2015 15:40:10 -0000 Author: melifaro Date: Wed Sep 16 15:40:08 2015 New Revision: 287862 URL: https://svnweb.freebsd.org/changeset/base/287862 Log: Fix build broken by r287861. Spotted by: zb Modified: head/sys/ofed/drivers/infiniband/core/addr.c Modified: head/sys/ofed/drivers/infiniband/core/addr.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/addr.c Wed Sep 16 14:26:28 2015 (r287861) +++ head/sys/ofed/drivers/infiniband/core/addr.c Wed Sep 16 15:40:08 2015 (r287862) @@ -332,7 +332,7 @@ mcast: #endif #ifdef INET6 case AF_INET6: - error = nd6_storelladdr(ifp, NULL, dst_in, (u_char *)edst, NULL); + error = nd6_resolve(ifp, is_gw, NULL, dst_in, edst, NULL); break; #endif default: From owner-svn-src-head@freebsd.org Wed Sep 16 16:40:08 2015 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 7E8979C2E22; Wed, 16 Sep 2015 16:40:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 707371065; Wed, 16 Sep 2015 16:40:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8GGe8et082172; Wed, 16 Sep 2015 16:40:08 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8GGe8KD082156; Wed, 16 Sep 2015 16:40:08 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201509161640.t8GGe8KD082156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 16 Sep 2015 16:40:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287864 - head/sys/kern X-SVN-Group: head 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.20 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, 16 Sep 2015 16:40:08 -0000 Author: jhb Date: Wed Sep 16 16:40:07 2015 New Revision: 287864 URL: https://svnweb.freebsd.org/changeset/base/287864 Log: When a process group leader exits, all of the processes in the group are sent SIGHUP and SIGCONT if any of the processes are stopped. Currently this behavior is triggered for any type of process stop including ptrace() stops and transient stops for single threading during exit() and execve(). Thus, if a debugger is attached to a process in a group when the leader exits, the entire group can be HUPed. Instead, only send the signals if a process in the group is stopped due to SIGSTOP. PR: 201149 Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D3681 Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Wed Sep 16 16:11:45 2015 (r287863) +++ head/sys/kern/kern_proc.c Wed Sep 16 16:40:07 2015 (r287864) @@ -694,7 +694,7 @@ orphanpg(pg) LIST_FOREACH(p, &pg->pg_members, p_pglist) { PROC_LOCK(p); - if (P_SHOULDSTOP(p)) { + if (P_SHOULDSTOP(p) == P_STOPPED_SIG) { PROC_UNLOCK(p); LIST_FOREACH(p, &pg->pg_members, p_pglist) { PROC_LOCK(p); From owner-svn-src-head@freebsd.org Wed Sep 16 16:56:22 2015 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 0C9E39CD61A; Wed, 16 Sep 2015 16:56:22 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1D8381BD9; Wed, 16 Sep 2015 16:56:20 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.15.2/8.15.2) with ESMTPS id t8GGuG19013103 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 16 Sep 2015 19:56:16 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.15.2/8.15.2/Submit) id t8GGuGqp013102; Wed, 16 Sep 2015 19:56:16 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 16 Sep 2015 19:56:16 +0300 From: Gleb Smirnoff To: "Alexander V. Chernikov" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r287861 - in head/sys: net netinet6 netpfil/pf ofed/drivers/infiniband/ulp/ipoib Message-ID: <20150916165616.GP1023@FreeBSD.org> References: <201509161426.t8GEQTPJ028672@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201509161426.t8GEQTPJ028672@repo.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 16 Sep 2015 16:56:22 -0000 Hi! The main disaster is still in its place in nd6_output_ifp(), as it was before in nd6_output():: error = (*ifp->if_output)(origifp, m, (struct sockaddr *)dst, NULL); ^^^ ^^^^^^^ :( On Wed, Sep 16, 2015 at 02:26:29PM +0000, Alexander V. Chernikov wrote: A> Author: melifaro A> Date: Wed Sep 16 14:26:28 2015 A> New Revision: 287861 A> URL: https://svnweb.freebsd.org/changeset/base/287861 A> A> Log: A> Simplify the way of attaching IPv6 link-layer header. A> A> Problem description: A> How do we currently perform layer 2 resolution and header imposition: A> A> For IPv4 we have the following chain: A> ip_output() -> (ether|atm|whatever)_output() -> arpresolve() A> A> Lookup is done in proper place (link-layer output routine) and it is possible A> to provide cached lle data. A> A> For IPv6 situation is more complex: A> ip6_output() -> nd6_output() -> nd6_output_ifp() -> (whatever)_output() -> A> nd6_storelladdr() A> A> We have ip6_ouput() which calls nd6_output() instead of link output routine. A> nd6_output() does the following: A> * checks if lle exists, creates it if needed (similar to arpresolve()) A> * performes lle state transitions (similar to arpresolve()) A> * calls nd6_output_ifp() which pushes packets to link output routine along A> with running SeND/MAC hooks regardless of lle state A> (e.g. works as run-hooks placeholder). A> A> After that, iface output routine like ether_output() calls nd6_storelladdr() A> which performs lle lookup once again. A> A> As a result, we perform lookup twice for each outgoing packet for most types A> of interfaces. We also need to maintain runtime-checked table of 'nd6-free' A> interfaces (see nd6_need_cache()). A> A> Fix this behavior by eliminating first ND lookup. To be more specific: A> * make all nd6_output() consumers use nd6_output_ifp() instead A> * rename nd6_output[_slow]() to nd6_resolve_[slow]() A> * convert nd6_resolve() and nd6_resolve_slow() to arpresolve() semantics, A> e.g. copy L2 address to buffer instead of pushing packet towards lower A> layers A> * Make all nd6_storelladdr() users use nd6_resolve() A> * eliminate nd6_storelladdr() A> A> The resulting callchain is the following: A> ip6_output() -> nd6_output_ifp() -> (whatever)_output() -> nd6_resolve() A> A> Error handling: A> Currently sending packet to non-existing la results in ip6_ A> -> nd6_output() -> nd6_output _lle() which returns 0. A> In new scenario packet is propagated to _output() -> A> nd6_resolve() which will return EWOULDBLOCK, and that result A> will be converted to 0. A> A> (And EWOULDBLOCK is actually used by IB/TOE code). A> A> Sponsored by: Yandex LLC A> Differential Revision: https://reviews.freebsd.org/D1469 A> A> Modified: A> head/sys/net/if_arcsubr.c A> head/sys/net/if_ethersubr.c A> head/sys/net/if_fddisubr.c A> head/sys/net/if_fwsubr.c A> head/sys/net/if_iso88025subr.c A> head/sys/netinet6/ip6_forward.c A> head/sys/netinet6/ip6_output.c A> head/sys/netinet6/nd6.c A> head/sys/netinet6/nd6.h A> head/sys/netpfil/pf/pf.c A> head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c A> A> Modified: head/sys/net/if_arcsubr.c A> ============================================================================== A> --- head/sys/net/if_arcsubr.c Wed Sep 16 13:25:35 2015 (r287860) A> +++ head/sys/net/if_arcsubr.c Wed Sep 16 14:26:28 2015 (r287861) A> @@ -103,8 +103,8 @@ arc_output(struct ifnet *ifp, struct mbu A> u_int8_t atype, adst; A> int loop_copy = 0; A> int isphds; A> -#ifdef INET A> - int is_gw; A> +#if defined(INET) || defined(INET6) A> + int is_gw = 0; A> #endif A> A> if (!((ifp->if_flags & IFF_UP) && A> @@ -112,6 +112,11 @@ arc_output(struct ifnet *ifp, struct mbu A> return(ENETDOWN); /* m, m1 aren't initialized yet */ A> A> error = 0; A> +#if defined(INET) || defined(INET6) A> + if (ro != NULL && ro->ro_rt != NULL && A> + (ro->ro_rt->rt_flags & RTF_GATEWAY) != 0) A> + is_gw = 1; A> +#endif A> A> switch (dst->sa_family) { A> #ifdef INET A> @@ -125,10 +130,6 @@ arc_output(struct ifnet *ifp, struct mbu A> else if (ifp->if_flags & IFF_NOARP) A> adst = ntohl(SIN(dst)->sin_addr.s_addr) & 0xFF; A> else { A> - is_gw = 0; A> - if (ro != NULL && ro->ro_rt != NULL && A> - (ro->ro_rt->rt_flags & RTF_GATEWAY) != 0) A> - is_gw = 1; A> error = arpresolve(ifp, is_gw, m, dst, &adst, NULL); A> if (error) A> return (error == EWOULDBLOCK ? 0 : error); A> @@ -169,10 +170,11 @@ arc_output(struct ifnet *ifp, struct mbu A> case AF_INET6: A> if ((m->m_flags & M_MCAST) != 0) A> adst = arcbroadcastaddr; /* ARCnet broadcast address */ A> - else A> - error = nd6_storelladdr(ifp, m, dst, (u_char *)&adst, NULL); A> - if (error) A> - return (error); A> + else { A> + error = nd6_resolve(ifp, is_gw, m, dst, &adst, NULL); A> + if (error != 0) A> + return (error == EWOULDBLOCK ? 0 : error); A> + } A> atype = ARCTYPE_INET6; A> break; A> #endif A> A> Modified: head/sys/net/if_ethersubr.c A> ============================================================================== A> --- head/sys/net/if_ethersubr.c Wed Sep 16 13:25:35 2015 (r287860) A> +++ head/sys/net/if_ethersubr.c Wed Sep 16 14:26:28 2015 (r287861) A> @@ -225,10 +225,10 @@ ether_output(struct ifnet *ifp, struct m A> if (lle != NULL && (pflags & LLE_VALID)) A> memcpy(edst, &lle->ll_addr.mac16, sizeof(edst)); A> else A> - error = nd6_storelladdr(ifp, m, dst, (u_char *)edst, A> + error = nd6_resolve(ifp, is_gw, m, dst, (u_char *)edst, A> &pflags); A> if (error) A> - return error; A> + return (error == EWOULDBLOCK ? 0 : error); A> type = htons(ETHERTYPE_IPV6); A> break; A> #endif A> A> Modified: head/sys/net/if_fddisubr.c A> ============================================================================== A> --- head/sys/net/if_fddisubr.c Wed Sep 16 13:25:35 2015 (r287860) A> +++ head/sys/net/if_fddisubr.c Wed Sep 16 14:26:28 2015 (r287861) A> @@ -101,8 +101,8 @@ fddi_output(struct ifnet *ifp, struct mb A> int loop_copy = 0, error = 0, hdrcmplt = 0; A> u_char esrc[FDDI_ADDR_LEN], edst[FDDI_ADDR_LEN]; A> struct fddi_header *fh; A> -#ifdef INET A> - int is_gw; A> +#if defined(INET) || defined(INET6) A> + int is_gw = 0; A> #endif A> A> #ifdef MAC A> @@ -118,13 +118,15 @@ fddi_output(struct ifnet *ifp, struct mb A> senderr(ENETDOWN); A> getmicrotime(&ifp->if_lastchange); A> A> +#if defined(INET) || defined(INET6) A> + if (ro != NULL && ro->ro_rt != NULL && A> + (ro->ro_rt->rt_flags & RTF_GATEWAY) != 0) A> + is_gw = 1; A> +#endif A> + A> switch (dst->sa_family) { A> #ifdef INET A> case AF_INET: { A> - is_gw = 0; A> - if (ro != NULL && ro->ro_rt != NULL && A> - (ro->ro_rt->rt_flags & RTF_GATEWAY) != 0) A> - is_gw = 1; A> error = arpresolve(ifp, is_gw, m, dst, edst, NULL); A> if (error) A> return (error == EWOULDBLOCK ? 0 : error); A> @@ -161,9 +163,9 @@ fddi_output(struct ifnet *ifp, struct mb A> #endif /* INET */ A> #ifdef INET6 A> case AF_INET6: A> - error = nd6_storelladdr(ifp, m, dst, (u_char *)edst, NULL); A> + error = nd6_resolve(ifp, is_gw, m, dst, edst, NULL); A> if (error) A> - return (error); /* Something bad happened */ A> + return (error == EWOULDBLOCK ? 0 : error); A> type = htons(ETHERTYPE_IPV6); A> break; A> #endif /* INET6 */ A> A> Modified: head/sys/net/if_fwsubr.c A> ============================================================================== A> --- head/sys/net/if_fwsubr.c Wed Sep 16 13:25:35 2015 (r287860) A> +++ head/sys/net/if_fwsubr.c Wed Sep 16 14:26:28 2015 (r287861) A> @@ -89,8 +89,8 @@ firewire_output(struct ifnet *ifp, struc A> struct mbuf *mtail; A> int unicast, dgl, foff; A> static int next_dgl; A> -#ifdef INET A> - int is_gw; A> +#if defined(INET) || defined(INET6) A> + int is_gw = 0; A> #endif A> A> #ifdef MAC A> @@ -105,6 +105,11 @@ firewire_output(struct ifnet *ifp, struc A> goto bad; A> } A> A> +#if defined(INET) || defined(INET6) A> + if (ro != NULL && ro->ro_rt != NULL && A> + (ro->ro_rt->rt_flags & RTF_GATEWAY) != 0) A> + is_gw = 1; A> +#endif A> /* A> * For unicast, we make a tag to store the lladdr of the A> * destination. This might not be the first time we have seen A> @@ -173,10 +178,10 @@ firewire_output(struct ifnet *ifp, struc A> #ifdef INET6 A> case AF_INET6: A> if (unicast) { A> - error = nd6_storelladdr(fc->fc_ifp, m, dst, A> + error = nd6_resolve(fc->fc_ifp, is_gw, m, dst, A> (u_char *) destfw, NULL); A> if (error) A> - return (error); A> + return (error == EWOULDBLOCK ? 0 : error); A> } A> type = ETHERTYPE_IPV6; A> break; A> A> Modified: head/sys/net/if_iso88025subr.c A> ============================================================================== A> --- head/sys/net/if_iso88025subr.c Wed Sep 16 13:25:35 2015 (r287860) A> +++ head/sys/net/if_iso88025subr.c Wed Sep 16 14:26:28 2015 (r287861) A> @@ -293,9 +293,9 @@ iso88025_output(struct ifnet *ifp, struc A> #endif /* INET */ A> #ifdef INET6 A> case AF_INET6: A> - error = nd6_storelladdr(ifp, m, dst, (u_char *)edst, NULL); A> + error = nd6_resolve(ifp, is_gw, m, dst, edst, NULL); A> if (error) A> - return (error); A> + return (error == EWOULDBLOCK ? 0 : error); A> snap_type = ETHERTYPE_IPV6; A> break; A> #endif /* INET6 */ A> A> Modified: head/sys/netinet6/ip6_forward.c A> ============================================================================== A> --- head/sys/netinet6/ip6_forward.c Wed Sep 16 13:25:35 2015 (r287860) A> +++ head/sys/netinet6/ip6_forward.c Wed Sep 16 14:26:28 2015 (r287861) A> @@ -571,7 +571,7 @@ pass: A> goto bad; A> } A> A> - error = nd6_output(rt->rt_ifp, origifp, m, dst, rt); A> + error = nd6_output_ifp(rt->rt_ifp, origifp, m, dst); A> if (error) { A> in6_ifstat_inc(rt->rt_ifp, ifs6_out_discard); A> IP6STAT_INC(ip6s_cantforward); A> A> Modified: head/sys/netinet6/ip6_output.c A> ============================================================================== A> --- head/sys/netinet6/ip6_output.c Wed Sep 16 13:25:35 2015 (r287860) A> +++ head/sys/netinet6/ip6_output.c Wed Sep 16 14:26:28 2015 (r287861) A> @@ -935,7 +935,7 @@ passout: A> m->m_pkthdr.len); A> ifa_free(&ia6->ia_ifa); A> } A> - error = nd6_output(ifp, origifp, m, dst, ro->ro_rt); A> + error = nd6_output_ifp(ifp, origifp, m, dst); A> goto done; A> } A> A> @@ -1034,7 +1034,7 @@ sendorfree: A> counter_u64_add(ia->ia_ifa.ifa_obytes, A> m->m_pkthdr.len); A> } A> - error = nd6_output(ifp, origifp, m, dst, ro->ro_rt); A> + error = nd6_output_ifp(ifp, origifp, m, dst); A> } else A> m_freem(m); A> } A> A> Modified: head/sys/netinet6/nd6.c A> ============================================================================== A> --- head/sys/netinet6/nd6.c Wed Sep 16 13:25:35 2015 (r287860) A> +++ head/sys/netinet6/nd6.c Wed Sep 16 14:26:28 2015 (r287861) A> @@ -136,10 +136,10 @@ static void nd6_free_redirect(const stru A> static void nd6_llinfo_timer(void *); A> static void clear_llinfo_pqueue(struct llentry *); A> static void nd6_rtrequest(int, struct rtentry *, struct rt_addrinfo *); A> -static int nd6_output_lle(struct ifnet *, struct ifnet *, struct mbuf *, A> - struct sockaddr_in6 *); A> -static int nd6_output_ifp(struct ifnet *, struct ifnet *, struct mbuf *, A> - struct sockaddr_in6 *); A> +static int nd6_resolve_slow(struct ifnet *, struct mbuf *, A> + const struct sockaddr_in6 *, u_char *, uint32_t *); A> +static int nd6_need_cache(struct ifnet *); A> + A> A> static VNET_DEFINE(struct callout, nd6_slowtimo_ch); A> #define V_nd6_slowtimo_ch VNET(nd6_slowtimo_ch) A> @@ -1904,7 +1904,7 @@ nd6_grab_holdchain(struct llentry *ln, s A> } A> } A> A> -static int A> +int A> nd6_output_ifp(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m, A> struct sockaddr_in6 *dst) A> { A> @@ -1950,16 +1950,29 @@ nd6_output_ifp(struct ifnet *ifp, struct A> } A> A> /* A> - * IPv6 packet output - light version. A> - * Checks if destination LLE exists and is in proper state A> - * (e.g no modification required). If not true, fall back to A> - * "heavy" version. A> + * Do L2 address resolution for @sa_dst address. Stores found A> + * address in @desten buffer. Copy of lle ln_flags can be also A> + * saved in @pflags if @pflags is non-NULL. A> + * A> + * If destination LLE does not exists or lle state modification A> + * is required, call "slow" version. A> + * A> + * Return values: A> + * - 0 on success (address copied to buffer). A> + * - EWOULDBLOCK (no local error, but address is still unresolved) A> + * - other errors (alloc failure, etc) A> */ A> int A> -nd6_output(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m, A> - struct sockaddr_in6 *dst, struct rtentry *rt0) A> +nd6_resolve(struct ifnet *ifp, int is_gw, struct mbuf *m, A> + const struct sockaddr *sa_dst, u_char *desten, uint32_t *pflags) A> { A> struct llentry *ln = NULL; A> + const struct sockaddr_in6 *dst6; A> + A> + if (pflags != NULL) A> + *pflags = 0; A> + A> + dst6 = (const struct sockaddr_in6 *)sa_dst; A> A> /* discard the packet if IPv6 operation is disabled on the interface */ A> if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED)) { A> @@ -1967,14 +1980,25 @@ nd6_output(struct ifnet *ifp, struct ifn A> return (ENETDOWN); /* better error? */ A> } A> A> - if (IN6_IS_ADDR_MULTICAST(&dst->sin6_addr)) A> - goto sendpkt; A> - A> - if (nd6_need_cache(ifp) == 0) A> - goto sendpkt; A> + if (m != NULL && m->m_flags & M_MCAST) { A> + switch (ifp->if_type) { A> + case IFT_ETHER: A> + case IFT_FDDI: A> + case IFT_L2VLAN: A> + case IFT_IEEE80211: A> + case IFT_BRIDGE: A> + case IFT_ISO88025: A> + ETHER_MAP_IPV6_MULTICAST(&dst6->sin6_addr, A> + desten); A> + return (0); A> + default: A> + m_freem(m); A> + return (EAFNOSUPPORT); A> + } A> + } A> A> IF_AFDATA_RLOCK(ifp); A> - ln = nd6_lookup(&dst->sin6_addr, 0, ifp); A> + ln = nd6_lookup(&dst6->sin6_addr, 0, ifp); A> IF_AFDATA_RUNLOCK(ifp); A> A> /* A> @@ -1990,45 +2014,33 @@ nd6_output(struct ifnet *ifp, struct ifn A> /* Fall back to slow processing path */ A> if (ln != NULL) A> LLE_RUNLOCK(ln); A> - return (nd6_output_lle(ifp, origifp, m, dst)); A> + return (nd6_resolve_slow(ifp, m, dst6, desten, pflags)); A> } A> A> -sendpkt: A> - if (ln != NULL) A> - LLE_RUNLOCK(ln); A> A> - return (nd6_output_ifp(ifp, origifp, m, dst)); A> + bcopy(&ln->ll_addr, desten, ifp->if_addrlen); A> + if (pflags != NULL) A> + *pflags = ln->la_flags; A> + LLE_RUNLOCK(ln); A> + return (0); A> } A> A> A> /* A> - * Output IPv6 packet - heavy version. A> - * Function assume that either A> - * 1) destination LLE does not exist, is invalid or stale, so A> - * ND6_EXCLUSIVE lock needs to be acquired A> - * 2) destination lle is provided (with ND6_EXCLUSIVE lock), A> - * in that case packets are queued in &chain. A> + * Do L2 address resolution for @sa_dst address. Stores found A> + * address in @desten buffer. Copy of lle ln_flags can be also A> + * saved in @pflags if @pflags is non-NULL. A> * A> + * Heavy version. A> + * Function assume that destination LLE does not exist, A> + * is invalid or stale, so ND6_EXCLUSIVE lock needs to be acquired. A> */ A> static int A> -nd6_output_lle(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m, A> - struct sockaddr_in6 *dst) A> +nd6_resolve_slow(struct ifnet *ifp, struct mbuf *m, A> + const struct sockaddr_in6 *dst, u_char *desten, uint32_t *pflags) A> { A> struct llentry *lle = NULL, *lle_tmp; A> A> - KASSERT(m != NULL, ("NULL mbuf, nothing to send")); A> - /* discard the packet if IPv6 operation is disabled on the interface */ A> - if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED)) { A> - m_freem(m); A> - return (ENETDOWN); /* better error? */ A> - } A> - A> - if (IN6_IS_ADDR_MULTICAST(&dst->sin6_addr)) A> - goto sendpkt; A> - A> - if (nd6_need_cache(ifp) == 0) A> - goto sendpkt; A> - A> /* A> * Address resolution or Neighbor Unreachability Detection A> * for the next hop. A> @@ -2072,23 +2084,18 @@ nd6_output_lle(struct ifnet *ifp, struct A> } A> } A> if (lle == NULL) { A> - if ((ifp->if_flags & IFF_POINTOPOINT) == 0 && A> - !(ND_IFINFO(ifp)->flags & ND6_IFF_PERFORMNUD)) { A> + if (!(ND_IFINFO(ifp)->flags & ND6_IFF_PERFORMNUD)) { A> m_freem(m); A> return (ENOBUFS); A> } A> - goto sendpkt; /* send anyway */ A> + A> + if (m != NULL) A> + m_freem(m); A> + return (ENOBUFS); A> } A> A> LLE_WLOCK_ASSERT(lle); A> A> - /* We don't have to do link-layer address resolution on a p2p link. */ A> - if ((ifp->if_flags & IFF_POINTOPOINT) != 0 && A> - lle->ln_state < ND6_LLINFO_REACHABLE) { A> - lle->ln_state = ND6_LLINFO_STALE; A> - nd6_llinfo_settimer_locked(lle, (long)V_nd6_gctimer * hz); A> - } A> - A> /* A> * The first time we send a packet to a neighbor whose entry is A> * STALE, we have to change the state to DELAY and a sets a timer to A> @@ -2107,8 +2114,13 @@ nd6_output_lle(struct ifnet *ifp, struct A> * (i.e. its link-layer address is already resolved), just A> * send the packet. A> */ A> - if (lle->ln_state > ND6_LLINFO_INCOMPLETE) A> - goto sendpkt; A> + if (lle->ln_state > ND6_LLINFO_INCOMPLETE) { A> + bcopy(&lle->ll_addr, desten, ifp->if_addrlen); A> + if (pflags != NULL) A> + *pflags = lle->la_flags; A> + LLE_WUNLOCK(lle); A> + return (0); A> + } A> A> /* A> * There is a neighbor cache entry, but no ethernet address A> @@ -2160,13 +2172,7 @@ nd6_output_lle(struct ifnet *ifp, struct A> LLE_WUNLOCK(lle); A> } A> A> - return (0); A> - A> - sendpkt: A> - if (lle != NULL) A> - LLE_WUNLOCK(lle); A> - A> - return (nd6_output_ifp(ifp, origifp, m, dst)); A> + return (EWOULDBLOCK); A> } A> A> A> @@ -2192,15 +2198,12 @@ nd6_flush_holdchain(struct ifnet *ifp, s A> A> /* A> * XXX A> - * note that intermediate errors are blindly ignored - but this is A> - * the same convention as used with nd6_output when called by A> - * nd6_cache_lladdr A> + * note that intermediate errors are blindly ignored A> */ A> return (error); A> } A> A> - A> -int A> +static int A> nd6_need_cache(struct ifnet *ifp) A> { A> /* A> @@ -2297,61 +2300,6 @@ nd6_rem_ifa_lle(struct in6_ifaddr *ia, i A> lltable_delete_addr(LLTABLE6(ifp), LLE_IFADDR, saddr); A> } A> A> -/* A> - * the callers of this function need to be re-worked to drop A> - * the lle lock, drop here for now A> - */ A> -int A> -nd6_storelladdr(struct ifnet *ifp, struct mbuf *m, A> - const struct sockaddr *dst, u_char *desten, uint32_t *pflags) A> -{ A> - struct llentry *ln; A> - A> - if (pflags != NULL) A> - *pflags = 0; A> - IF_AFDATA_UNLOCK_ASSERT(ifp); A> - if (m != NULL && m->m_flags & M_MCAST) { A> - switch (ifp->if_type) { A> - case IFT_ETHER: A> - case IFT_FDDI: A> - case IFT_L2VLAN: A> - case IFT_IEEE80211: A> - case IFT_BRIDGE: A> - case IFT_ISO88025: A> - ETHER_MAP_IPV6_MULTICAST(&SIN6(dst)->sin6_addr, A> - desten); A> - return (0); A> - default: A> - m_freem(m); A> - return (EAFNOSUPPORT); A> - } A> - } A> - A> - A> - /* A> - * the entry should have been created in nd6_store_lladdr A> - */ A> - IF_AFDATA_RLOCK(ifp); A> - ln = lla_lookup(LLTABLE6(ifp), 0, dst); A> - IF_AFDATA_RUNLOCK(ifp); A> - if ((ln == NULL) || !(ln->la_flags & LLE_VALID)) { A> - if (ln != NULL) A> - LLE_RUNLOCK(ln); A> - /* this could happen, if we could not allocate memory */ A> - m_freem(m); A> - return (1); A> - } A> - A> - bcopy(&ln->ll_addr, desten, ifp->if_addrlen); A> - if (pflags != NULL) A> - *pflags = ln->la_flags; A> - LLE_RUNLOCK(ln); A> - /* A> - * A *small* use after free race exists here A> - */ A> - return (0); A> -} A> - A> static void A> clear_llinfo_pqueue(struct llentry *ln) A> { A> A> Modified: head/sys/netinet6/nd6.h A> ============================================================================== A> --- head/sys/netinet6/nd6.h Wed Sep 16 13:25:35 2015 (r287860) A> +++ head/sys/netinet6/nd6.h Wed Sep 16 14:26:28 2015 (r287861) A> @@ -414,22 +414,19 @@ void nd6_llinfo_settimer_locked(struct l A> void nd6_timer(void *); A> void nd6_purge(struct ifnet *); A> void nd6_nud_hint(struct rtentry *, struct in6_addr *, int); A> -int nd6_resolve(struct ifnet *, struct rtentry *, struct mbuf *, A> - struct sockaddr *, u_char *); A> +int nd6_resolve(struct ifnet *, int, struct mbuf *, A> + const struct sockaddr *, u_char *, uint32_t *); A> int nd6_ioctl(u_long, caddr_t, struct ifnet *); A> void nd6_cache_lladdr(struct ifnet *, struct in6_addr *, A> char *, int, int, int); A> -int nd6_output(struct ifnet *, struct ifnet *, struct mbuf *, A> - struct sockaddr_in6 *, struct rtentry *); A> void nd6_grab_holdchain(struct llentry *, struct mbuf **, A> struct sockaddr_in6 *); A> int nd6_flush_holdchain(struct ifnet *, struct ifnet *, struct mbuf *, A> struct sockaddr_in6 *); A> -int nd6_need_cache(struct ifnet *); A> int nd6_add_ifa_lle(struct in6_ifaddr *); A> void nd6_rem_ifa_lle(struct in6_ifaddr *, int); A> -int nd6_storelladdr(struct ifnet *, struct mbuf *, A> - const struct sockaddr *, u_char *, uint32_t *); A> +int nd6_output_ifp(struct ifnet *, struct ifnet *, struct mbuf *, A> + struct sockaddr_in6 *); A> A> /* nd6_nbr.c */ A> void nd6_na_input(struct mbuf *, int, int); A> A> Modified: head/sys/netpfil/pf/pf.c A> ============================================================================== A> --- head/sys/netpfil/pf/pf.c Wed Sep 16 13:25:35 2015 (r287860) A> +++ head/sys/netpfil/pf/pf.c Wed Sep 16 14:26:28 2015 (r287861) A> @@ -5534,7 +5534,7 @@ pf_route6(struct mbuf **m, struct pf_rul A> if (IN6_IS_SCOPE_EMBED(&dst.sin6_addr)) A> dst.sin6_addr.s6_addr16[1] = htons(ifp->if_index); A> if ((u_long)m0->m_pkthdr.len <= ifp->if_mtu) A> - nd6_output(ifp, ifp, m0, &dst, NULL); A> + nd6_output_ifp(ifp, ifp, m0, &dst); A> else { A> in6_ifstat_inc(ifp, ifs6_in_toobig); A> if (r->rt != PF_DUPTO) A> A> Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c A> ============================================================================== A> --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Wed Sep 16 13:25:35 2015 (r287860) A> +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Wed Sep 16 14:26:28 2015 (r287861) A> @@ -1333,7 +1333,7 @@ ipoib_output(struct ifnet *ifp, struct m A> else if (m->m_flags & M_MCAST) A> ipv6_ib_mc_map(&((struct sockaddr_in6 *)dst)->sin6_addr, ifp->if_broadcastaddr, edst); A> else A> - error = nd6_storelladdr(ifp, m, dst, (u_char *)edst, NULL); A> + error = nd6_resolve(ifp, is_gw, m, dst, edst, NULL); A> if (error) A> return error; A> type = htons(ETHERTYPE_IPV6); A> -- Totus tuus, Glebius. From owner-svn-src-head@freebsd.org Wed Sep 16 17:44:45 2015 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 E2F689CEC49; Wed, 16 Sep 2015 17:44:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 D4CDC1286; Wed, 16 Sep 2015 17:44:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8GHij5J010529; Wed, 16 Sep 2015 17:44:45 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8GHijBh010528; Wed, 16 Sep 2015 17:44:45 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509161744.t8GHijBh010528@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 16 Sep 2015 17:44:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287865 - head/share/mk X-SVN-Group: head 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.20 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, 16 Sep 2015 17:44:46 -0000 Author: bdrewery Date: Wed Sep 16 17:44:45 2015 New Revision: 287865 URL: https://svnweb.freebsd.org/changeset/base/287865 Log: Ignore CCACHE_DIR for meta mode decisions. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/local.meta.sys.mk Modified: head/share/mk/local.meta.sys.mk ============================================================================== --- head/share/mk/local.meta.sys.mk Wed Sep 16 16:40:07 2015 (r287864) +++ head/share/mk/local.meta.sys.mk Wed Sep 16 17:44:45 2015 (r287865) @@ -186,6 +186,10 @@ UPDATE_DEPENDFILE= NO # define the list of places that contain files we are responsible for .MAKE.META.BAILIWICK = ${SB} ${OBJROOT} ${STAGE_ROOT} +.if defined(CCACHE_DIR) +.MAKE.META.IGNORE_PATHS += ${CCACHE_DIR} +.endif + CSU_DIR.${MACHINE_ARCH} ?= csu/${MACHINE_ARCH} CSU_DIR := ${CSU_DIR.${MACHINE_ARCH}} From owner-svn-src-head@freebsd.org Wed Sep 16 17:56:25 2015 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 5177C9CD164; Wed, 16 Sep 2015 17:56:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 43BB41B0B; Wed, 16 Sep 2015 17:56:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8GHuPwg014765; Wed, 16 Sep 2015 17:56:25 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8GHuPYm014764; Wed, 16 Sep 2015 17:56:25 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509161756.t8GHuPYm014764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 16 Sep 2015 17:56:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287866 - head/sys/cam/scsi X-SVN-Group: head 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.20 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, 16 Sep 2015 17:56:25 -0000 Author: mav Date: Wed Sep 16 17:56:24 2015 New Revision: 287866 URL: https://svnweb.freebsd.org/changeset/base/287866 Log: Fix fixed sense writing when passed more data then it can fit. MFC after: 1 week Modified: head/sys/cam/scsi/scsi_all.c Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Wed Sep 16 17:44:45 2015 (r287865) +++ head/sys/cam/scsi/scsi_all.c Wed Sep 16 17:56:24 2015 (r287866) @@ -3804,8 +3804,6 @@ scsi_set_sense_data_va(struct scsi_sense */ sense->extra_len = 10; sense_len = (int)va_arg(ap, int); - len_to_copy = MIN(sense_len, SSD_EXTRA_MAX - - sense->extra_len); data = (uint8_t *)va_arg(ap, uint8_t *); switch (elem_type) { @@ -3823,10 +3821,14 @@ scsi_set_sense_data_va(struct scsi_sense uint8_t *data_dest; int i; - if (elem_type == SSD_ELEM_COMMAND) + if (elem_type == SSD_ELEM_COMMAND) { data_dest = &sense->cmd_spec_info[0]; - else { + len_to_copy = MIN(sense_len, + sizeof(sense->cmd_spec_info)); + } else { data_dest = &sense->info[0]; + len_to_copy = MIN(sense_len, + sizeof(sense->info)); /* * We're setting the info field, so * set the valid bit. From owner-svn-src-head@freebsd.org Wed Sep 16 18:02:05 2015 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 DBAA69CD56D; Wed, 16 Sep 2015 18:02:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 CD7D210AA; Wed, 16 Sep 2015 18:02:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8GI25iE018680; Wed, 16 Sep 2015 18:02:05 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8GI25D6018679; Wed, 16 Sep 2015 18:02:05 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509161802.t8GI25D6018679@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 16 Sep 2015 18:02:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287867 - head/share/mk X-SVN-Group: head 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.20 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, 16 Sep 2015 18:02:06 -0000 Author: bdrewery Date: Wed Sep 16 18:02:04 2015 New Revision: 287867 URL: https://svnweb.freebsd.org/changeset/base/287867 Log: Error and give better feedback for invalid MAKEOBJDIR settings. Submitted by: sjg Modified: head/share/mk/local.meta.sys.mk Modified: head/share/mk/local.meta.sys.mk ============================================================================== --- head/share/mk/local.meta.sys.mk Wed Sep 16 17:56:24 2015 (r287866) +++ head/share/mk/local.meta.sys.mk Wed Sep 16 18:02:04 2015 (r287867) @@ -16,14 +16,18 @@ OBJROOT:=${MAKEOBJDIRPREFIX}${SRCTOP:S,/ MAKEOBJDIRPREFIX= .export MAKEOBJDIRPREFIX .endif -.if empty(MAKEOBJDIR) || ${MAKEOBJDIR:M*/*} == "" +_default_makeobjdir=$${.CURDIR:S,$${SRCTOP},$${OBJTOP},} +.if empty(MAKEOBJDIR) # OBJTOP set below -MAKEOBJDIR=$${.CURDIR:S,$${SRCTOP},$${OBJTOP},} +MAKEOBJDIR=${_default_makeobjdir} # export but do not track .export-env MAKEOBJDIR # now for our own use MAKEOBJDIR= ${.CURDIR:S,${SRCTOP},${OBJTOP},} .endif +.if ${MAKEOBJDIR:M*/*} == "" +.error Cannot use MAKEOBJDIR=${MAKEOBJDIR}${.newline}Unset MAKEOBJDIR to get default: MAKEOBJDIR='${_default_makeobjdir}' +.endif .endif .if !empty(SB) SB_OBJROOT ?= ${SB}/obj/ From owner-svn-src-head@freebsd.org Wed Sep 16 18:02:30 2015 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 209F89CD5D6; Wed, 16 Sep 2015 18:02:30 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 0D9BD1287; Wed, 16 Sep 2015 18:02:30 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 0604D1863; Wed, 16 Sep 2015 18:02:30 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id B8F7211EF0; Wed, 16 Sep 2015 18:02:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id sBUOrYTMGDXR; Wed, 16 Sep 2015 18:02:27 +0000 (UTC) Subject: Re: svn commit: r287636 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 20A8511EEA To: "Simon J. Gerraty" , Julian Elischer References: <201509110019.t8B0JocS082576@repo.freebsd.org> <55F2529E.5080105@freebsd.org> <13099.1441985049@chaos> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Organization: FreeBSD Message-ID: <55F9AEB1.4040009@FreeBSD.org> Date: Wed, 16 Sep 2015 11:02:25 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <13099.1441985049@chaos> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 16 Sep 2015 18:02:30 -0000 On 9/11/15 8:24 AM, Simon J. Gerraty wrote: > Julian Elischer wrote: >>> If MAKEOBJDIR is empty or not a suitable value (no '/') >>> set a default that works. >> >> if not suitable.. it should error (with a really explicit error >> message), not do something else.. > > How about: > > $ MAKEOBJDIR='obj.${MACHINE}' make -C bin/cat -DWITH_META_MODE -V .OBJDIR > make: "/b/sjg/work/FreeBSD/current/src/share/mk/local.meta.sys.mk" line > 29: Cannot use MAKEOBJDIR=obj.amd64 > Unset MAKEOBJDIR to get default: MAKEOBJDIR='${.CURDIR:S,${SRCTOP},${OBJTOP},}' > $ > > Index: share/mk/local.meta.sys.mk > =================================================================== > --- share/mk/local.meta.sys.mk (revision 287636) > +++ share/mk/local.meta.sys.mk (working copy) > @@ -16,15 +16,19 @@ > MAKEOBJDIRPREFIX= > .export MAKEOBJDIRPREFIX > .endif > -.if empty(MAKEOBJDIR) || ${MAKEOBJDIR:M*/*} == "" > +_default_makeobjdir=$${.CURDIR:S,$${SRCTOP},$${OBJTOP},} > +.if empty(MAKEOBJDIR) > # OBJTOP set below > -MAKEOBJDIR=$${.CURDIR:S,$${SRCTOP},$${OBJTOP},} > +MAKEOBJDIR=${_default_makeobjdir} > # export but do not track > .export-env MAKEOBJDIR > # now for our own use > MAKEOBJDIR= ${.CURDIR:S,${SRCTOP},${OBJTOP},} > .endif > +.if ${MAKEOBJDIR:M*/*} == "" > +.error Cannot use MAKEOBJDIR=${MAKEOBJDIR}${.newline}Unset MAKEOBJDIR to get default: MAKEOBJDIR='${_default_makeobjdir}' > .endif > +.endif > .if !empty(SB) > SB_OBJROOT ?= ${SB}/obj/ > # this is what we use below > I have committed this as it seems fine and I need to make changes around the code. -- Regards, Bryan Drewery From owner-svn-src-head@freebsd.org Wed Sep 16 18:33:05 2015 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 0F88A9C250B; Wed, 16 Sep 2015 18:33:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 D95FF1649; Wed, 16 Sep 2015 18:33:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8GIX4iJ030778; Wed, 16 Sep 2015 18:33:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8GIX4Ih030777; Wed, 16 Sep 2015 18:33:04 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509161833.t8GIX4Ih030777@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 16 Sep 2015 18:33:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287868 - head/sys/cam/ctl X-SVN-Group: head 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.20 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, 16 Sep 2015 18:33:05 -0000 Author: mav Date: Wed Sep 16 18:33:04 2015 New Revision: 287868 URL: https://svnweb.freebsd.org/changeset/base/287868 Log: Make COMPARE AND WRITE report offset of difference. Modified: head/sys/cam/ctl/ctl_backend_block.c Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Wed Sep 16 18:02:04 2015 (r287867) +++ head/sys/cam/ctl/ctl_backend_block.c Wed Sep 16 18:33:04 2015 (r287868) @@ -351,6 +351,48 @@ ctl_complete_beio(struct ctl_be_block_io } } +static size_t +cmp(uint8_t *a, uint8_t *b, size_t size) +{ + size_t i; + + for (i = 0; i < size; i++) { + if (a[i] != b[i]) + break; + } + return (i); +} + +static void +ctl_be_block_compare(union ctl_io *io) +{ + struct ctl_be_block_io *beio; + uint64_t off, res; + int i; + uint8_t info[8]; + + beio = (struct ctl_be_block_io *)PRIV(io)->ptr; + off = 0; + for (i = 0; i < beio->num_segs; i++) { + res = cmp(beio->sg_segs[i].addr, + beio->sg_segs[i + CTLBLK_HALF_SEGS].addr, + beio->sg_segs[i].len); + off += res; + if (res < beio->sg_segs[i].len) + break; + } + if (i < beio->num_segs) { + scsi_u64to8b(off, info); + ctl_set_sense(&io->scsiio, /*current_error*/ 1, + /*sense_key*/ SSD_KEY_MISCOMPARE, + /*asc*/ 0x1D, /*ascq*/ 0x00, + /*type*/ SSD_ELEM_INFO, + /*size*/ sizeof(info), /*data*/ &info, + /*type*/ SSD_ELEM_NONE); + } else + ctl_set_success(&io->scsiio); +} + static int ctl_be_block_move_done(union ctl_io *io) { @@ -360,7 +402,6 @@ ctl_be_block_move_done(union ctl_io *io) #ifdef CTL_TIME_IO struct bintime cur_bt; #endif - int i; beio = (struct ctl_be_block_io *)PRIV(io)->ptr; be_lun = beio->lun; @@ -388,21 +429,7 @@ ctl_be_block_move_done(union ctl_io *io) ctl_set_success(&io->scsiio); } else if (lbalen->flags & CTL_LLF_COMPARE) { /* We have two data blocks ready for comparison. */ - for (i = 0; i < beio->num_segs; i++) { - if (memcmp(beio->sg_segs[i].addr, - beio->sg_segs[i + CTLBLK_HALF_SEGS].addr, - beio->sg_segs[i].len) != 0) - break; - } - if (i < beio->num_segs) - ctl_set_sense(&io->scsiio, - /*current_error*/ 1, - /*sense_key*/ SSD_KEY_MISCOMPARE, - /*asc*/ 0x1D, - /*ascq*/ 0x00, - SSD_ELEM_NONE); - else - ctl_set_success(&io->scsiio); + ctl_be_block_compare(io); } } else if ((io->io_hdr.port_status != 0) && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || From owner-svn-src-head@freebsd.org Wed Sep 16 19:58:05 2015 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 9090C9CEDD5; Wed, 16 Sep 2015 19:58:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 5F0851CE4; Wed, 16 Sep 2015 19:58:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8GJw5CB065025; Wed, 16 Sep 2015 19:58:05 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8GJw5vA065024; Wed, 16 Sep 2015 19:58:05 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509161958.t8GJw5vA065024@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 16 Sep 2015 19:58:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287869 - head/share/mk X-SVN-Group: head 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.20 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, 16 Sep 2015 19:58:05 -0000 Author: bdrewery Date: Wed Sep 16 19:58:04 2015 New Revision: 287869 URL: https://svnweb.freebsd.org/changeset/base/287869 Log: Fix check from r287867 for valid MAKEOBJDIR from top-level builds. MAKEOBJDIR is based on OBJTOP so cannot be expanded until OBJTOP is set. Reported by: Nikolai Lifanov Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/local.meta.sys.mk Modified: head/share/mk/local.meta.sys.mk ============================================================================== --- head/share/mk/local.meta.sys.mk Wed Sep 16 18:33:04 2015 (r287868) +++ head/share/mk/local.meta.sys.mk Wed Sep 16 19:58:04 2015 (r287869) @@ -7,6 +7,8 @@ # we need this until there is an alternative MK_INSTALL_AS_USER= yes +_default_makeobjdir=$${.CURDIR:S,$${SRCTOP},$${OBJTOP},} + .if empty(OBJROOT) || ${.MAKE.LEVEL} == 0 .if !make(showconfig) .if defined(MAKEOBJDIRPREFIX) && exists(${MAKEOBJDIRPREFIX}) @@ -16,7 +18,6 @@ OBJROOT:=${MAKEOBJDIRPREFIX}${SRCTOP:S,/ MAKEOBJDIRPREFIX= .export MAKEOBJDIRPREFIX .endif -_default_makeobjdir=$${.CURDIR:S,$${SRCTOP},$${OBJTOP},} .if empty(MAKEOBJDIR) # OBJTOP set below MAKEOBJDIR=${_default_makeobjdir} @@ -25,9 +26,6 @@ MAKEOBJDIR=${_default_makeobjdir} # now for our own use MAKEOBJDIR= ${.CURDIR:S,${SRCTOP},${OBJTOP},} .endif -.if ${MAKEOBJDIR:M*/*} == "" -.error Cannot use MAKEOBJDIR=${MAKEOBJDIR}${.newline}Unset MAKEOBJDIR to get default: MAKEOBJDIR='${_default_makeobjdir}' -.endif .endif .if !empty(SB) SB_OBJROOT ?= ${SB}/obj/ @@ -110,6 +108,12 @@ TARGET_SPEC = ${TARGET_SPEC_VARS:@v@${$v TARGET_OBJ_SPEC:= ${TARGET_SPEC:S;,;.;g} OBJTOP:= ${OBJROOT}${TARGET_OBJ_SPEC} +.if defined(MAKEOBJDIR) +.if ${MAKEOBJDIR:M*/*} == "" +.error Cannot use MAKEOBJDIR=${MAKEOBJDIR}${.newline}Unset MAKEOBJDIR to get default: MAKEOBJDIR='${_default_makeobjdir}' +.endif +.endif + .if ${.CURDIR} == ${SRCTOP} RELDIR = . .elif ${.CURDIR:M${SRCTOP}/*} From owner-svn-src-head@freebsd.org Wed Sep 16 20:54:50 2015 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 185CE9CEA04 for ; Wed, 16 Sep 2015 20:54:50 +0000 (UTC) (envelope-from rrs@netflix.com) Received: from mail-pa0-x22b.google.com (mail-pa0-x22b.google.com [IPv6:2607:f8b0:400e:c03::22b]) (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 D3AF81DC1 for ; Wed, 16 Sep 2015 20:54:49 +0000 (UTC) (envelope-from rrs@netflix.com) Received: by pacex6 with SMTP id ex6so219425420pac.0 for ; Wed, 16 Sep 2015 13:54:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netflix.com; s=google; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=WSQ1Qgqyj+1LNw2wDWbeHuBfNOmguEJre+DC0jUSsFk=; b=IHXkxw1LFxT1KvIQ2s2Rwxl/0qXEwW5U0TJgqUVAhsZl8wg8l+M35gDAdRrKcTZ9D6 ewfZB/FW5icVJjXJ+fQbfVS5ZKutqN/LdnnyPi6RYkzaAGLQ3vc2oghk3NHHzegQ34kt RSUiLPIHKn+Ofz56c4BgLti2eQAxfLEitNbOE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=WSQ1Qgqyj+1LNw2wDWbeHuBfNOmguEJre+DC0jUSsFk=; b=eoiJeewr+mSW1MFrSRDkSsEG5LMB/hoXliP/JACFyckjs/eVmMWRxAV3IzhofHNe69 Su6MoqRNawymPa0G+VocDCjZuD894GsvKkWfqzu7+W+IAjxlixZ9p0WYNXFKhDLp9NZI 5u4iN7URL0VZuG8DBFXo/Nyu/0tQmsimHyc8+wIUlkWKIiRe2iDAzDh4ULdFHGETBC3h ANuSF3ZZa7WQn4IisdqX2elXQTXSQl5rTFG+mEvAxAWDwUOuJgxRk9AMH8ZCD8hFAOUQ 5gufzOK96EUGfRO0KWaG0EGHMRhohNHiu4zUF94FDBmRThNeO1SP1iChleef19MdECSO P9iA== X-Gm-Message-State: ALoCoQlowv4nfMr9Pd/x9HuZ1419CIpw4IOhLdxETBApbp7M3f90yqJKVb9bEJuHmKanCnhVIarK X-Received: by 10.68.109.2 with SMTP id ho2mr64533732pbb.158.1442436889355; Wed, 16 Sep 2015 13:54:49 -0700 (PDT) Received: from ?IPv6:2607:fb10:16:208:9168:1ab3:84c7:f324? ([2607:fb10:16:208:9168:1ab3:84c7:f324]) by smtp.gmail.com with ESMTPSA id lo10sm29624106pab.16.2015.09.16.13.54.48 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 16 Sep 2015 13:54:48 -0700 (PDT) Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r287780 - in head: share/man/man9 sys/kern sys/sys From: Randall Stewart In-Reply-To: <201509141052.t8EAqRWf008293@repo.freebsd.org> Date: Wed, 16 Sep 2015 13:54:47 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201509141052.t8EAqRWf008293@repo.freebsd.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.1878.6) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 16 Sep 2015 20:54:50 -0000 Hans: By outside prompting, I have finally had a chance to look at this: What it appears you do here is: a) stop the callout, not paying attention to if it stopped or not. b) Then get the callout systems lock and check if your callout is up and = running, storing that in your retval. Where 1 is it was running, and 0 is no it was not running. c) Assuming that your callout is running. 1) assert the user has the lock (if its a mtx associated lock), which = means the callout is blocked on you finishing this. 2) change the nature of the callout so that it will return-unlocked = (no matter what the caller thought he set in his callout). 3) Start a timeout using this same callout that calls the function = (async drain function) that the user supplied *instead* of the original callout. Now this is *not* how I would have done it and I question c.2 = especially. I don=92t think you should be changing the nature of the callout and its lock. =20 Overall I really doubt this will work well since the callout that you = start will call to the user function that says =93I am done with the callout memory.. which is = usually what you want this async-drain for=94 but using the very memory that you want to free for the callout. I wonder how tested this code is? =20 I would think one would be better off having a way to set a callback if = you are trying to stop and drain-async that the actual callout code itself calls to say =93I am done=94.. not = this interesting recursive use of the callout itself. R On Sep 14, 2015, at 3:52 AM, Hans Petter Selasky = wrote: > Author: hselasky > Date: Mon Sep 14 10:52:26 2015 > New Revision: 287780 > URL: https://svnweb.freebsd.org/changeset/base/287780 >=20 > Log: > Implement callout_drain_async(), inspired by the projects/hps_head > branch. >=20 > This function is used to drain a callout via a callback instead of > blocking the caller until the drain is complete. Refer to the > callout_drain_async() manual page for a detailed description. >=20 > Limitation: If a lock is used with the callout, the callout can only > be drained asynchronously one time unless the callout_init_mtx() > function is called again. This limitation is not present in > projects/hps_head and will require more invasive changes to the > timeout code, which was not in the scope of this patch. >=20 > Differential Revision: https://reviews.freebsd.org/D3521 > Reviewed by: wblock > MFC after: 1 month >=20 > Modified: > head/share/man/man9/Makefile > head/share/man/man9/timeout.9 > head/sys/kern/kern_timeout.c > head/sys/sys/_callout.h > head/sys/sys/callout.h >=20 > Modified: head/share/man/man9/Makefile > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/share/man/man9/Makefile Mon Sep 14 10:28:47 2015 = (r287779) > +++ head/share/man/man9/Makefile Mon Sep 14 10:52:26 2015 = (r287780) > @@ -1641,6 +1641,7 @@ MLINKS+=3Dtimeout.9 callout.9 \ > timeout.9 callout_active.9 \ > timeout.9 callout_deactivate.9 \ > timeout.9 callout_drain.9 \ > + timeout.9 callout_drain_async.9 \ > timeout.9 callout_handle_init.9 \ > timeout.9 callout_init.9 \ > timeout.9 callout_init_mtx.9 \ >=20 > Modified: head/share/man/man9/timeout.9 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/share/man/man9/timeout.9 Mon Sep 14 10:28:47 2015 = (r287779) > +++ head/share/man/man9/timeout.9 Mon Sep 14 10:52:26 2015 = (r287780) > @@ -36,6 +36,7 @@ > .Nm callout_active , > .Nm callout_deactivate , > .Nm callout_drain , > +.Nm callout_drain_async , > .Nm callout_handle_init , > .Nm callout_init , > .Nm callout_init_mtx , > @@ -70,6 +71,8 @@ typedef void timeout_t (void *); > .Fn callout_deactivate "struct callout *c" > .Ft int > .Fn callout_drain "struct callout *c" > +.Ft int > +.Fn callout_drain_async "struct callout *c" "callout_func_t *fn" = "void *arg" > .Ft void > .Fn callout_handle_init "struct callout_handle *handle" > .Bd -literal > @@ -264,6 +267,24 @@ fully stopped before > .Fn callout_drain > returns. > .Pp > +The function > +.Fn callout_drain_async > +is non-blocking and works the same as the > +.Fn callout_stop > +function. > +When this function returns non-zero, do not call it again until the = callback function given by > +.Fa fn > +has been called with argument > +.Fa arg . > +Only one of > +.Fn callout_drain > +or > +.Fn callout_drain_async > +should be called at a time to drain a callout. > +If this function returns zero, it is safe to free the callout = structure pointed to by the > +.Fa c > +argument immediately. > +.Pp > The > .Fn callout_reset > and >=20 > Modified: head/sys/kern/kern_timeout.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/kern/kern_timeout.c Mon Sep 14 10:28:47 2015 = (r287779) > +++ head/sys/kern/kern_timeout.c Mon Sep 14 10:52:26 2015 = (r287780) > @@ -1145,6 +1145,45 @@ callout_schedule(struct callout *c, int=20 > } >=20 > int > +callout_drain_async(struct callout *c, callout_func_t *func, void = *arg) > +{ > + struct callout_cpu *cc; > + struct lock_class *class; > + int retval; > + int direct; > + > + /* stop callout */ > + callout_stop(c); > + > + /* check if callback is being called */ > + cc =3D callout_lock(c); > + if (c->c_iflags & CALLOUT_DIRECT) { > + direct =3D 1; > + } else { > + direct =3D 0; > + } > + retval =3D (cc_exec_curr(cc, direct) =3D=3D c); > + > + /* drop locks, if any */ > + if (retval && c->c_lock !=3D NULL && > + c->c_lock !=3D &Giant.lock_object) { > + /* ensure we are properly locked */ > + class =3D LOCK_CLASS(c->c_lock); > + class->lc_assert(c->c_lock, LA_XLOCKED); > + /* the final callback should not be called locked */ > + c->c_lock =3D NULL; > + c->c_iflags |=3D CALLOUT_RETURNUNLOCKED; > + } > + CC_UNLOCK(cc); > + > + /* check if we should queue final callback */ > + if (retval) > + callout_reset(c, 1, func, arg); > + > + return (retval); > +} > + > +int > _callout_stop_safe(struct callout *c, int safe) > { > struct callout_cpu *cc, *old_cc; >=20 > Modified: head/sys/sys/_callout.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/sys/_callout.h Mon Sep 14 10:28:47 2015 = (r287779) > +++ head/sys/sys/_callout.h Mon Sep 14 10:52:26 2015 = (r287780) > @@ -46,6 +46,8 @@ LIST_HEAD(callout_list, callout); > SLIST_HEAD(callout_slist, callout); > TAILQ_HEAD(callout_tailq, callout); >=20 > +typedef void callout_func_t(void *); > + > struct callout { > union { > LIST_ENTRY(callout) le; >=20 > Modified: head/sys/sys/callout.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/sys/callout.h Mon Sep 14 10:28:47 2015 = (r287779) > +++ head/sys/sys/callout.h Mon Sep 14 10:52:26 2015 = (r287780) > @@ -82,6 +82,7 @@ struct callout_handle { > #define callout_active(c) ((c)->c_flags & CALLOUT_ACTIVE) > #define callout_deactivate(c) ((c)->c_flags &=3D = ~CALLOUT_ACTIVE) > #define callout_drain(c) _callout_stop_safe(c, 1) > +int callout_drain_async(struct callout *, callout_func_t *, void *); > void callout_init(struct callout *, int); > void _callout_init_lock(struct callout *, struct lock_object *, int); > #define callout_init_mtx(c, mtx, flags) = \ >=20 -------- Randall Stewart rrs@netflix.com 803-317-4952 From owner-svn-src-head@freebsd.org Wed Sep 16 20:55:01 2015 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 A50929CEA35; Wed, 16 Sep 2015 20:55:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 93D771F03; Wed, 16 Sep 2015 20:55:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8GKt1Dk090689; Wed, 16 Sep 2015 20:55:01 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8GKt13u090688; Wed, 16 Sep 2015 20:55:01 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201509162055.t8GKt13u090688@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 16 Sep 2015 20:55:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287870 - head/sys/kern X-SVN-Group: head 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.20 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, 16 Sep 2015 20:55:01 -0000 Author: jhb Date: Wed Sep 16 20:55:00 2015 New Revision: 287870 URL: https://svnweb.freebsd.org/changeset/base/287870 Log: Always clear TDB_USERWR before fetching system call arguments. The TDB_USERWR flag may still be set after a debugger detaches from a process via PT_DETACH. Previously the flag would never be cleared forcing a double fetch of the system call arguments for each system call. Note that the flag cannot be cleared at PT_DETACH time in case one of the threads in the process is currently stopped in syscallenter() and the debugger has modified the arguments for that pending system call before detaching. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D3678 Modified: head/sys/kern/subr_syscall.c Modified: head/sys/kern/subr_syscall.c ============================================================================== --- head/sys/kern/subr_syscall.c Wed Sep 16 19:58:04 2015 (r287869) +++ head/sys/kern/subr_syscall.c Wed Sep 16 20:55:00 2015 (r287870) @@ -63,14 +63,14 @@ syscallenter(struct thread *td, struct s td->td_pticks = 0; if (td->td_cowgen != p->p_cowgen) thread_cow_update(td); - if (p->p_flag & P_TRACED) { - traced = 1; + traced = (p->p_flag & P_TRACED) != 0; + if (traced || td->td_dbgflags & TDB_USERWR) { PROC_LOCK(p); td->td_dbgflags &= ~TDB_USERWR; - td->td_dbgflags |= TDB_SCE; + if (traced) + td->td_dbgflags |= TDB_SCE; PROC_UNLOCK(p); - } else - traced = 0; + } error = (p->p_sysent->sv_fetch_syscall_args)(td, sa); #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) From owner-svn-src-head@freebsd.org Wed Sep 16 20:58:44 2015 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 6859E9CEB8A; Wed, 16 Sep 2015 20:58:44 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 588081102; Wed, 16 Sep 2015 20:58:44 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8GKwi2H090862; Wed, 16 Sep 2015 20:58:44 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8GKwiJp090861; Wed, 16 Sep 2015 20:58:44 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509162058.t8GKwiJp090861@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 16 Sep 2015 20:58:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287871 - head/share/mk X-SVN-Group: head 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.20 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, 16 Sep 2015 20:58:44 -0000 Author: bdrewery Date: Wed Sep 16 20:58:43 2015 New Revision: 287871 URL: https://svnweb.freebsd.org/changeset/base/287871 Log: META_MODE: Fix OBJROOT ending in two // when it does not yet exist. This would lead to the 2nd build (after the first with a missing OBJROOT) to always rebuild everything as the 'command' would have changed due to the path changing from having // to only /. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/local.meta.sys.mk Modified: head/share/mk/local.meta.sys.mk ============================================================================== --- head/share/mk/local.meta.sys.mk Wed Sep 16 20:55:00 2015 (r287870) +++ head/share/mk/local.meta.sys.mk Wed Sep 16 20:58:43 2015 (r287871) @@ -34,7 +34,7 @@ OBJROOT ?= ${SB_OBJROOT} .endif OBJROOT ?= ${SRCTOP:H}/obj/ .if ${OBJROOT:M*/} != "" -OBJROOT:= ${OBJROOT:tA}/ +OBJROOT:= ${OBJROOT:H:tA}/ .else OBJROOT:= ${OBJROOT:H:tA}/${OBJROOT:T} .endif From owner-svn-src-head@freebsd.org Wed Sep 16 21:42:34 2015 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 6DC089CD703; Wed, 16 Sep 2015 21:42:34 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 510181562; Wed, 16 Sep 2015 21:42:34 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8GLgYPO011377; Wed, 16 Sep 2015 21:42:34 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8GLgYsr011376; Wed, 16 Sep 2015 21:42:34 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201509162142.t8GLgYsr011376@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 16 Sep 2015 21:42:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287874 - head/sys/netinet X-SVN-Group: head 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.20 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, 16 Sep 2015 21:42:34 -0000 Author: glebius Date: Wed Sep 16 21:42:33 2015 New Revision: 287874 URL: https://svnweb.freebsd.org/changeset/base/287874 Log: In tcp_ctlinput() separate the (ip == NULL) block from the rest of the function to reduce so many levels of indentation. Style the lines that got now indentation reduced. No functional change. Checked with: md5 Modified: head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Wed Sep 16 21:00:21 2015 (r287873) +++ head/sys/netinet/tcp_subr.c Wed Sep 16 21:42:33 2015 (r287874) @@ -1515,74 +1515,75 @@ tcp_ctlinput(int cmd, struct sockaddr *s ip = NULL; else if ((unsigned)cmd >= PRC_NCMDS || inetctlerrmap[cmd] == 0) return; - if (ip != NULL) { - icp = (struct icmp *)((caddr_t)ip - - offsetof(struct icmp, icmp_ip)); - th = (struct tcphdr *)((caddr_t)ip - + (ip->ip_hl << 2)); - INP_INFO_RLOCK(&V_tcbinfo); - inp = in_pcblookup(&V_tcbinfo, faddr, th->th_dport, - ip->ip_src, th->th_sport, INPLOOKUP_WLOCKPCB, NULL); - if (inp != NULL) { - if (!(inp->inp_flags & INP_TIMEWAIT) && - !(inp->inp_flags & INP_DROPPED) && - !(inp->inp_socket == NULL)) { - icmp_tcp_seq = htonl(th->th_seq); - tp = intotcpcb(inp); - if (SEQ_GEQ(icmp_tcp_seq, tp->snd_una) && - SEQ_LT(icmp_tcp_seq, tp->snd_max)) { - if (cmd == PRC_MSGSIZE) { - /* - * MTU discovery: - * If we got a needfrag set the MTU - * in the route to the suggested new - * value (if given) and then notify. - */ - bzero(&inc, sizeof(inc)); - inc.inc_faddr = faddr; - inc.inc_fibnum = - inp->inp_inc.inc_fibnum; - - mtu = ntohs(icp->icmp_nextmtu); - /* - * If no alternative MTU was - * proposed, try the next smaller - * one. - */ - if (!mtu) + + if (ip == NULL) { + in_pcbnotifyall(&V_tcbinfo, faddr, inetctlerrmap[cmd], notify); + return; + } + + icp = (struct icmp *)((caddr_t)ip - offsetof(struct icmp, icmp_ip)); + th = (struct tcphdr *)((caddr_t)ip + (ip->ip_hl << 2)); + INP_INFO_RLOCK(&V_tcbinfo); + inp = in_pcblookup(&V_tcbinfo, faddr, th->th_dport, ip->ip_src, + th->th_sport, INPLOOKUP_WLOCKPCB, NULL); + if (inp != NULL) { + if (!(inp->inp_flags & INP_TIMEWAIT) && + !(inp->inp_flags & INP_DROPPED) && + !(inp->inp_socket == NULL)) { + icmp_tcp_seq = htonl(th->th_seq); + tp = intotcpcb(inp); + if (SEQ_GEQ(icmp_tcp_seq, tp->snd_una) && + SEQ_LT(icmp_tcp_seq, tp->snd_max)) { + if (cmd == PRC_MSGSIZE) { + /* + * MTU discovery: + * If we got a needfrag set the MTU + * in the route to the suggested new + * value (if given) and then notify. + */ + bzero(&inc, sizeof(inc)); + inc.inc_faddr = faddr; + inc.inc_fibnum = + inp->inp_inc.inc_fibnum; + + mtu = ntohs(icp->icmp_nextmtu); + /* + * If no alternative MTU was + * proposed, try the next smaller + * one. + */ + if (!mtu) mtu = ip_next_mtu( - ntohs(ip->ip_len), 1); - if (mtu < V_tcp_minmss - + sizeof(struct tcpiphdr)) - mtu = V_tcp_minmss - + sizeof(struct tcpiphdr); - /* - * Only cache the MTU if it - * is smaller than the interface - * or route MTU. tcp_mtudisc() - * will do right thing by itself. - */ - if (mtu <= tcp_maxmtu(&inc, NULL)) + ntohs(ip->ip_len), 1); + if (mtu < V_tcp_minmss + + sizeof(struct tcpiphdr)) + mtu = V_tcp_minmss + + sizeof(struct tcpiphdr); + /* + * Only cache the MTU if it + * is smaller than the interface + * or route MTU. tcp_mtudisc() + * will do right thing by itself. + */ + if (mtu <= tcp_maxmtu(&inc, NULL)) tcp_hc_updatemtu(&inc, mtu); - tcp_mtudisc(inp, mtu); - } else - inp = (*notify)(inp, - inetctlerrmap[cmd]); - } + tcp_mtudisc(inp, mtu); + } else + inp = (*notify)(inp, + inetctlerrmap[cmd]); } - if (inp != NULL) - INP_WUNLOCK(inp); - } else { - bzero(&inc, sizeof(inc)); - inc.inc_fport = th->th_dport; - inc.inc_lport = th->th_sport; - inc.inc_faddr = faddr; - inc.inc_laddr = ip->ip_src; - syncache_unreach(&inc, th); } - INP_INFO_RUNLOCK(&V_tcbinfo); - } else - in_pcbnotifyall(&V_tcbinfo, faddr, inetctlerrmap[cmd], notify); + if (inp != NULL) + INP_WUNLOCK(inp); + } else { + bzero(&inc, sizeof(inc)); + inc.inc_fport = th->th_dport; + inc.inc_lport = th->th_sport; + inc.inc_faddr = faddr; + inc.inc_laddr = ip->ip_src; + syncache_unreach(&inc, th); + } + INP_INFO_RUNLOCK(&V_tcbinfo); } #endif /* INET */ From owner-svn-src-head@freebsd.org Wed Sep 16 21:43:52 2015 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 1DEF49CD80A; Wed, 16 Sep 2015 21:43:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 0E6B818FC; Wed, 16 Sep 2015 21:43:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8GLhptY011473; Wed, 16 Sep 2015 21:43:51 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8GLhpOf011472; Wed, 16 Sep 2015 21:43:51 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509162143.t8GLhpOf011472@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 16 Sep 2015 21:43:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287875 - head/sys/cam/ctl X-SVN-Group: head 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.20 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, 16 Sep 2015 21:43:52 -0000 Author: mav Date: Wed Sep 16 21:43:51 2015 New Revision: 287875 URL: https://svnweb.freebsd.org/changeset/base/287875 Log: Fix reading after end of file for file-backed LUNs. If backing file is smaller then the LUN size, we have to explicitly clear the rest of the buffer to not leak some random data from previous I/Os. Modified: head/sys/cam/ctl/ctl_backend_block.c Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Wed Sep 16 21:42:33 2015 (r287874) +++ head/sys/cam/ctl/ctl_backend_block.c Wed Sep 16 21:43:51 2015 (r287875) @@ -632,8 +632,8 @@ ctl_be_block_dispatch_file(struct ctl_be union ctl_io *io; struct uio xuio; struct iovec *xiovec; - int flags; - int error, i; + size_t s; + int error, flags, i; DPRINTF("entered\n"); @@ -694,6 +694,22 @@ ctl_be_block_dispatch_file(struct ctl_be VOP_UNLOCK(be_lun->vn, 0); SDT_PROBE(cbb, kernel, read, file_done, 0, 0, 0, 0, 0); + if (error == 0 && xuio.uio_resid > 0) { + /* + * If we red less then requested (EOF), then + * we should clean the rest of the buffer. + */ + s = beio->io_len - xuio.uio_resid; + for (i = 0; i < beio->num_segs; i++) { + if (s >= beio->sg_segs[i].len) { + s -= beio->sg_segs[i].len; + continue; + } + bzero((uint8_t *)beio->sg_segs[i].addr + s, + beio->sg_segs[i].len - s); + s = 0; + } + } } else { struct mount *mountpoint; int lock_flags; From owner-svn-src-head@freebsd.org Wed Sep 16 22:06:02 2015 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 C5FB89CE206; Wed, 16 Sep 2015 22:06:02 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D1661097; Wed, 16 Sep 2015 22:06:01 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.15.2/8.15.2) with ESMTPS id t8GM5xjW014784 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 17 Sep 2015 01:05:59 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.15.2/8.15.2/Submit) id t8GM5xpu014783; Thu, 17 Sep 2015 01:05:59 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 17 Sep 2015 01:05:59 +0300 From: Gleb Smirnoff To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r287780 - in head: share/man/man9 sys/kern sys/sys Message-ID: <20150916220559.GS1023@FreeBSD.org> References: <201509141052.t8EAqRWf008293@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201509141052.t8EAqRWf008293@repo.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 16 Sep 2015 22:06:02 -0000 Hans, On Mon, Sep 14, 2015 at 10:52:27AM +0000, Hans Petter Selasky wrote: H> Author: hselasky H> Date: Mon Sep 14 10:52:26 2015 H> New Revision: 287780 H> URL: https://svnweb.freebsd.org/changeset/base/287780 H> H> Log: H> Implement callout_drain_async(), inspired by the projects/hps_head H> branch. H> H> This function is used to drain a callout via a callback instead of H> blocking the caller until the drain is complete. Refer to the H> callout_drain_async() manual page for a detailed description. H> H> Limitation: If a lock is used with the callout, the callout can only H> be drained asynchronously one time unless the callout_init_mtx() H> function is called again. This limitation is not present in H> projects/hps_head and will require more invasive changes to the H> timeout code, which was not in the scope of this patch. H> H> Differential Revision: https://reviews.freebsd.org/D3521 H> Reviewed by: wblock H> MFC after: 1 month Weren't you explicitly asked not to touch this system without a proper review and discussion? Presense of code in your own branch doesn't justify the change. Neither does differential revision, that was reviewed only by a documentation committer. -- Totus tuus, Glebius. From owner-svn-src-head@freebsd.org Wed Sep 16 23:01:17 2015 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 55A339CDB38; Wed, 16 Sep 2015 23:01:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 464E71C4A; Wed, 16 Sep 2015 23:01:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8GN1HLX043884; Wed, 16 Sep 2015 23:01:17 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8GN1HUs043883; Wed, 16 Sep 2015 23:01:17 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509162301.t8GN1HUs043883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 16 Sep 2015 23:01:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287879 - head/share/mk X-SVN-Group: head 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.20 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, 16 Sep 2015 23:01:17 -0000 Author: bdrewery Date: Wed Sep 16 23:01:16 2015 New Revision: 287879 URL: https://svnweb.freebsd.org/changeset/base/287879 Log: META_MODE: Don't create obj directories automatically when running make -V. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/sys.mk Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Wed Sep 16 22:35:59 2015 (r287878) +++ head/share/mk/sys.mk Wed Sep 16 23:01:16 2015 (r287879) @@ -47,8 +47,11 @@ __DEFAULT_DEPENDENT_OPTIONS= \ .endif .if ${MK_AUTO_OBJ} == "yes" # This needs to be done early - before .PATH is computed +# Don't do this if just running make -V +.if ${.MAKEFLAGS:M-V} == "" .sinclude .endif +.endif .endif From owner-svn-src-head@freebsd.org Wed Sep 16 23:09:32 2015 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 85A8C9CE024; Wed, 16 Sep 2015 23:09:32 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 5C33E1F9B; Wed, 16 Sep 2015 23:09:32 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8GN9WS2044821; Wed, 16 Sep 2015 23:09:32 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8GN9Wsw044820; Wed, 16 Sep 2015 23:09:32 GMT (envelope-from des@FreeBSD.org) Message-Id: <201509162309.t8GN9Wsw044820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Wed, 16 Sep 2015 23:09:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287880 - head/usr.sbin/unbound/local-setup X-SVN-Group: head 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.20 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, 16 Sep 2015 23:09:32 -0000 Author: des Date: Wed Sep 16 23:09:31 2015 New Revision: 287880 URL: https://svnweb.freebsd.org/changeset/base/287880 Log: If forwarders were specified on the command line, create an empty resolvconf.conf so that resolvconf won't replace the manually configured forwarders with dynamically configured ones the next time the lease is renewed. Modified: head/usr.sbin/unbound/local-setup/local-unbound-setup.sh Modified: head/usr.sbin/unbound/local-setup/local-unbound-setup.sh ============================================================================== --- head/usr.sbin/unbound/local-setup/local-unbound-setup.sh Wed Sep 16 23:01:16 2015 (r287879) +++ head/usr.sbin/unbound/local-setup/local-unbound-setup.sh Wed Sep 16 23:09:31 2015 (r287880) @@ -172,13 +172,18 @@ do_not_edit() { # the libc resolver will try unbound first. # gen_resolvconf_conf() { + local style="$1" do_not_edit echo "resolv_conf=\"/dev/null\" # prevent updating ${resolv_conf}" - echo "unbound_conf=\"${forward_conf}\"" - echo "unbound_pid=\"${pidfile}\"" - echo "unbound_service=\"${service}\"" - # resolvconf(8) likes to restart rather than reload - echo "unbound_restart=\"service ${service} reload\"" + if [ "${style}" = "dynamic" ] ; then + echo "unbound_conf=\"${forward_conf}\"" + echo "unbound_pid=\"${pidfile}\"" + echo "unbound_service=\"${service}\"" + # resolvconf(8) likes to restart rather than reload + echo "unbound_restart=\"service ${service} reload\"" + else + echo "# Static DNS configuration" + fi } # @@ -379,6 +384,9 @@ main() { if [ -z "$forwarders" ] ; then echo "Extracting forwarders from ${resolv_conf}." forwarders=$(get_nameservers <"${resolv_conf}") + style=dynamic + else + style=static fi # @@ -440,7 +448,7 @@ main() { # instead of resolv.conf. # local tmp_resolvconf_conf=$(mktemp -u "${resolvconf_conf}.XXXXX") - gen_resolvconf_conf | unexpand >"${tmp_resolvconf_conf}" + gen_resolvconf_conf "${style}" | unexpand >"${tmp_resolvconf_conf}" replace "${resolvconf_conf}" "${tmp_resolvconf_conf}" # From owner-svn-src-head@freebsd.org Wed Sep 16 23:34:57 2015 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 C64FE9CEC71; Wed, 16 Sep 2015 23:34:57 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 AAA4A10C2; Wed, 16 Sep 2015 23:34:57 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8GNYvSl057523; Wed, 16 Sep 2015 23:34:57 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8GNYqZA057496; Wed, 16 Sep 2015 23:34:52 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201509162334.t8GNYqZA057496@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Wed, 16 Sep 2015 23:34:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287882 - in head/sys: arm/versatile arm/xscale/i80321 arm/xscale/i8134x dev/acpica dev/pci dev/xen/pcifront mips/adm5120 mips/atheros mips/cavium mips/idt mips/malta mips/nlm mips/rmi ... X-SVN-Group: head 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.20 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, 16 Sep 2015 23:34:58 -0000 Author: zbb Date: Wed Sep 16 23:34:51 2015 New Revision: 287882 URL: https://svnweb.freebsd.org/changeset/base/287882 Log: Add domain support to PCI bus allocation When the system has more than a single PCI domain, the bus numbers are not unique, thus they cannot be used for "pci" device numbering. Change bus numbers to -1 (i.e. to-be-determined automatically) wherever the code did not care about domains. Reviewed by: jhb Obtained from: Semihalf Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3406 Modified: head/sys/arm/versatile/versatile_pci.c head/sys/arm/xscale/i80321/i80321_pci.c head/sys/arm/xscale/i8134x/i81342_pci.c head/sys/dev/acpica/acpi_pcib.c head/sys/dev/pci/pci_pci.c head/sys/dev/xen/pcifront/pcifront.c head/sys/mips/adm5120/admpci.c head/sys/mips/atheros/ar71xx_pci.c head/sys/mips/atheros/ar724x_pci.c head/sys/mips/atheros/qca955x_pci.c head/sys/mips/cavium/octopci.c head/sys/mips/idt/idtpci.c head/sys/mips/malta/gt_pci.c head/sys/mips/nlm/xlp_pci.c head/sys/mips/rmi/xlr_pci.c head/sys/powerpc/ofw/ofw_pci.c head/sys/x86/pci/pci_bus.c head/sys/x86/pci/qpi.c head/sys/x86/x86/mptable_pci.c Modified: head/sys/arm/versatile/versatile_pci.c ============================================================================== --- head/sys/arm/versatile/versatile_pci.c Wed Sep 16 23:33:12 2015 (r287881) +++ head/sys/arm/versatile/versatile_pci.c Wed Sep 16 23:34:51 2015 (r287882) @@ -266,7 +266,7 @@ versatile_pci_attach(device_t dev) versatile_pci_conf_write_4((slot << 11) + PCIR_COMMAND, val); } - device_add_child(dev, "pci", 0); + device_add_child(dev, "pci", -1); return (bus_generic_attach(dev)); } Modified: head/sys/arm/xscale/i80321/i80321_pci.c ============================================================================== --- head/sys/arm/xscale/i80321/i80321_pci.c Wed Sep 16 23:33:12 2015 (r287881) +++ head/sys/arm/xscale/i80321/i80321_pci.c Wed Sep 16 23:34:51 2015 (r287882) @@ -117,7 +117,7 @@ i80321_pci_attach(device_t dev) if (rman_init(&sc->sc_irq_rman) != 0 || rman_manage_region(&sc->sc_irq_rman, 26, 32) != 0) panic("i80321_pci_probe: failed to set up IRQ rman"); - device_add_child(dev, "pci",busno); + device_add_child(dev, "pci", -1); return (bus_generic_attach(dev)); } Modified: head/sys/arm/xscale/i8134x/i81342_pci.c ============================================================================== --- head/sys/arm/xscale/i8134x/i81342_pci.c Wed Sep 16 23:33:12 2015 (r287881) +++ head/sys/arm/xscale/i8134x/i81342_pci.c Wed Sep 16 23:34:51 2015 (r287882) @@ -209,7 +209,7 @@ i81342_pci_attach(device_t dev) } bus_space_write_4(sc->sc_st, sc->sc_atu_sh, ATU_ISR, bus_space_read_4(sc->sc_st, sc->sc_atu_sh, ATU_ISR) & ATUX_ISR_ERRMSK); - device_add_child(dev, "pci", busno); + device_add_child(dev, "pci", -1); return (bus_generic_attach(dev)); } Modified: head/sys/dev/acpica/acpi_pcib.c ============================================================================== --- head/sys/dev/acpica/acpi_pcib.c Wed Sep 16 23:33:12 2015 (r287881) +++ head/sys/dev/acpica/acpi_pcib.c Wed Sep 16 23:34:51 2015 (r287882) @@ -150,7 +150,7 @@ acpi_pcib_attach(device_t dev, ACPI_BUFF /* * Attach the PCI bus proper. */ - if (device_add_child(dev, "pci", busno) == NULL) { + if (device_add_child(dev, "pci", -1) == NULL) { device_printf(device_get_parent(dev), "couldn't attach pci bus\n"); return_VALUE(ENXIO); } Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Wed Sep 16 23:33:12 2015 (r287881) +++ head/sys/dev/pci/pci_pci.c Wed Sep 16 23:34:51 2015 (r287882) @@ -1082,7 +1082,7 @@ pcib_attach(device_t dev) pcib_attach_common(dev); sc = device_get_softc(dev); if (sc->bus.sec != 0) { - child = device_add_child(dev, "pci", sc->bus.sec); + child = device_add_child(dev, "pci", -1); if (child != NULL) return(bus_generic_attach(dev)); } Modified: head/sys/dev/xen/pcifront/pcifront.c ============================================================================== --- head/sys/dev/xen/pcifront/pcifront.c Wed Sep 16 23:33:12 2015 (r287881) +++ head/sys/dev/xen/pcifront/pcifront.c Wed Sep 16 23:34:51 2015 (r287882) @@ -559,7 +559,7 @@ xpcib_attach(device_t dev) DPRINTF("xpcib attach (bus=%d)\n", sc->bus); - device_add_child(dev, "pci", sc->bus); + device_add_child(dev, "pci", -1); return bus_generic_attach(dev); } Modified: head/sys/mips/adm5120/admpci.c ============================================================================== --- head/sys/mips/adm5120/admpci.c Wed Sep 16 23:33:12 2015 (r287881) +++ head/sys/mips/adm5120/admpci.c Wed Sep 16 23:34:51 2015 (r287882) @@ -181,7 +181,7 @@ admpci_attach(device_t dev) panic("bus_space_map failed"); } - device_add_child(dev, "pci", busno); + device_add_child(dev, "pci", -1); return (bus_generic_attach(dev)); } Modified: head/sys/mips/atheros/ar71xx_pci.c ============================================================================== --- head/sys/mips/atheros/ar71xx_pci.c Wed Sep 16 23:33:12 2015 (r287881) +++ head/sys/mips/atheros/ar71xx_pci.c Wed Sep 16 23:34:51 2015 (r287882) @@ -462,7 +462,7 @@ ar71xx_pci_attach(device_t dev) ar71xx_pci_slot_fixup(dev, 0, 18, 0); #endif /* AR71XX_ATH_EEPROM */ - device_add_child(dev, "pci", busno); + device_add_child(dev, "pci", -1); return (bus_generic_attach(dev)); } Modified: head/sys/mips/atheros/ar724x_pci.c ============================================================================== --- head/sys/mips/atheros/ar724x_pci.c Wed Sep 16 23:33:12 2015 (r287881) +++ head/sys/mips/atheros/ar724x_pci.c Wed Sep 16 23:34:51 2015 (r287882) @@ -429,7 +429,7 @@ ar724x_pci_attach(device_t dev) | PCIM_CMD_SERRESPEN | PCIM_CMD_BACKTOBACK | PCIM_CMD_PERRESPEN | PCIM_CMD_MWRICEN, 2); - device_add_child(dev, "pci", busno); + device_add_child(dev, "pci", -1); return (bus_generic_attach(dev)); } Modified: head/sys/mips/atheros/qca955x_pci.c ============================================================================== --- head/sys/mips/atheros/qca955x_pci.c Wed Sep 16 23:33:12 2015 (r287881) +++ head/sys/mips/atheros/qca955x_pci.c Wed Sep 16 23:34:51 2015 (r287882) @@ -362,7 +362,7 @@ qca955x_pci_attach(device_t dev) | PCIM_CMD_SERRESPEN | PCIM_CMD_BACKTOBACK | PCIM_CMD_PERRESPEN | PCIM_CMD_MWRICEN, 2); - device_add_child(dev, "pci", busno); + device_add_child(dev, "pci", -1); return (bus_generic_attach(dev)); } Modified: head/sys/mips/cavium/octopci.c ============================================================================== --- head/sys/mips/cavium/octopci.c Wed Sep 16 23:33:12 2015 (r287881) +++ head/sys/mips/cavium/octopci.c Wed Sep 16 23:34:51 2015 (r287882) @@ -205,7 +205,7 @@ octopci_attach(device_t dev) subbus = octopci_init_bus(dev, sc->sc_bus); octopci_write_config(dev, sc->sc_bus, 0, 0, PCIR_SUBBUS_1, subbus, 1); - device_add_child(dev, "pci", device_get_unit(dev)); + device_add_child(dev, "pci", -1); return (bus_generic_attach(dev)); } Modified: head/sys/mips/idt/idtpci.c ============================================================================== --- head/sys/mips/idt/idtpci.c Wed Sep 16 23:33:12 2015 (r287881) +++ head/sys/mips/idt/idtpci.c Wed Sep 16 23:34:51 2015 (r287882) @@ -275,7 +275,7 @@ idtpci_attach(device_t dev) PCI_IRQ_END) != 0) panic("idtpci_attach: failed to set up IRQ rman"); - device_add_child(dev, "pci", busno); + device_add_child(dev, "pci", -1); return (bus_generic_attach(dev)); } Modified: head/sys/mips/malta/gt_pci.c ============================================================================== --- head/sys/mips/malta/gt_pci.c Wed Sep 16 23:33:12 2015 (r287881) +++ head/sys/mips/malta/gt_pci.c Wed Sep 16 23:34:51 2015 (r287882) @@ -415,7 +415,7 @@ gt_pci_attach(device_t dev) } /* Initialize memory and i/o rmans. */ - device_add_child(dev, "pci", busno); + device_add_child(dev, "pci", -1); return (bus_generic_attach(dev)); } Modified: head/sys/mips/nlm/xlp_pci.c ============================================================================== --- head/sys/mips/nlm/xlp_pci.c Wed Sep 16 23:33:12 2015 (r287881) +++ head/sys/mips/nlm/xlp_pci.c Wed Sep 16 23:34:51 2015 (r287882) @@ -314,7 +314,7 @@ xlp_pcib_attach(device_t dev) for (link = 0; link < 4; link++) xlp_pcib_hardware_swap_enable(node, link); - device_add_child(dev, "pci", 0); + device_add_child(dev, "pci", -1); bus_generic_attach(dev); return (0); } Modified: head/sys/mips/rmi/xlr_pci.c ============================================================================== --- head/sys/mips/rmi/xlr_pci.c Wed Sep 16 23:33:12 2015 (r287881) +++ head/sys/mips/rmi/xlr_pci.c Wed Sep 16 23:34:51 2015 (r287882) @@ -306,7 +306,7 @@ xlr_pcib_attach(device_t dev) 0xff, 0x7fffffff, 0, NULL, NULL, &sc->sc_pci_dmat) != 0) panic("%s: bus_dma_tag_create failed", __func__); } - device_add_child(dev, "pci", 0); + device_add_child(dev, "pci", -1); bus_generic_attach(dev); return (0); } Modified: head/sys/powerpc/ofw/ofw_pci.c ============================================================================== --- head/sys/powerpc/ofw/ofw_pci.c Wed Sep 16 23:33:12 2015 (r287881) +++ head/sys/powerpc/ofw/ofw_pci.c Wed Sep 16 23:34:51 2015 (r287882) @@ -240,7 +240,7 @@ ofw_pci_attach(device_t dev) return (error); } - device_add_child(dev, "pci", device_get_unit(dev)); + device_add_child(dev, "pci", -1); return (bus_generic_attach(dev)); } Modified: head/sys/x86/pci/pci_bus.c ============================================================================== --- head/sys/x86/pci/pci_bus.c Wed Sep 16 23:33:12 2015 (r287881) +++ head/sys/x86/pci/pci_bus.c Wed Sep 16 23:34:51 2015 (r287882) @@ -524,7 +524,7 @@ legacy_pcib_attach(device_t dev) device_probe_and_attach(pir); } #endif - device_add_child(dev, "pci", bus); + device_add_child(dev, "pci", -1); return bus_generic_attach(dev); } Modified: head/sys/x86/pci/qpi.c ============================================================================== --- head/sys/x86/pci/qpi.c Wed Sep 16 23:33:12 2015 (r287881) +++ head/sys/x86/pci/qpi.c Wed Sep 16 23:34:51 2015 (r287882) @@ -218,7 +218,7 @@ static int qpi_pcib_attach(device_t dev) { - device_add_child(dev, "pci", pcib_get_bus(dev)); + device_add_child(dev, "pci", -1); return (bus_generic_attach(dev)); } Modified: head/sys/x86/x86/mptable_pci.c ============================================================================== --- head/sys/x86/x86/mptable_pci.c Wed Sep 16 23:33:12 2015 (r287881) +++ head/sys/x86/x86/mptable_pci.c Wed Sep 16 23:34:51 2015 (r287882) @@ -69,7 +69,7 @@ mptable_hostb_attach(device_t dev) #ifdef NEW_PCIB mptable_pci_host_res_init(dev); #endif - device_add_child(dev, "pci", pcib_get_bus(dev)); + device_add_child(dev, "pci", -1); return (bus_generic_attach(dev)); } From owner-svn-src-head@freebsd.org Wed Sep 16 23:46:21 2015 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 0BC429CE2C0; Wed, 16 Sep 2015 23:46:21 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 F10E51A4C; Wed, 16 Sep 2015 23:46:20 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8GNkKa5062085; Wed, 16 Sep 2015 23:46:20 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8GNkKXn062084; Wed, 16 Sep 2015 23:46:20 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201509162346.t8GNkKXn062084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Wed, 16 Sep 2015 23:46:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287883 - head/sys/arm64/arm64 X-SVN-Group: head 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.20 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, 16 Sep 2015 23:46:21 -0000 Author: zbb Date: Wed Sep 16 23:46:20 2015 New Revision: 287883 URL: https://svnweb.freebsd.org/changeset/base/287883 Log: Release memory for CPUs that fail to init on ARM64 cpu_init_fdt will now release memory allocated for structures serving CPUs that have failed to init. Obtained from: Semihalf Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3297 Modified: head/sys/arm64/arm64/mp_machdep.c Modified: head/sys/arm64/arm64/mp_machdep.c ============================================================================== --- head/sys/arm64/arm64/mp_machdep.c Wed Sep 16 23:34:51 2015 (r287882) +++ head/sys/arm64/arm64/mp_machdep.c Wed Sep 16 23:46:20 2015 (r287883) @@ -352,7 +352,6 @@ cpu_init_fdt(u_int id, phandle_t node, u if (id == 0) return (1); - CPU_SET(id, &all_cpus); pcpup = &__pcpu[id]; pcpu_init(pcpup, id, sizeof(struct pcpu)); @@ -371,8 +370,17 @@ cpu_init_fdt(u_int id, phandle_t node, u pa = pmap_extract(kernel_pmap, (vm_offset_t)mpentry); err = psci_cpu_on(target_cpu, pa, id); - if (err != PSCI_RETVAL_SUCCESS) - printf("Failed to start CPU %u\n", id); + if (err != PSCI_RETVAL_SUCCESS) { + /* Panic here if INVARIANTS are enabled */ + KASSERT(0, ("Failed to start CPU %u (%lx)\n", id, target_cpu)); + + pcpu_destroy(pcpup); + kmem_free(kernel_arena, (vm_offset_t)dpcpu[id - 1], DPCPU_SIZE); + dpcpu[id - 1] = NULL; + /* Notify the user that the CPU failed to start */ + printf("Failed to start CPU %u (%lx)\n", id, target_cpu); + } else + CPU_SET(id, &all_cpus); return (1); } From owner-svn-src-head@freebsd.org Wed Sep 16 23:59:47 2015 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 3C30E9CEA77; Wed, 16 Sep 2015 23:59:47 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 137D61EDC; Wed, 16 Sep 2015 23:59:47 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8GNxkvZ066268; Wed, 16 Sep 2015 23:59:46 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8GNxkZx066265; Wed, 16 Sep 2015 23:59:46 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201509162359.t8GNxkZx066265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Wed, 16 Sep 2015 23:59:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287884 - in head/sys/arm64: arm64 include X-SVN-Group: head 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.20 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, 16 Sep 2015 23:59:47 -0000 Author: zbb Date: Wed Sep 16 23:59:45 2015 New Revision: 287884 URL: https://svnweb.freebsd.org/changeset/base/287884 Log: Block secondary ITS instances from attaching on ARM64 Currently FreeBSD supports only single PIC controller. Some systems that have more than one (like ThunderX dual-socket) fails to boot. Disable other PICes until proper handling is implemented in the generic interrupt code. Reviewed by: imp Obtained from: Semihalf Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3682 Modified: head/sys/arm64/arm64/gic_v3_its.c head/sys/arm64/arm64/gic_v3_var.h head/sys/arm64/include/cpu.h Modified: head/sys/arm64/arm64/gic_v3_its.c ============================================================================== --- head/sys/arm64/arm64/gic_v3_its.c Wed Sep 16 23:46:20 2015 (r287883) +++ head/sys/arm64/arm64/gic_v3_its.c Wed Sep 16 23:59:45 2015 (r287884) @@ -180,6 +180,19 @@ gic_v3_its_attach(device_t dev) sc = device_get_softc(dev); /* + * XXX ARM64TODO: Avoid configuration of more than one ITS + * device. To be removed when multi-PIC support is added + * to FreeBSD (or at least multi-ITS is implemented). Limit + * supported ITS sockets to '0' only. + */ + if (device_get_unit(dev) != 0) { + device_printf(dev, + "Only single instance of ITS is supported, exitting...\n"); + return (ENXIO); + } + sc->its_socket = 0; + + /* * Initialize sleep & spin mutex for ITS */ /* Protects ITS device list and assigned LPIs bitmaps. */ @@ -558,6 +571,10 @@ its_init_cpu(struct gic_v3_its_softc *sc sc = its_sc; } else return (ENXIO); + + /* Skip if running secondary init on a wrong socket */ + if (sc->its_socket != CPU_CURRENT_SOCKET) + return (ENXIO); } /* Modified: head/sys/arm64/arm64/gic_v3_var.h ============================================================================== --- head/sys/arm64/arm64/gic_v3_var.h Wed Sep 16 23:46:20 2015 (r287883) +++ head/sys/arm64/arm64/gic_v3_var.h Wed Sep 16 23:59:45 2015 (r287884) @@ -232,6 +232,8 @@ struct gic_v3_its_softc { struct mtx its_mtx; struct mtx its_spin_mtx; + + uint32_t its_socket; /* Socket number ITS is attached to */ }; /* Stuff that is specific to the vendor's implementation */ Modified: head/sys/arm64/include/cpu.h ============================================================================== --- head/sys/arm64/include/cpu.h Wed Sep 16 23:46:20 2015 (r287883) +++ head/sys/arm64/include/cpu.h Wed Sep 16 23:59:45 2015 (r287884) @@ -148,6 +148,8 @@ void identify_cpu(void); void swi_vm(void *v); #define CPU_AFFINITY(cpu) __cpu_affinity[(cpu)] +#define CPU_CURRENT_SOCKET \ + (CPU_AFF2(CPU_AFFINITY(PCPU_GET(cpuid)))) static __inline uint64_t get_cyclecount(void) From owner-svn-src-head@freebsd.org Wed Sep 16 23:59:54 2015 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 618489CEAC1; Wed, 16 Sep 2015 23:59:54 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 0E1771010; Wed, 16 Sep 2015 23:59:54 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8GNxrdU066315; Wed, 16 Sep 2015 23:59:53 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8GNxrxA066314; Wed, 16 Sep 2015 23:59:53 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509162359.t8GNxrxA066314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 16 Sep 2015 23:59:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287885 - head/share/mk X-SVN-Group: head 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.20 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, 16 Sep 2015 23:59:54 -0000 Author: bdrewery Date: Wed Sep 16 23:59:53 2015 New Revision: 287885 URL: https://svnweb.freebsd.org/changeset/base/287885 Log: Update META_MODE architectures for universe Modified: head/share/mk/local.meta.sys.mk Modified: head/share/mk/local.meta.sys.mk ============================================================================== --- head/share/mk/local.meta.sys.mk Wed Sep 16 23:59:45 2015 (r287884) +++ head/share/mk/local.meta.sys.mk Wed Sep 16 23:59:53 2015 (r287885) @@ -46,8 +46,9 @@ OBJROOT:= ${OBJROOT:H:tA}/${OBJROOT:T} .endif # from src/Makefile (for universe) -TARGET_ARCHES_arm?= arm armeb armv6 armv6eb -TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 +TARGET_ARCHES_arm?= arm armeb armv6 armv6hf +TARGET_ARCHES_arm64?= aarch64 +TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipsn32el TARGET_ARCHES_powerpc?= powerpc powerpc64 TARGET_ARCHES_pc98?= i386 @@ -56,7 +57,7 @@ BOOT_MACHINE_DIR.amd64 = boot/i386 MACHINE_ARCH.host = ${_HOST_ARCH} # the list of machines we support -ALL_MACHINE_LIST?= amd64 arm i386 ia64 mips pc98 powerpc sparc64 +ALL_MACHINE_LIST?= amd64 arm arm64 i386 ia64 mips pc98 powerpc sparc64 .for m in ${ALL_MACHINE_LIST:O:u} MACHINE_ARCH_LIST.$m?= ${TARGET_ARCHES_${m}:U$m} MACHINE_ARCH.$m?= ${MACHINE_ARCH_LIST.$m:[1]} From owner-svn-src-head@freebsd.org Thu Sep 17 00:03:56 2015 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 9904D9CEDC5; Thu, 17 Sep 2015 00:03:56 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 8AA2C1487; Thu, 17 Sep 2015 00:03:56 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8H03u4m070156; Thu, 17 Sep 2015 00:03:56 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8H03uSf070155; Thu, 17 Sep 2015 00:03:56 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201509170003.t8H03uSf070155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Thu, 17 Sep 2015 00:03:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287886 - head/sys/sys X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 00:03:56 -0000 Author: smh Date: Thu Sep 17 00:03:55 2015 New Revision: 287886 URL: https://svnweb.freebsd.org/changeset/base/287886 Log: Fix kqueue write events for files > 2GB Due to the use of int's for file offsets in the VOP_WRITE_(PRE|POST) macros, kqueue write events for files greater 2GB where never fired. This caused tail -f on a file greater 2GB to never see updates. MFC after: 1 week Relnotes: YES Sponsored by: Multiplay Modified: head/sys/sys/vnode.h Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Wed Sep 16 23:59:53 2015 (r287885) +++ head/sys/sys/vnode.h Thu Sep 17 00:03:55 2015 (r287886) @@ -797,7 +797,8 @@ void vop_rename_fail(struct vop_rename_a #define VOP_WRITE_PRE(ap) \ struct vattr va; \ - int error, osize, ooffset, noffset; \ + int error; \ + off_t osize, ooffset, noffset; \ \ osize = ooffset = noffset = 0; \ if (!VN_KNLIST_EMPTY((ap)->a_vp)) { \ @@ -805,7 +806,7 @@ void vop_rename_fail(struct vop_rename_a if (error) \ return (error); \ ooffset = (ap)->a_uio->uio_offset; \ - osize = va.va_size; \ + osize = (off_t)va.va_size; \ } #define VOP_WRITE_POST(ap, ret) \ From owner-svn-src-head@freebsd.org Thu Sep 17 00:17:33 2015 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 920DA9CD4E8; Thu, 17 Sep 2015 00:17:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 834D31C30; Thu, 17 Sep 2015 00:17:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8H0HXc8074619; Thu, 17 Sep 2015 00:17:33 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8H0HXw1074618; Thu, 17 Sep 2015 00:17:33 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509170017.t8H0HXw1074618@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 17 Sep 2015 00:17:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287887 - head/share/mk X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 00:17:33 -0000 Author: bdrewery Date: Thu Sep 17 00:17:32 2015 New Revision: 287887 URL: https://svnweb.freebsd.org/changeset/base/287887 Log: META_MODE: Don't define the default MAKEOBJDIR twice. Just expand the default. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/local.meta.sys.mk Modified: head/share/mk/local.meta.sys.mk ============================================================================== --- head/share/mk/local.meta.sys.mk Thu Sep 17 00:03:55 2015 (r287886) +++ head/share/mk/local.meta.sys.mk Thu Sep 17 00:17:32 2015 (r287887) @@ -23,8 +23,8 @@ MAKEOBJDIRPREFIX= MAKEOBJDIR=${_default_makeobjdir} # export but do not track .export-env MAKEOBJDIR -# now for our own use -MAKEOBJDIR= ${.CURDIR:S,${SRCTOP},${OBJTOP},} +# Expand for our own use +MAKEOBJDIR:= ${MAKEOBJDIR} .endif .endif .if !empty(SB) From owner-svn-src-head@freebsd.org Thu Sep 17 01:56:36 2015 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 CAB1D9CE865; Thu, 17 Sep 2015 01:56:36 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A919A1B34; Thu, 17 Sep 2015 01:56:36 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B0BFBB972; Wed, 16 Sep 2015 21:56:34 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r287864 - head/sys/kern Date: Wed, 16 Sep 2015 18:53:31 -0700 Message-ID: <1476335.DNMxzjPDBI@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-PRERELEASE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201509161640.t8GGe8KD082156@repo.freebsd.org> References: <201509161640.t8GGe8KD082156@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 16 Sep 2015 21:56:34 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 17 Sep 2015 01:56:36 -0000 On Wednesday, September 16, 2015 04:40:08 PM John Baldwin wrote: > Author: jhb > Date: Wed Sep 16 16:40:07 2015 > New Revision: 287864 > URL: https://svnweb.freebsd.org/changeset/base/287864 > > Log: > When a process group leader exits, all of the processes in the group are > sent SIGHUP and SIGCONT if any of the processes are stopped. Currently this > behavior is triggered for any type of process stop including ptrace() stops > and transient stops for single threading during exit() and execve(). > Thus, if a debugger is attached to a process in a group when the leader > exits, the entire group can be HUPed. Instead, only send the signals if a > process in the group is stopped due to SIGSTOP. In particular, gdb creates a new process group each time it runs a new process. If that process forks a child and gdb follows the child, the child is killed with SIGHUP when the parent exits without this fix. -- John Baldwin From owner-svn-src-head@freebsd.org Thu Sep 17 03:01:20 2015 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 354AA9CD707; Thu, 17 Sep 2015 03:01:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 262521910; Thu, 17 Sep 2015 03:01:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8H31Knq042688; Thu, 17 Sep 2015 03:01:20 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8H31KdP042687; Thu, 17 Sep 2015 03:01:20 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509170301.t8H31KdP042687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 17 Sep 2015 03:01:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287892 - head/sys/dev/usb/wlan X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 03:01:20 -0000 Author: adrian Date: Thu Sep 17 03:01:19 2015 New Revision: 287892 URL: https://svnweb.freebsd.org/changeset/base/287892 Log: Use DELAY() rather than usb_pause_mtx() - the latter releases the lock before waiting, which prevents the lock from really acting like a hardware serialiser. Sigh. Modified: head/sys/dev/usb/wlan/if_rsu.c Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Thu Sep 17 00:37:40 2015 (r287891) +++ head/sys/dev/usb/wlan/if_rsu.c Thu Sep 17 03:01:19 2015 (r287892) @@ -214,7 +214,7 @@ static int rsu_transmit(struct ieee80211 static void rsu_start(struct rsu_softc *); static void rsu_parent(struct ieee80211com *); static void rsu_stop(struct rsu_softc *); -static void rsu_ms_delay(struct rsu_softc *); +static void rsu_ms_delay(struct rsu_softc *, int); static device_method_t rsu_methods[] = { DEVMETHOD(device_probe, rsu_match), @@ -464,7 +464,7 @@ rsu_do_request(struct rsu_softc *sc, str break; DPRINTFN(1, "Control request failed, %s (retrying)\n", usbd_errstr(err)); - usb_pause_mtx(&sc->sc_mtx, hz / 100); + rsu_ms_delay(sc, 10); } return (err); @@ -774,11 +774,11 @@ rsu_fw_iocmd(struct rsu_softc *sc, uint3 int ntries; rsu_write_4(sc, R92S_IOCMD_CTRL, iocmd); - rsu_ms_delay(sc); + rsu_ms_delay(sc, 1); for (ntries = 0; ntries < 50; ntries++) { if (rsu_read_4(sc, R92S_IOCMD_CTRL) == 0) return (0); - rsu_ms_delay(sc); + rsu_ms_delay(sc, 1); } return (ETIMEDOUT); } @@ -798,7 +798,7 @@ rsu_efuse_read_1(struct rsu_softc *sc, u reg = rsu_read_4(sc, R92S_EFUSE_CTRL); if (reg & R92S_EFUSE_CTRL_VALID) return (MS(reg, R92S_EFUSE_CTRL_DATA)); - rsu_ms_delay(sc); + rsu_ms_delay(sc, 1); } device_printf(sc->sc_dev, "could not read efuse byte at address 0x%x\n", addr); @@ -822,7 +822,7 @@ rsu_read_rom(struct rsu_softc *sc) /* Turn on 2.5V to prevent eFuse leakage. */ reg = rsu_read_1(sc, R92S_EFUSE_TEST + 3); rsu_write_1(sc, R92S_EFUSE_TEST + 3, reg | 0x80); - rsu_ms_delay(sc); + rsu_ms_delay(sc, 1); rsu_write_1(sc, R92S_EFUSE_TEST + 3, reg & ~0x80); /* Read full ROM image. */ @@ -1883,7 +1883,7 @@ rsu_power_on_acut(struct rsu_softc *sc) rsu_write_1(sc, R92S_SPS1_CTRL, rsu_read_1(sc, R92S_SPS1_CTRL) | R92S_SPS1_LDEN); - usb_pause_mtx(&sc->sc_mtx, 2 * hz); + rsu_ms_delay(sc, 2000); /* Enable switch regulator block. */ rsu_write_1(sc, R92S_SPS1_CTRL, rsu_read_1(sc, R92S_SPS1_CTRL) | R92S_SPS1_SWEN); @@ -1955,7 +1955,7 @@ rsu_power_on_bcut(struct rsu_softc *sc) /* Prevent eFuse leakage. */ rsu_write_1(sc, 0x37, 0xb0); - usb_pause_mtx(&sc->sc_mtx, hz / 100); + rsu_ms_delay(sc, 10); rsu_write_1(sc, 0x37, 0x30); /* Switch the control path to hardware. */ @@ -1966,7 +1966,7 @@ rsu_power_on_bcut(struct rsu_softc *sc) } rsu_write_1(sc, R92S_SYS_FUNC_EN + 1, rsu_read_1(sc, R92S_SYS_FUNC_EN + 1) & ~0x8c); - rsu_ms_delay(sc); + rsu_ms_delay(sc, 1); rsu_write_1(sc, R92S_SPS0_CTRL + 1, 0x53); rsu_write_1(sc, R92S_SPS0_CTRL + 0, 0x57); @@ -1999,11 +1999,11 @@ rsu_power_on_bcut(struct rsu_softc *sc) /* Enable AFE PLL macro block. */ reg = rsu_read_1(sc, R92S_AFE_PLL_CTRL); rsu_write_1(sc, R92S_AFE_PLL_CTRL, reg | 0x11); - rsu_ms_delay(sc); + rsu_ms_delay(sc, 1); rsu_write_1(sc, R92S_AFE_PLL_CTRL, reg | 0x51); - rsu_ms_delay(sc); + rsu_ms_delay(sc, 1); rsu_write_1(sc, R92S_AFE_PLL_CTRL, reg | 0x11); - rsu_ms_delay(sc); + rsu_ms_delay(sc, 1); /* Attach AFE PLL to MACTOP/BB. */ rsu_write_1(sc, R92S_SYS_ISO_CTRL, @@ -2050,7 +2050,7 @@ rsu_power_on_bcut(struct rsu_softc *sc) if ((reg & (R92S_TCR_IMEM_CHK_RPT | R92S_TCR_EMEM_CHK_RPT)) == (R92S_TCR_IMEM_CHK_RPT | R92S_TCR_EMEM_CHK_RPT)) break; - rsu_ms_delay(sc); + rsu_ms_delay(sc, 1); } if (ntries == 20) { RSU_DPRINTF(sc, RSU_DEBUG_RESET | RSU_DEBUG_TX, @@ -2059,7 +2059,7 @@ rsu_power_on_bcut(struct rsu_softc *sc) /* Reset TxDMA. */ reg = rsu_read_1(sc, R92S_CR); rsu_write_1(sc, R92S_CR, reg & ~R92S_CR_TXDMA_EN); - rsu_ms_delay(sc); + rsu_ms_delay(sc, 1); rsu_write_1(sc, R92S_CR, reg | R92S_CR_TXDMA_EN); } } @@ -2069,7 +2069,7 @@ rsu_power_off(struct rsu_softc *sc) { /* Turn RF off. */ rsu_write_1(sc, R92S_RF_CTRL, 0x00); - usb_pause_mtx(&sc->sc_mtx, hz / 200); + rsu_ms_delay(sc, 5); /* Turn MAC off. */ /* Switch control path. */ @@ -2202,7 +2202,7 @@ rsu_load_firmware(struct rsu_softc *sc) } /* Wait for load to complete. */ for (ntries = 0; ntries != 50; ntries++) { - usb_pause_mtx(&sc->sc_mtx, hz / 100); + rsu_ms_delay(sc, 10); reg = rsu_read_1(sc, R92S_TCR); if (reg & R92S_TCR_IMEM_CODE_DONE) break; @@ -2221,7 +2221,7 @@ rsu_load_firmware(struct rsu_softc *sc) } /* Wait for load to complete. */ for (ntries = 0; ntries != 50; ntries++) { - usb_pause_mtx(&sc->sc_mtx, hz / 100); + rsu_ms_delay(sc, 10); reg = rsu_read_2(sc, R92S_TCR); if (reg & R92S_TCR_EMEM_CODE_DONE) break; @@ -2251,7 +2251,7 @@ rsu_load_firmware(struct rsu_softc *sc) for (ntries = 0; ntries < 100; ntries++) { if (rsu_read_1(sc, R92S_TCR) & R92S_TCR_IMEM_RDY) break; - rsu_ms_delay(sc); + rsu_ms_delay(sc, 1); } if (ntries == 100) { device_printf(sc->sc_dev, @@ -2283,7 +2283,7 @@ rsu_load_firmware(struct rsu_softc *sc) for (ntries = 0; ntries < 100; ntries++) { if (rsu_read_1(sc, R92S_TCR) & R92S_TCR_DMEM_CODE_DONE) break; - rsu_ms_delay(sc); + rsu_ms_delay(sc, 1); } if (ntries == 100) { device_printf(sc->sc_dev, "timeout waiting for %s transfer\n", @@ -2295,7 +2295,7 @@ rsu_load_firmware(struct rsu_softc *sc) for (ntries = 0; ntries < 60; ntries++) { if (!(rsu_read_1(sc, R92S_TCR) & R92S_TCR_FWRDY)) break; - rsu_ms_delay(sc); + rsu_ms_delay(sc, 1); } if (ntries == 60) { device_printf(sc->sc_dev, @@ -2397,7 +2397,7 @@ rsu_init(struct rsu_softc *sc) rsu_write_region_1(sc, R92S_MACID, macaddr, IEEE80211_ADDR_LEN); /* It really takes 1.5 seconds for the firmware to boot: */ - usb_pause_mtx(&sc->sc_mtx, (3 * hz) / 2); + rsu_ms_delay(sc, 2000); RSU_DPRINTF(sc, RSU_DEBUG_RESET, "%s: setting MAC address to %s\n", __func__, @@ -2468,8 +2468,14 @@ rsu_stop(struct rsu_softc *sc) usbd_transfer_stop(sc->sc_xfer[i]); } +/* + * Note: usb_pause_mtx() actually releases the mutex before calling pause(), + * which breaks any kind of driver serialisation. + */ static void -rsu_ms_delay(struct rsu_softc *sc) +rsu_ms_delay(struct rsu_softc *sc, int ms) { - usb_pause_mtx(&sc->sc_mtx, hz / 1000); + + //usb_pause_mtx(&sc->sc_mtx, hz / 1000); + DELAY(ms * 1000); } From owner-svn-src-head@freebsd.org Thu Sep 17 03:01:56 2015 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 AB6299CD904; Thu, 17 Sep 2015 03:01:56 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 9CCCD1B81; Thu, 17 Sep 2015 03:01:56 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8H31uGY044671; Thu, 17 Sep 2015 03:01:56 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8H31uGC044670; Thu, 17 Sep 2015 03:01:56 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509170301.t8H31uGC044670@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 17 Sep 2015 03:01:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287893 - head/sys/dev/usb/wlan X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 03:01:56 -0000 Author: adrian Date: Thu Sep 17 03:01:55 2015 New Revision: 287893 URL: https://svnweb.freebsd.org/changeset/base/287893 Log: Bump RX_LIST_COUNT so we don't fall behind during active traffic. Modified: head/sys/dev/usb/wlan/if_rsureg.h Modified: head/sys/dev/usb/wlan/if_rsureg.h ============================================================================== --- head/sys/dev/usb/wlan/if_rsureg.h Thu Sep 17 03:01:19 2015 (r287892) +++ head/sys/dev/usb/wlan/if_rsureg.h Thu Sep 17 03:01:55 2015 (r287893) @@ -597,7 +597,7 @@ struct r92s_tx_desc { /* * Driver definitions. */ -#define RSU_RX_LIST_COUNT 1 +#define RSU_RX_LIST_COUNT 100 #define RSU_TX_LIST_COUNT 32 #define RSU_HOST_CMD_RING_COUNT 32 From owner-svn-src-head@freebsd.org Thu Sep 17 03:08:03 2015 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 412189CDD27; Thu, 17 Sep 2015 03:08:03 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 2E4861D6A; Thu, 17 Sep 2015 03:08:03 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8H383Zx044953; Thu, 17 Sep 2015 03:08:03 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8H382AD044951; Thu, 17 Sep 2015 03:08:02 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509170308.t8H382AD044951@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 17 Sep 2015 03:08:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287894 - head/sys/dev/usb/wlan X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 03:08:03 -0000 Author: adrian Date: Thu Sep 17 03:08:02 2015 New Revision: 287894 URL: https://svnweb.freebsd.org/changeset/base/287894 Log: Prepare for 11n - get the number of endpoints and whether 11n is available. Modified: head/sys/dev/usb/wlan/if_rsu.c head/sys/dev/usb/wlan/if_rsureg.h Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Thu Sep 17 03:01:55 2015 (r287893) +++ head/sys/dev/usb/wlan/if_rsu.c Thu Sep 17 03:08:02 2015 (r287894) @@ -313,10 +313,16 @@ rsu_attach(device_t self) struct ieee80211com *ic = &sc->sc_ic; int error; uint8_t iface_index, bands; + struct usb_interface *iface; device_set_usb_desc(self); sc->sc_udev = uaa->device; sc->sc_dev = self; + sc->sc_ht = !! (USB_GET_DRIVER_INFO(uaa) & RSU_HT_SUPPORTED); + + /* Get number of endpoints */ + iface = usbd_get_iface(sc->sc_udev, 0); + sc->sc_nendpoints = iface->idesc->bNumEndpoints; mtx_init(&sc->sc_mtx, device_get_nameunit(self), MTX_NETWORK_LOCK, MTX_DEF); Modified: head/sys/dev/usb/wlan/if_rsureg.h ============================================================================== --- head/sys/dev/usb/wlan/if_rsureg.h Thu Sep 17 03:01:55 2015 (r287893) +++ head/sys/dev/usb/wlan/if_rsureg.h Thu Sep 17 03:08:02 2015 (r287894) @@ -736,6 +736,8 @@ struct rsu_softc { struct timeout_task calib_task; const uint8_t *qid2idx; struct mtx sc_mtx; + int sc_ht; + int sc_nendpoints; u_int sc_running:1, sc_calibrating:1, From owner-svn-src-head@freebsd.org Thu Sep 17 03:13:02 2015 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 30CCD9CE093; Thu, 17 Sep 2015 03:13:02 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 21CCB1143; Thu, 17 Sep 2015 03:13:02 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8H3D2tS048805; Thu, 17 Sep 2015 03:13:02 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8H3D1uZ048804; Thu, 17 Sep 2015 03:13:01 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509170313.t8H3D1uZ048804@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 17 Sep 2015 03:13:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287895 - head/sys/dev/usb/wlan X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 03:13:02 -0000 Author: adrian Date: Thu Sep 17 03:13:01 2015 New Revision: 287895 URL: https://svnweb.freebsd.org/changeset/base/287895 Log: Add 11n and QoS methods. The firmware takes care of ampdu tx/rx (except for RX reordering, grr), QoS/WME and other bits/pieces. So they're stubs, just in case. Modified: head/sys/dev/usb/wlan/if_rsu.c Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Thu Sep 17 03:08:02 2015 (r287894) +++ head/sys/dev/usb/wlan/if_rsu.c Thu Sep 17 03:13:01 2015 (r287895) @@ -305,6 +305,28 @@ rsu_send_mgmt(struct ieee80211_node *ni, return (ENOTSUP); } +static void +rsu_update_chw(struct ieee80211com *ic) +{ + +} + +static int +rsu_ampdu_enable(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap) +{ + + /* Firmware handles this; not our problem */ + return (0); +} + +static int +rsu_wme_update(struct ieee80211com *ic) +{ + + /* Firmware handles this; not our problem */ + return (0); +} + static int rsu_attach(device_t self) { @@ -412,6 +434,9 @@ rsu_attach(device_t self) ic->ic_parent = rsu_parent; ic->ic_transmit = rsu_transmit; ic->ic_send_mgmt = rsu_send_mgmt; + ic->ic_update_chw = rsu_update_chw; + ic->ic_ampdu_enable = rsu_ampdu_enable; + ic->ic_wme.wme_update = rsu_wme_update; ieee80211_radiotap_attach(ic, &sc->sc_txtap.wt_ihdr, sizeof(sc->sc_txtap), RSU_TX_RADIOTAP_PRESENT, From owner-svn-src-head@freebsd.org Thu Sep 17 03:19:11 2015 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 DC9B49CE2A6; Thu, 17 Sep 2015 03:19:10 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 BE4081305; Thu, 17 Sep 2015 03:19:10 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8H3JAxx049075; Thu, 17 Sep 2015 03:19:10 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8H3JAwV049073; Thu, 17 Sep 2015 03:19:10 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509170319.t8H3JAwV049073@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 17 Sep 2015 03:19:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287896 - head/sys/dev/usb/wlan X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 03:19:11 -0000 Author: adrian Date: Thu Sep 17 03:19:09 2015 New Revision: 287896 URL: https://svnweb.freebsd.org/changeset/base/287896 Log: Use the H2C endpoint for sending firmware commands, rather than the voice data queues. This is similar to the openbsd and rtlwifi/r92su drivers. Note: this driver still assumes it's a 4-endpoint device; I'll enforce that in a follow-up commit. Modified: head/sys/dev/usb/wlan/if_rsu.c head/sys/dev/usb/wlan/if_rsureg.h Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Thu Sep 17 03:13:01 2015 (r287895) +++ head/sys/dev/usb/wlan/if_rsu.c Thu Sep 17 03:19:09 2015 (r287896) @@ -151,6 +151,7 @@ static device_attach_t rsu_attach; static device_detach_t rsu_detach; static usb_callback_t rsu_bulk_tx_callback_be_bk; static usb_callback_t rsu_bulk_tx_callback_vi_vo; +static usb_callback_t rsu_bulk_tx_callback_h2c; static usb_callback_t rsu_bulk_rx_callback; static usb_error_t rsu_do_request(struct rsu_softc *, struct usb_device_request *, void *); @@ -245,6 +246,9 @@ static uint8_t rsu_wme_ac_xfer_map[4] = [WME_AC_VO] = RSU_BULK_TX_VI_VO, }; +/* XXX hard-coded */ +#define RSU_H2C_ENDPOINT 3 + static const struct usb_config rsu_config[RSU_N_TRANSFER] = { [RSU_BULK_RX] = { .type = UE_BULK, @@ -283,6 +287,19 @@ static const struct usb_config rsu_confi .callback = rsu_bulk_tx_callback_vi_vo, .timeout = RSU_TX_TIMEOUT }, + [RSU_BULK_TX_H2C] = { + .type = UE_BULK, + .endpoint = 0x0d, + .direction = UE_DIR_OUT, + .bufsize = RSU_TXBUFSZ, + .flags = { + .ext_buffer = 1, + .pipe_bof = 1, + .short_xfer_ok = 1 + }, + .callback = rsu_bulk_tx_callback_h2c, + .timeout = RSU_TX_TIMEOUT + }, }; static int @@ -891,7 +908,7 @@ rsu_read_rom(struct rsu_softc *sc) static int rsu_fw_cmd(struct rsu_softc *sc, uint8_t code, void *buf, int len) { - const uint8_t which = rsu_wme_ac_xfer_map[WME_AC_VO]; + const uint8_t which = RSU_H2C_ENDPOINT; struct rsu_data *data; struct r92s_tx_desc *txd; struct r92s_fw_cmd_hdr *cmd; @@ -1712,6 +1729,12 @@ rsu_bulk_tx_callback_vi_vo(struct usb_xf rsu_bulk_tx_callback_sub(xfer, error, RSU_BULK_TX_VI_VO); } +static void +rsu_bulk_tx_callback_h2c(struct usb_xfer *xfer, usb_error_t error) +{ + rsu_bulk_tx_callback_sub(xfer, error, RSU_BULK_TX_H2C); +} + static int rsu_tx_start(struct rsu_softc *sc, struct ieee80211_node *ni, struct mbuf *m0, struct rsu_data *data) Modified: head/sys/dev/usb/wlan/if_rsureg.h ============================================================================== --- head/sys/dev/usb/wlan/if_rsureg.h Thu Sep 17 03:13:01 2015 (r287895) +++ head/sys/dev/usb/wlan/if_rsureg.h Thu Sep 17 03:19:09 2015 (r287896) @@ -700,6 +700,7 @@ enum { RSU_BULK_RX, RSU_BULK_TX_BE_BK, /* = WME_AC_BE/BK */ RSU_BULK_TX_VI_VO, /* = WME_AC_VI/VO */ + RSU_BULK_TX_H2C, /* H2C */ RSU_N_TRANSFER, }; From owner-svn-src-head@freebsd.org Thu Sep 17 03:42:19 2015 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 B25969CEC0F; Thu, 17 Sep 2015 03:42:19 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 894731E14; Thu, 17 Sep 2015 03:42:19 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8H3gJHh060866; Thu, 17 Sep 2015 03:42:19 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8H3gJpj060865; Thu, 17 Sep 2015 03:42:19 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509170342.t8H3gJpj060865@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 17 Sep 2015 03:42:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287897 - head/sys/dev/usb/wlan X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 03:42:19 -0000 Author: adrian Date: Thu Sep 17 03:42:18 2015 New Revision: 287897 URL: https://svnweb.freebsd.org/changeset/base/287897 Log: Program the firmware setup stuff with the current hardware setup: * Do 1T1R for now, until we read the config out of ROM and use it. * Disable turbo mode, I dunno what this is, but the linux drivers have this disabled. * Set the firmware endpoints to what we read from USB. Tested: * RTL8712 cut 3, STA mode Modified: head/sys/dev/usb/wlan/if_rsu.c Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Thu Sep 17 03:19:09 2015 (r287896) +++ head/sys/dev/usb/wlan/if_rsu.c Thu Sep 17 03:42:18 2015 (r287897) @@ -363,6 +363,13 @@ rsu_attach(device_t self) iface = usbd_get_iface(sc->sc_udev, 0); sc->sc_nendpoints = iface->idesc->bNumEndpoints; + /* Endpoints are hard-coded for now, so enforce 4-endpoint only */ + if (sc->sc_nendpoints != 4) { + device_printf(sc->sc_dev, + "the driver currently only supports 4-endpoint devices\n"); + return (ENXIO); + } + mtx_init(&sc->sc_mtx, device_get_nameunit(self), MTX_NETWORK_LOCK, MTX_DEF); TIMEOUT_TASK_INIT(taskqueue_thread, &sc->calib_task, 0, @@ -2318,14 +2325,15 @@ rsu_load_firmware(struct rsu_softc *sc) dmem = __DECONST(struct r92s_fw_priv *, &hdr->priv); memset(dmem, 0, sizeof(*dmem)); dmem->hci_sel = R92S_HCI_SEL_USB | R92S_HCI_SEL_8172; - dmem->nendpoints = 0; - dmem->rf_config = 0x12; /* 1T2R */ + dmem->nendpoints = sc->sc_nendpoints; + /* XXX TODO: rf_config should come from ROM */ + dmem->rf_config = 0x11; /* 1T1R */ dmem->vcs_type = R92S_VCS_TYPE_AUTO; dmem->vcs_mode = R92S_VCS_MODE_RTS_CTS; #ifdef notyet dmem->bw40_en = (ic->ic_htcaps & IEEE80211_HTCAP_CBW20_40) != 0; #endif - dmem->turbo_mode = 1; + dmem->turbo_mode = 0; /* Load DMEM section. */ error = rsu_fw_loadsection(sc, (uint8_t *)dmem, sizeof(*dmem)); if (error != 0) { From owner-svn-src-head@freebsd.org Thu Sep 17 04:01:06 2015 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 B52DD9CE305; Thu, 17 Sep 2015 04:01:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 A2B4C14D9; Thu, 17 Sep 2015 04:01:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8H416cB066559; Thu, 17 Sep 2015 04:01:06 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8H416ar066558; Thu, 17 Sep 2015 04:01:06 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509170401.t8H416ar066558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 17 Sep 2015 04:01:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287898 - head/share/mk X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 04:01:06 -0000 Author: bdrewery Date: Thu Sep 17 04:01:05 2015 New Revision: 287898 URL: https://svnweb.freebsd.org/changeset/base/287898 Log: META_MODE: Allow MAKEOBJDIRPREFIX to work more closely to its traditional behavior. The preferred way to modify the object directory root is to use OBJROOT. However, setting OBJROOT to ${MAKEOBJDIRPREFIX}/${SRCTOP}/ effectively behaves as expected. The problem with this before was that setting OBJROOT to contain SRCTOP resulted in a recursive replacement (/usr/obj/usr/obj/usr/src/). Anchoring to the start of the path for replacing SRCCTOP in CURDIR resolves this by avoiding replacing SRCTOP when CURDIR is within the OBJDIR. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/local.meta.sys.mk Modified: head/share/mk/local.meta.sys.mk ============================================================================== --- head/share/mk/local.meta.sys.mk Thu Sep 17 03:42:18 2015 (r287897) +++ head/share/mk/local.meta.sys.mk Thu Sep 17 04:01:05 2015 (r287898) @@ -7,14 +7,13 @@ # we need this until there is an alternative MK_INSTALL_AS_USER= yes -_default_makeobjdir=$${.CURDIR:S,$${SRCTOP},$${OBJTOP},} +_default_makeobjdir=$${.CURDIR:S,^$${SRCTOP},$${OBJTOP},} .if empty(OBJROOT) || ${.MAKE.LEVEL} == 0 .if !make(showconfig) -.if defined(MAKEOBJDIRPREFIX) && exists(${MAKEOBJDIRPREFIX}) -.warning MAKEOBJDIRPREFIX not supported; setting MAKEOBJDIR... +.if defined(MAKEOBJDIRPREFIX) # put things approximately where they want -OBJROOT:=${MAKEOBJDIRPREFIX}${SRCTOP:S,/src,,}/ +OBJROOT:=${MAKEOBJDIRPREFIX}${SRCTOP}/ MAKEOBJDIRPREFIX= .export MAKEOBJDIRPREFIX .endif From owner-svn-src-head@freebsd.org Thu Sep 17 04:22:01 2015 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 6343F9CEE63; Thu, 17 Sep 2015 04:22:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 53A9A10B7; Thu, 17 Sep 2015 04:22:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8H4M1vp079233; Thu, 17 Sep 2015 04:22:01 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8H4M1tn079232; Thu, 17 Sep 2015 04:22:01 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509170422.t8H4M1tn079232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 17 Sep 2015 04:22:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287899 - head/share/mk X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 04:22:01 -0000 Author: bdrewery Date: Thu Sep 17 04:22:00 2015 New Revision: 287899 URL: https://svnweb.freebsd.org/changeset/base/287899 Log: META_MODE: Default OBJROOT to the traditional /usr/src/SRCTOP/. This avoids easily colliding multiple src trees with the same objects. Having multiple checkouts in dir/ dir2/ dir3/ would all use obj/ without any unique identifier inside of obj/. This pattern is more likely to be used due to the non-META_MODE behavior working with it fine. In environments where ../obj/ is wanted as the obj directory the value of OBJROOT can be set to ${SRCTOP:H}/obj/ instead via src-env.conf (set by SRC_ENV_CONF) or environment. For environment it must be single quoted or escaped. This will be more likely for vendors who are building images or using NFS for builds. In those cases MAKEOBJDIRPREFIX may already be utilized and is supported. Discussed with: imp Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/local.meta.sys.mk Modified: head/share/mk/local.meta.sys.mk ============================================================================== --- head/share/mk/local.meta.sys.mk Thu Sep 17 04:01:05 2015 (r287898) +++ head/share/mk/local.meta.sys.mk Thu Sep 17 04:22:00 2015 (r287899) @@ -31,7 +31,7 @@ SB_OBJROOT ?= ${SB}/obj/ # this is what we use below OBJROOT ?= ${SB_OBJROOT} .endif -OBJROOT ?= ${SRCTOP:H}/obj/ +OBJROOT ?= /usr/obj/${SRCTOP}/ .if ${OBJROOT:M*/} != "" OBJROOT:= ${OBJROOT:H:tA}/ .else From owner-svn-src-head@freebsd.org Thu Sep 17 04:43:08 2015 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 B58BF9CE77D; Thu, 17 Sep 2015 04:43:08 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 A357C1A36; Thu, 17 Sep 2015 04:43:08 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8H4h8sJ087365; Thu, 17 Sep 2015 04:43:08 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8H4h8Fw087364; Thu, 17 Sep 2015 04:43:08 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509170443.t8H4h8Fw087364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 17 Sep 2015 04:43:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287900 - head X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 04:43:08 -0000 Author: bdrewery Date: Thu Sep 17 04:43:07 2015 New Revision: 287900 URL: https://svnweb.freebsd.org/changeset/base/287900 Log: Get arm64/aarch64 into 'make targets' output to fix makeman. Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Thu Sep 17 04:22:00 2015 (r287899) +++ head/Makefile Thu Sep 17 04:43:07 2015 (r287900) @@ -382,7 +382,7 @@ kernel-toolchains: # .if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets) # XXX Add arm64 to universe only if we have an external binutils installed. -# It does not build with the in-tree linker. +# It does not build with the in-tree linker. Added to lower .for loops too. .if exists(/usr/local/aarch64-freebsd/bin/ld) UNIVERSE_arm64=arm64 .elif empty(${TARGETS}) @@ -397,7 +397,7 @@ TARGET_ARCHES_arm64?= aarch64 TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 TARGET_ARCHES_powerpc?= powerpc powerpc64 TARGET_ARCHES_pc98?= i386 -.for target in ${TARGETS} +.for target in ${TARGETS} arm64 TARGET_ARCHES_${target}?= ${target} .endfor @@ -410,7 +410,7 @@ KERNSRCDIR?= ${.CURDIR}/sys targets: .PHONY @echo "Supported TARGET/TARGET_ARCH pairs for world and kernel targets" -.for target in ${TARGETS} +.for target in ${TARGETS} arm64 .for target_arch in ${TARGET_ARCHES_${target}} @echo " ${target}/${target_arch}" .endfor From owner-svn-src-head@freebsd.org Thu Sep 17 04:45:30 2015 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 9CE549CE8AA; Thu, 17 Sep 2015 04:45:30 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 80FCC1BDF; Thu, 17 Sep 2015 04:45:30 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8H4jUYc087528; Thu, 17 Sep 2015 04:45:30 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8H4jU2C087527; Thu, 17 Sep 2015 04:45:30 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509170445.t8H4jU2C087527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 17 Sep 2015 04:45:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287901 - head/sys/dev/usb/wlan X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 04:45:30 -0000 Author: adrian Date: Thu Sep 17 04:45:29 2015 New Revision: 287901 URL: https://svnweb.freebsd.org/changeset/base/287901 Log: Bring over the QoS logic from the Linux r92su driver. * the tx descriptor TID is priority, not TID. * the tx descriptor queue id mapping is separate from the TID/priority; rather than just "BE". TODO: * go and re-re-re-verify the queue mappings; the linux and openbsd mappings aren't exactly the same. I need to verify all of this before I try to flip on 11n RX. Modified: head/sys/dev/usb/wlan/if_rsu.c Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Thu Sep 17 04:43:07 2015 (r287900) +++ head/sys/dev/usb/wlan/if_rsu.c Thu Sep 17 04:45:29 2015 (r287901) @@ -425,6 +425,7 @@ rsu_attach(device_t self) IEEE80211_C_BGSCAN | /* Background scan. */ #endif IEEE80211_C_SHPREAMBLE | /* Short preamble supported. */ + IEEE80211_C_WME | /* WME/QoS */ IEEE80211_C_SHSLOT | /* Short slot time supported. */ IEEE80211_C_WPA; /* WPA/RSN. */ @@ -1752,10 +1753,11 @@ rsu_tx_start(struct rsu_softc *sc, struc struct ieee80211_key *k = NULL; struct r92s_tx_desc *txd; uint8_t type; - uint8_t tid = 0; + int prio = 0; uint8_t which; int hasqos; int xferlen; + int qid; RSU_ASSERT_LOCKED(sc); @@ -1776,6 +1778,23 @@ rsu_tx_start(struct rsu_softc *sc, struc } wh = mtod(m0, struct ieee80211_frame *); } + /* If we have QoS then use it */ + /* XXX TODO: mbuf WME/PRI versus TID? */ + if (IEEE80211_QOS_HAS_SEQ(wh)) { + /* Has QoS */ + prio = M_WME_GETAC(m0); + which = rsu_wme_ac_xfer_map[prio]; + hasqos = 1; + } else { + /* Non-QoS TID */ + /* XXX TODO: tid=0 for non-qos TID? */ + which = rsu_wme_ac_xfer_map[WME_AC_BE]; + hasqos = 0; + prio = 0; + } + + qid = rsu_ac2qid[prio]; +#if 0 switch (type) { case IEEE80211_FC0_TYPE_CTL: case IEEE80211_FC0_TYPE_MGT: @@ -1786,7 +1805,7 @@ rsu_tx_start(struct rsu_softc *sc, struc break; } hasqos = 0; - +#endif /* Fill Tx descriptor. */ txd = (struct r92s_tx_desc *)data->buf; memset(txd, 0, sizeof(*txd)); @@ -1797,8 +1816,7 @@ rsu_tx_start(struct rsu_softc *sc, struc R92S_TXDW0_OWN | R92S_TXDW0_FSG | R92S_TXDW0_LSG); txd->txdw1 |= htole32( - SM(R92S_TXDW1_MACID, R92S_MACID_BSS) | - SM(R92S_TXDW1_QSEL, R92S_TXDW1_QSEL_BE)); + SM(R92S_TXDW1_MACID, R92S_MACID_BSS) | SM(R92S_TXDW1_QSEL, qid)); if (!hasqos) txd->txdw1 |= htole32(R92S_TXDW1_NONQOS); #ifdef notyet @@ -1826,9 +1844,9 @@ rsu_tx_start(struct rsu_softc *sc, struc txd->txdw2 |= htole32(R92S_TXDW2_BMCAST); /* * Firmware will use and increment the sequence number for the - * specified TID. + * specified priority. */ - txd->txdw3 |= htole32(SM(R92S_TXDW3_SEQ, tid)); + txd->txdw3 |= htole32(SM(R92S_TXDW3_SEQ, prio)); if (ieee80211_radiotap_active_vap(vap)) { struct rsu_tx_radiotap_header *tap = &sc->sc_txtap; From owner-svn-src-head@freebsd.org Thu Sep 17 04:48:16 2015 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 34B3A9CE9F3; Thu, 17 Sep 2015 04:48:16 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 2544B1E4F; Thu, 17 Sep 2015 04:48:16 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8H4mGjl087871; Thu, 17 Sep 2015 04:48:16 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8H4mGe2087870; Thu, 17 Sep 2015 04:48:16 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509170448.t8H4mGe2087870@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 17 Sep 2015 04:48:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287902 - head X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 04:48:16 -0000 Author: bdrewery Date: Thu Sep 17 04:48:15 2015 New Revision: 287902 URL: https://svnweb.freebsd.org/changeset/base/287902 Log: Let makeman run 'make showconfig' without hitting the aarch64 error. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Sep 17 04:45:29 2015 (r287901) +++ head/Makefile.inc1 Thu Sep 17 04:48:15 2015 (r287902) @@ -330,6 +330,7 @@ CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN # support the target architecture), provide a default cross-binutils prefix. # This allows aarch64 builds, for example, to automatically use the # aarch64-binutils port or package. +.if !make(showconfig) .if !empty(BROKEN_OPTIONS:MBINUTILS_BOOTSTRAP) && \ !defined(CROSS_BINUTILS_PREFIX) CROSS_BINUTILS_PREFIX=/usr/local/${TARGET_ARCH}-freebsd/bin/ @@ -337,6 +338,7 @@ CROSS_BINUTILS_PREFIX=/usr/local/${TARGE .error In-tree binutils does not support the ${TARGET_ARCH} architecture. Install the ${TARGET_ARCH}-binutils port or package or set CROSS_BINUTILS_PREFIX. .endif .endif +.endif XCOMPILERS= CC CXX CPP .for COMPILER in ${XCOMPILERS} From owner-svn-src-head@freebsd.org Thu Sep 17 04:54:50 2015 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 609A79CEDC2; Thu, 17 Sep 2015 04:54:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 37179121A; Thu, 17 Sep 2015 04:54:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8H4soDW091873; Thu, 17 Sep 2015 04:54:50 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8H4soto091872; Thu, 17 Sep 2015 04:54:50 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509170454.t8H4soto091872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 17 Sep 2015 04:54:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287903 - head X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 04:54:50 -0000 Author: bdrewery Date: Thu Sep 17 04:54:49 2015 New Revision: 287903 URL: https://svnweb.freebsd.org/changeset/base/287903 Log: Rework r287900 to keep arm64/aarch64 stable in the TARGETS list. This is relevant for makeman using the 'make targets' output in src.conf(5). This makes a _UNIVERSE_TARGETS that removes arm64 if the build requirements are not met. Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Thu Sep 17 04:48:15 2015 (r287902) +++ head/Makefile Thu Sep 17 04:54:49 2015 (r287903) @@ -381,26 +381,27 @@ kernel-toolchains: # existing system is. # .if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets) -# XXX Add arm64 to universe only if we have an external binutils installed. -# It does not build with the in-tree linker. Added to lower .for loops too. -.if exists(/usr/local/aarch64-freebsd/bin/ld) -UNIVERSE_arm64=arm64 -.elif empty(${TARGETS}) -universe: universe_arm64_skip -universe_epilogue: universe_arm64_skip -universe_arm64_skip: universe_prologue - @echo ">> arm64 skipped - install aarch64-binutils port or package to build" -.endif -TARGETS?=amd64 arm ${UNIVERSE_arm64} i386 mips pc98 powerpc sparc64 +TARGETS?=amd64 arm arm64 i386 mips pc98 powerpc sparc64 +_UNIVERSE_TARGETS= ${TARGETS} TARGET_ARCHES_arm?= arm armeb armv6 armv6hf TARGET_ARCHES_arm64?= aarch64 TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 TARGET_ARCHES_powerpc?= powerpc powerpc64 TARGET_ARCHES_pc98?= i386 -.for target in ${TARGETS} arm64 +.for target in ${TARGETS} TARGET_ARCHES_${target}?= ${target} .endfor +# XXX Add arm64 to universe only if we have an external binutils installed. +# It does not build with the in-tree linker. +.if !exists(/usr/local/aarch64-freebsd/bin/ld) && empty(${TARGETS}) +_UNIVERSE_TARGETS:= ${_UNIVERSE_TARGETS:Narm64} +universe: universe_arm64_skip +universe_epilogue: universe_arm64_skip +universe_arm64_skip: universe_prologue + @echo ">> arm64 skipped - install aarch64-binutils port or package to build" +.endif + .if defined(UNIVERSE_TARGET) MAKE_JUST_WORLDS= YES .else @@ -410,7 +411,7 @@ KERNSRCDIR?= ${.CURDIR}/sys targets: .PHONY @echo "Supported TARGET/TARGET_ARCH pairs for world and kernel targets" -.for target in ${TARGETS} arm64 +.for target in ${TARGETS} .for target_arch in ${TARGET_ARCHES_${target}} @echo " ${target}/${target_arch}" .endfor @@ -432,7 +433,7 @@ universe_prologue: .if defined(DOING_TINDERBOX) @rm -f ${FAILFILE} .endif -.for target in ${TARGETS} +.for target in ${_UNIVERSE_TARGETS} universe: universe_${target} universe_epilogue: universe_${target} universe_${target}: universe_${target}_prologue From owner-svn-src-head@freebsd.org Thu Sep 17 05:01:06 2015 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 131A39CE08C; Thu, 17 Sep 2015 05:01:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 EC31815C0; Thu, 17 Sep 2015 05:01:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8H515eN093906; Thu, 17 Sep 2015 05:01:05 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8H5153c093904; Thu, 17 Sep 2015 05:01:05 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509170501.t8H5153c093904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 17 Sep 2015 05:01:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287904 - in head: share/man/man5 tools/build/options X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 05:01:06 -0000 Author: bdrewery Date: Thu Sep 17 05:01:04 2015 New Revision: 287904 URL: https://svnweb.freebsd.org/changeset/base/287904 Log: Document NO_SILENT for META_MODE. Reword and add some formatting as well. Modified: head/share/man/man5/src.conf.5 head/tools/build/options/WITH_META_MODE Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Thu Sep 17 04:54:49 2015 (r287903) +++ head/share/man/man5/src.conf.5 Thu Sep 17 05:01:04 2015 (r287904) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 284708 2015-06-22 20:21:57Z sjg .\" $FreeBSD$ -.Dd August 16, 2015 +.Dd September 16, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -883,11 +883,17 @@ The meta files can be useful for debuggi .\" from FreeBSD: head/tools/build/options/WITH_META_MODE 284708 2015-06-22 20:21:57Z sjg Enable building in meta mode. .Pp -The build is driven by dirdeps.mk using DIRDEPS stored in +The build is driven by dirdeps.mk using +.Va DIRDEPS +stored in Makefile.depend files found in each directory. .Pp The build can be started from anywhere, and behaves the same. -The initial instance of make recursively reads DIRDEPS from Makefile.depend +The initial instance of +.Xr make 1 +recursively reads +.Va DIRDEPS +from Makefile.depend computing a graph of tree dependencies from the current origin. See http://www.crufty.net/help/sjg/dirdeps.htm .Pp @@ -898,8 +904,13 @@ the command line, as well as any command output. If .Xr filemon 4 -is available the meta file will also capture a record of syscalls -used to produce the target. +is available the meta file will also capture a record of files +used to produce the target by tracking syscalls. +.Pp +The build will hide commands ran unless +.Va NO_SILENT +is defined. +.Pp When set, it also enforces the following options: .Pp .Bl -item -compact Modified: head/tools/build/options/WITH_META_MODE ============================================================================== --- head/tools/build/options/WITH_META_MODE Thu Sep 17 04:54:49 2015 (r287903) +++ head/tools/build/options/WITH_META_MODE Thu Sep 17 05:01:04 2015 (r287904) @@ -1,11 +1,17 @@ .\" $FreeBSD$ Enable building in meta mode. .Pp -The build is driven by dirdeps.mk using DIRDEPS stored in +The build is driven by dirdeps.mk using +.Va DIRDEPS +stored in Makefile.depend files found in each directory. .Pp The build can be started from anywhere, and behaves the same. -The initial instance of make recursively reads DIRDEPS from Makefile.depend +The initial instance of +.Xr make 1 +recursively reads +.Va DIRDEPS +from Makefile.depend computing a graph of tree dependencies from the current origin. See http://www.crufty.net/help/sjg/dirdeps.htm .Pp @@ -16,5 +22,10 @@ the command line, as well as any command output. If .Xr filemon 4 -is available the meta file will also capture a record of syscalls -used to produce the target. +is available the meta file will also capture a record of files +used to produce the target by tracking syscalls. +.Pp +The build will hide commands ran unless +.Va NO_SILENT +is defined. +.Pp From owner-svn-src-head@freebsd.org Thu Sep 17 05:06:38 2015 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 522869CE2B1; Thu, 17 Sep 2015 05:06:38 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 359F5192B; Thu, 17 Sep 2015 05:06:38 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8H56cnG096107; Thu, 17 Sep 2015 05:06:38 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8H56Zoi096094; Thu, 17 Sep 2015 05:06:35 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509170506.t8H56Zoi096094@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 17 Sep 2015 05:06:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287905 - in head: bin/ps lib/libc lib/libsm lib/libxo sbin/ipf/ipftest sbin/savecore usr.bin/netstat usr.bin/procstat usr.bin/wc usr.sbin/yppoll X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 05:06:38 -0000 Author: bdrewery Date: Thu Sep 17 05:06:34 2015 New Revision: 287905 URL: https://svnweb.freebsd.org/changeset/base/287905 Log: Update META_MODE dependencies. Modified: head/bin/ps/Makefile.depend head/lib/libc/Makefile.depend head/lib/libsm/Makefile.depend head/lib/libxo/Makefile.depend head/sbin/ipf/ipftest/Makefile.depend head/sbin/savecore/Makefile.depend head/usr.bin/netstat/Makefile.depend head/usr.bin/procstat/Makefile.depend head/usr.bin/wc/Makefile.depend head/usr.sbin/yppoll/Makefile.depend Modified: head/bin/ps/Makefile.depend ============================================================================== --- head/bin/ps/Makefile.depend Thu Sep 17 05:01:04 2015 (r287904) +++ head/bin/ps/Makefile.depend Thu Sep 17 05:06:34 2015 (r287905) @@ -11,6 +11,7 @@ DIRDEPS = \ lib/libcompiler_rt \ lib/libjail \ lib/libkvm \ + lib/libutil \ lib/libxo \ lib/msun \ Modified: head/lib/libc/Makefile.depend ============================================================================== --- head/lib/libc/Makefile.depend Thu Sep 17 05:01:04 2015 (r287904) +++ head/lib/libc/Makefile.depend Thu Sep 17 05:06:34 2015 (r287905) @@ -126,6 +126,9 @@ jemalloc_mb.po: jemalloc_mb.c jemalloc_mutex.So: jemalloc_mutex.c jemalloc_mutex.o: jemalloc_mutex.c jemalloc_mutex.po: jemalloc_mutex.c +jemalloc_pages.So: jemalloc_pages.c +jemalloc_pages.o: jemalloc_pages.c +jemalloc_pages.po: jemalloc_pages.c jemalloc_prof.So: jemalloc_prof.c jemalloc_prof.o: jemalloc_prof.c jemalloc_prof.po: jemalloc_prof.c Modified: head/lib/libsm/Makefile.depend ============================================================================== --- head/lib/libsm/Makefile.depend Thu Sep 17 05:01:04 2015 (r287904) +++ head/lib/libsm/Makefile.depend Thu Sep 17 05:06:34 2015 (r287905) @@ -83,8 +83,6 @@ mpeix.o: sm_os.h mpeix.po: sm_os.h niprop.o: sm_os.h niprop.po: sm_os.h -path.o: sm_os.h -path.po: sm_os.h put.o: sm_os.h put.po: sm_os.h refill.o: sm_os.h Modified: head/lib/libxo/Makefile.depend ============================================================================== --- head/lib/libxo/Makefile.depend Thu Sep 17 05:01:04 2015 (r287904) +++ head/lib/libxo/Makefile.depend Thu Sep 17 05:06:34 2015 (r287905) @@ -9,6 +9,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libutil \ usr.bin/xinstall.host \ Modified: head/sbin/ipf/ipftest/Makefile.depend ============================================================================== --- head/sbin/ipf/ipftest/Makefile.depend Thu Sep 17 05:01:04 2015 (r287904) +++ head/sbin/ipf/ipftest/Makefile.depend Thu Sep 17 05:06:34 2015 (r287905) @@ -25,8 +25,10 @@ ipf_l.o: ipf_y.h ipf_l.po: ipf_l.c ipf_l.po: ipf_l.h ipf_l.po: ipf_y.h +ipf_y.o: ipf.tab.c ipf_y.o: ipf_l.h ipf_y.o: ipf_y.c +ipf_y.po: ipf.tab.c ipf_y.po: ipf_l.h ipf_y.po: ipf_y.c ipnat_l.o: ipnat_l.c @@ -35,8 +37,10 @@ ipnat_l.o: ipnat_y.h ipnat_l.po: ipnat_l.c ipnat_l.po: ipnat_l.h ipnat_l.po: ipnat_y.h +ipnat_y.o: ipnat.tab.c ipnat_y.o: ipnat_l.h ipnat_y.o: ipnat_y.c +ipnat_y.po: ipnat.tab.c ipnat_y.po: ipnat_l.h ipnat_y.po: ipnat_y.c ippool_l.o: ippool_l.c @@ -45,8 +49,10 @@ ippool_l.o: ippool_y.h ippool_l.po: ippool_l.c ippool_l.po: ippool_l.h ippool_l.po: ippool_y.h +ippool_y.o: ippool.tab.c ippool_y.o: ippool_l.h ippool_y.o: ippool_y.c +ippool_y.po: ippool.tab.c ippool_y.po: ippool_l.h ippool_y.po: ippool_y.c .endif Modified: head/sbin/savecore/Makefile.depend ============================================================================== --- head/sbin/savecore/Makefile.depend Thu Sep 17 05:01:04 2015 (r287904) +++ head/sbin/savecore/Makefile.depend Thu Sep 17 05:06:34 2015 (r287905) @@ -9,6 +9,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libutil \ lib/libxo \ lib/libz \ Modified: head/usr.bin/netstat/Makefile.depend ============================================================================== --- head/usr.bin/netstat/Makefile.depend Thu Sep 17 05:01:04 2015 (r287904) +++ head/usr.bin/netstat/Makefile.depend Thu Sep 17 05:06:34 2015 (r287905) @@ -21,4 +21,14 @@ DIRDEPS = \ .if ${DEP_RELDIR} == ${_DEP_RELDIR} # local dependencies - needed for -jN in clean tree +main.o: nl_defs.h +main.po: nl_defs.h +mroute.o: nl_defs.h +mroute.po: nl_defs.h +netisr.o: nl_defs.h +netisr.po: nl_defs.h +nl_symbols.o: nl_symbols.c +nl_symbols.po: nl_symbols.c +route.o: nl_defs.h +route.po: nl_defs.h .endif Modified: head/usr.bin/procstat/Makefile.depend ============================================================================== --- head/usr.bin/procstat/Makefile.depend Thu Sep 17 05:01:04 2015 (r287904) +++ head/usr.bin/procstat/Makefile.depend Thu Sep 17 05:06:34 2015 (r287905) @@ -13,7 +13,9 @@ DIRDEPS = \ lib/libelf \ lib/libkvm \ lib/libprocstat \ + lib/libsbuf \ lib/libutil \ + lib/libxo \ .include Modified: head/usr.bin/wc/Makefile.depend ============================================================================== --- head/usr.bin/wc/Makefile.depend Thu Sep 17 05:01:04 2015 (r287904) +++ head/usr.bin/wc/Makefile.depend Thu Sep 17 05:06:34 2015 (r287905) @@ -9,6 +9,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libutil \ lib/libxo \ Modified: head/usr.sbin/yppoll/Makefile.depend ============================================================================== --- head/usr.sbin/yppoll/Makefile.depend Thu Sep 17 05:01:04 2015 (r287904) +++ head/usr.sbin/yppoll/Makefile.depend Thu Sep 17 05:06:34 2015 (r287905) @@ -5,6 +5,7 @@ DIRDEPS = \ gnu/lib/csu \ gnu/lib/libgcc \ include \ + include/arpa \ include/rpc \ include/rpcsvc \ include/xlocale \ From owner-svn-src-head@freebsd.org Thu Sep 17 05:07:39 2015 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 C67F59CE339; Thu, 17 Sep 2015 05:07:39 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 B41CE1A91; Thu, 17 Sep 2015 05:07:39 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8H57ddl096193; Thu, 17 Sep 2015 05:07:39 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8H57dvd096192; Thu, 17 Sep 2015 05:07:39 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509170507.t8H57dvd096192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 17 Sep 2015 05:07:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287906 - head/share/man/man5 X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 05:07:39 -0000 Author: bdrewery Date: Thu Sep 17 05:07:39 2015 New Revision: 287906 URL: https://svnweb.freebsd.org/changeset/base/287906 Log: Regenerate Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Thu Sep 17 05:06:34 2015 (r287905) +++ head/share/man/man5/src.conf.5 Thu Sep 17 05:07:39 2015 (r287906) @@ -327,6 +327,8 @@ When set, it also enforces the following .It .Va WITHOUT_CLANG_BOOTSTRAP .It +.Va WITHOUT_ELFTOOLCHAIN_BOOTSTRAP +.It .Va WITHOUT_GCC_BOOTSTRAP .El .It Va WITHOUT_CRYPT @@ -880,7 +882,7 @@ and related support files. Create meta files during non META_MODE build. The meta files can be useful for debugging. .It Va WITH_META_MODE -.\" from FreeBSD: head/tools/build/options/WITH_META_MODE 284708 2015-06-22 20:21:57Z sjg +.\" from FreeBSD: head/tools/build/options/WITH_META_MODE 287904 2015-09-17 05:01:04Z bdrewery Enable building in meta mode. .Pp The build is driven by dirdeps.mk using From owner-svn-src-head@freebsd.org Thu Sep 17 06:07:50 2015 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 7F8379CE0D4; Thu, 17 Sep 2015 06:07:50 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 704E6125B; Thu, 17 Sep 2015 06:07:50 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8H67oKw021142; Thu, 17 Sep 2015 06:07:50 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8H67ov3021141; Thu, 17 Sep 2015 06:07:50 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201509170607.t8H67ov3021141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 17 Sep 2015 06:07:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287907 - head/sys/mips/atheros X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 06:07:50 -0000 Author: bz Date: Thu Sep 17 06:07:49 2015 New Revision: 287907 URL: https://svnweb.freebsd.org/changeset/base/287907 Log: Remove unused variable leading to compile errors. Modified: head/sys/mips/atheros/ar71xx_pci.c Modified: head/sys/mips/atheros/ar71xx_pci.c ============================================================================== --- head/sys/mips/atheros/ar71xx_pci.c Thu Sep 17 05:07:39 2015 (r287906) +++ head/sys/mips/atheros/ar71xx_pci.c Thu Sep 17 06:07:49 2015 (r287907) @@ -377,7 +377,6 @@ ar71xx_pci_probe(device_t dev) static int ar71xx_pci_attach(device_t dev) { - int busno = 0; int rid = 0; struct ar71xx_pci_softc *sc = device_get_softc(dev); From owner-svn-src-head@freebsd.org Thu Sep 17 07:01:41 2015 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 CD0C19CECBB; Thu, 17 Sep 2015 07:01:41 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 BE3F71B9A; Thu, 17 Sep 2015 07:01:41 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8H71fNo045156; Thu, 17 Sep 2015 07:01:41 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8H71fmU045155; Thu, 17 Sep 2015 07:01:41 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201509170701.t8H71fmU045155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 17 Sep 2015 07:01:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287908 - head X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 07:01:41 -0000 Author: jkim Date: Thu Sep 17 07:01:40 2015 New Revision: 287908 URL: https://svnweb.freebsd.org/changeset/base/287908 Log: Remove an entry. It was re-added in r287780. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Sep 17 06:07:49 2015 (r287907) +++ head/ObsoleteFiles.inc Thu Sep 17 07:01:40 2015 (r287908) @@ -483,8 +483,6 @@ OLD_FILES+=usr/share/man/man9/splstatclo OLD_FILES+=usr/share/man/man9/spltty.9.gz OLD_FILES+=usr/share/man/man9/splvm.9.gz OLD_FILES+=usr/share/man/man9/splx.9.gz -# 20150122: callout changes reverted -OLD_FILES+=usr/share/man/man9/callout_drain_async.9.gz # 20150118: toeplitz.c moved from netinet to net OLD_FILES+=usr/include/netinet/toeplitz.h # 20150118: new clang import which bumps version from 3.5.0 to 3.5.1. From owner-svn-src-head@freebsd.org Thu Sep 17 07:04:16 2015 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 AF5669CEDCE; Thu, 17 Sep 2015 07:04:16 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 A06091D63; Thu, 17 Sep 2015 07:04:16 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8H74GXP045301; Thu, 17 Sep 2015 07:04:16 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8H74GDW045300; Thu, 17 Sep 2015 07:04:16 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509170704.t8H74GDW045300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 17 Sep 2015 07:04:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287909 - head/sys/dev/usb/wlan X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 07:04:16 -0000 Author: adrian Date: Thu Sep 17 07:04:15 2015 New Revision: 287909 URL: https://svnweb.freebsd.org/changeset/base/287909 Log: .. oops, flip on QoS. Modified: head/sys/dev/usb/wlan/if_rsu.c Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Thu Sep 17 07:01:40 2015 (r287908) +++ head/sys/dev/usb/wlan/if_rsu.c Thu Sep 17 07:04:15 2015 (r287909) @@ -2352,6 +2352,7 @@ rsu_load_firmware(struct rsu_softc *sc) dmem->bw40_en = (ic->ic_htcaps & IEEE80211_HTCAP_CBW20_40) != 0; #endif dmem->turbo_mode = 0; + dmem->qos_en = 1; /* Load DMEM section. */ error = rsu_fw_loadsection(sc, (uint8_t *)dmem, sizeof(*dmem)); if (error != 0) { From owner-svn-src-head@freebsd.org Thu Sep 17 07:18:56 2015 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 5F0489CE528; Thu, 17 Sep 2015 07:18:56 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (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 261E71270; Thu, 17 Sep 2015 07:18:56 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 27FCE1FE023; Thu, 17 Sep 2015 09:18:54 +0200 (CEST) Subject: Re: svn commit: r287780 - in head: share/man/man9 sys/kern sys/sys To: Gleb Smirnoff References: <201509141052.t8EAqRWf008293@repo.freebsd.org> <20150916220559.GS1023@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: <55FA69BD.10507@selasky.org> Date: Thu, 17 Sep 2015 09:20:29 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <20150916220559.GS1023@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 17 Sep 2015 07:18:56 -0000 On 09/17/15 00:05, Gleb Smirnoff wrote: > Weren't you explicitly asked not to touch this system without a proper > review and discussion? Adding a new function is not touching code. --HPS From owner-svn-src-head@freebsd.org Thu Sep 17 07:28:27 2015 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 9A9239CE912; Thu, 17 Sep 2015 07:28:27 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (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 5A79A180B; Thu, 17 Sep 2015 07:28:27 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 484AC1FE023; Thu, 17 Sep 2015 09:28:25 +0200 (CEST) Subject: Re: svn commit: r287780 - in head: share/man/man9 sys/kern sys/sys To: Randall Stewart References: <201509141052.t8EAqRWf008293@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: <55FA6BF8.3030201@selasky.org> Date: Thu, 17 Sep 2015 09:30:00 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 17 Sep 2015 07:28:27 -0000 On 09/16/15 22:54, Randall Stewart wrote: > Hans: > > By outside prompting, I have finally had a chance to look at this: > > What it appears you do here is: > > a) stop the callout, not paying attention to if it stopped or not. > b) Then get the callout systems lock and check if your callout is up and running, storing that in your > retval. Where 1 is it was running, and 0 is no it was not running. > c) Assuming that your callout is running. > 1) assert the user has the lock (if its a mtx associated lock), which means the callout is blocked on you finishing this. > 2) change the nature of the callout so that it will return-unlocked (no matter what the caller thought he set in his callout). Hi Randall, 2) I didn't want to touch the callout code, so this is the only way to do it without changing anything. You can complete the callout_async_drain() function which I believe you have promised to do? > 3) Start a timeout using this same callout that calls the function (async drain function) that the user supplied *instead* of > the original callout. 3) Starting a callout after callout_async_drain() is not supported currently, except for MP-SAFE callouts (c_lock == NULL). > Now this is *not* how I would have done it and I question c.2 especially. I don’t think > you should be changing the nature of the callout and its lock. Right, but that requires changes inside the callout_process() to handle a lock-less call to the destructor and I don't want to touch those parts. > Overall I really doubt this will work well since the callout that you start will call to the user > function that says “I am done with the callout memory.. which is usually what you want this async-drain for” but > using the very memory that you want to free for the callout. This is exactly what's being done in the TCP stack currently. No complaints about that! The callout is not touched after the callback completion. All variables are copied to the stack beforehand. That's why we cannot have c_lock unequal to NULL, and must clear it and set CALLOUT returnulocked, else the a lock which might be inside freed memory will be unlocked. > I wonder how tested this code is? I've run the code through various tests over here, and it works like expected. > I would think one would be better off having a way to set a callback if you are trying to stop and drain-async > that the actual callout code itself calls to say “I am done”.. not this interesting recursive use > of the callout itself. Right. That part I've reserved for you, hence it involves touching the callout code! What we've got now is simply a replacement (factor out) for some code which is currently inside the TCP stack. Thank you for your time reviewing this Randall. --HPS From owner-svn-src-head@freebsd.org Thu Sep 17 07:30:14 2015 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 796059CEA3C; Thu, 17 Sep 2015 07:30:14 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (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 3EA95199E; Thu, 17 Sep 2015 07:30:13 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 9F2491FE023; Thu, 17 Sep 2015 09:30:11 +0200 (CEST) Subject: Re: svn commit: r287892 - head/sys/dev/usb/wlan To: Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201509170301.t8H31KdP042687@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <55FA6C62.6010705@selasky.org> Date: Thu, 17 Sep 2015 09:31:46 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <201509170301.t8H31KdP042687@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 17 Sep 2015 07:30:14 -0000 On 09/17/15 05:01, Adrian Chadd wrote: > Author: adrian > Date: Thu Sep 17 03:01:19 2015 > New Revision: 287892 > URL: https://svnweb.freebsd.org/changeset/base/287892 > > Log: > Use DELAY() rather than usb_pause_mtx() - the latter releases the lock > before waiting, which prevents the lock from really acting like > a hardware serialiser. Sigh. > > Modified: > head/sys/dev/usb/wlan/if_rsu.c > This cause a lot more CPU to be burnt. Is there no other way to fix this? Using an SX lock? --HPS From owner-svn-src-head@freebsd.org Thu Sep 17 07:39:49 2015 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 B33D49CEFC7; Thu, 17 Sep 2015 07:39:49 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (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 7BC941EF2; Thu, 17 Sep 2015 07:39:49 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id A698B1FE023; Thu, 17 Sep 2015 09:39:47 +0200 (CEST) Subject: Re: svn commit: r287892 - head/sys/dev/usb/wlan To: Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201509170301.t8H31KdP042687@repo.freebsd.org> <55FA6C62.6010705@selasky.org> From: Hans Petter Selasky Message-ID: <55FA6EA2.8050809@selasky.org> Date: Thu, 17 Sep 2015 09:41:22 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <55FA6C62.6010705@selasky.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 17 Sep 2015 07:39:49 -0000 On 09/17/15 09:31, Hans Petter Selasky wrote: > On 09/17/15 05:01, Adrian Chadd wrote: >> Author: adrian >> Date: Thu Sep 17 03:01:19 2015 >> New Revision: 287892 >> URL: https://svnweb.freebsd.org/changeset/base/287892 >> >> Log: >> Use DELAY() rather than usb_pause_mtx() - the latter releases the lock >> before waiting, which prevents the lock from really acting like >> a hardware serialiser. Sigh. >> >> Modified: >> head/sys/dev/usb/wlan/if_rsu.c >> > > This cause a lot more CPU to be burnt. Is there no other way to fix > this? Using an SX lock? > > --HPS > This will not help anything, because at every control request the same lock is dropped again. You need to add an SX lock there, and should revert this pause->DELAY change :-( --HPS From owner-svn-src-head@freebsd.org Thu Sep 17 07:43:24 2015 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 4FBF19CE394; Thu, 17 Sep 2015 07:43:24 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x235.google.com (mail-ig0-x235.google.com [IPv6:2607:f8b0:4001:c05::235]) (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 19D1012D9; Thu, 17 Sep 2015 07:43:24 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igxx6 with SMTP id x6so8516138igx.1; Thu, 17 Sep 2015 00:43:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=yMimR/kZJ4Yy+Z1dIHe7xqEirjYhwT9jRzkCE3PjcCA=; b=a3m2tyyL7PxM4lRl9VANzqJVzIRg8kSrsK2XJZ2r2Q06E68v5IUD7EyZzWIHrkMXUj 7ueM43P9B3n/no5qEHYFuFTzMUayREYXEKmB5BhdrQQ3kN2JgioYjtooC75cTW+z58YC tIzlrPSOLJn/VheRRCdf2cnbbtuvG/Coz59ih7A2zr+Ji63LOl54OJ9GFVdEgkWHHQi/ gqNss5g8UPxy+00QniXNoZj7e0aJzQPUPbOMC/eMBk58PCKQdxLlaF87/7+DOurf/Wg4 y4bvLew/e+JBcowh34g0D58oHyP3X3klN16SL6B+6HHMFti07WxSiIML1eiqXrD+Zo+M vh0Q== MIME-Version: 1.0 X-Received: by 10.50.1.44 with SMTP id 12mr21921325igj.61.1442475803344; Thu, 17 Sep 2015 00:43:23 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.28.208 with HTTP; Thu, 17 Sep 2015 00:43:23 -0700 (PDT) In-Reply-To: <55FA6EA2.8050809@selasky.org> References: <201509170301.t8H31KdP042687@repo.freebsd.org> <55FA6C62.6010705@selasky.org> <55FA6EA2.8050809@selasky.org> Date: Thu, 17 Sep 2015 00:43:23 -0700 X-Google-Sender-Auth: jMEx-EZK3X-hIDEWu6V5CpN_Dsc Message-ID: Subject: Re: svn commit: r287892 - head/sys/dev/usb/wlan From: Adrian Chadd To: Hans Petter Selasky Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 17 Sep 2015 07:43:24 -0000 .. I'm likely going to do exactly that as part of "making" if_rsu do 11n and behave correctly. Right now it does neither. But this is a pretty big design pattern flaw; all of the wifi drivers use the usb library like this and .. well, unless you look under the hood, you don't really realise that serialiser lock is being dropped for you... :( -a On 17 September 2015 at 00:41, Hans Petter Selasky wrote: > On 09/17/15 09:31, Hans Petter Selasky wrote: >> >> On 09/17/15 05:01, Adrian Chadd wrote: >>> >>> Author: adrian >>> Date: Thu Sep 17 03:01:19 2015 >>> New Revision: 287892 >>> URL: https://svnweb.freebsd.org/changeset/base/287892 >>> >>> Log: >>> Use DELAY() rather than usb_pause_mtx() - the latter releases the lock >>> before waiting, which prevents the lock from really acting like >>> a hardware serialiser. Sigh. >>> >>> Modified: >>> head/sys/dev/usb/wlan/if_rsu.c >>> >> >> This cause a lot more CPU to be burnt. Is there no other way to fix >> this? Using an SX lock? >> >> --HPS >> > > This will not help anything, because at every control request the same lock > is dropped again. You need to add an SX lock there, and should revert this > pause->DELAY change :-( > > --HPS > From owner-svn-src-head@freebsd.org Thu Sep 17 07:52:25 2015 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 C61FD9CE829; Thu, 17 Sep 2015 07:52:25 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (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 8A7201A3E; Thu, 17 Sep 2015 07:52:25 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id ADB4E1FE023; Thu, 17 Sep 2015 09:52:23 +0200 (CEST) Subject: Re: svn commit: r287892 - head/sys/dev/usb/wlan To: Adrian Chadd References: <201509170301.t8H31KdP042687@repo.freebsd.org> <55FA6C62.6010705@selasky.org> <55FA6EA2.8050809@selasky.org> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Hans Petter Selasky Message-ID: <55FA7196.40004@selasky.org> Date: Thu, 17 Sep 2015 09:53:58 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 17 Sep 2015 07:52:25 -0000 Hi Adrian, On 09/17/15 09:43, Adrian Chadd wrote: > .. I'm likely going to do exactly that as part of "making" if_rsu do > 11n and behave correctly. Right now it does neither. Thank you for helping out with the USB WLAN drivers. Yes, USB requests sleep and don't spin until they're done. > > But this is a pretty big design pattern flaw; all of the wifi drivers > use the usb library like this and .. well, unless you look under the > hood, you don't really realise that serialiser lock is being dropped > for you... :( Right. If you need any help test, code or review, let me know. Not dropping the mutex inside USB sleeping functions would force all USB drivers to use SX locks or lower in the locking hierherachy, for synchronization, which would not be so good. --HPS From owner-svn-src-head@freebsd.org Thu Sep 17 08:15:41 2015 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 915039C26F0; Thu, 17 Sep 2015 08:15:41 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 85E5311F5; Thu, 17 Sep 2015 08:15:41 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 8477F1F16; Thu, 17 Sep 2015 08:15:41 +0000 (UTC) Date: Thu, 17 Sep 2015 08:15:41 +0000 From: Alexey Dokuchaev To: Steven Hartland Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r287886 - head/sys/sys Message-ID: <20150917081541.GA65088@FreeBSD.org> References: <201509170003.t8H03uSf070155@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201509170003.t8H03uSf070155@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 17 Sep 2015 08:15:41 -0000 On Thu, Sep 17, 2015 at 12:03:56AM +0000, Steven Hartland wrote: > New Revision: 287886 > URL: https://svnweb.freebsd.org/changeset/base/287886 > > Log: > Fix kqueue write events for files > 2GB > > Due to the use of int's for file offsets in the VOP_WRITE_(PRE|POST) > macros, kqueue write events for files greater 2GB where never fired. > > This caused tail -f on a file greater 2GB to never see updates. Oh that's an embarrassing bug. > MFC after: 1 week Would you also consider merging to stable/8? Thanks, ./danfe From owner-svn-src-head@freebsd.org Thu Sep 17 09:07:46 2015 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 681FA9CD47D; Thu, 17 Sep 2015 09:07:46 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cloud.theravensnest.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F83B1B2E; Thu, 17 Sep 2015 09:07:45 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from [192.168.0.7] (cpc16-cmbg15-2-0-cust60.5-4.cable.virginm.net [86.5.162.61]) (authenticated bits=0) by theravensnest.org (8.15.2/8.15.2) with ESMTPSA id t8H97f0v049069 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 17 Sep 2015 09:07:42 GMT (envelope-from theraven@FreeBSD.org) X-Authentication-Warning: theravensnest.org: Host cpc16-cmbg15-2-0-cust60.5-4.cable.virginm.net [86.5.162.61] claimed to be [192.168.0.7] Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Subject: Re: svn commit: r287780 - in head: share/man/man9 sys/kern sys/sys From: David Chisnall In-Reply-To: <55FA69BD.10507@selasky.org> Date: Thu, 17 Sep 2015 10:07:35 +0100 Cc: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <0952027A-5276-487D-99B8-74747B0EEF5D@FreeBSD.org> References: <201509141052.t8EAqRWf008293@repo.freebsd.org> <20150916220559.GS1023@FreeBSD.org> <55FA69BD.10507@selasky.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.2102) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 17 Sep 2015 09:07:46 -0000 On 17 Sep 2015, at 08:20, Hans Petter Selasky wrote: >=20 > On 09/17/15 00:05, Gleb Smirnoff wrote: >> Weren't you explicitly asked not to touch this system without a = proper >> review and discussion? >=20 > Adding a new function is not touching code. Adding a new interface to an existing core subsystem is most definitely = touching the system. I would expect *anyone* making a change like this = to have both the design and code reviewed for sanity checking. For = someone who has already been required to have explicit review of any = changes to the subsystem to skip this step shows a flagrant disregard = for the project=92s policies and best practices. David From owner-svn-src-head@freebsd.org Thu Sep 17 09:37:40 2015 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 A84399CE52B; Thu, 17 Sep 2015 09:37:40 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (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 6B2061977; Thu, 17 Sep 2015 09:37:39 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 835CA1FE023; Thu, 17 Sep 2015 11:37:36 +0200 (CEST) Subject: Re: svn commit: r287780 - in head: share/man/man9 sys/kern sys/sys To: David Chisnall References: <201509141052.t8EAqRWf008293@repo.freebsd.org> <20150916220559.GS1023@FreeBSD.org> <55FA69BD.10507@selasky.org> <0952027A-5276-487D-99B8-74747B0EEF5D@FreeBSD.org> Cc: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: <55FA8A3F.4000005@selasky.org> Date: Thu, 17 Sep 2015 11:39:11 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <0952027A-5276-487D-99B8-74747B0EEF5D@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 17 Sep 2015 09:37:40 -0000 On 09/17/15 11:07, David Chisnall wrote: > On 17 Sep 2015, at 08:20, Hans Petter Selasky wrote: >> >> On 09/17/15 00:05, Gleb Smirnoff wrote: >>> Weren't you explicitly asked not to touch this system without a proper >>> review and discussion? >> >> Adding a new function is not touching code. > > Adding a new interface to an existing core subsystem is most definitely touching the system. I would expect *anyone* making a change like this to have both the design and code reviewed for sanity checking. > For someone who has already been required to have explicit review of any changes to the subsystem to skip this step shows a flagrant disregard for the project’s policies and best practices. David, My patch is _not_ touching the existing callout system. It's touching the callout API. Maybe my understanding of touching is different than yours. You can voice your conserns in phabricator please, isn't that why we have Phabricator? https://reviews.freebsd.org/D3521 The differential review has been out for 14 days with relevant people like rss on the reviewers list, and no conserns were raised. Only manual page comments from wblock, and those were addressed. I will refer to a well known saying, that whoever tier agree. It is a bit late to shout now. David, I think phabricator allows filtering so that all commits which touch sys/kern gets your subscription. At least wblock was automatically subscribed because of updating some manual pages. I think that's the way to go. Let's end this discussion here and move it somewhere else. --HPS From owner-svn-src-head@freebsd.org Thu Sep 17 11:59:11 2015 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 92F579CE7BE for ; Thu, 17 Sep 2015 11:59:11 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) (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 3205817B5 for ; Thu, 17 Sep 2015 11:59:10 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by wicfx3 with SMTP id fx3so20449883wic.1 for ; Thu, 17 Sep 2015 04:59:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=v7xRfsruzQTeXbKAvB1qPC3AHHdukJdMRAbb4doUhuQ=; b=gvO/iaezXihKu+PWwBK+qRMt6aWm/nJjnoMcKnA9ucwr3C1O14qfEv9oglBDkLtl1r G30ZONI579/irvGx0XlOvB2/RKoYb2nr2HjmtkdxN3aUC2h+NMmQGxVDNFD51RMW75gy 764Skg+3Odn5zXK+eZ4IFiC3STlZmPdIl2iLTaaNr2yVTU9vOEc7fYMs11qGccUa4lcA KvkvxRFf1UQ28tC0ZsebHqb22/UHUVYRAy0/IeY7P70AZkTeYCk8Q1LFDO8KsO9Nm9ex uZinAA+ry64yv1hUf2N6Qkkt8GvnRCYGaHUg+Z4JrAn7NUoanJ62QXkKHK/LlztL9YPJ dUIw== X-Gm-Message-State: ALoCoQliFfTxMDNy78aQf4Bgp3C0wz041PmXTszZJ8cN/Py4XP/YY9MSO0mRO4N2/8l8R+Ltn2LL X-Received: by 10.194.122.66 with SMTP id lq2mr62396379wjb.156.1442491148701; Thu, 17 Sep 2015 04:59:08 -0700 (PDT) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by smtp.gmail.com with ESMTPSA id cx3sm3046300wjc.27.2015.09.17.04.59.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Sep 2015 04:59:07 -0700 (PDT) From: Steven Hartland X-Google-Original-From: Steven Hartland Subject: Re: svn commit: r287886 - head/sys/sys To: Alexey Dokuchaev References: <201509170003.t8H03uSf070155@repo.freebsd.org> <20150917081541.GA65088@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <55FAAB03.2090409@freebsd.org> Date: Thu, 17 Sep 2015 12:58:59 +0100 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150917081541.GA65088@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 17 Sep 2015 11:59:11 -0000 On 17/09/2015 09:15, Alexey Dokuchaev wrote: > On Thu, Sep 17, 2015 at 12:03:56AM +0000, Steven Hartland wrote: >> New Revision: 287886 >> URL: https://svnweb.freebsd.org/changeset/base/287886 >> >> Log: >> Fix kqueue write events for files > 2GB >> >> Due to the use of int's for file offsets in the VOP_WRITE_(PRE|POST) >> macros, kqueue write events for files greater 2GB where never fired. >> >> This caused tail -f on a file greater 2GB to never see updates. > Oh that's an embarrassing bug. > >> MFC after: 1 week > Would you also consider merging to stable/8? Thanks, > > ./danfe 8 isn't supported any more but the patch should apply to stable/8 sources if you maintain your own branch of it. Regards Steve From owner-svn-src-head@freebsd.org Thu Sep 17 12:04:42 2015 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 4BE829CE07E; Thu, 17 Sep 2015 12:04:42 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 3CBE71F17; Thu, 17 Sep 2015 12:04:42 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HC4gBJ067728; Thu, 17 Sep 2015 12:04:42 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HC4fuY067726; Thu, 17 Sep 2015 12:04:41 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201509171204.t8HC4fuY067726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 17 Sep 2015 12:04:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287911 - head/sys/mips/atheros X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 12:04:42 -0000 Author: bz Date: Thu Sep 17 12:04:41 2015 New Revision: 287911 URL: https://svnweb.freebsd.org/changeset/base/287911 Log: Remove more unused variables leading to compile time errors. Modified: head/sys/mips/atheros/ar724x_pci.c head/sys/mips/atheros/qca955x_pci.c Modified: head/sys/mips/atheros/ar724x_pci.c ============================================================================== --- head/sys/mips/atheros/ar724x_pci.c Thu Sep 17 08:54:49 2015 (r287910) +++ head/sys/mips/atheros/ar724x_pci.c Thu Sep 17 12:04:41 2015 (r287911) @@ -369,7 +369,6 @@ static int ar724x_pci_attach(device_t dev) { struct ar71xx_pci_softc *sc = device_get_softc(dev); - int busno = 0; int rid = 0; sc->sc_mem_rman.rm_type = RMAN_ARRAY; Modified: head/sys/mips/atheros/qca955x_pci.c ============================================================================== --- head/sys/mips/atheros/qca955x_pci.c Thu Sep 17 08:54:49 2015 (r287910) +++ head/sys/mips/atheros/qca955x_pci.c Thu Sep 17 12:04:41 2015 (r287911) @@ -272,7 +272,6 @@ qca955x_pci_attach(device_t dev) { struct ar71xx_pci_softc *sc = device_get_softc(dev); int unit = device_get_unit(dev); - int busno = 0; int rid = 0; /* Dirty; maybe these could all just be hints */ From owner-svn-src-head@freebsd.org Thu Sep 17 12:52:20 2015 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 7257A9CF8A2; Thu, 17 Sep 2015 12:52:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 62C451847; Thu, 17 Sep 2015 12:52:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HCqKvt088004; Thu, 17 Sep 2015 12:52:20 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HCqJkn088000; Thu, 17 Sep 2015 12:52:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509171252.t8HCqJkn088000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 17 Sep 2015 12:52:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287912 - head/sys/cam/ctl X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 12:52:20 -0000 Author: mav Date: Thu Sep 17 12:52:18 2015 New Revision: 287912 URL: https://svnweb.freebsd.org/changeset/base/287912 Log: Report proper medium error code for VERIFY commands. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_backend_block.c head/sys/cam/ctl/ctl_error.c head/sys/cam/ctl/ctl_error.h Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Thu Sep 17 12:04:41 2015 (r287911) +++ head/sys/cam/ctl/ctl.c Thu Sep 17 12:52:18 2015 (r287912) @@ -12046,7 +12046,9 @@ ctl_inject_error(struct ctl_lun *lun, un ctl_set_aborted(&io->scsiio); break; case CTL_LUN_INJ_MEDIUM_ERR: - ctl_set_medium_error(&io->scsiio); + ctl_set_medium_error(&io->scsiio, + (io->io_hdr.flags & CTL_FLAG_DATA_MASK) != + CTL_FLAG_DATA_OUT); break; case CTL_LUN_INJ_UA: /* 29h/00h POWER ON, RESET, OR BUS DEVICE RESET Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Thu Sep 17 12:04:41 2015 (r287911) +++ head/sys/cam/ctl/ctl_backend_block.c Thu Sep 17 12:52:18 2015 (r287912) @@ -542,8 +542,10 @@ ctl_be_block_biodone(struct bio *bio) ctl_set_internal_failure(&io->scsiio, /*sks_valid*/ 1, /*retry_count*/ 0xbad2); - } else - ctl_set_medium_error(&io->scsiio); + } else { + ctl_set_medium_error(&io->scsiio, + beio->bio_cmd == BIO_READ); + } ctl_complete_beio(beio); return; } @@ -758,17 +760,14 @@ ctl_be_block_dispatch_file(struct ctl_be * return the I/O to the user. */ if (error != 0) { - char path_str[32]; - - ctl_scsi_path_string(io, path_str, sizeof(path_str)); - printf("%s%s command returned errno %d\n", path_str, - (beio->bio_cmd == BIO_READ) ? "READ" : "WRITE", error); if (error == ENOSPC || error == EDQUOT) { ctl_set_space_alloc_fail(&io->scsiio); } else if (error == EROFS || error == EACCES) { ctl_set_hw_write_protected(&io->scsiio); - } else - ctl_set_medium_error(&io->scsiio); + } else { + ctl_set_medium_error(&io->scsiio, + beio->bio_cmd == BIO_READ); + } ctl_complete_beio(beio); return; } @@ -934,8 +933,10 @@ ctl_be_block_dispatch_zvol(struct ctl_be ctl_set_space_alloc_fail(&io->scsiio); } else if (error == EROFS || error == EACCES) { ctl_set_hw_write_protected(&io->scsiio); - } else - ctl_set_medium_error(&io->scsiio); + } else { + ctl_set_medium_error(&io->scsiio, + beio->bio_cmd == BIO_READ); + } ctl_complete_beio(beio); return; } Modified: head/sys/cam/ctl/ctl_error.c ============================================================================== --- head/sys/cam/ctl/ctl_error.c Thu Sep 17 12:04:41 2015 (r287911) +++ head/sys/cam/ctl/ctl_error.c Thu Sep 17 12:52:18 2015 (r287912) @@ -686,9 +686,9 @@ ctl_set_internal_failure(struct ctl_scsi } void -ctl_set_medium_error(struct ctl_scsiio *ctsio) +ctl_set_medium_error(struct ctl_scsiio *ctsio, int read) { - if ((ctsio->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) { + if (read) { /* "Unrecovered read error" */ ctl_set_sense(ctsio, /*current_error*/ 1, Modified: head/sys/cam/ctl/ctl_error.h ============================================================================== --- head/sys/cam/ctl/ctl_error.h Thu Sep 17 12:04:41 2015 (r287911) +++ head/sys/cam/ctl/ctl_error.h Thu Sep 17 12:52:18 2015 (r287912) @@ -73,7 +73,7 @@ void ctl_set_lun_standby(struct ctl_scsi void ctl_set_lun_unavail(struct ctl_scsiio *ctsio); void ctl_set_internal_failure(struct ctl_scsiio *ctsio, int sks_valid, uint16_t retry_count); -void ctl_set_medium_error(struct ctl_scsiio *ctsio); +void ctl_set_medium_error(struct ctl_scsiio *ctsio, int read); void ctl_set_aborted(struct ctl_scsiio *ctsio); void ctl_set_lba_out_of_range(struct ctl_scsiio *ctsio); void ctl_set_lun_stopped(struct ctl_scsiio *ctsio); From owner-svn-src-head@freebsd.org Thu Sep 17 13:07:48 2015 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 8E6309CFE85; Thu, 17 Sep 2015 13:07:48 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 81505100B; Thu, 17 Sep 2015 13:07:48 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 80551190D; Thu, 17 Sep 2015 13:07:48 +0000 (UTC) Date: Thu, 17 Sep 2015 13:07:48 +0000 From: Alexey Dokuchaev To: Steven Hartland Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r287886 - head/sys/sys Message-ID: <20150917130748.GA90488@FreeBSD.org> References: <201509170003.t8H03uSf070155@repo.freebsd.org> <20150917081541.GA65088@FreeBSD.org> <55FAAB03.2090409@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55FAAB03.2090409@freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 17 Sep 2015 13:07:48 -0000 On Thu, Sep 17, 2015 at 12:58:59PM +0100, Steven Hartland wrote: > On 17/09/2015 09:15, Alexey Dokuchaev wrote: > > On Thu, Sep 17, 2015 at 12:03:56AM +0000, Steven Hartland wrote: > >> New Revision: 287886 > >> URL: https://svnweb.freebsd.org/changeset/base/287886 > >> > >> Log: > >> Fix kqueue write events for files > 2GB > > > > Oh that's an embarrassing bug. > > > > [...] > > Would you also consider merging to stable/8? Thanks, > > 8 isn't supported any more but the patch should apply to stable/8 > sources if you maintain your own branch of it. So the answer is "no". It's OK, I'll ask for your approval and MFC it myself in due time (provided there won't be any regressions found). ./danfe From owner-svn-src-head@freebsd.org Thu Sep 17 14:12:14 2015 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 61B699CE206 for ; Thu, 17 Sep 2015 14:12:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk0-f176.google.com (mail-qk0-f176.google.com [209.85.220.176]) (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 2170712C4 for ; Thu, 17 Sep 2015 14:12:13 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by qkap81 with SMTP id p81so6859093qka.2 for ; Thu, 17 Sep 2015 07:12:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=yJ8NzwjGuf9B8FyVtMyTvkg4pJTgFEaps39Se90A088=; b=lreU1vM0OruEyz8lpe9+rDyHgyIGQMpBRkC8hSAhfOpqordCv+S8tX0PmgoKrBh9ct S+PdDuVA7QwWvluANZQ6a7JebGbLf7uEWEnrbBAw1+b4B0fFuAibNQ76kyZvj3xCVump liwG045Ne6SEFikxkQ/kSrGIdWDecccV9k5Ikb/Xm1XGSVqLRPFTgGsRJhn3usNsX4hl l1gaTc+2A74AgqHKvyyrVnaSIpZ/oE9/JAQsg6q4I9LFURJ+2Qkem+tonJmy37tXD/vC pyuyFa9Z4+YY/CvcvrIbrp7XlDNAKBq3CrxYC2V4/rKVjGFbvx66UkoQItj8UL5Dq1Bq 09Rg== X-Gm-Message-State: ALoCoQnbFGaQUWWJwE9pkthCYQBOkrOgkMZmB4YbMiL01E376sE3uRcFwNRsdnkwYn0tOQ8KfXeB MIME-Version: 1.0 X-Received: by 10.55.204.208 with SMTP id n77mr51400912qkl.46.1442499127389; Thu, 17 Sep 2015 07:12:07 -0700 (PDT) Sender: wlosh@bsdimp.com Received: by 10.140.80.167 with HTTP; Thu, 17 Sep 2015 07:12:07 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: <55FA8A3F.4000005@selasky.org> References: <201509141052.t8EAqRWf008293@repo.freebsd.org> <20150916220559.GS1023@FreeBSD.org> <55FA69BD.10507@selasky.org> <0952027A-5276-487D-99B8-74747B0EEF5D@FreeBSD.org> <55FA8A3F.4000005@selasky.org> Date: Thu, 17 Sep 2015 08:12:07 -0600 X-Google-Sender-Auth: GnahNSeOPiUrJuahbUlwhKU8j3E Message-ID: Subject: Re: svn commit: r287780 - in head: share/man/man9 sys/kern sys/sys From: Warner Losh To: Hans Petter Selasky Cc: David Chisnall , Gleb Smirnoff , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 17 Sep 2015 14:12:14 -0000 Hi Hans, Given how contentious this has been in the past, perhaps it would be better to goad people like rrs@ into giving you a positive, explicit OK rather than relying on a timeout that may not indicate that your change is good, just that your reviewers are busy. Warner On Thu, Sep 17, 2015 at 3:39 AM, Hans Petter Selasky wrote: > On 09/17/15 11:07, David Chisnall wrote: > >> On 17 Sep 2015, at 08:20, Hans Petter Selasky wrote: >> >>> >>> On 09/17/15 00:05, Gleb Smirnoff wrote: >>> >>>> Weren't you explicitly asked not to touch this system without a proper >>>> review and discussion? >>>> >>> >>> Adding a new function is not touching code. >>> >> >> Adding a new interface to an existing core subsystem is most definitely >> touching the system. I would expect *anyone* making a change like this t= o >> have both the design and code reviewed for sanity checking. >> > > For someone who has already been required to have explicit review of an= y > changes to the subsystem to skip this step shows a flagrant disregard for > the project=E2=80=99s policies and best practices. > > David, > > My patch is _not_ touching the existing callout system. It's touching the > callout API. Maybe my understanding of touching is different than yours. > You can voice your conserns in phabricator please, isn't that why we have > Phabricator? > > https://reviews.freebsd.org/D3521 > > The differential review has been out for 14 days with relevant people lik= e > rss on the reviewers list, and no conserns were raised. Only manual page > comments from wblock, and those were addressed. I will refer to a well > known saying, that whoever tier agree. It is a bit late to shout now. > > David, I think phabricator allows filtering so that all commits which > touch sys/kern gets your subscription. At least wblock was automatically > subscribed because of updating some manual pages. I think that's the way = to > go. > > Let's end this discussion here and move it somewhere else. > > --HPS > > > From owner-svn-src-head@freebsd.org Thu Sep 17 14:22:52 2015 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 E99BD9CE71C; Thu, 17 Sep 2015 14:22:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 CD87E18F8; Thu, 17 Sep 2015 14:22:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HEMq8s024945; Thu, 17 Sep 2015 14:22:52 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HEMq0X024944; Thu, 17 Sep 2015 14:22:52 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509171422.t8HEMq0X024944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 17 Sep 2015 14:22:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287913 - head/sys/cam/ctl X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 14:22:53 -0000 Author: mav Date: Thu Sep 17 14:22:52 2015 New Revision: 287913 URL: https://svnweb.freebsd.org/changeset/base/287913 Log: Report number of failed XCOPY segment. Modified: head/sys/cam/ctl/ctl_tpc.c Modified: head/sys/cam/ctl/ctl_tpc.c ============================================================================== --- head/sys/cam/ctl/ctl_tpc.c Thu Sep 17 12:52:18 2015 (r287912) +++ head/sys/cam/ctl/ctl_tpc.c Thu Sep 17 14:22:52 2015 (r287913) @@ -820,7 +820,9 @@ tpc_process_b2b(struct tpc_list *list) off_t srclba, dstlba, numbytes, donebytes, roundbytes; int numlba; uint32_t srcblock, dstblock, pb, pbo, adj; + uint8_t csi[4]; + scsi_ulto4b(list->curseg, csi); if (list->stage == 1) { while ((tior = TAILQ_FIRST(&list->allio)) != NULL) { TAILQ_REMOVE(&list->allio, tior, links); @@ -834,7 +836,9 @@ tpc_process_b2b(struct tpc_list *list) } else if (list->error) { ctl_set_sense(list->ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, - /*asc*/ 0x0d, /*ascq*/ 0x01, SSD_ELEM_NONE); + /*asc*/ 0x0d, /*ascq*/ 0x01, + SSD_ELEM_COMMAND, csi, sizeof(csi), + SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); } list->cursectors += list->segsectors; @@ -849,7 +853,9 @@ tpc_process_b2b(struct tpc_list *list) if (sl >= CTL_MAX_LUNS || dl >= CTL_MAX_LUNS) { ctl_set_sense(list->ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, - /*asc*/ 0x08, /*ascq*/ 0x04, SSD_ELEM_NONE); + /*asc*/ 0x08, /*ascq*/ 0x04, + SSD_ELEM_COMMAND, csi, sizeof(csi), + SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); } if (pbo > 0) @@ -878,7 +884,9 @@ tpc_process_b2b(struct tpc_list *list) if (numbytes % srcblock != 0 || numbytes % dstblock != 0) { ctl_set_sense(list->ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, - /*asc*/ 0x26, /*ascq*/ 0x0A, SSD_ELEM_NONE); + /*asc*/ 0x26, /*ascq*/ 0x0A, + SSD_ELEM_COMMAND, csi, sizeof(csi), + SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); } @@ -962,7 +970,9 @@ tpc_process_verify(struct tpc_list *list struct scsi_ec_segment_verify *seg; struct tpc_io *tio; uint64_t sl; + uint8_t csi[4]; + scsi_ulto4b(list->curseg, csi); if (list->stage == 1) { while ((tio = TAILQ_FIRST(&list->allio)) != NULL) { TAILQ_REMOVE(&list->allio, tio, links); @@ -975,7 +985,9 @@ tpc_process_verify(struct tpc_list *list } else if (list->error) { ctl_set_sense(list->ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, - /*asc*/ 0x0d, /*ascq*/ 0x01, SSD_ELEM_NONE); + /*asc*/ 0x0d, /*ascq*/ 0x01, + SSD_ELEM_COMMAND, csi, sizeof(csi), + SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); } else return (CTL_RETVAL_COMPLETE); @@ -987,7 +999,9 @@ tpc_process_verify(struct tpc_list *list if (sl >= CTL_MAX_LUNS) { ctl_set_sense(list->ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, - /*asc*/ 0x08, /*ascq*/ 0x04, SSD_ELEM_NONE); + /*asc*/ 0x08, /*ascq*/ 0x04, + SSD_ELEM_COMMAND, csi, sizeof(csi), + SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); } @@ -1019,7 +1033,9 @@ tpc_process_register_key(struct tpc_list struct tpc_io *tio; uint64_t dl; int datalen; + uint8_t csi[4]; + scsi_ulto4b(list->curseg, csi); if (list->stage == 1) { while ((tio = TAILQ_FIRST(&list->allio)) != NULL) { TAILQ_REMOVE(&list->allio, tio, links); @@ -1033,7 +1049,9 @@ tpc_process_register_key(struct tpc_list } else if (list->error) { ctl_set_sense(list->ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, - /*asc*/ 0x0d, /*ascq*/ 0x01, SSD_ELEM_NONE); + /*asc*/ 0x0d, /*ascq*/ 0x01, + SSD_ELEM_COMMAND, csi, sizeof(csi), + SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); } else return (CTL_RETVAL_COMPLETE); @@ -1045,7 +1063,9 @@ tpc_process_register_key(struct tpc_list if (dl >= CTL_MAX_LUNS) { ctl_set_sense(list->ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, - /*asc*/ 0x08, /*ascq*/ 0x04, SSD_ELEM_NONE); + /*asc*/ 0x08, /*ascq*/ 0x04, + SSD_ELEM_COMMAND, csi, sizeof(csi), + SSD_ELEM_NONE); return (CTL_RETVAL_ERROR); } @@ -1346,6 +1366,7 @@ tpc_process(struct tpc_list *list) struct scsi_ec_segment *seg; struct ctl_scsiio *ctsio = list->ctsio; int retval = CTL_RETVAL_COMPLETE; + uint8_t csi[4]; if (list->service_action == EC_WUT) { if (list->token != NULL) @@ -1373,9 +1394,12 @@ tpc_process(struct tpc_list *list) retval = tpc_process_register_key(list); break; default: + scsi_ulto4b(list->curseg, csi); ctl_set_sense(ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_COPY_ABORTED, - /*asc*/ 0x26, /*ascq*/ 0x09, SSD_ELEM_NONE); + /*asc*/ 0x26, /*ascq*/ 0x09, + SSD_ELEM_COMMAND, csi, sizeof(csi), + SSD_ELEM_NONE); goto done; } if (retval == CTL_RETVAL_QUEUED) From owner-svn-src-head@freebsd.org Thu Sep 17 15:11:46 2015 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 531269CFF9B; Thu, 17 Sep 2015 15:11:46 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 3FF65178B; Thu, 17 Sep 2015 15:11:46 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HFBkrF045437; Thu, 17 Sep 2015 15:11:46 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HFBjNo045434; Thu, 17 Sep 2015 15:11:45 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201509171511.t8HFBjNo045434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 17 Sep 2015 15:11:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287914 - head/sys/dev/e1000 X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 15:11:46 -0000 Author: sbruno Date: Thu Sep 17 15:11:45 2015 New Revision: 287914 URL: https://svnweb.freebsd.org/changeset/base/287914 Log: Add Intel Skylake/I219 Support - New em(4) device in currently shipping products Differential Revision: https://reviews.freebsd.org/D3163 Submitted by: erj@freebsd.org Reviewed by: jfv@freebsd.org MFC after: 2 weeks Sponsored by: Intel Corporation Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_em.h Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Thu Sep 17 14:22:52 2015 (r287913) +++ head/sys/dev/e1000/if_em.c Thu Sep 17 15:11:45 2015 (r287914) @@ -103,7 +103,7 @@ int em_display_debug_stats = 0; /********************************************************************* * Driver version: *********************************************************************/ -char em_driver_version[] = "7.4.2"; +char em_driver_version[] = "7.5.2"; /********************************************************************* * PCI Device ID Table @@ -191,6 +191,11 @@ static em_vendor_info_t em_vendor_info_a { 0x8086, E1000_DEV_ID_PCH_I218_V2, PCI_ANY_ID, PCI_ANY_ID, 0}, { 0x8086, E1000_DEV_ID_PCH_I218_LM3, PCI_ANY_ID, PCI_ANY_ID, 0}, { 0x8086, E1000_DEV_ID_PCH_I218_V3, PCI_ANY_ID, PCI_ANY_ID, 0}, + { 0x8086, E1000_DEV_ID_PCH_SPT_I219_LM, PCI_ANY_ID, PCI_ANY_ID, 0}, + { 0x8086, E1000_DEV_ID_PCH_SPT_I219_V, PCI_ANY_ID, PCI_ANY_ID, 0}, + { 0x8086, E1000_DEV_ID_PCH_SPT_I219_LM2, + PCI_ANY_ID, PCI_ANY_ID, 0}, + { 0x8086, E1000_DEV_ID_PCH_SPT_I219_V2, PCI_ANY_ID, PCI_ANY_ID, 0}, /* required last entry */ { 0, 0, 0, 0, 0} }; @@ -238,6 +243,7 @@ static void em_free_pci_resources(struct static void em_local_timer(void *); static void em_reset(struct adapter *); static int em_setup_interface(device_t, struct adapter *); +static void em_flush_desc_rings(struct adapter *); static void em_setup_transmit_structures(struct adapter *); static void em_initialize_transmit_unit(struct adapter *); @@ -584,6 +590,20 @@ em_attach(device_t dev) } /* + ** In the new SPT device flash is not a + ** separate BAR, rather it is also in BAR0, + ** so use the same tag and handle for the + ** FLASH read/write macros in the shared + ** code. + */ + if (hw->mac.type == e1000_pch_spt) { + adapter->osdep.flash_bus_space_tag = + adapter->osdep.mem_bus_space_tag; + adapter->osdep.flash_bus_space_handle = + adapter->osdep.mem_bus_space_handle; + } + + /* * Setup MSI/X or MSI if PCI Express */ adapter->msix = em_setup_msix(adapter); @@ -1168,6 +1188,7 @@ em_ioctl(if_t ifp, u_long command, caddr case e1000_ich10lan: case e1000_pch2lan: case e1000_pch_lpt: + case e1000_pch_spt: case e1000_82574: case e1000_82583: case e1000_80003es2lan: /* 9K Jumbo Frame size */ @@ -1369,8 +1390,15 @@ em_init_locked(struct adapter *adapter) if_clearhwassist(ifp); if (if_getcapenable(ifp) & IFCAP_TXCSUM) if_sethwassistbits(ifp, CSUM_TCP | CSUM_UDP, 0); - if (if_getcapenable(ifp) & IFCAP_TSO4) - if_sethwassistbits(ifp, CSUM_TSO, 0); + /* + ** There have proven to be problems with TSO when not + ** at full gigabit speed, so disable the assist automatically + ** when at lower speeds. -jfv + */ + if (if_getcapenable(ifp) & IFCAP_TSO4) { + if (adapter->link_speed == SPEED_1000) + if_sethwassistbits(ifp, CSUM_TSO, 0); + } /* Configure for OS presence */ em_init_manageability(adapter); @@ -2350,6 +2378,8 @@ em_update_link_status(struct adapter *ad switch (hw->phy.media_type) { case e1000_media_type_copper: if (hw->mac.get_link_status) { + if (hw->mac.type == e1000_pch_spt) + msec_delay(50); /* Do the work to read phy */ e1000_check_for_link(hw); link_check = !hw->mac.get_link_status; @@ -2441,6 +2471,10 @@ em_stop(void *arg) EM_TX_UNLOCK(txr); } + /* I219 needs some special flushing to avoid hangs */ + if (adapter->hw.mac.type == e1000_pch_spt) + em_flush_desc_rings(adapter); + e1000_reset_hw(&adapter->hw); E1000_WRITE_REG(&adapter->hw, E1000_WUC, 0); @@ -2860,6 +2894,116 @@ msi: } +/* +** The 3 following flush routines are used as a workaround in the +** I219 client parts and only for them. +** +** em_flush_tx_ring - remove all descriptors from the tx_ring +** +** We want to clear all pending descriptors from the TX ring. +** zeroing happens when the HW reads the regs. We assign the ring itself as +** the data of the next descriptor. We don't care about the data we are about +** to reset the HW. +*/ +static void +em_flush_tx_ring(struct adapter *adapter) +{ + struct e1000_hw *hw = &adapter->hw; + struct tx_ring *txr = adapter->tx_rings; + struct e1000_tx_desc *txd; + u32 tctl, txd_lower = E1000_TXD_CMD_IFCS; + u16 size = 512; + + tctl = E1000_READ_REG(hw, E1000_TCTL); + E1000_WRITE_REG(hw, E1000_TCTL, tctl | E1000_TCTL_EN); + + txd = &txr->tx_base[txr->next_avail_desc++]; + if (txr->next_avail_desc == adapter->num_tx_desc) + txr->next_avail_desc = 0; + + /* Just use the ring as a dummy buffer addr */ + txd->buffer_addr = txr->txdma.dma_paddr; + txd->lower.data = htole32(txd_lower | size); + txd->upper.data = 0; + + /* flush descriptors to memory before notifying the HW */ + wmb(); + + E1000_WRITE_REG(hw, E1000_TDT(0), txr->next_avail_desc); + mb(); + usec_delay(250); +} + +/* +** em_flush_rx_ring - remove all descriptors from the rx_ring +** +** Mark all descriptors in the RX ring as consumed and disable the rx ring +*/ +static void +em_flush_rx_ring(struct adapter *adapter) +{ + struct e1000_hw *hw = &adapter->hw; + u32 rctl, rxdctl; + + rctl = E1000_READ_REG(hw, E1000_RCTL); + E1000_WRITE_REG(hw, E1000_RCTL, rctl & ~E1000_RCTL_EN); + E1000_WRITE_FLUSH(hw); + usec_delay(150); + + rxdctl = E1000_READ_REG(hw, E1000_RXDCTL(0)); + /* zero the lower 14 bits (prefetch and host thresholds) */ + rxdctl &= 0xffffc000; + /* + * update thresholds: prefetch threshold to 31, host threshold to 1 + * and make sure the granularity is "descriptors" and not "cache lines" + */ + rxdctl |= (0x1F | (1 << 8) | E1000_RXDCTL_THRESH_UNIT_DESC); + E1000_WRITE_REG(hw, E1000_RXDCTL(0), rxdctl); + + /* momentarily enable the RX ring for the changes to take effect */ + E1000_WRITE_REG(hw, E1000_RCTL, rctl | E1000_RCTL_EN); + E1000_WRITE_FLUSH(hw); + usec_delay(150); + E1000_WRITE_REG(hw, E1000_RCTL, rctl & ~E1000_RCTL_EN); +} + +/* +** em_flush_desc_rings - remove all descriptors from the descriptor rings +** +** In i219, the descriptor rings must be emptied before resetting the HW +** or before changing the device state to D3 during runtime (runtime PM). +** +** Failure to do this will cause the HW to enter a unit hang state which can +** only be released by PCI reset on the device +** +*/ +static void +em_flush_desc_rings(struct adapter *adapter) +{ + struct e1000_hw *hw = &adapter->hw; + device_t dev = adapter->dev; + u16 hang_state; + u32 fext_nvm11, tdlen; + + /* First, disable MULR fix in FEXTNVM11 */ + fext_nvm11 = E1000_READ_REG(hw, E1000_FEXTNVM11); + fext_nvm11 |= E1000_FEXTNVM11_DISABLE_MULR_FIX; + E1000_WRITE_REG(hw, E1000_FEXTNVM11, fext_nvm11); + + /* do nothing if we're not in faulty state, or if the queue is empty */ + tdlen = E1000_READ_REG(hw, E1000_TDLEN(0)); + hang_state = pci_read_config(dev, PCICFG_DESC_RING_STATUS, 2); + if (!(hang_state & FLUSH_DESC_REQUIRED) || !tdlen) + return; + em_flush_tx_ring(adapter); + + /* recheck, maybe the fault is caused by the rx ring */ + hang_state = pci_read_config(dev, PCICFG_DESC_RING_STATUS, 2); + if (hang_state & FLUSH_DESC_REQUIRED) + em_flush_rx_ring(adapter); +} + + /********************************************************************* * * Initialize the hardware to a configuration @@ -2921,6 +3065,7 @@ em_reset(struct adapter *adapter) case e1000_pchlan: case e1000_pch2lan: case e1000_pch_lpt: + case e1000_pch_spt: pba = E1000_PBA_26K; break; default: @@ -2979,6 +3124,7 @@ em_reset(struct adapter *adapter) break; case e1000_pch2lan: case e1000_pch_lpt: + case e1000_pch_spt: hw->fc.high_water = 0x5C20; hw->fc.low_water = 0x5048; hw->fc.pause_time = 0x0650; @@ -3003,6 +3149,10 @@ em_reset(struct adapter *adapter) break; } + /* I219 needs some special flushing to avoid hangs */ + if (hw->mac.type == e1000_pch_spt) + em_flush_desc_rings(adapter); + /* Issue a global reset */ e1000_reset_hw(hw); E1000_WRITE_REG(hw, E1000_WUC, 0); @@ -3599,6 +3749,15 @@ em_initialize_transmit_unit(struct adapt /* This write will effectively turn on the transmit unit. */ E1000_WRITE_REG(&adapter->hw, E1000_TCTL, tctl); + if (hw->mac.type == e1000_pch_spt) { + u32 reg; + reg = E1000_READ_REG(hw, E1000_IOSFPC); + reg |= E1000_RCTL_RDMTS_HEX; + E1000_WRITE_REG(hw, E1000_IOSFPC, reg); + reg = E1000_READ_REG(hw, E1000_TARC(0)); + reg |= E1000_TARC0_CB_MULTIQ_3_REQ; + E1000_WRITE_REG(hw, E1000_TARC(0), reg); + } } Modified: head/sys/dev/e1000/if_em.h ============================================================================== --- head/sys/dev/e1000/if_em.h Thu Sep 17 14:22:52 2015 (r287913) +++ head/sys/dev/e1000/if_em.h Thu Sep 17 15:11:45 2015 (r287914) @@ -218,6 +218,9 @@ #define EM_TX_HUNG 0x80000000 #define EM_TX_MAXTRIES 10 +#define PCICFG_DESC_RING_STATUS 0xe4 +#define FLUSH_DESC_REQUIRED 0x100 + /* * TDBA/RDBA should be aligned on 16 byte boundary. But TDLEN/RDLEN should be * multiple of 128 bytes. So we align TDBA/RDBA on 128 byte boundary. This will From owner-svn-src-head@freebsd.org Thu Sep 17 16:10:13 2015 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 5152C9CDF8F; Thu, 17 Sep 2015 16:10:13 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 3B1B31116; Thu, 17 Sep 2015 16:10:13 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HGADud066637; Thu, 17 Sep 2015 16:10:13 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HGACxA066632; Thu, 17 Sep 2015 16:10:12 GMT (envelope-from des@FreeBSD.org) Message-Id: <201509171610.t8HGACxA066632@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Thu, 17 Sep 2015 16:10:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287917 - in head: contrib/unbound contrib/unbound/compat contrib/unbound/daemon contrib/unbound/dns64 contrib/unbound/dnstap contrib/unbound/doc contrib/unbound/iterator contrib/unboun... X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 16:10:13 -0000 Author: des Date: Thu Sep 17 16:10:11 2015 New Revision: 287917 URL: https://svnweb.freebsd.org/changeset/base/287917 Log: Upgrade to Unbound 1.5.4. Added: head/contrib/unbound/compat/reallocarray.c - copied unchanged from r287915, vendor/unbound/dist/compat/reallocarray.c head/contrib/unbound/libunbound/python/file_py3.i - copied unchanged from r287915, vendor/unbound/dist/libunbound/python/file_py3.i head/contrib/unbound/sldns/ - copied from r287915, vendor/unbound/dist/sldns/ Deleted: head/contrib/unbound/ldns/ Modified: head/contrib/unbound/Makefile.in head/contrib/unbound/acx_nlnetlabs.m4 head/contrib/unbound/compat/getentropy_linux.c head/contrib/unbound/config.h head/contrib/unbound/config.h.in head/contrib/unbound/configure head/contrib/unbound/configure.ac head/contrib/unbound/daemon/cachedump.c head/contrib/unbound/daemon/daemon.c head/contrib/unbound/daemon/remote.c head/contrib/unbound/daemon/stats.c head/contrib/unbound/daemon/stats.h head/contrib/unbound/daemon/worker.c head/contrib/unbound/daemon/worker.h head/contrib/unbound/dns64/dns64.c head/contrib/unbound/dnstap/dnstap.c head/contrib/unbound/doc/Changelog head/contrib/unbound/doc/README head/contrib/unbound/doc/example.conf head/contrib/unbound/doc/example.conf.in head/contrib/unbound/doc/libunbound.3 head/contrib/unbound/doc/libunbound.3.in head/contrib/unbound/doc/unbound-anchor.8 head/contrib/unbound/doc/unbound-anchor.8.in head/contrib/unbound/doc/unbound-checkconf.8 head/contrib/unbound/doc/unbound-checkconf.8.in head/contrib/unbound/doc/unbound-control.8 head/contrib/unbound/doc/unbound-control.8.in head/contrib/unbound/doc/unbound-host.1 head/contrib/unbound/doc/unbound-host.1.in head/contrib/unbound/doc/unbound.8 head/contrib/unbound/doc/unbound.8.in head/contrib/unbound/doc/unbound.conf.5 head/contrib/unbound/doc/unbound.conf.5.in head/contrib/unbound/freebsd-configure.sh head/contrib/unbound/iterator/iter_delegpt.c head/contrib/unbound/iterator/iter_fwd.c head/contrib/unbound/iterator/iter_hints.c head/contrib/unbound/iterator/iter_priv.c head/contrib/unbound/iterator/iter_resptype.c head/contrib/unbound/iterator/iter_scrub.c head/contrib/unbound/iterator/iter_utils.c head/contrib/unbound/iterator/iter_utils.h head/contrib/unbound/iterator/iterator.c head/contrib/unbound/iterator/iterator.h head/contrib/unbound/libunbound/context.c head/contrib/unbound/libunbound/libunbound.c head/contrib/unbound/libunbound/libworker.c head/contrib/unbound/libunbound/python/Makefile head/contrib/unbound/libunbound/python/examples/async-lookup.py head/contrib/unbound/libunbound/python/examples/dns-lookup.py head/contrib/unbound/libunbound/python/examples/dnssec-valid.py head/contrib/unbound/libunbound/python/examples/dnssec_test.py head/contrib/unbound/libunbound/python/examples/example8-1.py head/contrib/unbound/libunbound/python/examples/idn-lookup.py head/contrib/unbound/libunbound/python/examples/mx-lookup.py head/contrib/unbound/libunbound/python/examples/ns-lookup.py head/contrib/unbound/libunbound/python/examples/reverse-lookup.py head/contrib/unbound/libunbound/python/libunbound.i head/contrib/unbound/libunbound/worker.h head/contrib/unbound/services/cache/dns.c head/contrib/unbound/services/cache/infra.c head/contrib/unbound/services/cache/infra.h head/contrib/unbound/services/cache/rrset.c head/contrib/unbound/services/listen_dnsport.c head/contrib/unbound/services/listen_dnsport.h head/contrib/unbound/services/localzone.c head/contrib/unbound/services/localzone.h head/contrib/unbound/services/mesh.c head/contrib/unbound/services/outside_network.c head/contrib/unbound/smallapp/unbound-anchor.c head/contrib/unbound/smallapp/unbound-checkconf.c head/contrib/unbound/smallapp/unbound-control-setup.sh head/contrib/unbound/smallapp/unbound-control-setup.sh.in head/contrib/unbound/smallapp/unbound-control.c head/contrib/unbound/smallapp/unbound-host.c head/contrib/unbound/util/alloc.c head/contrib/unbound/util/alloc.h head/contrib/unbound/util/config_file.c head/contrib/unbound/util/config_file.h head/contrib/unbound/util/configlexer.lex head/contrib/unbound/util/configparser.y head/contrib/unbound/util/data/dname.c head/contrib/unbound/util/data/msgencode.c head/contrib/unbound/util/data/msgparse.c head/contrib/unbound/util/data/msgparse.h head/contrib/unbound/util/data/msgreply.c head/contrib/unbound/util/data/msgreply.h head/contrib/unbound/util/data/packed_rrset.c head/contrib/unbound/util/data/packed_rrset.h head/contrib/unbound/util/fptr_wlist.c head/contrib/unbound/util/iana_ports.inc head/contrib/unbound/util/log.c head/contrib/unbound/util/log.h head/contrib/unbound/util/net_help.c head/contrib/unbound/util/netevent.c head/contrib/unbound/util/netevent.h head/contrib/unbound/validator/autotrust.c head/contrib/unbound/validator/val_anchor.c head/contrib/unbound/validator/val_kentry.c head/contrib/unbound/validator/val_neg.c head/contrib/unbound/validator/val_nsec3.c head/contrib/unbound/validator/val_secalgo.c head/contrib/unbound/validator/val_sigcrypt.c head/contrib/unbound/validator/validator.c head/lib/libunbound/Makefile Directory Properties: head/contrib/unbound/ (props changed) Modified: head/contrib/unbound/Makefile.in ============================================================================== --- head/contrib/unbound/Makefile.in Thu Sep 17 15:22:09 2015 (r287916) +++ head/contrib/unbound/Makefile.in Thu Sep 17 16:10:11 2015 (r287917) @@ -25,6 +25,7 @@ DNSTAP_SRC=@DNSTAP_SRC@ DNSTAP_OBJ=@DNSTAP_OBJ@ WITH_PYTHONMODULE=@WITH_PYTHONMODULE@ WITH_PYUNBOUND=@WITH_PYUNBOUND@ +PY_MAJOR_VERSION=@PY_MAJOR_VERSION@ PYTHON_SITE_PKG=@PYTHON_SITE_PKG@ PYTHONMOD_INSTALL=@PYTHONMOD_INSTALL@ PYTHONMOD_UNINSTALL=@PYTHONMOD_UNINSTALL@ @@ -131,12 +132,12 @@ compat/memcmp.c compat/memmove.c compat/ compat/strlcpy.c compat/strptime.c compat/getentropy_linux.c \ compat/getentropy_osx.c compat/getentropy_solaris.c compat/getentropy_win.c \ compat/explicit_bzero.c compat/arc4random.c compat/arc4random_uniform.c \ -compat/arc4_lock.c compat/sha512.c +compat/arc4_lock.c compat/sha512.c compat/reallocarray.c COMPAT_OBJ=$(LIBOBJS:.o=.lo) COMPAT_OBJ_WITHOUT_CTIME=$(LIBOBJ_WITHOUT_CTIME:.o=.lo) COMPAT_OBJ_WITHOUT_CTIMEARC4=$(LIBOBJ_WITHOUT_CTIMEARC4:.o=.lo) -SLDNS_SRC=ldns/keyraw.c ldns/sbuffer.c ldns/wire2str.c ldns/parse.c \ -ldns/parseutil.c ldns/rrdef.c ldns/str2wire.c +SLDNS_SRC=sldns/keyraw.c sldns/sbuffer.c sldns/wire2str.c sldns/parse.c \ +sldns/parseutil.c sldns/rrdef.c sldns/str2wire.c SLDNS_OBJ=keyraw.lo sbuffer.lo wire2str.lo parse.lo parseutil.lo rrdef.lo \ str2wire.lo UNITTEST_SRC=testcode/unitanchor.c testcode/unitdname.c \ @@ -393,7 +394,7 @@ libunbound_wrap.lo libunbound_wrap.o: li unbound.h libunbound/python/libunbound_wrap.c: $(srcdir)/libunbound/python/libunbound.i unbound.h @-if test ! -d libunbound/python; then $(INSTALL) -d libunbound/python; fi - $(SWIG) -python -o $@ $(CPPFLAGS) $(srcdir)/libunbound/python/libunbound.i + $(SWIG) -python -o $@ $(CPPFLAGS) -DPY_MAJOR_VERSION=$(PY_MAJOR_VERSION) $(srcdir)/libunbound/python/libunbound.i # Pyunbound python unbound wrapper _unbound.la: libunbound_wrap.lo libunbound.la @@ -597,146 +598,151 @@ dns.lo dns.o: $(srcdir)/services/cache/d $(srcdir)/validator/val_nsec.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/services/cache/dns.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/ldns/sbuffer.h -infra.lo infra.o: $(srcdir)/services/cache/infra.c config.h $(srcdir)/ldns/rrdef.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/sldns/sbuffer.h +infra.lo infra.o: $(srcdir)/services/cache/infra.c config.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/str2wire.h \ $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/util/rtt.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lookup3.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/iterator/iterator.h \ - $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/util/storage/lookup3.h $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/config_file.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h rrset.lo rrset.o: $(srcdir)/services/cache/rrset.c config.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/config_file.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/regional.h $(srcdir)/util/alloc.h dname.lo dname.o: $(srcdir)/util/data/dname.c config.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/storage/lookup3.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/storage/lookup3.h $(srcdir)/sldns/sbuffer.h msgencode.lo msgencode.o: $(srcdir)/util/data/msgencode.c config.h $(srcdir)/util/data/msgencode.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/dname.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ + $(srcdir)/sldns/sbuffer.h msgparse.lo msgparse.o: $(srcdir)/util/data/msgparse.c config.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/util/data/dname.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/storage/lookup3.h $(srcdir)/util/regional.h $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/parseutil.h \ - $(srcdir)/ldns/wire2str.h + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/dname.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/storage/lookup3.h $(srcdir)/util/regional.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/parseutil.h \ + $(srcdir)/sldns/wire2str.h msgreply.lo msgreply.o: $(srcdir)/util/data/msgreply.c config.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/storage/lookup3.h $(srcdir)/util/alloc.h $(srcdir)/util/netevent.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/regional.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/util/data/msgencode.h $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/wire2str.h + $(srcdir)/util/data/dname.h $(srcdir)/util/regional.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgencode.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h packed_rrset.lo packed_rrset.o: $(srcdir)/util/data/packed_rrset.c config.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/alloc.h $(srcdir)/util/regional.h \ - $(srcdir)/util/net_help.h $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/wire2str.h + $(srcdir)/util/net_help.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h iterator.lo iterator.o: $(srcdir)/iterator/iterator.c config.h $(srcdir)/iterator/iterator.h \ $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/iterator/iter_utils.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/iterator/iter_utils.h \ $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_donotq.h \ $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_scrub.h $(srcdir)/iterator/iter_priv.h \ $(srcdir)/validator/val_neg.h $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/infra.h \ $(srcdir)/util/rtt.h $(srcdir)/util/netevent.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/util/config_file.h $(srcdir)/ldns/wire2str.h \ - $(srcdir)/ldns/parseutil.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/util/config_file.h $(srcdir)/util/random.h \ + $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/sbuffer.h iter_delegpt.lo iter_delegpt.o: $(srcdir)/iterator/iter_delegpt.c config.h $(srcdir)/iterator/iter_delegpt.h \ $(srcdir)/util/log.h $(srcdir)/services/cache/dns.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/regional.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/sbuffer.h iter_donotq.lo iter_donotq.o: $(srcdir)/iterator/iter_donotq.c config.h $(srcdir)/iterator/iter_donotq.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/regional.h $(srcdir)/util/log.h \ $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h iter_fwd.lo iter_fwd.o: $(srcdir)/iterator/iter_fwd.c config.h $(srcdir)/iterator/iter_fwd.h \ $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h $(srcdir)/util/config_file.h \ $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/str2wire.h + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/str2wire.h iter_hints.lo iter_hints.o: $(srcdir)/iterator/iter_hints.c config.h $(srcdir)/iterator/iter_hints.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h \ $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/str2wire.h \ - $(srcdir)/ldns/wire2str.h + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/str2wire.h \ + $(srcdir)/sldns/wire2str.h iter_priv.lo iter_priv.o: $(srcdir)/iterator/iter_priv.c config.h $(srcdir)/iterator/iter_priv.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/regional.h $(srcdir)/util/log.h $(srcdir)/util/config_file.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/sbuffer.h iter_resptype.lo iter_resptype.o: $(srcdir)/iterator/iter_resptype.c config.h \ $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h \ $(srcdir)/services/cache/dns.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/data/dname.h $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/pkthdr.h + $(srcdir)/util/data/dname.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h iter_scrub.lo iter_scrub.o: $(srcdir)/iterator/iter_scrub.c config.h $(srcdir)/iterator/iter_scrub.h \ $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ $(srcdir)/iterator/iter_priv.h $(srcdir)/util/rbtree.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h $(srcdir)/util/alloc.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h $(srcdir)/util/alloc.h $(srcdir)/sldns/sbuffer.h iter_utils.lo iter_utils.o: $(srcdir)/iterator/iter_utils.c config.h $(srcdir)/iterator/iter_utils.h \ $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h \ - $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_donotq.h \ - $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_priv.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/rtt.h $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/rrset.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h \ - $(srcdir)/util/regional.h $(srcdir)/util/data/dname.h $(srcdir)/util/random.h $(srcdir)/util/fptr_wlist.h \ - $(srcdir)/util/netevent.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h \ - $(srcdir)/validator/val_anchor.h $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_kentry.h \ - $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_sigcrypt.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/iterator/iter_hints.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_fwd.h \ + $(srcdir)/iterator/iter_donotq.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_priv.h \ + $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/services/cache/dns.h \ + $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/regional.h $(srcdir)/util/data/dname.h $(srcdir)/util/random.h \ + $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \ + $(srcdir)/services/modstack.h $(srcdir)/validator/val_anchor.h $(srcdir)/validator/val_kcache.h \ + $(srcdir)/validator/val_kentry.h $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_sigcrypt.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h listen_dnsport.lo listen_dnsport.o: $(srcdir)/services/listen_dnsport.c config.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/util/netevent.h $(srcdir)/services/outside_network.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/log.h $(srcdir)/util/config_file.h \ - $(srcdir)/util/net_help.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/util/net_help.h $(srcdir)/sldns/sbuffer.h localzone.lo localzone.o: $(srcdir)/services/localzone.c config.h $(srcdir)/services/localzone.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/rrdef.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h \ $(srcdir)/util/net_help.h $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h mesh.lo mesh.o: $(srcdir)/services/mesh.c config.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/netevent.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/util/log.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/modstack.h $(srcdir)/services/outbound_list.h \ - $(srcdir)/services/cache/dns.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ - $(srcdir)/util/data/msgencode.h $(srcdir)/util/timehist.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h \ - $(srcdir)/util/alloc.h $(srcdir)/util/config_file.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/util/log.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/modstack.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/services/cache/dns.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/regional.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/timehist.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/tube.h $(srcdir)/util/alloc.h $(srcdir)/util/config_file.h $(srcdir)/sldns/sbuffer.h modstack.lo modstack.o: $(srcdir)/services/modstack.c config.h $(srcdir)/services/modstack.h \ $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/dns64/dns64.h $(srcdir)/iterator/iterator.h \ - $(srcdir)/services/outbound_list.h $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h \ + $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/dns64/dns64.h \ + $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/validator/validator.h \ + $(srcdir)/validator/val_utils.h outbound_list.lo outbound_list.o: $(srcdir)/services/outbound_list.c config.h \ $(srcdir)/services/outbound_list.h $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/netevent.h outside_network.lo outside_network.o: $(srcdir)/services/outside_network.c config.h \ $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h $(srcdir)/util/netevent.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/rtt.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/random.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h \ - $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/ldns/sbuffer.h \ - $(srcdir)/dnstap/dnstap.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/rtt.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/random.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/module.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/dnstap/dnstap.h \ alloc.lo alloc.o: $(srcdir)/util/alloc.c config.h $(srcdir)/util/alloc.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/regional.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h config_file.lo config_file.o: $(srcdir)/util/config_file.c config.h $(srcdir)/util/log.h \ $(srcdir)/util/configyyrename.h $(srcdir)/util/config_file.h util/configparser.h \ $(srcdir)/util/net_help.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/regional.h $(srcdir)/util/fptr_wlist.h \ $(srcdir)/util/netevent.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ - $(srcdir)/services/modstack.h $(srcdir)/util/data/dname.h $(srcdir)/util/rtt.h $(srcdir)/ldns/wire2str.h \ - $(srcdir)/ldns/parseutil.h $(srcdir)/util/iana_ports.inc + $(srcdir)/services/modstack.h $(srcdir)/util/data/dname.h $(srcdir)/util/rtt.h $(srcdir)/services/cache/infra.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/parseutil.h \ + $(srcdir)/util/iana_ports.inc configlexer.lo configlexer.o: util/configlexer.c config.h $(srcdir)/util/configyyrename.h \ $(srcdir)/util/config_file.h util/configparser.h configparser.lo configparser.o: util/configparser.c config.h $(srcdir)/util/configyyrename.h \ @@ -744,46 +750,45 @@ configparser.lo configparser.o: util/con fptr_wlist.lo fptr_wlist.o: $(srcdir)/util/fptr_wlist.c config.h $(srcdir)/util/fptr_wlist.h \ $(srcdir)/util/netevent.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/util/mini_event.h \ $(srcdir)/util/rbtree.h $(srcdir)/services/outside_network.h \ - $(srcdir)/services/localzone.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ - $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/dns64/dns64.h \ + $(srcdir)/services/localzone.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/dns64/dns64.h \ $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h \ $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_anchor.h \ $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_kentry.h \ - $(srcdir)/validator/val_neg.h $(srcdir)/validator/autotrust.h $(srcdir)/util/storage/dnstree.h \ - $(srcdir)/libunbound/libworker.h $(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h \ - $(srcdir)/libunbound/unbound.h $(srcdir)/libunbound/worker.h $(srcdir)/ldns/sbuffer.h \ - $(srcdir)/util/config_file.h + $(srcdir)/validator/val_neg.h $(srcdir)/validator/autotrust.h $(srcdir)/libunbound/libworker.h \ + $(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h $(srcdir)/libunbound/unbound.h \ + $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/config_file.h locks.lo locks.o: $(srcdir)/util/locks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h -log.lo log.o: $(srcdir)/util/log.c config.h $(srcdir)/util/log.h $(srcdir)/util/locks.h $(srcdir)/ldns/sbuffer.h +log.lo log.o: $(srcdir)/util/log.c config.h $(srcdir)/util/log.h $(srcdir)/util/locks.h $(srcdir)/sldns/sbuffer.h mini_event.lo mini_event.o: $(srcdir)/util/mini_event.c config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h module.lo module.o: $(srcdir)/util/module.c config.h $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h netevent.lo netevent.o: $(srcdir)/util/netevent.c config.h $(srcdir)/util/netevent.h $(srcdir)/util/log.h \ $(srcdir)/util/net_help.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/ldns/sbuffer.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/dnstap/dnstap.h \ $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h net_help.lo net_help.o: $(srcdir)/util/net_help.c config.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/module.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/regional.h $(srcdir)/ldns/parseutil.h \ - $(srcdir)/ldns/wire2str.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/regional.h $(srcdir)/sldns/parseutil.h \ + $(srcdir)/sldns/wire2str.h \ random.lo random.o: $(srcdir)/util/random.c config.h $(srcdir)/util/random.h $(srcdir)/util/log.h rbtree.lo rbtree.o: $(srcdir)/util/rbtree.c config.h $(srcdir)/util/log.h $(srcdir)/util/fptr_wlist.h \ $(srcdir)/util/netevent.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h regional.lo regional.o: $(srcdir)/util/regional.c config.h $(srcdir)/util/log.h $(srcdir)/util/regional.h rtt.lo rtt.o: $(srcdir)/util/rtt.c config.h $(srcdir)/util/rtt.h @@ -794,7 +799,7 @@ lookup3.lo lookup3.o: $(srcdir)/util/sto lruhash.lo lruhash.o: $(srcdir)/util/storage/lruhash.c config.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/module.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ $(srcdir)/services/modstack.h slabhash.lo slabhash.o: $(srcdir)/util/storage/slabhash.c config.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h @@ -802,43 +807,44 @@ timehist.lo timehist.o: $(srcdir)/util/t tube.lo tube.o: $(srcdir)/util/tube.c config.h $(srcdir)/util/tube.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/netevent.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/services/mesh.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/services/mesh.h \ $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h winsock_event.lo winsock_event.o: $(srcdir)/util/winsock_event.c config.h autotrust.lo autotrust.o: $(srcdir)/validator/autotrust.c config.h $(srcdir)/validator/autotrust.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/validator/val_anchor.h $(srcdir)/validator/val_utils.h \ $(srcdir)/validator/val_sigcrypt.h $(srcdir)/util/data/dname.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/util/regional.h $(srcdir)/util/random.h \ $(srcdir)/services/mesh.h $(srcdir)/util/netevent.h $(srcdir)/services/modstack.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/validator/val_kcache.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/wire2str.h $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/keyraw.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/keyraw.h \ val_anchor.lo val_anchor.o: $(srcdir)/validator/val_anchor.c config.h $(srcdir)/validator/val_anchor.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/validator/val_sigcrypt.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/validator/autotrust.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/ldns/sbuffer.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/str2wire.h + $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/str2wire.h validator.lo validator.o: $(srcdir)/validator/validator.c config.h $(srcdir)/validator/validator.h \ $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_anchor.h \ - $(srcdir)/util/rbtree.h $(srcdir)/validator/val_kcache.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/validator/val_kentry.h $(srcdir)/validator/val_nsec.h $(srcdir)/validator/val_nsec3.h \ - $(srcdir)/validator/val_neg.h $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/autotrust.h \ - $(srcdir)/services/cache/dns.h $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/ldns/wire2str.h + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/validator/val_utils.h \ + $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h $(srcdir)/validator/val_kcache.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/validator/val_kentry.h $(srcdir)/validator/val_nsec.h \ + $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_neg.h $(srcdir)/validator/val_sigcrypt.h \ + $(srcdir)/validator/autotrust.h $(srcdir)/services/cache/dns.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h \ + $(srcdir)/sldns/wire2str.h val_kcache.lo val_kcache.o: $(srcdir)/validator/val_kcache.c config.h $(srcdir)/validator/val_kcache.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/validator/val_kentry.h $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h val_kentry.lo val_kentry.o: $(srcdir)/validator/val_kentry.c config.h $(srcdir)/validator/val_kentry.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/keyraw.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h \ val_neg.lo val_neg.o: $(srcdir)/validator/val_neg.c config.h \ $(srcdir)/validator/val_neg.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/rbtree.h \ @@ -846,78 +852,78 @@ val_neg.lo val_neg.o: $(srcdir)/validato $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_utils.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/dns.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/sbuffer.h val_nsec3.lo val_nsec3.o: $(srcdir)/validator/val_nsec3.c config.h \ $(srcdir)/validator/val_nsec3.h $(srcdir)/util/rbtree.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/validator/validator.h \ - $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_kentry.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_kentry.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/regional.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h $(srcdir)/validator/val_nsec.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h $(srcdir)/validator/val_nsec.h $(srcdir)/sldns/sbuffer.h val_nsec.lo val_nsec.o: $(srcdir)/validator/val_nsec.c config.h $(srcdir)/validator/val_nsec.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/validator/val_utils.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h + $(srcdir)/util/net_help.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h val_secalgo.lo val_secalgo.o: $(srcdir)/validator/val_secalgo.c config.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/validator/val_secalgo.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/keyraw.h \ - $(srcdir)/ldns/sbuffer.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h \ + $(srcdir)/sldns/sbuffer.h \ val_sigcrypt.lo val_sigcrypt.o: $(srcdir)/validator/val_sigcrypt.c config.h \ $(srcdir)/validator/val_sigcrypt.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/validator/val_secalgo.h $(srcdir)/validator/validator.h \ - $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/validator/val_utils.h $(srcdir)/util/data/dname.h $(srcdir)/util/rbtree.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/ldns/keyraw.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/parseutil.h $(srcdir)/ldns/wire2str.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/validator/val_utils.h $(srcdir)/util/data/dname.h $(srcdir)/util/rbtree.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/sldns/keyraw.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/wire2str.h \ val_utils.lo val_utils.o: $(srcdir)/validator/val_utils.c config.h $(srcdir)/validator/val_utils.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/validator/validator.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/validator/val_kentry.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/validator/val_kentry.h \ $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h \ $(srcdir)/validator/val_nsec.h $(srcdir)/validator/val_neg.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/dns.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/net_help.h $(srcdir)/util/regional.h dns64.lo dns64.o: $(srcdir)/dns64/dns64.c config.h $(srcdir)/dns64/dns64.h $(srcdir)/util/module.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h \ - $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/regional.h + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/util/config_file.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ + $(srcdir)/services/modstack.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h checklocks.lo checklocks.o: $(srcdir)/testcode/checklocks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/testcode/checklocks.h -dnstap.lo dnstap.o: $(srcdir)/dnstap/dnstap.c config.h $(srcdir)/ldns/sbuffer.h \ +dnstap.lo dnstap.o: $(srcdir)/dnstap/dnstap.c config.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/util/netevent.h \ $(srcdir)/dnstap/dnstap.h \ $(srcdir)/dnstap/dnstap.pb-c.h dnstap.pb-c.lo dnstap.pb-c.o: $(srcdir)/dnstap/dnstap.pb-c.c $(srcdir)/dnstap/dnstap.pb-c.h unitanchor.lo unitanchor.o: $(srcdir)/testcode/unitanchor.c config.h $(srcdir)/util/log.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/testcode/unitmain.h \ - $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/rrdef.h + $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/rrdef.h unitdname.lo unitdname.o: $(srcdir)/testcode/unitdname.c config.h $(srcdir)/util/log.h $(srcdir)/testcode/unitmain.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/ldns/sbuffer.h \ - $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/rrdef.h + $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h unitlruhash.lo unitlruhash.o: $(srcdir)/testcode/unitlruhash.c config.h $(srcdir)/testcode/unitmain.h \ $(srcdir)/util/log.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/storage/slabhash.h unitmain.lo unitmain.o: $(srcdir)/testcode/unitmain.c config.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/keyraw.h \ - $(srcdir)/util/log.h \ - $(srcdir)/testcode/unitmain.h $(srcdir)/util/alloc.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h \ + $(srcdir)/util/log.h $(srcdir)/testcode/unitmain.h $(srcdir)/util/alloc.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h \ $(srcdir)/util/config_file.h $(srcdir)/util/rtt.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/random.h + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ + $(srcdir)/util/random.h unitmsgparse.lo unitmsgparse.o: $(srcdir)/testcode/unitmsgparse.c config.h $(srcdir)/util/log.h \ $(srcdir)/testcode/unitmain.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/locks.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/locks.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/alloc.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h $(srcdir)/testcode/readhex.h \ - $(srcdir)/testcode/testpkts.h $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/wire2str.h + $(srcdir)/testcode/testpkts.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h unitneg.lo unitneg.o: $(srcdir)/testcode/unitneg.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/data/dname.h $(srcdir)/testcode/unitmain.h $(srcdir)/validator/val_neg.h $(srcdir)/util/rbtree.h \ - $(srcdir)/ldns/rrdef.h + $(srcdir)/sldns/rrdef.h unitregional.lo unitregional.o: $(srcdir)/testcode/unitregional.c config.h $(srcdir)/testcode/unitmain.h \ $(srcdir)/util/log.h $(srcdir)/util/regional.h unitslabhash.lo unitslabhash.o: $(srcdir)/testcode/unitslabhash.c config.h $(srcdir)/testcode/unitmain.h \ @@ -927,88 +933,89 @@ unitverify.lo unitverify.o: $(srcdir)/te $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/validator/val_secalgo.h \ $(srcdir)/validator/val_nsec.h $(srcdir)/validator/val_nsec3.h $(srcdir)/util/rbtree.h \ $(srcdir)/validator/validator.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/validator/val_utils.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/validator/val_utils.h \ $(srcdir)/testcode/testpkts.h $(srcdir)/util/data/dname.h $(srcdir)/util/regional.h $(srcdir)/util/alloc.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/keyraw.h \ - $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/wire2str.h + $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/keyraw.h \ + $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h readhex.lo readhex.o: $(srcdir)/testcode/readhex.c config.h $(srcdir)/testcode/readhex.h $(srcdir)/util/log.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/parseutil.h + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/parseutil.h testpkts.lo testpkts.o: $(srcdir)/testcode/testpkts.c config.h $(srcdir)/testcode/testpkts.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/wire2str.h + $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h unitldns.lo unitldns.o: $(srcdir)/testcode/unitldns.c config.h $(srcdir)/util/log.h $(srcdir)/testcode/unitmain.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/wire2str.h + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h acl_list.lo acl_list.o: $(srcdir)/daemon/acl_list.c config.h $(srcdir)/daemon/acl_list.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/regional.h $(srcdir)/util/log.h \ $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h cachedump.lo cachedump.o: $(srcdir)/daemon/cachedump.c config.h \ $(srcdir)/daemon/cachedump.h $(srcdir)/daemon/remote.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/util/regional.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h $(srcdir)/iterator/iterator.h \ - $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_utils.h \ - $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/util/rbtree.h \ - $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h $(srcdir)/ldns/wire2str.h \ - $(srcdir)/ldns/str2wire.h + $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/data/dname.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \ + $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_utils.h $(srcdir)/iterator/iter_resptype.h \ + $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h $(srcdir)/sldns/wire2str.h \ + $(srcdir)/sldns/str2wire.h daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h \ $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h \ $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h \ $(srcdir)/util/rtt.h $(srcdir)/services/localzone.h $(srcdir)/util/random.h $(srcdir)/util/tube.h \ - $(srcdir)/util/net_help.h $(srcdir)/ldns/keyraw.h + $(srcdir)/util/net_help.h $(srcdir)/sldns/keyraw.h remote.lo remote.o: $(srcdir)/daemon/remote.c config.h \ $(srcdir)/daemon/remote.h \ - $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/ldns/sbuffer.h \ + $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ - $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ + $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ $(srcdir)/services/modstack.h $(srcdir)/daemon/cachedump.h $(srcdir)/util/config_file.h \ $(srcdir)/util/net_help.h $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/localzone.h $(srcdir)/util/fptr_wlist.h \ - $(srcdir)/util/tube.h $(srcdir)/util/data/dname.h $(srcdir)/validator/validator.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/services/mesh.h $(srcdir)/services/localzone.h \ + $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/data/dname.h $(srcdir)/validator/validator.h \ $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_kentry.h \ $(srcdir)/validator/val_anchor.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \ - $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h \ - $(srcdir)/iterator/iter_delegpt.h $(srcdir)/services/outside_network.h $(srcdir)/ldns/str2wire.h \ - $(srcdir)/ldns/parseutil.h $(srcdir)/ldns/wire2str.h + $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h $(srcdir)/iterator/iter_delegpt.h \ + $(srcdir)/services/outside_network.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/parseutil.h \ + $(srcdir)/sldns/wire2str.h stats.lo stats.o: $(srcdir)/daemon/stats.c config.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ - $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/ldns/sbuffer.h \ + $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h \ $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/outside_network.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/tube.h $(srcdir)/util/net_help.h $(srcdir)/validator/validator.h \ - $(srcdir)/validator/val_utils.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/validator/val_kcache.h + $(srcdir)/services/listen_dnsport.h $(srcdir)/util/config_file.h $(srcdir)/util/tube.h $(srcdir)/util/net_help.h \ + $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/rtt.h $(srcdir)/validator/val_kcache.h unbound.lo unbound.o: $(srcdir)/daemon/unbound.c config.h $(srcdir)/util/log.h $(srcdir)/daemon/daemon.h \ $(srcdir)/util/locks.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ $(srcdir)/daemon/remote.h \ $(srcdir)/util/config_file.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/util/netevent.h $(srcdir)/services/cache/rrset.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ - $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/util/net_help.h $(srcdir)/util/mini_event.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/net_help.h $(srcdir)/util/mini_event.h \ $(srcdir)/util/rbtree.h worker.lo worker.o: $(srcdir)/daemon/worker.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/random.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/ldns/sbuffer.h \ + $(srcdir)/util/random.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ - $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ + $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ $(srcdir)/services/modstack.h $(srcdir)/daemon/remote.h \ $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/config_file.h $(srcdir)/util/regional.h $(srcdir)/util/storage/slabhash.h \ @@ -1022,23 +1029,23 @@ worker.lo worker.o: $(srcdir)/daemon/wor testbound.lo testbound.o: $(srcdir)/testcode/testbound.c config.h $(srcdir)/testcode/testpkts.h \ $(srcdir)/testcode/replay.h $(srcdir)/util/netevent.h $(srcdir)/util/rbtree.h $(srcdir)/testcode/fake_event.h \ $(srcdir)/daemon/remote.h \ - $(srcdir)/util/config_file.h $(srcdir)/ldns/keyraw.h $(srcdir)/daemon/unbound.c $(srcdir)/util/log.h \ + $(srcdir)/util/config_file.h $(srcdir)/sldns/keyraw.h $(srcdir)/daemon/unbound.c $(srcdir)/util/log.h \ $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ - $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/rtt.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/util/net_help.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h testpkts.lo testpkts.o: $(srcdir)/testcode/testpkts.c config.h $(srcdir)/testcode/testpkts.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/wire2str.h + $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h worker.lo worker.o: $(srcdir)/daemon/worker.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/random.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/ldns/sbuffer.h \ + $(srcdir)/util/random.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ - $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ + $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ $(srcdir)/services/modstack.h $(srcdir)/daemon/remote.h \ $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/config_file.h $(srcdir)/util/regional.h $(srcdir)/util/storage/slabhash.h \ @@ -1055,134 +1062,135 @@ acl_list.lo acl_list.o: $(srcdir)/daemon daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h \ $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h \ $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h \ $(srcdir)/util/rtt.h $(srcdir)/services/localzone.h $(srcdir)/util/random.h $(srcdir)/util/tube.h \ - $(srcdir)/util/net_help.h $(srcdir)/ldns/keyraw.h + $(srcdir)/util/net_help.h $(srcdir)/sldns/keyraw.h stats.lo stats.o: $(srcdir)/daemon/stats.c config.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ - $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/ldns/sbuffer.h \ + $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h \ $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/outside_network.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/tube.h $(srcdir)/util/net_help.h $(srcdir)/validator/validator.h \ - $(srcdir)/validator/val_utils.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/validator/val_kcache.h + $(srcdir)/services/listen_dnsport.h $(srcdir)/util/config_file.h $(srcdir)/util/tube.h $(srcdir)/util/net_help.h \ + $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/rtt.h $(srcdir)/validator/val_kcache.h replay.lo replay.o: $(srcdir)/testcode/replay.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/config_file.h $(srcdir)/testcode/replay.h $(srcdir)/util/netevent.h $(srcdir)/testcode/testpkts.h \ - $(srcdir)/util/rbtree.h $(srcdir)/testcode/fake_event.h $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/rrdef.h + $(srcdir)/util/rbtree.h $(srcdir)/testcode/fake_event.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h fake_event.lo fake_event.o: $(srcdir)/testcode/fake_event.c config.h $(srcdir)/testcode/fake_event.h \ $(srcdir)/util/netevent.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/config_file.h $(srcdir)/services/listen_dnsport.h \ $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ - $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/testcode/replay.h $(srcdir)/testcode/testpkts.h \ - $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \ - $(srcdir)/services/modstack.h $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/wire2str.h $(srcdir)/ldns/str2wire.h + $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rtt.h \ + $(srcdir)/testcode/replay.h $(srcdir)/testcode/testpkts.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h \ + $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h lock_verify.lo lock_verify.o: $(srcdir)/testcode/lock_verify.c config.h $(srcdir)/util/log.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/locks.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h pktview.lo pktview.o: $(srcdir)/testcode/pktview.c config.h $(srcdir)/util/log.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/testcode/unitmain.h $(srcdir)/testcode/readhex.h $(srcdir)/ldns/sbuffer.h \ - $(srcdir)/ldns/parseutil.h + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/testcode/unitmain.h $(srcdir)/testcode/readhex.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/sldns/parseutil.h readhex.lo readhex.o: $(srcdir)/testcode/readhex.c config.h $(srcdir)/testcode/readhex.h $(srcdir)/util/log.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/parseutil.h + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/parseutil.h memstats.lo memstats.o: $(srcdir)/testcode/memstats.c config.h $(srcdir)/util/log.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/locks.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h unbound-checkconf.lo unbound-checkconf.o: $(srcdir)/smallapp/unbound-checkconf.c config.h $(srcdir)/util/log.h \ $(srcdir)/util/config_file.h $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h \ $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/services/localzone.h \ - $(srcdir)/ldns/sbuffer.h + $(srcdir)/sldns/sbuffer.h worker_cb.lo worker_cb.o: $(srcdir)/smallapp/worker_cb.c config.h $(srcdir)/libunbound/context.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ $(srcdir)/libunbound/unbound.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/libunbound/worker.h $(srcdir)/ldns/sbuffer.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h \ - $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h + $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h context.lo context.o: $(srcdir)/libunbound/context.c config.h $(srcdir)/libunbound/context.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ $(srcdir)/libunbound/unbound.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/services/localzone.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/services/localzone.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/rtt.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rtt.h $(srcdir)/sldns/sbuffer.h libunbound.lo libunbound.o: $(srcdir)/libunbound/libunbound.c $(srcdir)/libunbound/unbound.h \ $(srcdir)/libunbound/unbound-event.h config.h $(srcdir)/libunbound/context.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/libunbound/libworker.h \ $(srcdir)/util/config_file.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/regional.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/regional.h \ $(srcdir)/util/random.h $(srcdir)/util/net_help.h $(srcdir)/util/tube.h $(srcdir)/services/localzone.h \ - $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rtt.h \ + $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/sldns/sbuffer.h libworker.lo libworker.o: $(srcdir)/libunbound/libworker.c config.h \ $(srcdir)/libunbound/libworker.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h \ $(srcdir)/services/modstack.h $(srcdir)/libunbound/unbound.h $(srcdir)/libunbound/worker.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/libunbound/unbound-event.h $(srcdir)/services/outside_network.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/libunbound/unbound-event.h $(srcdir)/services/outside_network.h \ $(srcdir)/util/netevent.h $(srcdir)/services/mesh.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/services/localzone.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/services/outbound_list.h $(srcdir)/util/fptr_wlist.h \ $(srcdir)/util/tube.h $(srcdir)/util/regional.h $(srcdir)/util/random.h $(srcdir)/util/config_file.h \ $(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/data/msgencode.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/ldns/str2wire.h + $(srcdir)/util/storage/dnstree.h $(srcdir)/sldns/str2wire.h unbound-host.lo unbound-host.o: $(srcdir)/smallapp/unbound-host.c config.h $(srcdir)/libunbound/unbound.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/wire2str.h + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h asynclook.lo asynclook.o: $(srcdir)/testcode/asynclook.c config.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/libunbound/context.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h \ $(srcdir)/services/modstack.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/ldns/rrdef.h + $(srcdir)/sldns/rrdef.h streamtcp.lo streamtcp.o: $(srcdir)/testcode/streamtcp.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/net_help.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/dname.h $(srcdir)/ldns/sbuffer.h \ - $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/wire2str.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/dname.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h \ perf.lo perf.o: $(srcdir)/testcode/perf.c config.h $(srcdir)/util/log.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h \ $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/wire2str.h $(srcdir)/ldns/str2wire.h + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h delayer.lo delayer.o: $(srcdir)/testcode/delayer.c config.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h \ - $(srcdir)/util/config_file.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/util/config_file.h $(srcdir)/sldns/sbuffer.h unbound-control.lo unbound-control.o: $(srcdir)/smallapp/unbound-control.c config.h \ - $(srcdir)/util/log.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h + $(srcdir)/util/log.h $(srcdir)/util/config_file.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h unbound-anchor.lo unbound-anchor.o: $(srcdir)/smallapp/unbound-anchor.c config.h $(srcdir)/libunbound/unbound.h \ - $(srcdir)/ldns/rrdef.h \ + $(srcdir)/sldns/rrdef.h \ petal.lo petal.o: $(srcdir)/testcode/petal.c config.h \ pythonmod_utils.lo pythonmod_utils.o: $(srcdir)/pythonmod/pythonmod_utils.c config.h $(srcdir)/util/module.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h \ - $(srcdir)/util/netevent.h $(srcdir)/util/net_help.h $(srcdir)/services/cache/dns.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/netevent.h $(srcdir)/util/net_help.h $(srcdir)/services/cache/dns.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/regional.h \ - $(srcdir)/iterator/iter_delegpt.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/iterator/iter_delegpt.h $(srcdir)/sldns/sbuffer.h win_svc.lo win_svc.o: $(srcdir)/winrc/win_svc.c config.h $(srcdir)/winrc/win_svc.h $(srcdir)/winrc/w_inst.h \ $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h \ $(srcdir)/util/config_file.h $(srcdir)/util/winsock_event.h w_inst.lo w_inst.o: $(srcdir)/winrc/w_inst.c config.h $(srcdir)/winrc/w_inst.h $(srcdir)/winrc/win_svc.h @@ -1191,20 +1199,21 @@ unbound-service-install.lo unbound-servi unbound-service-remove.lo unbound-service-remove.o: $(srcdir)/winrc/unbound-service-remove.c config.h \ $(srcdir)/winrc/w_inst.h anchor-update.lo anchor-update.o: $(srcdir)/winrc/anchor-update.c config.h $(srcdir)/libunbound/unbound.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/wire2str.h -keyraw.lo keyraw.o: $(srcdir)/ldns/keyraw.c config.h $(srcdir)/ldns/keyraw.h \ - $(srcdir)/ldns/rrdef.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/wire2str.h +keyraw.lo keyraw.o: $(srcdir)/sldns/keyraw.c config.h $(srcdir)/sldns/keyraw.h \ + $(srcdir)/sldns/rrdef.h \ -sbuffer.lo sbuffer.o: $(srcdir)/ldns/sbuffer.c config.h $(srcdir)/ldns/sbuffer.h -wire2str.lo wire2str.o: $(srcdir)/ldns/wire2str.c config.h $(srcdir)/ldns/wire2str.h $(srcdir)/ldns/str2wire.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/parseutil.h $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/keyraw.h \ +sbuffer.lo sbuffer.o: $(srcdir)/sldns/sbuffer.c config.h $(srcdir)/sldns/sbuffer.h +wire2str.lo wire2str.o: $(srcdir)/sldns/wire2str.c config.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/sldns/keyraw.h \ -parse.lo parse.o: $(srcdir)/ldns/parse.c config.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/parseutil.h \ - $(srcdir)/ldns/sbuffer.h -parseutil.lo parseutil.o: $(srcdir)/ldns/parseutil.c config.h $(srcdir)/ldns/parseutil.h -rrdef.lo rrdef.o: $(srcdir)/ldns/rrdef.c config.h $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/parseutil.h -str2wire.lo str2wire.o: $(srcdir)/ldns/str2wire.c config.h $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/rrdef.h \ - $(srcdir)/ldns/wire2str.h $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/parseutil.h +parse.lo parse.o: $(srcdir)/sldns/parse.c config.h $(srcdir)/sldns/parse.h $(srcdir)/sldns/parseutil.h \ + $(srcdir)/sldns/sbuffer.h +parseutil.lo parseutil.o: $(srcdir)/sldns/parseutil.c config.h $(srcdir)/sldns/parseutil.h +rrdef.lo rrdef.o: $(srcdir)/sldns/rrdef.c config.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/parseutil.h +str2wire.lo str2wire.o: $(srcdir)/sldns/str2wire.c config.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/parse.h $(srcdir)/sldns/parseutil.h ctime_r.lo ctime_r.o: $(srcdir)/compat/ctime_r.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h fake-rfc2553.lo fake-rfc2553.o: $(srcdir)/compat/fake-rfc2553.c $(srcdir)/compat/fake-rfc2553.h config.h gmtime_r.lo gmtime_r.o: $(srcdir)/compat/gmtime_r.c config.h @@ -1228,3 +1237,4 @@ arc4random.lo arc4random.o: $(srcdir)/co arc4random_uniform.lo arc4random_uniform.o: $(srcdir)/compat/arc4random_uniform.c config.h arc4_lock.lo arc4_lock.o: $(srcdir)/compat/arc4_lock.c config.h $(srcdir)/util/locks.h sha512.lo sha512.o: $(srcdir)/compat/sha512.c config.h +reallocarray.lo reallocarray.o: $(srcdir)/compat/reallocarray.c config.h Modified: head/contrib/unbound/acx_nlnetlabs.m4 ============================================================================== --- head/contrib/unbound/acx_nlnetlabs.m4 Thu Sep 17 15:22:09 2015 (r287916) +++ head/contrib/unbound/acx_nlnetlabs.m4 Thu Sep 17 16:10:11 2015 (r287917) @@ -2,7 +2,8 @@ # Copyright 2009, Wouter Wijngaards, NLnet Labs. # BSD licensed. # -# Version 26 +# Version 27 +# 2015-03-17 AHX_CONFIG_REALLOCARRAY added # 2013-09-19 FLTO help text improved. # 2013-07-18 Enable ACX_CHECK_COMPILER_FLAG to test for -Wstrict-prototypes # 2013-06-25 FLTO has --disable-flto option. @@ -1213,6 +1214,16 @@ struct tm *gmtime_r(const time_t *timep, #endif ]) +dnl provide reallocarray compat prototype. +dnl $1: unique name for compat code +AC_DEFUN([AHX_CONFIG_REALLOCARRAY], +[ +#ifndef HAVE_REALLOCARRAY +#define reallocarray reallocarray$1 +void* reallocarray(void *ptr, size_t nmemb, size_t size); +#endif +]) + dnl provide w32 compat definition for sleep AC_DEFUN([AHX_CONFIG_W32_SLEEP], [ Modified: head/contrib/unbound/compat/getentropy_linux.c ============================================================================== --- head/contrib/unbound/compat/getentropy_linux.c Thu Sep 17 15:22:09 2015 (r287916) +++ head/contrib/unbound/compat/getentropy_linux.c Thu Sep 17 16:10:11 2015 (r287917) @@ -77,6 +77,9 @@ int getentropy(void *buf, size_t len); extern int main(int, char *argv[]); #endif static int gotdata(char *buf, size_t len); +#ifdef SYS_getrandom +static int getentropy_getrandom(void *buf, size_t len); +#endif static int getentropy_urandom(void *buf, size_t len); #ifdef SYS__sysctl static int getentropy_sysctl(void *buf, size_t len); @@ -94,11 +97,15 @@ getentropy(void *buf, size_t len) } #ifdef SYS_getrandom - /* try to use getrandom syscall introduced with kernel 3.17 */ - ret = syscall(SYS_getrandom, buf, len, 0); + /* + * Try descriptor-less getrandom() + */ + ret = getentropy_getrandom(buf, len); if (ret != -1) return (ret); -#endif /* SYS_getrandom */ + if (errno != ENOSYS) + return (-1); +#endif /* * Try to get entropy with /dev/urandom @@ -185,6 +192,25 @@ gotdata(char *buf, size_t len) return 0; } +#ifdef SYS_getrandom +static int +getentropy_getrandom(void *buf, size_t len) +{ + int pre_errno = errno; + int ret; + if (len > 256) + return (-1); + do { + ret = syscall(SYS_getrandom, buf, len, 0); + } while (ret == -1 && errno == EINTR); + + if (ret != (int)len) + return (-1); + errno = pre_errno; + return (0); +} +#endif + static int getentropy_urandom(void *buf, size_t len) { @@ -258,7 +284,7 @@ getentropy_sysctl(void *buf, size_t len) struct __sysctl_args args = { .name = mib, .nlen = 3, - .oldval = buf + i, + .oldval = (char *)buf + i, .oldlenp = &chunk, }; if (syscall(SYS__sysctl, &args) != 0) Copied: head/contrib/unbound/compat/reallocarray.c (from r287915, vendor/unbound/dist/compat/reallocarray.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/unbound/compat/reallocarray.c Thu Sep 17 16:10:11 2015 (r287917, copy of r287915, vendor/unbound/dist/compat/reallocarray.c) @@ -0,0 +1,39 @@ +/* $OpenBSD: reallocarray.c,v 1.1 2014/05/08 21:43:49 deraadt Exp $ */ +/* + * Copyright (c) 2008 Otto Moerbeek + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include "config.h" +#include +#include +#include +#include + +/* + * This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX + * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW + */ +#define MUL_NO_OVERFLOW ((size_t)1 << (sizeof(size_t) * 4)) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu Sep 17 16:16:59 2015 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 858B99CE366; Thu, 17 Sep 2015 16:16:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 6F2A418AC; Thu, 17 Sep 2015 16:16:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 666061D3C; Thu, 17 Sep 2015 16:16:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 15F35BF74; Thu, 17 Sep 2015 16:16:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id JfcJC6EOpRoH; Thu, 17 Sep 2015 16:16:56 +0000 (UTC) Subject: Re: svn commit: r287886 - head/sys/sys DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 9B0F9BF6A To: Alexey Dokuchaev , Steven Hartland References: <201509170003.t8H03uSf070155@repo.freebsd.org> <20150917081541.GA65088@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Organization: FreeBSD Message-ID: <55FAE777.4010709@FreeBSD.org> Date: Thu, 17 Sep 2015 09:16:55 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150917081541.GA65088@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 17 Sep 2015 16:16:59 -0000 On 9/17/15 1:15 AM, Alexey Dokuchaev wrote: > On Thu, Sep 17, 2015 at 12:03:56AM +0000, Steven Hartland wrote: >> New Revision: 287886 >> URL: https://svnweb.freebsd.org/changeset/base/287886 >> >> Log: >> Fix kqueue write events for files > 2GB >> >> Due to the use of int's for file offsets in the VOP_WRITE_(PRE|POST) >> macros, kqueue write events for files greater 2GB where never fired. >> >> This caused tail -f on a file greater 2GB to never see updates. > > Oh that's an embarrassing bug. > Please try to get an EN for this :) -- Regards, Bryan Drewery From owner-svn-src-head@freebsd.org Thu Sep 17 16:19:37 2015 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 9B7089CE4E6; Thu, 17 Sep 2015 16:19:37 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 8C4801B58; Thu, 17 Sep 2015 16:19:37 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HGJbZe071082; Thu, 17 Sep 2015 16:19:37 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HGJb2c071081; Thu, 17 Sep 2015 16:19:37 GMT (envelope-from des@FreeBSD.org) Message-Id: <201509171619.t8HGJb2c071081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Thu, 17 Sep 2015 16:19:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287918 - head/contrib/unbound/util X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 16:19:37 -0000 Author: des Date: Thu Sep 17 16:19:36 2015 New Revision: 287918 URL: https://svnweb.freebsd.org/changeset/base/287918 Log: When chrooted, we need to strip the chroot directory from the front of included paths. Don't forget to do it for globs as well. Modified: head/contrib/unbound/util/configlexer.lex Modified: head/contrib/unbound/util/configlexer.lex ============================================================================== --- head/contrib/unbound/util/configlexer.lex Thu Sep 17 16:10:11 2015 (r287917) +++ head/contrib/unbound/util/configlexer.lex Thu Sep 17 16:19:36 2015 (r287918) @@ -128,6 +128,10 @@ static void config_start_include_glob(co #endif ; memset(&g, 0, sizeof(g)); + if(cfg_parser->chroot && strncmp(filename, cfg_parser->chroot, + strlen(cfg_parser->chroot)) == 0) { + filename += strlen(cfg_parser->chroot); + } r = glob(filename, flags, NULL, &g); if(r) { /* some error */ From owner-svn-src-head@freebsd.org Thu Sep 17 16:38:33 2015 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 B27DD9CEE67; Thu, 17 Sep 2015 16:38:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 893561A22; Thu, 17 Sep 2015 16:38:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HGcXUF079489; Thu, 17 Sep 2015 16:38:33 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HGcXsm079487; Thu, 17 Sep 2015 16:38:33 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509171638.t8HGcXsm079487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 17 Sep 2015 16:38:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287919 - head/share/mk X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 16:38:33 -0000 Author: bdrewery Date: Thu Sep 17 16:38:32 2015 New Revision: 287919 URL: https://svnweb.freebsd.org/changeset/base/287919 Log: Fix makeman creating obj directories due to turning on WITH_AUTO_OBJ. r284708 addressed this slightly but seems to have put the make(showconfig) guard in the wrong place. Rather than guard setting the default obj directory, guard inclusion of auto.obj.mk. This avoids creating SRCTOP/obj and SRCTOP/release/obj when running makeman. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/local.meta.sys.mk head/share/mk/sys.mk Modified: head/share/mk/local.meta.sys.mk ============================================================================== --- head/share/mk/local.meta.sys.mk Thu Sep 17 16:19:36 2015 (r287918) +++ head/share/mk/local.meta.sys.mk Thu Sep 17 16:38:32 2015 (r287919) @@ -10,7 +10,6 @@ MK_INSTALL_AS_USER= yes _default_makeobjdir=$${.CURDIR:S,^$${SRCTOP},$${OBJTOP},} .if empty(OBJROOT) || ${.MAKE.LEVEL} == 0 -.if !make(showconfig) .if defined(MAKEOBJDIRPREFIX) # put things approximately where they want OBJROOT:=${MAKEOBJDIRPREFIX}${SRCTOP}/ @@ -25,7 +24,6 @@ MAKEOBJDIR=${_default_makeobjdir} # Expand for our own use MAKEOBJDIR:= ${MAKEOBJDIR} .endif -.endif .if !empty(SB) SB_OBJROOT ?= ${SB}/obj/ # this is what we use below Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Thu Sep 17 16:19:36 2015 (r287918) +++ head/share/mk/sys.mk Thu Sep 17 16:38:32 2015 (r287919) @@ -47,8 +47,8 @@ __DEFAULT_DEPENDENT_OPTIONS= \ .endif .if ${MK_AUTO_OBJ} == "yes" # This needs to be done early - before .PATH is computed -# Don't do this if just running make -V -.if ${.MAKEFLAGS:M-V} == "" +# Don't do this if just running 'make -V' or 'make showconfig' +.if ${.MAKEFLAGS:M-V} == "" && !make(showconfig) .sinclude .endif .endif From owner-svn-src-head@freebsd.org Thu Sep 17 16:56:49 2015 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 E98229CF5B4; Thu, 17 Sep 2015 16:56:49 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 DAC11141A; Thu, 17 Sep 2015 16:56:49 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HGungp087560; Thu, 17 Sep 2015 16:56:49 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HGunFo087559; Thu, 17 Sep 2015 16:56:49 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201509171656.t8HGunFo087559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Thu, 17 Sep 2015 16:56:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287920 - head/sbin/route X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 16:56:50 -0000 Author: rstone Date: Thu Sep 17 16:56:49 2015 New Revision: 287920 URL: https://svnweb.freebsd.org/changeset/base/287920 Log: Fix /sbin/route to never look up (invalid) interface names through DNS /sbin/route has a bug where if it is passed an interface name that does not exist, it falls through and winds up interpreting it as a hostname. It fails out eventually, but on a system where DNS lookup is broken you can end up waiting for up to 60 seconds waiting for the DNS lookup to timeout. I'm not quite sure what happens if the DNS lookup somehow succeeds but I doubt that can end well. Reviewed by: markj, cem MFC after: 2 weeks Sponsored by: EMC/Isilon Storage Division Modified: head/sbin/route/route.c Modified: head/sbin/route/route.c ============================================================================== --- head/sbin/route/route.c Thu Sep 17 16:38:32 2015 (r287919) +++ head/sbin/route/route.c Thu Sep 17 16:56:49 2015 (r287920) @@ -1222,6 +1222,9 @@ getaddr(int idx, char *str, struct hoste freeifaddrs(ifap); if (sdl != NULL) return(1); + else + errx(EX_DATAERR, + "interface '%s' does not exist", str); } break; case RTAX_IFP: From owner-svn-src-head@freebsd.org Thu Sep 17 17:00:38 2015 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 D98669CF8EF; Thu, 17 Sep 2015 17:00:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 BB3261A0C; Thu, 17 Sep 2015 17:00:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HH0cgR088319; Thu, 17 Sep 2015 17:00:38 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HH0bSm088315; Thu, 17 Sep 2015 17:00:37 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509171700.t8HH0bSm088315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 17 Sep 2015 17:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287921 - head/sys/cam/ctl X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 17:00:39 -0000 Author: mav Date: Thu Sep 17 17:00:36 2015 New Revision: 287921 URL: https://svnweb.freebsd.org/changeset/base/287921 Log: When reporting TPT UA, report which of thresholds was reached. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_error.c head/sys/cam/ctl/ctl_io.h head/sys/cam/ctl/ctl_private.h Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Thu Sep 17 16:56:49 2015 (r287920) +++ head/sys/cam/ctl/ctl.c Thu Sep 17 17:00:36 2015 (r287921) @@ -703,6 +703,9 @@ ctl_isc_ua(struct ctl_softc *softc, unio (lun = softc->ctl_luns[msg->hdr.nexus.targ_mapped_lun]) != NULL) { mtx_lock(&lun->lun_lock); mtx_unlock(&softc->ctl_lock); + if (msg->ua.ua_type == CTL_UA_THIN_PROV_THRES && + msg->ua.ua_set) + memcpy(lun->ua_tpt_info, msg->ua.ua_info, 8); if (msg->ua.ua_all) { if (msg->ua.ua_set) ctl_est_ua_all(lun, iid, msg->ua.ua_type); @@ -11131,15 +11134,9 @@ ctl_scsiio_precheck(struct ctl_softc *so */ if ((entry->flags & CTL_CMD_FLAG_NO_SENSE) == 0) { ctl_ua_type ua_type; - scsi_sense_data_type sense_format; - - if (lun->flags & CTL_LUN_SENSE_DESC) - sense_format = SSD_TYPE_DESC; - else - sense_format = SSD_TYPE_FIXED; ua_type = ctl_build_ua(lun, initidx, &ctsio->sense_data, - sense_format); + SSD_TYPE_NONE); if (ua_type != CTL_UA_NONE) { mtx_unlock(&lun->lun_lock); ctsio->scsi_status = SCSI_STATUS_CHECK_COND; @@ -13338,12 +13335,16 @@ ctl_thresh_thread(void *arg) continue; if ((page->descr[i].flags & SLBPPD_ARMING_MASK) == SLBPPD_ARMING_INC) - e |= (val >= thres); + e = (val >= thres); else - e |= (val <= thres); + e = (val <= thres); + if (e) + break; } mtx_lock(&lun->lun_lock); if (e) { + scsi_u64to8b((uint8_t *)&page->descr[i] - + (uint8_t *)page, lun->ua_tpt_info); if (lun->lasttpt == 0 || time_uptime - lun->lasttpt >= CTL_LBP_UA_PERIOD) { lun->lasttpt = time_uptime; @@ -13369,6 +13370,7 @@ ctl_thresh_thread(void *arg) msg.ua.ua_all = 1; msg.ua.ua_set = (set > 0); msg.ua.ua_type = CTL_UA_THIN_PROV_THRES; + memcpy(msg.ua.ua_info, lun->ua_tpt_info, 8); mtx_unlock(&softc->ctl_lock); // XXX ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg, sizeof(msg.ua), M_WAITOK); Modified: head/sys/cam/ctl/ctl_error.c ============================================================================== --- head/sys/cam/ctl/ctl_error.c Thu Sep 17 16:56:49 2015 (r287920) +++ head/sys/cam/ctl/ctl_error.c Thu Sep 17 17:00:36 2015 (r287921) @@ -366,8 +366,8 @@ ctl_set_ua(struct ctl_scsiio *ctsio, int } static void -ctl_ua_to_acsq(ctl_ua_type ua_to_build, int *asc, int *ascq, - ctl_ua_type *ua_to_clear) +ctl_ua_to_acsq(struct ctl_lun *lun, ctl_ua_type ua_to_build, int *asc, + int *ascq, ctl_ua_type *ua_to_clear, uint8_t **info) { switch (ua_to_build) { @@ -453,6 +453,7 @@ ctl_ua_to_acsq(ctl_ua_type ua_to_build, /* 38h/07h THIN PROVISIONING SOFT THRESHOLD REACHED */ *asc = 0x38; *ascq = 0x07; + *info = lun->ua_tpt_info; break; default: panic("%s: Unknown UA %x", __func__, ua_to_build); @@ -464,6 +465,7 @@ ctl_build_qae(struct ctl_lun *lun, uint3 { ctl_ua_type ua; ctl_ua_type ua_to_build, ua_to_clear; + uint8_t *info; int asc, ascq; uint32_t p, i; @@ -479,7 +481,8 @@ ctl_build_qae(struct ctl_lun *lun, uint3 ua_to_build = (1 << (ffs(ua) - 1)); ua_to_clear = ua_to_build; - ctl_ua_to_acsq(ua_to_build, &asc, &ascq, &ua_to_clear); + info = NULL; + ctl_ua_to_acsq(lun, ua_to_build, &asc, &ascq, &ua_to_clear, &info); resp[0] = SSD_KEY_UNIT_ATTENTION; if (ua_to_build == ua) @@ -497,6 +500,7 @@ ctl_build_ua(struct ctl_lun *lun, uint32 { ctl_ua_type *ua; ctl_ua_type ua_to_build, ua_to_clear; + uint8_t *info; int asc, ascq; uint32_t p, i; @@ -522,16 +526,13 @@ ctl_build_ua(struct ctl_lun *lun, uint32 ua_to_build = (1 << (ffs(ua[i]) - 1)); ua_to_clear = ua_to_build; - ctl_ua_to_acsq(ua_to_build, &asc, &ascq, &ua_to_clear); + info = NULL; + ctl_ua_to_acsq(lun, ua_to_build, &asc, &ascq, &ua_to_clear, &info); - ctl_set_sense_data(sense, - /*lun*/ NULL, - sense_format, - /*current_error*/ 1, - /*sense_key*/ SSD_KEY_UNIT_ATTENTION, - asc, - ascq, - SSD_ELEM_NONE); + ctl_set_sense_data(sense, lun, sense_format, /*current_error*/ 1, + /*sense_key*/ SSD_KEY_UNIT_ATTENTION, asc, ascq, + ((info != NULL) ? SSD_ELEM_INFO : SSD_ELEM_SKIP), 8, info, + SSD_ELEM_NONE); /* We're reporting this UA, so clear it */ ua[i] &= ~ua_to_clear; Modified: head/sys/cam/ctl/ctl_io.h ============================================================================== --- head/sys/cam/ctl/ctl_io.h Thu Sep 17 16:56:49 2015 (r287920) +++ head/sys/cam/ctl/ctl_io.h Thu Sep 17 17:00:36 2015 (r287921) @@ -408,6 +408,7 @@ struct ctl_ha_msg_ua { int ua_all; int ua_set; int ua_type; + uint8_t ua_info[8]; }; /* Modified: head/sys/cam/ctl/ctl_private.h ============================================================================== --- head/sys/cam/ctl/ctl_private.h Thu Sep 17 16:56:49 2015 (r287920) +++ head/sys/cam/ctl/ctl_private.h Thu Sep 17 17:00:36 2015 (r287921) @@ -393,6 +393,7 @@ struct ctl_lun { struct scsi_sense_data pending_sense[CTL_MAX_INITIATORS]; #endif ctl_ua_type *pending_ua[CTL_MAX_PORTS]; + uint8_t ua_tpt_info[8]; time_t lasttpt; struct ctl_mode_pages mode_pages; struct ctl_log_pages log_pages; From owner-svn-src-head@freebsd.org Thu Sep 17 17:27:29 2015 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 A00189CF2A5; Thu, 17 Sep 2015 17:27:29 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com [IPv6:2607:f8b0:4001:c06::22d]) (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 6B2AA1D00; Thu, 17 Sep 2015 17:27:29 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by iofh134 with SMTP id h134so29868621iof.0; Thu, 17 Sep 2015 10:27:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=WpHOEG4pxmSGCuM5q0oWcp0NrFT4Do3LiQDy6ExZaWI=; b=ek84KGyjVi1vSPGdJlwnKj1ZNs9HDl8Iwvy6G0P6Nv+qhyEX11sEs0gaJwlz4X5x5W aOSB7xW5wy1dsas2yx7m6jeGZARN8oEY1jO8q4xcS8ed4glLcFxp6lN7Xt3wppXJqFFq S7AtUzNVggjaQsCWU8RYWJIcEQs2L3UgBo/eKY3WWOb6rQyVZrSLzsWgR4wyd3S4UbXT mZ/0PIXWMY4g2c04WKP90+uh3c9ci5oLJBLsMTDj07A3cYoDdrohFAxF4bgpS3XP9L6Q gfzX1wkQstVCrpFvMy0WDoHRWoD+zDuBB1Ur14YhAmF7Hm6sDYDn9epC/G3FYKq9tUb6 l2sw== MIME-Version: 1.0 X-Received: by 10.107.35.78 with SMTP id j75mr7905905ioj.123.1442510848775; Thu, 17 Sep 2015 10:27:28 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.28.208 with HTTP; Thu, 17 Sep 2015 10:27:28 -0700 (PDT) In-Reply-To: <55FA7196.40004@selasky.org> References: <201509170301.t8H31KdP042687@repo.freebsd.org> <55FA6C62.6010705@selasky.org> <55FA6EA2.8050809@selasky.org> <55FA7196.40004@selasky.org> Date: Thu, 17 Sep 2015 10:27:28 -0700 X-Google-Sender-Auth: aBkzIFB-Beo1_pTWu2cHU8YB0CY Message-ID: Subject: Re: svn commit: r287892 - head/sys/dev/usb/wlan From: Adrian Chadd To: Hans Petter Selasky Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 17 Sep 2015 17:27:29 -0000 On 17 September 2015 at 00:53, Hans Petter Selasky wrote: > Hi Adrian, > > On 09/17/15 09:43, Adrian Chadd wrote: >> >> .. I'm likely going to do exactly that as part of "making" if_rsu do >> 11n and behave correctly. Right now it does neither. > > > Thank you for helping out with the USB WLAN drivers. Yes, USB requests sleep > and don't spin until they're done. > >> >> But this is a pretty big design pattern flaw; all of the wifi drivers >> use the usb library like this and .. well, unless you look under the >> hood, you don't really realise that serialiser lock is being dropped >> for you... :( > > > Right. If you need any help test, code or review, let me know. > > Not dropping the mutex inside USB sleeping functions would force all USB > drivers to use SX locks or lower in the locking hierherachy, for > synchronization, which would not be so good. Well, that's a big design warning alert. Same as NICs that do UNLOCK;input;LOCK and chunks of the wifi stack I inherited which do the same thing - you suddenly can't guarantee consistency in any way. So, we need some way to serialise management accesses and TX/RX accesses and we need to use that design pattern for all drivers. Right now it's "use mutex to serialize hardware state" which people then break with unlock;stackwork;lock or unlock;sleep;lock. I can't point to a specific USB device that does it correctly (and most PCI wifi drivers don't do it either. Sigh.) -adrian From owner-svn-src-head@freebsd.org Thu Sep 17 17:27:50 2015 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 60A389CF309; Thu, 17 Sep 2015 17:27:50 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 51ABD1EC6; Thu, 17 Sep 2015 17:27:50 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HHRoRW007913; Thu, 17 Sep 2015 17:27:50 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HHRoYr007912; Thu, 17 Sep 2015 17:27:50 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201509171727.t8HHRoYr007912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 17 Sep 2015 17:27:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287923 - head/sys/netinet X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 17:27:50 -0000 Author: glebius Date: Thu Sep 17 17:27:49 2015 New Revision: 287923 URL: https://svnweb.freebsd.org/changeset/base/287923 Log: Use proper byteswap macro. This isn't a functional change. Modified: head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Thu Sep 17 17:09:03 2015 (r287922) +++ head/sys/netinet/tcp_subr.c Thu Sep 17 17:27:49 2015 (r287923) @@ -1530,7 +1530,7 @@ tcp_ctlinput(int cmd, struct sockaddr *s if (!(inp->inp_flags & INP_TIMEWAIT) && !(inp->inp_flags & INP_DROPPED) && !(inp->inp_socket == NULL)) { - icmp_tcp_seq = htonl(th->th_seq); + icmp_tcp_seq = ntohl(th->th_seq); tp = intotcpcb(inp); if (SEQ_GEQ(icmp_tcp_seq, tp->snd_una) && SEQ_LT(icmp_tcp_seq, tp->snd_max)) { From owner-svn-src-head@freebsd.org Thu Sep 17 17:35:07 2015 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 B47BE9CF6B4; Thu, 17 Sep 2015 17:35:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 A555A1504; Thu, 17 Sep 2015 17:35:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HHZ7oI011876; Thu, 17 Sep 2015 17:35:07 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HHZ7uj011875; Thu, 17 Sep 2015 17:35:07 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509171735.t8HHZ7uj011875@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 17 Sep 2015 17:35:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287924 - head/share/mk X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 17:35:07 -0000 Author: bdrewery Date: Thu Sep 17 17:35:06 2015 New Revision: 287924 URL: https://svnweb.freebsd.org/changeset/base/287924 Log: Include bsd.mkopt.mk after local.sys.env.mk (which includes /etc/src-env.conf). This will allow setting WITH_META_MODE in that file rather that requiring it to be set in the environment. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/sys.mk Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Thu Sep 17 17:27:49 2015 (r287923) +++ head/share/mk/sys.mk Thu Sep 17 17:35:06 2015 (r287924) @@ -29,8 +29,6 @@ __DEFAULT_DEPENDENT_OPTIONS= \ STAGING/META_MODE \ SYSROOT/META_MODE -.include - # early include for customization # see local.sys.mk below # Not included when building in fmake compatibility mode (still needed @@ -38,6 +36,8 @@ __DEFAULT_DEPENDENT_OPTIONS= \ .if defined(.PARSEDIR) .sinclude +.include + .if ${MK_META_MODE} == "yes" .sinclude .elif ${MK_META_FILES} == "yes" && defined(.MAKEFLAGS) @@ -52,7 +52,8 @@ __DEFAULT_DEPENDENT_OPTIONS= \ .sinclude .endif .endif - +.else # bmake +.include .endif # If the special target .POSIX appears (without prerequisites or From owner-svn-src-head@freebsd.org Thu Sep 17 17:45:22 2015 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 24DF69CFBCE; Thu, 17 Sep 2015 17:45:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 F05DD1E64; Thu, 17 Sep 2015 17:45:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HHjLDa016537; Thu, 17 Sep 2015 17:45:21 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HHjLAe016523; Thu, 17 Sep 2015 17:45:21 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509171745.t8HHjLAe016523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 17 Sep 2015 17:45:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287925 - in head: share/man/man5 tools/build/options X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 17:45:22 -0000 Author: bdrewery Date: Thu Sep 17 17:45:20 2015 New Revision: 287925 URL: https://svnweb.freebsd.org/changeset/base/287925 Log: Document src-env.conf and note its use for MAKEOBJDIRPREFIX and WITH_META_MDOE. Sponsored by: EMC / Isilon Storage Division Modified: head/share/man/man5/Makefile head/tools/build/options/WITH_META_MODE head/tools/build/options/makeman Modified: head/share/man/man5/Makefile ============================================================================== --- head/share/man/man5/Makefile Thu Sep 17 17:35:06 2015 (r287924) +++ head/share/man/man5/Makefile Thu Sep 17 17:45:20 2015 (r287925) @@ -78,6 +78,7 @@ MLINKS+=portindex.5 INDEX.5 MLINKS+=quota.user.5 quota.group.5 MLINKS+=rc.conf.5 rc.conf.local.5 MLINKS+=resolver.5 resolv.conf.5 +MLINKS+=src.conf.5 src-env.conf.5 .if ${MK_AUTOFS} != "no" MAN+= autofs.5 Modified: head/tools/build/options/WITH_META_MODE ============================================================================== --- head/tools/build/options/WITH_META_MODE Thu Sep 17 17:35:06 2015 (r287924) +++ head/tools/build/options/WITH_META_MODE Thu Sep 17 17:45:20 2015 (r287925) @@ -25,6 +25,11 @@ If is available the meta file will also capture a record of files used to produce the target by tracking syscalls. .Pp +This must be set in the environment or +.Pa /etc/src-env.conf , +not +.Pa /etc/src.conf . +.Pp The build will hide commands ran unless .Va NO_SILENT is defined. Modified: head/tools/build/options/makeman ============================================================================== --- head/tools/build/options/makeman Thu Sep 17 17:35:06 2015 (r287924) +++ head/tools/build/options/makeman Thu Sep 17 17:45:20 2015 (r287925) @@ -188,6 +188,18 @@ option of or in its environment; see .Xr environ 7 . .Pp +The environment of +.Xr make 1 +for the build can be controlled via the +.Va SRC_ENV_CONF +variable, which defaults to +.Pa /etc/src-env.conf . +Some examples that may only be set in this file are +.Va MAKEOBJDIRPREFIX , +and +.Va WITH_META_MODE +as they are environment-only variables. +.Pp The values of variables are ignored regardless of their setting; even if they would be set to .Dq Li FALSE @@ -284,6 +296,7 @@ EOF .Sh FILES .Bl -tag -compact -width Pa .It Pa /etc/src.conf +.It Pa /etc/src-env.conf .It Pa /usr/share/mk/bsd.own.mk .El .Sh SEE ALSO From owner-svn-src-head@freebsd.org Thu Sep 17 18:11:27 2015 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 BF72C9CE8A6; Thu, 17 Sep 2015 18:11:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 B04111EEA; Thu, 17 Sep 2015 18:11:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HIBRi4029963; Thu, 17 Sep 2015 18:11:27 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HIBRD7029962; Thu, 17 Sep 2015 18:11:27 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201509171811.t8HIBRD7029962@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 17 Sep 2015 18:11:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287927 - head/usr.sbin/bhyve X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 18:11:27 -0000 Author: delphij Date: Thu Sep 17 18:11:26 2015 New Revision: 287927 URL: https://svnweb.freebsd.org/changeset/base/287927 Log: Use strlcpy() instead of strncpy() because subsequent mkstemps expects the string be nul-terminated. Reviewed by: neel MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D3685 Modified: head/usr.sbin/bhyve/acpi.c Modified: head/usr.sbin/bhyve/acpi.c ============================================================================== --- head/usr.sbin/bhyve/acpi.c Thu Sep 17 17:56:23 2015 (r287926) +++ head/usr.sbin/bhyve/acpi.c Thu Sep 17 18:11:26 2015 (r287927) @@ -790,10 +790,10 @@ basl_open(struct basl_fio *bf, int suffi err = 0; if (suffix) { - strncpy(bf->f_name, basl_stemplate, MAXPATHLEN); + strlcpy(bf->f_name, basl_stemplate, MAXPATHLEN); bf->fd = mkstemps(bf->f_name, strlen(BHYVE_ASL_SUFFIX)); } else { - strncpy(bf->f_name, basl_template, MAXPATHLEN); + strlcpy(bf->f_name, basl_template, MAXPATHLEN); bf->fd = mkstemp(bf->f_name); } From owner-svn-src-head@freebsd.org Thu Sep 17 18:32:52 2015 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 C4F759CF4C9; Thu, 17 Sep 2015 18:32:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 9B6DB1FA4; Thu, 17 Sep 2015 18:32:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HIWq3Y038795; Thu, 17 Sep 2015 18:32:52 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HIWqfc038793; Thu, 17 Sep 2015 18:32:52 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201509171832.t8HIWqfc038793@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 17 Sep 2015 18:32:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287930 - in head/sys/boot/efi: boot1 loader X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 18:32:52 -0000 Author: jhb Date: Thu Sep 17 18:32:51 2015 New Revision: 287930 URL: https://svnweb.freebsd.org/changeset/base/287930 Log: Various small cleanups to EFI loader Makefiles. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D3641 Modified: head/sys/boot/efi/boot1/Makefile head/sys/boot/efi/loader/Makefile Modified: head/sys/boot/efi/boot1/Makefile ============================================================================== --- head/sys/boot/efi/boot1/Makefile Thu Sep 17 18:21:47 2015 (r287929) +++ head/sys/boot/efi/boot1/Makefile Thu Sep 17 18:32:51 2015 (r287930) @@ -9,7 +9,7 @@ MAN= MK_SSP= no -PROG= loader.sym +PROG= boot1.sym INTERNALPROG= # architecture-specific loader code @@ -50,7 +50,7 @@ DPADD+= ${LIBSTAND} LDADD+= -lstand .endif -${PROG}: ${LDSCRIPT} +DPADD+= ${LDSCRIPT} OBJCOPY?= objcopy OBJDUMP?= objdump @@ -63,19 +63,19 @@ EFI_TARGET= efi-app-ia32 EFI_TARGET= binary .endif -boot1.efi: loader.sym +boot1.efi: ${PROG} if [ `${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*' | wc -l` != 0 ]; then \ ${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*'; \ exit 1; \ fi ${OBJCOPY} -j .peheader -j .text -j .sdata -j .data \ -j .dynamic -j .dynsym -j .rel.dyn \ - -j .rela.dyn -j .reloc -j .eh_frame -j set_Xcommand_set \ + -j .rela.dyn -j .reloc -j .eh_frame \ --output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET} boot1.o: ${.CURDIR}/../../common/ufsread.c -# The following inserts out objects into a template FAT file system +# The following inserts our objects into a template FAT file system # created by generate-fat.sh .include "${.CURDIR}/Makefile.fat" Modified: head/sys/boot/efi/loader/Makefile ============================================================================== --- head/sys/boot/efi/loader/Makefile Thu Sep 17 18:21:47 2015 (r287929) +++ head/sys/boot/efi/loader/Makefile Thu Sep 17 18:32:51 2015 (r287930) @@ -12,7 +12,6 @@ MK_SSP= no PROG= loader.sym INTERNALPROG= -.PATH: ${.CURDIR}/../../efi/loader # architecture-specific loader code SRCS= autoload.c \ bootinfo.c \ @@ -97,7 +96,7 @@ EFI_TARGET= efi-app-ia32 EFI_TARGET= binary .endif -loader.efi: loader.sym +loader.efi: ${PROG} if [ `${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*' | wc -l` != 0 ]; then \ ${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*'; \ exit 1; \ From owner-svn-src-head@freebsd.org Thu Sep 17 20:03:50 2015 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 9E0379CFEE3 for ; Thu, 17 Sep 2015 20:03:50 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) (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 45FFE12B4 for ; Thu, 17 Sep 2015 20:03:50 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by wicfx3 with SMTP id fx3so38328825wic.1 for ; Thu, 17 Sep 2015 13:03:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=F+dAswfrHRAyATRtMLG8kFzAMW+wSuQGUV0ZEbovOHI=; b=kvGtH8NoPBy9hdbSb/wQwoQNgfWTUCPnZY5dZqR/h2Yq53czctat+7KYhnFMVKy0Nf lU0haCmWg8HW+7jjPSprXTyUUaOZorAdMraFbw7aDCuQO2zVhRhK/1a8VHMUgiYYlT6v teL3752NMwpZa7uWh0s9Sp3PtsfNVsBB16hl6XUW+HR3NnRIZuVtDllvokyc1zlaB354 r37SgHM09oegtRVcs8/3WrnNF+UTcu98qV6RrIrleuqGTj1YZ/xofFQXCc7cgDHCFJyf hQO/G5w3JlAo3RbKC1Ci6W+QoOlPyfCwxNYfBEQyqDAi0NtjW6cda2082OQR/u9XDFSj qvEA== X-Gm-Message-State: ALoCoQld+79HvZzr1jMJgHzTakV12/q+qmAnDfOu4FDl6KTqaOw0OAVy80+Qlz9U2sTur9g2GYDr X-Received: by 10.180.23.162 with SMTP id n2mr10810677wif.8.1442519794321; Thu, 17 Sep 2015 12:56:34 -0700 (PDT) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by smtp.gmail.com with ESMTPSA id x7sm11763775wia.10.2015.09.17.12.56.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Sep 2015 12:56:33 -0700 (PDT) From: Steven Hartland X-Google-Original-From: Steven Hartland Subject: Re: svn commit: r287886 - head/sys/sys To: Bryan Drewery , Alexey Dokuchaev References: <201509170003.t8H03uSf070155@repo.freebsd.org> <20150917081541.GA65088@FreeBSD.org> <55FAE777.4010709@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <55FB1AE9.8040804@freebsd.org> Date: Thu, 17 Sep 2015 20:56:25 +0100 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <55FAE777.4010709@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 17 Sep 2015 20:03:50 -0000 On 17/09/2015 17:16, Bryan Drewery wrote: > On 9/17/15 1:15 AM, Alexey Dokuchaev wrote: >> On Thu, Sep 17, 2015 at 12:03:56AM +0000, Steven Hartland wrote: >>> New Revision: 287886 >>> URL: https://svnweb.freebsd.org/changeset/base/287886 >>> >>> Log: >>> Fix kqueue write events for files > 2GB >>> >>> Due to the use of int's for file offsets in the VOP_WRITE_(PRE|POST) >>> macros, kqueue write events for files greater 2GB where never fired. >>> >>> This caused tail -f on a file greater 2GB to never see updates. >> Oh that's an embarrassing bug. >> > Please try to get an EN for this :) Yep I was going to request once the MFC timeout triggers. From owner-svn-src-head@freebsd.org Thu Sep 17 20:21:56 2015 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 A8B799CE710; Thu, 17 Sep 2015 20:21:56 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 99B971B9C; Thu, 17 Sep 2015 20:21:56 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HKLuNb083662; Thu, 17 Sep 2015 20:21:56 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HKLuST083661; Thu, 17 Sep 2015 20:21:56 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201509172021.t8HKLuST083661@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 17 Sep 2015 20:21:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287931 - head/sys/sys X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 20:21:56 -0000 Author: glebius Date: Thu Sep 17 20:21:55 2015 New Revision: 287931 URL: https://svnweb.freebsd.org/changeset/base/287931 Log: Remove extra tabs. Modified: head/sys/sys/systm.h Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Thu Sep 17 18:32:51 2015 (r287930) +++ head/sys/sys/systm.h Thu Sep 17 20:21:55 2015 (r287931) @@ -82,12 +82,12 @@ void kassert_panic(const char *fmt, ...) #ifdef INVARIANTS /* The option is always available */ #define KASSERT(exp,msg) do { \ if (__predict_false(!(exp))) \ - kassert_panic msg; \ + kassert_panic msg; \ } while (0) #define VNASSERT(exp, vp, msg) do { \ if (__predict_false(!(exp))) { \ vn_printf(vp, "VNASSERT failed\n"); \ - kassert_panic msg; \ + kassert_panic msg; \ } \ } while (0) #else From owner-svn-src-head@freebsd.org Thu Sep 17 20:33:54 2015 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 72B889CED69; Thu, 17 Sep 2015 20:33:54 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 49475106D; Thu, 17 Sep 2015 20:33:54 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HKXsYx087803; Thu, 17 Sep 2015 20:33:54 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HKXr1M087800; Thu, 17 Sep 2015 20:33:53 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509172033.t8HKXr1M087800@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 17 Sep 2015 20:33:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287932 - in head: share/mk tools/build/options X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 20:33:54 -0000 Author: bdrewery Date: Thu Sep 17 20:33:52 2015 New Revision: 287932 URL: https://svnweb.freebsd.org/changeset/base/287932 Log: src.conf.5: Make it self-documenting that the mkopts are environment-only. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/sys.mk head/tools/build/options/WITH_META_MODE head/tools/build/options/makeman Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Thu Sep 17 20:21:55 2015 (r287931) +++ head/share/mk/sys.mk Thu Sep 17 20:33:52 2015 (r287932) @@ -29,6 +29,11 @@ __DEFAULT_DEPENDENT_OPTIONS= \ STAGING/META_MODE \ SYSROOT/META_MODE +__ENV_ONLY_OPTIONS:= \ + ${__DEFAULT_NO_OPTIONS} \ + ${__DEFAULT_YES_OPTIONS} \ + ${__DEFAULT_DEPENDENT_OPTIONS:H} + # early include for customization # see local.sys.mk below # Not included when building in fmake compatibility mode (still needed Modified: head/tools/build/options/WITH_META_MODE ============================================================================== --- head/tools/build/options/WITH_META_MODE Thu Sep 17 20:21:55 2015 (r287931) +++ head/tools/build/options/WITH_META_MODE Thu Sep 17 20:33:52 2015 (r287932) @@ -25,11 +25,6 @@ If is available the meta file will also capture a record of files used to produce the target by tracking syscalls. .Pp -This must be set in the environment or -.Pa /etc/src-env.conf , -not -.Pa /etc/src.conf . -.Pp The build will hide commands ran unless .Va NO_SILENT is defined. Modified: head/tools/build/options/makeman ============================================================================== --- head/tools/build/options/makeman Thu Sep 17 20:21:55 2015 (r287931) +++ head/tools/build/options/makeman Thu Sep 17 20:33:52 2015 (r287932) @@ -221,6 +221,7 @@ EOF show with SRCCONF=/dev/null | sort | sed 's/$/=/' > $t/src.conf show settings SRCCONF=$t/src.conf | sort > $t/config_WITH_ALL show without SRCCONF=/dev/null | sort > $t/config_WITHOUT_ALL + env_only_options="$(${make} -V __ENV_ONLY_OPTIONS)" show_options | while read opt targets ; do @@ -289,6 +290,17 @@ EOF done echo '.El' fi + + case " ${env_only_options} " in + *\ ${opt#*_}\ *) + echo ".Pp" + echo "This must be set in the environment or" + echo ".Pa /etc/src-env.conf ," + echo "not" + echo ".Pa /etc/src.conf ." + ;; + esac + twiddle >&2 done cat < 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 9CE309CEEE0; Thu, 17 Sep 2015 20:36:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 7139B1208; Thu, 17 Sep 2015 20:36:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HKaZp9087973; Thu, 17 Sep 2015 20:36:35 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HKaZqG087971; Thu, 17 Sep 2015 20:36:35 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509172036.t8HKaZqG087971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 17 Sep 2015 20:36:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287933 - head/sys/cam/ctl X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 20:36:35 -0000 Author: mav Date: Thu Sep 17 20:36:34 2015 New Revision: 287933 URL: https://svnweb.freebsd.org/changeset/base/287933 Log: Replicate port->init_devid to HA peer. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_io.h Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Thu Sep 17 20:33:52 2015 (r287932) +++ head/sys/cam/ctl/ctl.c Thu Sep 17 20:36:34 2015 (r287933) @@ -611,6 +611,8 @@ ctl_isc_announce_port(struct ctl_port *p i += port->port_devid->len; if (port->target_devid) i += port->target_devid->len; + if (port->init_devid) + i += port->init_devid->len; msg = malloc(i, M_CTL, M_WAITOK); bzero(&msg->port, sizeof(msg->port)); msg->hdr.msg_type = CTL_MSG_PORT_SYNC; @@ -641,6 +643,12 @@ ctl_isc_announce_port(struct ctl_port *p msg->port.target_devid_len); i += msg->port.target_devid_len; } + if (port->init_devid) { + msg->port.init_devid_len = port->init_devid->len; + memcpy(&msg->port.data[i], port->init_devid->data, + msg->port.init_devid_len); + i += msg->port.init_devid_len; + } ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg->port, sizeof(msg->port) + i, M_WAITOK); free(msg, M_CTL); @@ -865,8 +873,23 @@ ctl_isc_port_sync(struct ctl_softc *soft port->target_devid->len = msg->port.target_devid_len; i += msg->port.target_devid_len; } else { - free(port->port_devid, M_CTL); - port->port_devid = NULL; + free(port->target_devid, M_CTL); + port->target_devid = NULL; + } + if (msg->port.init_devid_len != 0) { + if (port->init_devid == NULL || + port->init_devid->len != msg->port.init_devid_len) { + free(port->init_devid, M_CTL); + port->init_devid = malloc(sizeof(struct ctl_devid) + + msg->port.init_devid_len, M_CTL, M_WAITOK); + } + memcpy(port->init_devid->data, &msg->port.data[i], + msg->port.init_devid_len); + port->init_devid->len = msg->port.init_devid_len; + i += msg->port.init_devid_len; + } else { + free(port->init_devid, M_CTL); + port->init_devid = NULL; } if (new) { if (ctl_port_register(port) != 0) { Modified: head/sys/cam/ctl/ctl_io.h ============================================================================== --- head/sys/cam/ctl/ctl_io.h Thu Sep 17 20:33:52 2015 (r287932) +++ head/sys/cam/ctl/ctl_io.h Thu Sep 17 20:36:34 2015 (r287933) @@ -479,6 +479,7 @@ struct ctl_ha_msg_port { int lun_map_len; int port_devid_len; int target_devid_len; + int init_devid_len; uint8_t data[]; }; From owner-svn-src-head@freebsd.org Thu Sep 17 20:36:47 2015 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 7C0EF9CEF12; Thu, 17 Sep 2015 20:36:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 6CEF11354; Thu, 17 Sep 2015 20:36:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HKalNC088026; Thu, 17 Sep 2015 20:36:47 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HKalKU088025; Thu, 17 Sep 2015 20:36:47 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201509172036.t8HKalKU088025@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 17 Sep 2015 20:36:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287934 - head/sys/boot/efi/loader X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 20:36:47 -0000 Author: jhb Date: Thu Sep 17 20:36:46 2015 New Revision: 287934 URL: https://svnweb.freebsd.org/changeset/base/287934 Log: The EFI boot loader allocates a single chunk of contiguous memory to hold the kernel, modules, and any other loaded data. This memory block is relocated to the kernel's expected location during the transfer of control from the loader to the kernel. The GENERIC kernel on amd64 has recently grown such that a kernel + zfs.ko no longer fits in the default staging size. Bump the default size from 32MB to 48MB to provide more breathing room. PR: 201679 Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D3666 Modified: head/sys/boot/efi/loader/copy.c Modified: head/sys/boot/efi/loader/copy.c ============================================================================== --- head/sys/boot/efi/loader/copy.c Thu Sep 17 20:36:34 2015 (r287933) +++ head/sys/boot/efi/loader/copy.c Thu Sep 17 20:36:46 2015 (r287934) @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #include #ifndef EFI_STAGING_SIZE -#define EFI_STAGING_SIZE 32 +#define EFI_STAGING_SIZE 48 #endif #define STAGE_PAGES ((EFI_STAGING_SIZE) * 1024 * 1024 / 4096) From owner-svn-src-head@freebsd.org Thu Sep 17 20:45:08 2015 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 0C0579CF307; Thu, 17 Sep 2015 20:45:08 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE560199D; Thu, 17 Sep 2015 20:45:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 2C217B924; Thu, 17 Sep 2015 16:45:06 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r287934 - head/sys/boot/efi/loader Date: Thu, 17 Sep 2015 13:43:59 -0700 Message-ID: <5683583.PWsk0G3i3G@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-PRERELEASE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201509172036.t8HKalKU088025@repo.freebsd.org> References: <201509172036.t8HKalKU088025@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 17 Sep 2015 16:45:06 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 17 Sep 2015 20:45:08 -0000 On Thursday, September 17, 2015 08:36:47 PM John Baldwin wrote: > Author: jhb > Date: Thu Sep 17 20:36:46 2015 > New Revision: 287934 > URL: https://svnweb.freebsd.org/changeset/base/287934 > > Log: > The EFI boot loader allocates a single chunk of contiguous memory to > hold the kernel, modules, and any other loaded data. This memory block > is relocated to the kernel's expected location during the transfer of > control from the loader to the kernel. > > The GENERIC kernel on amd64 has recently grown such that a kernel + zfs.ko > no longer fits in the default staging size. Bump the default size from > 32MB to 48MB to provide more breathing room. I believe that this should work fine for any system with 64MB of RAM. One downside of the static size is that the loader fails if it can't allocate a contiguous staging size (it isn't able to grow the staging area on demand). -- John Baldwin From owner-svn-src-head@freebsd.org Thu Sep 17 20:45:52 2015 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 586E99CF385; Thu, 17 Sep 2015 20:45:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 48F651AFA; Thu, 17 Sep 2015 20:45:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HKjqYe092124; Thu, 17 Sep 2015 20:45:52 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HKjq3H092123; Thu, 17 Sep 2015 20:45:52 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509172045.t8HKjq3H092123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 17 Sep 2015 20:45:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287935 - head/tools/build/options X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 20:45:52 -0000 Author: bdrewery Date: Thu Sep 17 20:45:51 2015 New Revision: 287935 URL: https://svnweb.freebsd.org/changeset/base/287935 Log: Optimize makeman slightly by removing uneeded cat and extra test -s. Sponsored by: EMC / Isilon Storage Division Modified: head/tools/build/options/makeman Modified: head/tools/build/options/makeman ============================================================================== --- head/tools/build/options/makeman Thu Sep 17 20:36:46 2015 (r287934) +++ head/tools/build/options/makeman Thu Sep 17 20:45:51 2015 (r287935) @@ -59,7 +59,7 @@ show_options() fi done - cat $t/settings | while read opt targets ; do + while read opt targets ; do if [ "${targets}" = "${ALL_TARGETS}" ] ; then echo "WITHOUT_${opt}" elif [ -z "${targets}" ] ; then @@ -68,7 +68,7 @@ show_options() echo "WITHOUT_${opt}" $(no_targets "${ALL_TARGETS}" "${targets}") echo "WITH_${opt} ${targets}" fi - done + done < $t/settings } # @@ -263,31 +263,33 @@ EOF :> $t/deps2 fi + havedeps=0 if [ -s $t/deps ] ; then + havedeps=1 echo 'When set, it also enforces the following options:' echo '.Pp' echo '.Bl -item -compact' - cat $t/deps | while read opt2 ; do + while read opt2 ; do echo '.It' echo ".Va ${opt2}" - done + done < $t/deps echo '.El' fi if [ -s $t/deps2 ] ; then - if [ -s $t/deps ] ; then + if [ ${havedeps} -eq 1 ] ; then echo '.Pp' fi echo 'When set, the following options are also in effect:' echo '.Pp' echo '.Bl -inset -compact' - cat $t/deps2 | while read opt2 ; do + while read opt2 ; do echo ".It Va ${opt2}" noopt=$(echo ${opt2} | sed -e's/WITH_/WITHOUT_/;t' -e's/WITHOUT_/WITH_/') echo '(unless' echo ".Va ${noopt}" echo 'is set explicitly)' - done + done < $t/deps2 echo '.El' fi From owner-svn-src-head@freebsd.org Thu Sep 17 20:48:43 2015 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 0E65A9CF461; Thu, 17 Sep 2015 20:48:43 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 F29F61C9B; Thu, 17 Sep 2015 20:48:42 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HKmgs4092265; Thu, 17 Sep 2015 20:48:42 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HKmgUf092264; Thu, 17 Sep 2015 20:48:42 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509172048.t8HKmgUf092264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 17 Sep 2015 20:48:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287936 - head/share/man/man5 X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 20:48:43 -0000 Author: bdrewery Date: Thu Sep 17 20:48:42 2015 New Revision: 287936 URL: https://svnweb.freebsd.org/changeset/base/287936 Log: Regenerate Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Thu Sep 17 20:45:51 2015 (r287935) +++ head/share/man/man5/src.conf.5 Thu Sep 17 20:48:42 2015 (r287936) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: head/tools/build/options/makeman 284708 2015-06-22 20:21:57Z sjg +.\" from FreeBSD: head/tools/build/options/makeman 287935 2015-09-17 20:45:51Z bdrewery .\" $FreeBSD$ -.Dd September 16, 2015 +.Dd September 17, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -65,6 +65,18 @@ option of or in its environment; see .Xr environ 7 . .Pp +The environment of +.Xr make 1 +for the build can be controlled via the +.Va SRC_ENV_CONF +variable, which defaults to +.Pa /etc/src-env.conf . +Some examples that may only be set in this file are +.Va MAKEOBJDIRPREFIX , +and +.Va WITH_META_MODE +as they are environment-only variables. +.Pp The values of variables are ignored regardless of their setting; even if they would be set to .Dq Li FALSE @@ -129,6 +141,11 @@ related programs, libraries, and kernel .It Va WITH_AUTO_OBJ .\" from FreeBSD: head/tools/build/options/WITH_AUTO_OBJ 284708 2015-06-22 20:21:57Z sjg Enable automatic creation of objdirs. +.Pp +This must be set in the environment or +.Pa /etc/src-env.conf , +not +.Pa /etc/src.conf . .It Va WITHOUT_BHYVE .\" from FreeBSD: head/tools/build/options/WITHOUT_BHYVE 277727 2015-01-26 06:44:48Z ngie Set to not build or install @@ -408,6 +425,11 @@ Cache result of dirdeps.mk which can sav for subsequent builds. Depends on .Va WITH_META_MODE . +.Pp +This must be set in the environment or +.Pa /etc/src-env.conf , +not +.Pa /etc/src.conf . .It Va WITHOUT_DMAGENT .\" from FreeBSD: head/tools/build/options/WITHOUT_DMAGENT 262335 2014-02-22 13:05:23Z bapt Set to not build dma Mail Transport Agent @@ -881,8 +903,13 @@ and related support files. .\" from FreeBSD: head/tools/build/options/WITH_META_FILES 284708 2015-06-22 20:21:57Z sjg Create meta files during non META_MODE build. The meta files can be useful for debugging. +.Pp +This must be set in the environment or +.Pa /etc/src-env.conf , +not +.Pa /etc/src.conf . .It Va WITH_META_MODE -.\" from FreeBSD: head/tools/build/options/WITH_META_MODE 287904 2015-09-17 05:01:04Z bdrewery +.\" from FreeBSD: head/tools/build/options/WITH_META_MODE 287932 2015-09-17 20:33:52Z bdrewery Enable building in meta mode. .Pp The build is driven by dirdeps.mk using @@ -938,6 +965,11 @@ is set explicitly) .Va WITHOUT_STAGING_PROG is set explicitly) .El +.Pp +This must be set in the environment or +.Pa /etc/src-env.conf , +not +.Pa /etc/src.conf . .It Va WITH_NAND .\" from FreeBSD: head/tools/build/options/WITH_NAND 235537 2012-05-17 10:11:18Z gber Set to build the NAND Flash components. @@ -1200,6 +1232,11 @@ is set explicitly) .Va WITHOUT_STAGING_PROG is set explicitly) .El +.Pp +This must be set in the environment or +.Pa /etc/src-env.conf , +not +.Pa /etc/src.conf . .It Va WITH_STAGING_MAN .\" from FreeBSD: head/tools/build/options/WITH_STAGING_MAN 284708 2015-06-22 20:21:57Z sjg Enable staging of MAN pages to stage tree. @@ -1233,6 +1270,11 @@ support files such as keyboard maps, fon Enable use of sysroot during build. Depends on .Va WITH_META_MODE . +.Pp +This must be set in the environment or +.Pa /etc/src-env.conf , +not +.Pa /etc/src.conf . .It Va WITHOUT_TALK .\" from FreeBSD: head/tools/build/options/WITHOUT_TALK 277676 2015-01-25 04:37:44Z ngie Set to not build or install @@ -1390,6 +1432,7 @@ Set to not build the timezone database. .Sh FILES .Bl -tag -compact -width Pa .It Pa /etc/src.conf +.It Pa /etc/src-env.conf .It Pa /usr/share/mk/bsd.own.mk .El .Sh SEE ALSO From owner-svn-src-head@freebsd.org Thu Sep 17 20:55:48 2015 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 827799CF7DD; Thu, 17 Sep 2015 20:55:48 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 66E9210BA; Thu, 17 Sep 2015 20:55:48 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HKtmaN096237; Thu, 17 Sep 2015 20:55:48 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HKtlvp096235; Thu, 17 Sep 2015 20:55:47 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201509172055.t8HKtlvp096235@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 17 Sep 2015 20:55:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287937 - head/usr.sbin/fstyp X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 20:55:48 -0000 Author: delphij Date: Thu Sep 17 20:55:47 2015 New Revision: 287937 URL: https://svnweb.freebsd.org/changeset/base/287937 Log: Eliminate unneeded copying of vdev data, goto, etc. and add a note that checksum of vdev label should be checked (which is not done currently). No functional change. While I'm there, raise WARNS to 2. Reviewed by: allanjude MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D3508 Modified: head/usr.sbin/fstyp/Makefile head/usr.sbin/fstyp/zfs.c Modified: head/usr.sbin/fstyp/Makefile ============================================================================== --- head/usr.sbin/fstyp/Makefile Thu Sep 17 20:48:42 2015 (r287936) +++ head/usr.sbin/fstyp/Makefile Thu Sep 17 20:55:47 2015 (r287937) @@ -11,7 +11,7 @@ SRCS += zfs.c MAN= fstyp.8 -WARNS?= 0 +WARNS?= 2 .include Modified: head/usr.sbin/fstyp/zfs.c ============================================================================== --- head/usr.sbin/fstyp/zfs.c Thu Sep 17 20:48:42 2015 (r287936) +++ head/usr.sbin/fstyp/zfs.c Thu Sep 17 20:55:47 2015 (r287937) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2015 Allan Jude + * Copyright (c) 2015 Xin LI * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,29 +43,33 @@ __FBSDID("$FreeBSD$"); int fstyp_zfs(FILE *fp, char *label, size_t labelsize) { - vdev_label_t *zpool_ptr = NULL; - vdev_label_t zpool_label; - char *buf = zpool_label.vl_vdev_phys.vp_nvlist; + vdev_label_t *vdev_label = NULL; + vdev_phys_t *vdev_phys; char *zpool_name = NULL; - size_t buflen = sizeof (zpool_label.vl_vdev_phys.vp_nvlist); nvlist_t *config = NULL; + int err = 0; - zpool_ptr = (vdev_label_t *)read_buf(fp, 0, sizeof(zpool_label)); - if (zpool_ptr == NULL) + /* + * Read in the first ZFS vdev label ("L0"), located at the beginning + * of the vdev and extract the pool name from it. + * + * TODO: the checksum of label should be validated. + */ + vdev_label = (vdev_label_t *)read_buf(fp, 0, sizeof(*vdev_label)); + if (vdev_label == NULL) return (1); - zpool_label = *zpool_ptr; - if (nvlist_unpack(buf, buflen, &config, 0) != 0) - goto zfserr; - if (nvlist_lookup_string(config, "name", &zpool_name) != 0) - goto zfserr; - strlcpy(label, zpool_name, labelsize); - nvlist_free(config); - free(zpool_ptr); - return (0); -zfserr: + vdev_phys = &(vdev_label->vl_vdev_phys); + + if ((nvlist_unpack(vdev_phys->vp_nvlist, sizeof(vdev_phys->vp_nvlist), + &config, 0)) == 0 && + (nvlist_lookup_string(config, "name", &zpool_name) == 0)) { + strlcpy(label, zpool_name, labelsize); + } else + err = 1; + nvlist_free(config); - free(zpool_ptr); + free(vdev_label); - return (1); + return (err); } From owner-svn-src-head@freebsd.org Thu Sep 17 21:49:30 2015 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 1A2659CF0A6; Thu, 17 Sep 2015 21:49:30 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 0A6C0199C; Thu, 17 Sep 2015 21:49:30 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HLnTtQ016834; Thu, 17 Sep 2015 21:49:29 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HLnT1n016833; Thu, 17 Sep 2015 21:49:29 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509172149.t8HLnT1n016833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 17 Sep 2015 21:49:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287939 - head/share/mk X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 21:49:30 -0000 Author: bdrewery Date: Thu Sep 17 21:49:29 2015 New Revision: 287939 URL: https://svnweb.freebsd.org/changeset/base/287939 Log: Add a check to ensure that the env-only mkopts are not set via src.conf. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/src.sys.mk Modified: head/share/mk/src.sys.mk ============================================================================== --- head/share/mk/src.sys.mk Thu Sep 17 21:12:47 2015 (r287938) +++ head/share/mk/src.sys.mk Thu Sep 17 21:49:29 2015 (r287939) @@ -8,9 +8,27 @@ # Allow user to configure things that only effect src tree builds. SRCCONF?= /etc/src.conf .if (exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf") && !target(_srcconf_included_) + +# Validate that the user didn't try setting an env-only variable in +# their src.conf. This benefits from already including bsd.mkopt.mk. +.for var in ${__ENV_ONLY_OPTIONS} +__presrcconf_${var}:= ${MK_${var}:U-}${WITHOUT_${var}:Uno:Dyes}${WITH_${var}:Uno:Dyes} +.endfor + .sinclude "${SRCCONF}" _srcconf_included_: .NOTMAIN + +# Validate the env-only variables. +.for var in ${__ENV_ONLY_OPTIONS} +__postrcconf_${var}:= ${MK_${var}:U-}${WITHOUT_${var}:Uno:Dyes}${WITH_${var}:Uno:Dyes} +.if ${__presrcconf_${var}} != ${__postrcconf_${var}} +.error Option ${var} may only be defined in ${SRC_ENV_CONF}, environment, or make argument, not ${SRCCONF}. .endif +.undef __presrcconf_${var} +.undef __postrcconf_${var} +.endfor + +.endif # SRCCONF # tempting, but bsd.compiler.mk causes problems this early # probably need to remove dependence on bsd.own.mk From owner-svn-src-head@freebsd.org Thu Sep 17 21:51:12 2015 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 C22299CF271; Thu, 17 Sep 2015 21:51:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 A5EC11CA3; Thu, 17 Sep 2015 21:51:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HLpCTZ018147; Thu, 17 Sep 2015 21:51:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HLpBO8018144; Thu, 17 Sep 2015 21:51:11 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509172151.t8HLpBO8018144@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 17 Sep 2015 21:51:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287940 - head/sys/cam/ctl X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 21:51:13 -0000 Author: mav Date: Thu Sep 17 21:51:11 2015 New Revision: 287940 URL: https://svnweb.freebsd.org/changeset/base/287940 Log: Replicate initiators WWPNs and names between HA peers. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl.h head/sys/cam/ctl/ctl_io.h Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Thu Sep 17 21:49:29 2015 (r287939) +++ head/sys/cam/ctl/ctl.c Thu Sep 17 21:51:11 2015 (r287940) @@ -654,14 +654,56 @@ ctl_isc_announce_port(struct ctl_port *p free(msg, M_CTL); } +void +ctl_isc_announce_iid(struct ctl_port *port, int iid) +{ + struct ctl_softc *softc = control_softc; + union ctl_ha_msg *msg; + int i, l; + + if (port->targ_port < softc->port_min || + port->targ_port >= softc->port_max || + softc->ha_link != CTL_HA_LINK_ONLINE) + return; + mtx_lock(&softc->ctl_lock); + i = sizeof(msg->iid); + l = 0; + if (port->wwpn_iid[iid].name) + l = strlen(port->wwpn_iid[iid].name) + 1; + i += l; + msg = malloc(i, M_CTL, M_NOWAIT); + if (msg == NULL) { + mtx_unlock(&softc->ctl_lock); + return; + } + bzero(&msg->iid, sizeof(msg->iid)); + msg->hdr.msg_type = CTL_MSG_IID_SYNC; + msg->hdr.nexus.targ_port = port->targ_port; + msg->hdr.nexus.initid = iid; + msg->iid.in_use = port->wwpn_iid[iid].in_use; + msg->iid.name_len = l; + msg->iid.wwpn = port->wwpn_iid[iid].wwpn; + if (port->wwpn_iid[iid].name) + strlcpy(msg->iid.data, port->wwpn_iid[iid].name, l); + mtx_unlock(&softc->ctl_lock); + ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg->iid, i, M_NOWAIT); + free(msg, M_CTL); +} + static void ctl_isc_ha_link_up(struct ctl_softc *softc) { struct ctl_port *port; struct ctl_lun *lun; + int i; - STAILQ_FOREACH(port, &softc->port_list, links) + STAILQ_FOREACH(port, &softc->port_list, links) { ctl_isc_announce_port(port); + for (i = 0; i < CTL_MAX_INIT_PER_PORT; i++) { + if (port->wwpn_iid[i].in_use) + ctl_isc_announce_iid(port, i); + } + } STAILQ_FOREACH(lun, &softc->lun_list, links) ctl_isc_announce_lun(lun); } @@ -672,6 +714,7 @@ ctl_isc_ha_link_down(struct ctl_softc *s struct ctl_port *port; struct ctl_lun *lun; union ctl_io *io; + int i; mtx_lock(&softc->ctl_lock); STAILQ_FOREACH(lun, &softc->lun_list, links) { @@ -696,6 +739,11 @@ ctl_isc_ha_link_down(struct ctl_softc *s port->targ_port < softc->port_max) continue; port->status &= ~CTL_PORT_STATUS_ONLINE; + for (i = 0; i < CTL_MAX_INIT_PER_PORT; i++) { + port->wwpn_iid[i].in_use = 0; + free(port->wwpn_iid[i].name, M_CTL); + port->wwpn_iid[i].name = NULL; + } } mtx_unlock(&softc->ctl_lock); } @@ -908,6 +956,29 @@ ctl_isc_port_sync(struct ctl_softc *soft mtx_unlock(&softc->ctl_lock); } +static void +ctl_isc_iid_sync(struct ctl_softc *softc, union ctl_ha_msg *msg, int len) +{ + struct ctl_port *port; + int iid; + + port = softc->ctl_ports[msg->hdr.nexus.targ_port]; + if (port == NULL) { + printf("%s: Received IID for unknown port %d\n", + __func__, msg->hdr.nexus.targ_port); + return; + } + iid = msg->hdr.nexus.initid; + port->wwpn_iid[iid].in_use = msg->iid.in_use; + port->wwpn_iid[iid].wwpn = msg->iid.wwpn; + free(port->wwpn_iid[iid].name, M_CTL); + if (msg->iid.name_len) { + port->wwpn_iid[iid].name = strndup(&msg->iid.data[0], + msg->iid.name_len, M_CTL); + } else + port->wwpn_iid[iid].name = NULL; +} + /* * ISC (Inter Shelf Communication) event handler. Events from the HA * subsystem come in here. @@ -1183,6 +1254,9 @@ ctl_isc_event_handler(ctl_ha_channel cha case CTL_MSG_LUN_SYNC: ctl_isc_lun_sync(softc, msg, param); break; + case CTL_MSG_IID_SYNC: + ctl_isc_iid_sync(softc, msg, param); + break; default: printf("Received HA message of unknown type %d\n", msg->hdr.msg_type); @@ -1597,6 +1671,7 @@ ctl_remove_initiator(struct ctl_port *po port->wwpn_iid[iid].in_use--; port->wwpn_iid[iid].last_use = time_uptime; mtx_unlock(&softc->ctl_lock); + ctl_isc_announce_iid(port, iid); return (0); } @@ -1712,6 +1787,7 @@ take: port->wwpn_iid[iid].wwpn = wwpn; port->wwpn_iid[iid].in_use++; mtx_unlock(&softc->ctl_lock); + ctl_isc_announce_iid(port, iid); return (iid); } Modified: head/sys/cam/ctl/ctl.h ============================================================================== --- head/sys/cam/ctl/ctl.h Thu Sep 17 21:49:29 2015 (r287939) +++ head/sys/cam/ctl/ctl.h Thu Sep 17 21:51:11 2015 (r287940) @@ -191,6 +191,7 @@ void ctl_clr_ua_allluns(struct ctl_softc void ctl_isc_announce_lun(struct ctl_lun *lun); void ctl_isc_announce_port(struct ctl_port *port); +void ctl_isc_announce_iid(struct ctl_port *port, int iid); /* * KPI to manipulate LUN/port options Modified: head/sys/cam/ctl/ctl_io.h ============================================================================== --- head/sys/cam/ctl/ctl_io.h Thu Sep 17 21:49:29 2015 (r287939) +++ head/sys/cam/ctl/ctl_io.h Thu Sep 17 21:51:11 2015 (r287940) @@ -197,6 +197,7 @@ typedef enum { CTL_MSG_UA, /* Set/clear UA on secondary. */ CTL_MSG_PORT_SYNC, /* Information about port. */ CTL_MSG_LUN_SYNC, /* Information about LUN. */ + CTL_MSG_IID_SYNC, /* Information about initiator. */ CTL_MSG_FAILOVER /* Fake, never sent though the wire */ } ctl_msg_type; @@ -502,6 +503,17 @@ struct ctl_ha_msg_lun_pr_key { uint64_t pr_key; }; +/* + * Used for CTL_MSG_IID_SYNC. + */ +struct ctl_ha_msg_iid { + struct ctl_ha_msg_hdr hdr; + int in_use; + int name_len; + uint64_t wwpn; + uint8_t data[]; +}; + union ctl_ha_msg { struct ctl_ha_msg_hdr hdr; struct ctl_ha_msg_task task; @@ -511,6 +523,7 @@ union ctl_ha_msg { struct ctl_ha_msg_ua ua; struct ctl_ha_msg_port port; struct ctl_ha_msg_lun lun; + struct ctl_ha_msg_iid iid; }; From owner-svn-src-head@freebsd.org Thu Sep 17 21:51:49 2015 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 1F8879CF2C6; Thu, 17 Sep 2015 21:51:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 101BF1E5E; Thu, 17 Sep 2015 21:51:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HLpmpN020638; Thu, 17 Sep 2015 21:51:48 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HLpmTY020637; Thu, 17 Sep 2015 21:51:48 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509172151.t8HLpmTY020637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 17 Sep 2015 21:51:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287941 - head/share/mk X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 21:51:49 -0000 Author: bdrewery Date: Thu Sep 17 21:51:48 2015 New Revision: 287941 URL: https://svnweb.freebsd.org/changeset/base/287941 Log: Trim space Modified: head/share/mk/src.sys.mk Modified: head/share/mk/src.sys.mk ============================================================================== --- head/share/mk/src.sys.mk Thu Sep 17 21:51:11 2015 (r287940) +++ head/share/mk/src.sys.mk Thu Sep 17 21:51:48 2015 (r287941) @@ -22,7 +22,7 @@ _srcconf_included_: .NOTMAIN .for var in ${__ENV_ONLY_OPTIONS} __postrcconf_${var}:= ${MK_${var}:U-}${WITHOUT_${var}:Uno:Dyes}${WITH_${var}:Uno:Dyes} .if ${__presrcconf_${var}} != ${__postrcconf_${var}} -.error Option ${var} may only be defined in ${SRC_ENV_CONF}, environment, or make argument, not ${SRCCONF}. +.error Option ${var} may only be defined in ${SRC_ENV_CONF}, environment, or make argument, not ${SRCCONF}. .endif .undef __presrcconf_${var} .undef __postrcconf_${var} From owner-svn-src-head@freebsd.org Thu Sep 17 22:04:47 2015 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 C1DBA9CF794; Thu, 17 Sep 2015 22:04:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 B274713A1; Thu, 17 Sep 2015 22:04:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HM4lxd024815; Thu, 17 Sep 2015 22:04:47 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HM4lgx024814; Thu, 17 Sep 2015 22:04:47 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509172204.t8HM4lgx024814@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 17 Sep 2015 22:04:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287942 - head/tools/build/options X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 22:04:48 -0000 Author: bdrewery Date: Thu Sep 17 22:04:46 2015 New Revision: 287942 URL: https://svnweb.freebsd.org/changeset/base/287942 Log: makeman: Fix handling of env-only vars by using SRC_ENV_CONF rather than SRCCONF. Also note that these env-only vars can be specified on the command line. This fixes the dependent options that are env-only (such as WITH_META_MODE and WITH_AUTO_OBJ) to properly display their dependencies. Sponsored by: EMC / Isilon Storage Division Modified: head/tools/build/options/makeman Modified: head/tools/build/options/makeman ============================================================================== --- head/tools/build/options/makeman Thu Sep 17 21:51:48 2015 (r287941) +++ head/tools/build/options/makeman Thu Sep 17 22:04:46 2015 (r287942) @@ -34,7 +34,8 @@ show_options() rm -f $t/settings for target in ${ALL_TARGETS} ; do ${make} showconfig \ - SRCCONF=/dev/null __MAKE_CONF=/dev/null \ + SRC_ENV_CONF=/dev/null SRCCONF=/dev/null \ + __MAKE_CONF=/dev/null \ TARGET_ARCH=${target#*/} TARGET=${target%/*} | while read var _ val ; do opt=${var#MK_} @@ -96,7 +97,8 @@ show() exit 1 ;; esac - ${make} .MAKE.MODE=normal "$@" showconfig __MAKE_CONF=/dev/null | + ${make} .MAKE.MODE=normal "$@" showconfig __MAKE_CONF=/dev/null \ + SRCCONF=/dev/null | while read var _ val ; do opt=${var#MK_} case ${val} in @@ -213,14 +215,14 @@ The following list provides a name and s that can be used for source builds. .Bl -tag -width indent EOF - show settings SRCCONF=/dev/null | sort > $t/config_default + show settings SRC_ENV_CONF=/dev/null | sort > $t/config_default # Work around WITH_LDNS_UTILS forcing BIND_UTILS off by parsing the # actual config that results from enabling every WITH_ option. This # can be reverted if/when we no longer have options that disable # others. - show with SRCCONF=/dev/null | sort | sed 's/$/=/' > $t/src.conf - show settings SRCCONF=$t/src.conf | sort > $t/config_WITH_ALL - show without SRCCONF=/dev/null | sort > $t/config_WITHOUT_ALL + show with SRC_ENV_CONF=/dev/null | sort | sed 's/$/=/' > $t/src.conf + show settings SRC_ENV_CONF=$t/src.conf | sort > $t/config_WITH_ALL + show without SRC_ENV_CONF=/dev/null | sort > $t/config_WITHOUT_ALL env_only_options="$(${make} -V __ENV_ONLY_OPTIONS)" show_options | @@ -240,18 +242,18 @@ EOF if [ "${opt%%_*}" = 'WITHOUT' ] ; then sed -n "/^WITH_${opt#WITHOUT_}$/!s/$/=/p" $t/config_WITH_ALL > $t/src.conf - show settings SRCCONF=$t/src.conf -D${opt} | sort > $t/config_WITH_ALL_${opt} + show settings SRC_ENV_CONF=$t/src.conf -D${opt} | sort > $t/config_WITH_ALL_${opt} comm -13 $t/config_WITH_ALL $t/config_WITH_ALL_${opt} | sed -n "/^${opt}$/!p" > $t/deps elif [ "${opt%%_*}" = 'WITH' ] ; then sed -n "/^WITHOUT${opt#WITH}$/!s/$/=/p" $t/config_WITHOUT_ALL > $t/src.conf - show settings SRCCONF=$t/src.conf -D${opt} | sort > $t/config_WITHOUT_ALL_${opt} + show settings SRC_ENV_CONF=$t/src.conf -D${opt} | sort > $t/config_WITHOUT_ALL_${opt} comm -13 $t/config_WITHOUT_ALL $t/config_WITHOUT_ALL_${opt} | sed -n "/^${opt}$/!p" > $t/deps else echo 'internal error' >&2 exit 1 fi - show settings SRCCONF=/dev/null -D${opt} | sort > $t/config_${opt} + show settings SRC_ENV_CONF=/dev/null -D${opt} | sort > $t/config_${opt} comm -13 $t/config_default $t/config_${opt} | sed -n "/^${opt}$/!p" | comm -13 $t/deps - > $t/deps2 @@ -296,7 +298,7 @@ EOF case " ${env_only_options} " in *\ ${opt#*_}\ *) echo ".Pp" - echo "This must be set in the environment or" + echo "This must be set in the environment, make command line, or" echo ".Pa /etc/src-env.conf ," echo "not" echo ".Pa /etc/src.conf ." From owner-svn-src-head@freebsd.org Thu Sep 17 22:07:41 2015 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 D13759CF8E0; Thu, 17 Sep 2015 22:07:41 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 B627115C4; Thu, 17 Sep 2015 22:07:41 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HM7ffN024981; Thu, 17 Sep 2015 22:07:41 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HM7fP6024980; Thu, 17 Sep 2015 22:07:41 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509172207.t8HM7fP6024980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 17 Sep 2015 22:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287943 - head/share/man/man5 X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 22:07:42 -0000 Author: bdrewery Date: Thu Sep 17 22:07:40 2015 New Revision: 287943 URL: https://svnweb.freebsd.org/changeset/base/287943 Log: Regenerate Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Thu Sep 17 22:04:46 2015 (r287942) +++ head/share/man/man5/src.conf.5 Thu Sep 17 22:07:40 2015 (r287943) @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: head/tools/build/options/makeman 287935 2015-09-17 20:45:51Z bdrewery +.\" from FreeBSD: head/tools/build/options/makeman 287942 2015-09-17 22:04:46Z bdrewery .\" $FreeBSD$ .Dd September 17, 2015 .Dt SRC.CONF 5 @@ -142,7 +142,7 @@ related programs, libraries, and kernel .\" from FreeBSD: head/tools/build/options/WITH_AUTO_OBJ 284708 2015-06-22 20:21:57Z sjg Enable automatic creation of objdirs. .Pp -This must be set in the environment or +This must be set in the environment, make command line, or .Pa /etc/src-env.conf , not .Pa /etc/src.conf . @@ -426,7 +426,7 @@ for subsequent builds. Depends on .Va WITH_META_MODE . .Pp -This must be set in the environment or +This must be set in the environment, make command line, or .Pa /etc/src-env.conf , not .Pa /etc/src.conf . @@ -904,7 +904,7 @@ and related support files. Create meta files during non META_MODE build. The meta files can be useful for debugging. .Pp -This must be set in the environment or +This must be set in the environment, make command line, or .Pa /etc/src-env.conf , not .Pa /etc/src.conf . @@ -944,18 +944,20 @@ When set, it also enforces the following .Pp .Bl -item -compact .It -.Va WITH_AUTO_OBJ -.It .Va WITH_INSTALL_AS_USER -.It -.Va WITH_STAGING -.It -.Va WITH_SYSROOT .El .Pp When set, the following options are also in effect: .Pp .Bl -inset -compact +.It Va WITH_AUTO_OBJ +(unless +.Va WITHOUT_AUTO_OBJ +is set explicitly) +.It Va WITH_STAGING +(unless +.Va WITHOUT_STAGING +is set explicitly) .It Va WITH_STAGING_MAN (unless .Va WITHOUT_STAGING_MAN @@ -964,9 +966,13 @@ is set explicitly) (unless .Va WITHOUT_STAGING_PROG is set explicitly) +.It Va WITH_SYSROOT +(unless +.Va WITHOUT_SYSROOT +is set explicitly) .El .Pp -This must be set in the environment or +This must be set in the environment, make command line, or .Pa /etc/src-env.conf , not .Pa /etc/src.conf . @@ -1233,7 +1239,7 @@ is set explicitly) is set explicitly) .El .Pp -This must be set in the environment or +This must be set in the environment, make command line, or .Pa /etc/src-env.conf , not .Pa /etc/src.conf . @@ -1271,7 +1277,7 @@ Enable use of sysroot during build. Depends on .Va WITH_META_MODE . .Pp -This must be set in the environment or +This must be set in the environment, make command line, or .Pa /etc/src-env.conf , not .Pa /etc/src.conf . From owner-svn-src-head@freebsd.org Thu Sep 17 22:28:39 2015 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 4E4B69CE25D; Thu, 17 Sep 2015 22:28:39 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 3FD1110B3; Thu, 17 Sep 2015 22:28:39 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8HMSdk8033200; Thu, 17 Sep 2015 22:28:39 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8HMSdGQ033199; Thu, 17 Sep 2015 22:28:39 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201509172228.t8HMSdGQ033199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Thu, 17 Sep 2015 22:28:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287944 - head/sys/vm X-SVN-Group: head 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.20 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: Thu, 17 Sep 2015 22:28:39 -0000 Author: alc Date: Thu Sep 17 22:28:38 2015 New Revision: 287944 URL: https://svnweb.freebsd.org/changeset/base/287944 Log: Eliminate (many) unnecessary calls to pmap_remove_all(). Pages from objects with a reference count of zero can't possibly be mapped, so there is never a need for vm_page_set_invalid() to call pmap_remove_all() on them. Reviewed by: kib MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Thu Sep 17 22:07:40 2015 (r287943) +++ head/sys/vm/vm_page.c Thu Sep 17 22:28:38 2015 (r287944) @@ -3096,7 +3096,8 @@ vm_page_set_invalid(vm_page_t m, int bas bits = VM_PAGE_BITS_ALL; else bits = vm_page_bits(base, size); - if (m->valid == VM_PAGE_BITS_ALL && bits != 0) + if (object->ref_count != 0 && m->valid == VM_PAGE_BITS_ALL && + bits != 0) pmap_remove_all(m); KASSERT((bits == 0 && m->valid == VM_PAGE_BITS_ALL) || !pmap_page_is_mapped(m), From owner-svn-src-head@freebsd.org Thu Sep 17 22:30:46 2015 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 7416D9CE3EF; Thu, 17 Sep 2015 22:30:46 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 266A3133E; Thu, 17 Sep 2015 22:30:44 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 1D6AF25D37C7; Thu, 17 Sep 2015 22:30:36 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 5732DC76FD4; Thu, 17 Sep 2015 22:30:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id ykxY9Q87cDfS; Thu, 17 Sep 2015 22:30:34 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:b0eb:d363:56cd:6b4b] (unknown [IPv6:fde9:577b:c1a9:4410:b0eb:d363:56cd:6b4b]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id C3473C76FD2; Thu, 17 Sep 2015 22:30:33 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r287934 - head/sys/boot/efi/loader From: "Bjoern A. Zeeb" In-Reply-To: <5683583.PWsk0G3i3G@ralph.baldwin.cx> Date: Thu, 17 Sep 2015 22:30:15 +0000 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201509172036.t8HKalKU088025@repo.freebsd.org> <5683583.PWsk0G3i3G@ralph.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 17 Sep 2015 22:30:46 -0000 > On 17 Sep 2015, at 20:43 , John Baldwin wrote: >=20 > On Thursday, September 17, 2015 08:36:47 PM John Baldwin wrote: >> Author: jhb >> Date: Thu Sep 17 20:36:46 2015 >> New Revision: 287934 >> URL: https://svnweb.freebsd.org/changeset/base/287934 >>=20 >> Log: >> The EFI boot loader allocates a single chunk of contiguous memory to >> hold the kernel, modules, and any other loaded data. This memory = block >> is relocated to the kernel's expected location during the transfer = of >> control from the loader to the kernel. >>=20 >> The GENERIC kernel on amd64 has recently grown such that a kernel + = zfs.ko >> no longer fits in the default staging size. Bump the default size = from >> 32MB to 48MB to provide more breathing room. >=20 > I believe that this should work fine for any system with 64MB of RAM. = One > downside of the static size is that the loader fails if it can't = allocate > a contiguous staging size (it isn't able to grow the staging area on > demand). how do md_images work in that case? From owner-svn-src-head@freebsd.org Fri Sep 18 04:01:28 2015 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 3524F9CE923; Fri, 18 Sep 2015 04:01:28 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 25B511D64; Fri, 18 Sep 2015 04:01:28 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8I41SuR010693; Fri, 18 Sep 2015 04:01:28 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8I41R27010688; Fri, 18 Sep 2015 04:01:27 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509180401.t8I41R27010688@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 18 Sep 2015 04:01:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287946 - head/sys/net80211 X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 04:01:28 -0000 Author: adrian Date: Fri Sep 18 04:01:26 2015 New Revision: 287946 URL: https://svnweb.freebsd.org/changeset/base/287946 Log: Expose the wme_info IE method. Modified: head/sys/net80211/ieee80211_output.c head/sys/net80211/ieee80211_proto.h Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Thu Sep 17 23:31:44 2015 (r287945) +++ head/sys/net80211/ieee80211_output.c Fri Sep 18 04:01:26 2015 (r287946) @@ -1787,7 +1787,7 @@ add_ie(uint8_t *frm, const uint8_t *ie) /* * Add a WME information element to a frame. */ -static uint8_t * +uint8_t * ieee80211_add_wme_info(uint8_t *frm, struct ieee80211_wme_state *wme) { static const struct ieee80211_wme_info info = { Modified: head/sys/net80211/ieee80211_proto.h ============================================================================== --- head/sys/net80211/ieee80211_proto.h Thu Sep 17 23:31:44 2015 (r287945) +++ head/sys/net80211/ieee80211_proto.h Fri Sep 18 04:01:26 2015 (r287946) @@ -156,6 +156,8 @@ uint8_t *ieee80211_add_rsn(uint8_t *, co uint8_t *ieee80211_add_qos(uint8_t *, const struct ieee80211_node *); uint16_t ieee80211_getcapinfo(struct ieee80211vap *, struct ieee80211_channel *); +struct ieee80211_wme_state; +uint8_t * ieee80211_add_wme_info(uint8_t *frm, struct ieee80211_wme_state *wme); void ieee80211_reset_erp(struct ieee80211com *); void ieee80211_set_shortslottime(struct ieee80211com *, int onoff); From owner-svn-src-head@freebsd.org Fri Sep 18 04:12:12 2015 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 3FE139CEF80; Fri, 18 Sep 2015 04:12:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 1E3D2120E; Fri, 18 Sep 2015 04:12:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8I4CBZ1016127; Fri, 18 Sep 2015 04:12:11 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8I4CBcA016126; Fri, 18 Sep 2015 04:12:11 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509180412.t8I4CBcA016126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 18 Sep 2015 04:12:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287947 - head/sys/dev/usb/wlan X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 04:12:12 -0000 Author: adrian Date: Fri Sep 18 04:12:11 2015 New Revision: 287947 URL: https://svnweb.freebsd.org/changeset/base/287947 Log: Add initial 11n support to if_rsu. * Add a tunable to enable 11n if it's available, so to not anger people who upgrade. kenv hw.usb.rsu.enable_11n=1 before inserting the device. * Add initial 11n htconfig bits; * Enable 40MHz mode if it's available; * Add 11n channels; * Set 11n bits in the firmware. It works for RX; I haven't tested TX aggregation just yet. However the firmware doesn't do RX re-ordering, so I have to tie it into the net80211 A-MPDU RX reorder path before I flip this on by default. I've verified that I'm indeed actually seeing MCS 0->7 rates being received. I haven't dug into whether it's actually transmitting 11n rates; I'll dig into that later. Modified: head/sys/dev/usb/wlan/if_rsu.c Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Fri Sep 18 04:01:26 2015 (r287946) +++ head/sys/dev/usb/wlan/if_rsu.c Fri Sep 18 04:12:11 2015 (r287947) @@ -84,6 +84,9 @@ SYSCTL_INT(_hw_usb_rsu, OID_AUTO, debug, #define RSU_DPRINTF(_sc, _flg, ...) #endif +static int rsu_enable_11n = 0; +TUNABLE_INT("hw.usb.rsu.enable_11n", &rsu_enable_11n); + #define RSU_DEBUG_ANY 0xffffffff #define RSU_DEBUG_TX 0x00000001 #define RSU_DEBUG_RX 0x00000002 @@ -357,7 +360,8 @@ rsu_attach(device_t self) device_set_usb_desc(self); sc->sc_udev = uaa->device; sc->sc_dev = self; - sc->sc_ht = !! (USB_GET_DRIVER_INFO(uaa) & RSU_HT_SUPPORTED); + if (rsu_enable_11n) + sc->sc_ht = !! (USB_GET_DRIVER_INFO(uaa) & RSU_HT_SUPPORTED); /* Get number of endpoints */ iface = usbd_get_iface(sc->sc_udev, 0); @@ -429,23 +433,30 @@ rsu_attach(device_t self) IEEE80211_C_SHSLOT | /* Short slot time supported. */ IEEE80211_C_WPA; /* WPA/RSN. */ -#if 0 /* Check if HT support is present. */ - if (usb_lookup(rsu_devs_noht, uaa->vendor, uaa->product) == NULL) { - /* Set HT capabilities. */ - ic->ic_htcaps = - IEEE80211_HTCAP_CBW20_40 | - IEEE80211_HTCAP_DSSSCCK40; - /* Set supported HT rates. */ - for (i = 0; i < 2; i++) - ic->ic_sup_mcs[i] = 0xff; + if (sc->sc_ht) { + device_printf(sc->sc_dev, "%s: enabling 11n\n", __func__); + + /* Enable basic HT */ + ic->ic_htcaps = IEEE80211_HTC_HT | + IEEE80211_HTC_AMPDU | + IEEE80211_HTC_AMSDU | + IEEE80211_HTCAP_MAXAMSDU_3839 | + IEEE80211_HTCAP_SMPS_OFF; + + ic->ic_htcaps |= IEEE80211_HTCAP_CHWIDTH40; + + /* set number of spatial streams */ + ic->ic_txstream = 1; + ic->ic_rxstream = 1; } -#endif /* Set supported .11b and .11g rates. */ bands = 0; setbit(&bands, IEEE80211_MODE_11B); setbit(&bands, IEEE80211_MODE_11G); + if (sc->sc_ht) + setbit(&bands, IEEE80211_MODE_11NG); ieee80211_init_channels(ic, NULL, &bands); ieee80211_ifattach(ic); @@ -1180,6 +1191,9 @@ rsu_join_bss(struct rsu_softc *sc, struc frm = ieee80211_add_rsn(frm, vap); frm = ieee80211_add_wpa(frm, vap); frm = ieee80211_add_qos(frm, ni); + if ((ic->ic_flags & IEEE80211_F_WME) && + (ni->ni_ies.wme_ie != NULL)) + frm = ieee80211_add_wme_info(frm, &ic->ic_wme); if (ni->ni_flags & IEEE80211_NODE_HT) frm = ieee80211_add_htcap(frm, ni); bss->ieslen = htole32(frm - (uint8_t *)fixed); @@ -1314,8 +1328,7 @@ rsu_rx_event(struct rsu_softc *sc, uint8 "%s: Rx event code=%d len=%d\n", __func__, code, len); switch (code) { case R92S_EVT_SURVEY: - if (vap->iv_state == IEEE80211_S_SCAN) - rsu_event_survey(sc, buf, len); + rsu_event_survey(sc, buf, len); break; case R92S_EVT_SURVEY_DONE: RSU_DPRINTF(sc, RSU_DEBUG_SCAN, @@ -1325,6 +1338,7 @@ rsu_rx_event(struct rsu_softc *sc, uint8 break; /* Ignore if not scanning. */ if (sc->sc_scan_pass == 0 && vap->iv_des_nssid != 0) { /* Schedule a directed scan for hidden APs. */ + /* XXX bad! */ sc->sc_scan_pass = 1; RSU_UNLOCK(sc); ieee80211_new_state(vap, IEEE80211_S_SCAN, -1); @@ -1806,6 +1820,13 @@ rsu_tx_start(struct rsu_softc *sc, struc } hasqos = 0; #endif + + RSU_DPRINTF(sc, RSU_DEBUG_TX, "%s: pri=%d, which=%d, hasqos=%d\n", + __func__, + prio, + which, + hasqos); + /* Fill Tx descriptor. */ txd = (struct r92s_tx_desc *)data->buf; memset(txd, 0, sizeof(*txd)); @@ -1839,6 +1860,7 @@ rsu_tx_start(struct rsu_softc *sc, struc SM(R92S_TXDW1_KEYIDX, k->k_id)); } #endif + /* XXX todo: set AGGEN bit if appropriate? */ txd->txdw2 |= htole32(R92S_TXDW2_BK); if (IEEE80211_IS_MULTICAST(wh->i_addr1)) txd->txdw2 |= htole32(R92S_TXDW2_BMCAST); @@ -2212,6 +2234,7 @@ rsu_load_firmware(struct rsu_softc *sc) { const struct r92s_fw_hdr *hdr; struct r92s_fw_priv *dmem; + struct ieee80211com *ic = &sc->sc_ic; const uint8_t *imem, *emem; int imemsz, ememsz; const struct firmware *fw; @@ -2348,10 +2371,11 @@ rsu_load_firmware(struct rsu_softc *sc) dmem->rf_config = 0x11; /* 1T1R */ dmem->vcs_type = R92S_VCS_TYPE_AUTO; dmem->vcs_mode = R92S_VCS_MODE_RTS_CTS; -#ifdef notyet - dmem->bw40_en = (ic->ic_htcaps & IEEE80211_HTCAP_CBW20_40) != 0; -#endif dmem->turbo_mode = 0; + dmem->bw40_en = !! (ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40); + dmem->amsdu2ampdu_en = !! (sc->sc_ht); + dmem->ampdu_en = !! (sc->sc_ht); + dmem->agg_offload = !! (sc->sc_ht); dmem->qos_en = 1; /* Load DMEM section. */ error = rsu_fw_loadsection(sc, (uint8_t *)dmem, sizeof(*dmem)); @@ -2504,8 +2528,7 @@ rsu_init(struct rsu_softc *sc) goto fail; } -#if 0 - if (ic->ic_htcaps & IEEE80211_HTCAP_CBW20_40) { + if (ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40) { /* Enable 40MHz mode. */ error = rsu_fw_iocmd(sc, SM(R92S_IOCMD_CLASS, 0xf4) | @@ -2518,9 +2541,6 @@ rsu_init(struct rsu_softc *sc) } } - /* Set default channel. */ - ic->ic_bss->ni_chan = ic->ic_ibss_chan; -#endif sc->sc_scan_pass = 0; usbd_transfer_start(sc->sc_xfer[RSU_BULK_RX]); From owner-svn-src-head@freebsd.org Fri Sep 18 05:01:06 2015 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 AC0849CD419; Fri, 18 Sep 2015 05:01:06 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 845651613; Fri, 18 Sep 2015 05:01:06 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8I516av038903; Fri, 18 Sep 2015 05:01:06 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8I516B0038901; Fri, 18 Sep 2015 05:01:06 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509180501.t8I516B0038901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 18 Sep 2015 05:01:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287948 - head/sys/net80211 X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 05:01:06 -0000 Author: adrian Date: Fri Sep 18 05:01:05 2015 New Revision: 287948 URL: https://svnweb.freebsd.org/changeset/base/287948 Log: Add an external facing function to manually set the RX A-MPDU parameters for re-ordering. Devices like if_rsu don't pass through action/management frames but do send firmware commands to inform us of things. One of those notifications is the RX A-MPDU negotiated parameters. Modified: head/sys/net80211/ieee80211_ht.c head/sys/net80211/ieee80211_ht.h Modified: head/sys/net80211/ieee80211_ht.c ============================================================================== --- head/sys/net80211/ieee80211_ht.c Fri Sep 18 04:12:11 2015 (r287947) +++ head/sys/net80211/ieee80211_ht.c Fri Sep 18 05:01:05 2015 (r287948) @@ -558,6 +558,43 @@ ampdu_rx_start(struct ieee80211_node *ni } /* + * Public function; manually setup the RX ampdu state. + */ +int +ieee80211_ampdu_rx_start_ext(struct ieee80211_node *ni, int tid, int seq, int baw) +{ + struct ieee80211_rx_ampdu *rap; + + /* XXX TODO: sanity check tid, seq, baw */ + + rap = &ni->ni_rx_ampdu[tid]; + + if (rap->rxa_flags & IEEE80211_AGGR_RUNNING) { + /* + * AMPDU previously setup and not terminated with a DELBA, + * flush the reorder q's in case anything remains. + */ + ampdu_rx_purge(rap); + } + + memset(rap, 0, sizeof(*rap)); + rap->rxa_wnd = (baw== 0) ? + IEEE80211_AGGR_BAWMAX : min(baw, IEEE80211_AGGR_BAWMAX); + rap->rxa_start = seq; + rap->rxa_flags |= IEEE80211_AGGR_RUNNING | IEEE80211_AGGR_XCHGPEND; + + IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N, ni, + "%s: tid=%d, start=%d, wnd=%d, flags=0x%08x\n", + __func__, + tid, + seq, + rap->rxa_wnd, + rap->rxa_flags); + + return 0; +} + +/* * Stop A-MPDU rx processing for the specified TID. */ static void Modified: head/sys/net80211/ieee80211_ht.h ============================================================================== --- head/sys/net80211/ieee80211_ht.h Fri Sep 18 04:12:11 2015 (r287947) +++ head/sys/net80211/ieee80211_ht.h Fri Sep 18 05:01:05 2015 (r287948) @@ -200,4 +200,7 @@ uint8_t *ieee80211_add_htinfo_vendor(uin struct ieee80211_beacon_offsets; void ieee80211_ht_update_beacon(struct ieee80211vap *, struct ieee80211_beacon_offsets *); +int ieee80211_ampdu_rx_start_ext(struct ieee80211_node *ni, int tid, + int seq, int baw); + #endif /* _NET80211_IEEE80211_HT_H_ */ From owner-svn-src-head@freebsd.org Fri Sep 18 05:03:02 2015 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 B99429CD620; Fri, 18 Sep 2015 05:03:02 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 909561AA0; Fri, 18 Sep 2015 05:03:02 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8I532NR039810; Fri, 18 Sep 2015 05:03:02 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8I532qj039807; Fri, 18 Sep 2015 05:03:02 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509180503.t8I532qj039807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 18 Sep 2015 05:03:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287949 - head/sys/dev/usb/wlan X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 05:03:02 -0000 Author: adrian Date: Fri Sep 18 05:03:01 2015 New Revision: 287949 URL: https://svnweb.freebsd.org/changeset/base/287949 Log: Add a very hacked up station only A-MPDU negotiation path. This is enough to set things up; there are still lots of retransmits seen but it's enough to get things working. Modified: head/sys/dev/usb/wlan/if_rsu.c head/sys/dev/usb/wlan/if_rsureg.h Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Fri Sep 18 05:01:05 2015 (r287948) +++ head/sys/dev/usb/wlan/if_rsu.c Fri Sep 18 05:03:01 2015 (r287949) @@ -1319,6 +1319,35 @@ rsu_event_join_bss(struct rsu_softc *sc, } static void +rsu_event_addba_req_report(struct rsu_softc *sc, uint8_t *buf, int len) +{ + struct ieee80211com *ic = &sc->sc_ic; + struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); + struct r92s_add_ba_event *ba = (void *) buf; + struct ieee80211_node *ni; + + if (len < sizeof(*ba)) { + device_printf(sc->sc_dev, "%s: short read (%d)\n", __func__, len); + return; + } + + if (vap == NULL) + return; + + device_printf(sc->sc_dev, "%s: mac=%s, tid=%d, ssn=%d\n", + __func__, + ether_sprintf(ba->mac_addr), + (int) ba->tid, + (int) le16toh(ba->ssn)); + + /* XXX do node lookup; this is STA specific */ + + ni = ieee80211_ref_node(vap->iv_bss); + ieee80211_ampdu_rx_start_ext(ni, ba->tid, le16toh(ba->ssn) >> 4, 32); + ieee80211_free_node(ni); +} + +static void rsu_rx_event(struct rsu_softc *sc, uint8_t code, uint8_t *buf, int len) { struct ieee80211com *ic = &sc->sc_ic; @@ -1370,6 +1399,10 @@ rsu_rx_event(struct rsu_softc *sc, uint8 buf[60] = '\0'; RSU_DPRINTF(sc, RSU_DEBUG_FWDBG, "FWDBG: %s\n", (char *)buf); break; + + case R92S_EVT_ADDBA_REQ_REPORT: + rsu_event_addba_req_report(sc, buf, len); + break; default: RSU_DPRINTF(sc, RSU_DEBUG_ANY, "%s: unhandled code (%d)\n", __func__, code); @@ -1640,6 +1673,8 @@ tr_setup: ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); if (ni != NULL) { + if (ni->ni_flags & IEEE80211_NODE_HT) + m->m_flags |= M_AMPDU; (void)ieee80211_input(ni, m, rssi, 0); ieee80211_free_node(ni); } else Modified: head/sys/dev/usb/wlan/if_rsureg.h ============================================================================== --- head/sys/dev/usb/wlan/if_rsureg.h Fri Sep 18 05:01:05 2015 (r287948) +++ head/sys/dev/usb/wlan/if_rsureg.h Fri Sep 18 05:03:01 2015 (r287949) @@ -593,6 +593,11 @@ struct r92s_tx_desc { uint16_t reserved1; } __packed __aligned(4); +struct r92s_add_ba_event { + uint8_t mac_addr[IEEE80211_ADDR_LEN]; + uint16_t ssn; + uint8_t tid; +}; /* * Driver definitions. From owner-svn-src-head@freebsd.org Fri Sep 18 05:59:16 2015 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 099799CF553; Fri, 18 Sep 2015 05:59:16 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 EED201ABC; Fri, 18 Sep 2015 05:59:15 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8I5xFEZ063039; Fri, 18 Sep 2015 05:59:15 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8I5xF3k063038; Fri, 18 Sep 2015 05:59:15 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509180559.t8I5xF3k063038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 18 Sep 2015 05:59:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287950 - head/sys/dev/usb/wlan X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 05:59:16 -0000 Author: adrian Date: Fri Sep 18 05:59:15 2015 New Revision: 287950 URL: https://svnweb.freebsd.org/changeset/base/287950 Log: Set AMPDU density/size parameters during vap creation. Inspired from: Linux r92su Modified: head/sys/dev/usb/wlan/if_rsu.c Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Fri Sep 18 05:03:01 2015 (r287949) +++ head/sys/dev/usb/wlan/if_rsu.c Fri Sep 18 05:59:15 2015 (r287950) @@ -563,6 +563,10 @@ rsu_vap_create(struct ieee80211com *ic, uvp->newstate = vap->iv_newstate; vap->iv_newstate = rsu_newstate; + /* Limits from the r92su driver */ + vap->iv_ampdu_density = IEEE80211_HTCAP_MPDUDENSITY_16; + vap->iv_ampdu_rxmax = IEEE80211_HTCAP_MAXRXAMPDU_32K; + /* complete setup */ ieee80211_vap_attach(vap, ieee80211_media_change, ieee80211_media_status, mac); From owner-svn-src-head@freebsd.org Fri Sep 18 06:54:53 2015 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 EC7599CDF89; Fri, 18 Sep 2015 06:54:53 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 DDCC41362; Fri, 18 Sep 2015 06:54:53 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8I6sr6E087250; Fri, 18 Sep 2015 06:54:53 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8I6srcw087247; Fri, 18 Sep 2015 06:54:53 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201509180654.t8I6srcw087247@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 18 Sep 2015 06:54:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287951 - head/etc/rc.d X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 06:54:54 -0000 Author: trasz Date: Fri Sep 18 06:54:52 2015 New Revision: 287951 URL: https://svnweb.freebsd.org/changeset/base/287951 Log: The "automount" rc script should depend on "automountd", not the other way around. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/etc/rc.d/automount head/etc/rc.d/automountd head/etc/rc.d/autounmountd Modified: head/etc/rc.d/automount ============================================================================== --- head/etc/rc.d/automount Fri Sep 18 05:59:15 2015 (r287950) +++ head/etc/rc.d/automount Fri Sep 18 06:54:52 2015 (r287951) @@ -4,7 +4,7 @@ # # PROVIDE: automount -# REQUIRE: nfsclient +# REQUIRE: nfsclient automountd # KEYWORD: nojail shutdown . /etc/rc.subr Modified: head/etc/rc.d/automountd ============================================================================== --- head/etc/rc.d/automountd Fri Sep 18 05:59:15 2015 (r287950) +++ head/etc/rc.d/automountd Fri Sep 18 06:54:52 2015 (r287951) @@ -4,7 +4,7 @@ # # PROVIDE: automountd -# REQUIRE: automount +# REQUIRE: DAEMON # KEYWORD: nojail . /etc/rc.subr Modified: head/etc/rc.d/autounmountd ============================================================================== --- head/etc/rc.d/autounmountd Fri Sep 18 05:59:15 2015 (r287950) +++ head/etc/rc.d/autounmountd Fri Sep 18 06:54:52 2015 (r287951) @@ -4,7 +4,7 @@ # # PROVIDE: autounmountd -# REQUIRE: nfsclient +# REQUIRE: DAEMON # KEYWORD: nojail . /etc/rc.subr From owner-svn-src-head@freebsd.org Fri Sep 18 07:18:11 2015 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 AC4FF9CEA46; Fri, 18 Sep 2015 07:18:11 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 837821CDB; Fri, 18 Sep 2015 07:18:11 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8I7IB6d095485; Fri, 18 Sep 2015 07:18:11 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8I7IBYS095484; Fri, 18 Sep 2015 07:18:11 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201509180718.t8I7IBYS095484@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Fri, 18 Sep 2015 07:18:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287952 - head/sys/netinet6 X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 07:18:11 -0000 Author: melifaro Date: Fri Sep 18 07:18:10 2015 New Revision: 287952 URL: https://svnweb.freebsd.org/changeset/base/287952 Log: * Simplify logic besides llchange variable. * Refresh nd6_is_router() comment. Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Fri Sep 18 06:54:52 2015 (r287951) +++ head/sys/netinet6/nd6.c Fri Sep 18 07:18:10 2015 (r287952) @@ -1618,15 +1618,15 @@ nd6_is_router(int type, int code, int is * neighbor cache, this is similar to (6). * This case is rare but we figured that we MUST NOT set IsRouter. * - * newentry olladdr lladdr llchange NS RS RA redir + * is_new old_addr new_addr NS RS RA redir * D R - * 0 n n -- (1) c ? s - * 0 y n -- (2) c s s - * 0 n y -- (3) c s s - * 0 y y n (4) c s s - * 0 y y y (5) c s s - * 1 -- n -- (6) c c c s - * 1 -- y -- (7) c c s c s + * 0 n n (1) c ? s + * 0 y n (2) c s s + * 0 n y (3) c s s + * 0 y y (4) c s s + * 0 y y (5) c s s + * 1 -- n (6) c c c s + * 1 -- y (7) c c s c s * * (c=clear s=set) */ @@ -1751,14 +1751,16 @@ nd6_cache_lladdr(struct ifnet *ifp, stru if (olladdr && lladdr) { llchange = bcmp(lladdr, &ln->ll_addr, ifp->if_addrlen); - } else + } else if (!olladdr && lladdr) + llchange = 1; + else llchange = 0; /* * newentry olladdr lladdr llchange (*=record) * 0 n n -- (1) * 0 y n -- (2) - * 0 n y -- (3) * STALE + * 0 n y y (3) * STALE * 0 y y n (4) * * 0 y y y (5) * STALE * 1 -- n -- (6) NOSTATE(= PASSIVE) @@ -1776,8 +1778,7 @@ nd6_cache_lladdr(struct ifnet *ifp, stru } if (!is_newentry) { - if ((!olladdr && lladdr != NULL) || /* (3) */ - (olladdr && lladdr != NULL && llchange)) { /* (5) */ + if (llchange != 0) { /* (3,5) */ do_update = 1; newstate = ND6_LLINFO_STALE; } else /* (1-2,4) */ From owner-svn-src-head@freebsd.org Fri Sep 18 07:26:35 2015 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 91EA89CEFBC; Fri, 18 Sep 2015 07:26:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 64D981249; Fri, 18 Sep 2015 07:26:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8I7QZXc099632; Fri, 18 Sep 2015 07:26:35 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8I7QZqA099631; Fri, 18 Sep 2015 07:26:35 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509180726.t8I7QZqA099631@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 18 Sep 2015 07:26:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287953 - head/sys/dev/usb/wlan X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 07:26:35 -0000 Author: adrian Date: Fri Sep 18 07:26:34 2015 New Revision: 287953 URL: https://svnweb.freebsd.org/changeset/base/287953 Log: Refactor out the tx buffer free code into a routine, rsu_freebuf(). This makes it easier to add more transmit buffers, have different buffer pools for things, etc. Modified: head/sys/dev/usb/wlan/if_rsu.c Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Fri Sep 18 07:18:10 2015 (r287952) +++ head/sys/dev/usb/wlan/if_rsu.c Fri Sep 18 07:26:34 2015 (r287953) @@ -174,6 +174,7 @@ static void rsu_free_tx_list(struct rsu_ static void rsu_free_list(struct rsu_softc *, struct rsu_data [], int); static struct rsu_data *_rsu_getbuf(struct rsu_softc *); static struct rsu_data *rsu_getbuf(struct rsu_softc *); +static void rsu_freebuf(struct rsu_softc *, struct rsu_data *); static int rsu_write_region_1(struct rsu_softc *, uint16_t, uint8_t *, int); static void rsu_write_1(struct rsu_softc *, uint16_t, uint8_t); @@ -759,6 +760,14 @@ rsu_getbuf(struct rsu_softc *sc) return (bf); } +static void +rsu_freebuf(struct rsu_softc *sc, struct rsu_data *bf) +{ + + RSU_ASSERT_LOCKED(sc); + STAILQ_INSERT_TAIL(&sc->sc_tx_inactive, bf, next); +} + static int rsu_write_region_1(struct rsu_softc *sc, uint16_t addr, uint8_t *buf, int len) @@ -1742,7 +1751,7 @@ rsu_bulk_tx_callback_sub(struct usb_xfer __func__, data); STAILQ_REMOVE_HEAD(&sc->sc_tx_active[which], next); rsu_txeof(xfer, data); - STAILQ_INSERT_TAIL(&sc->sc_tx_inactive, data, next); + rsu_freebuf(sc, data); /* FALLTHROUGH */ case USB_ST_SETUP: tr_setup: @@ -1766,7 +1775,7 @@ tr_setup: if (data != NULL) { STAILQ_REMOVE_HEAD(&sc->sc_tx_active[which], next); rsu_txeof(xfer, data); - STAILQ_INSERT_TAIL(&sc->sc_tx_inactive, data, next); + rsu_freebuf(sc, data); } counter_u64_add(ic->ic_oerrors, 1); @@ -1975,7 +1984,7 @@ rsu_start(struct rsu_softc *sc) if (rsu_tx_start(sc, ni, m, bf) != 0) { if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); - STAILQ_INSERT_HEAD(&sc->sc_tx_inactive, bf, next); + rsu_freebuf(sc, bf); ieee80211_free_node(ni); break; } @@ -2477,7 +2486,7 @@ rsu_raw_xmit(struct ieee80211_node *ni, } if (rsu_tx_start(sc, ni, m, bf) != 0) { ieee80211_free_node(ni); - STAILQ_INSERT_HEAD(&sc->sc_tx_inactive, bf, next); + rsu_freebuf(sc, bf); RSU_UNLOCK(sc); return (EIO); } From owner-svn-src-head@freebsd.org Fri Sep 18 07:55:34 2015 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 44B339CFAE2; Fri, 18 Sep 2015 07:55:34 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 293AC1E9F; Fri, 18 Sep 2015 07:55:34 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8I7tYow011801; Fri, 18 Sep 2015 07:55:34 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8I7tXVg011798; Fri, 18 Sep 2015 07:55:33 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509180755.t8I7tXVg011798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 18 Sep 2015 07:55:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287954 - head/sys/dev/usb/wlan X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 07:55:34 -0000 Author: adrian Date: Fri Sep 18 07:55:33 2015 New Revision: 287954 URL: https://svnweb.freebsd.org/changeset/base/287954 Log: Add in a temporary (hah!) workaround for net80211 scanning versus NIC requirements. Don't start the opmode and join path until a pending survey is finished. This seems to reliably fix things. Ideally I'd just finish off the net80211 pluggable scan stuff and implement the methods here so if_rsu can just drive the scan machinery. However, that's a .. later thing. Whilst here, remove the getbuf debugging; it's okay to run out of transmit buffers under load; it however isn't okay to not be able to send commands. I'll fix that later. Modified: head/sys/dev/usb/wlan/if_rsu.c head/sys/dev/usb/wlan/if_rsureg.h Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Fri Sep 18 07:26:34 2015 (r287953) +++ head/sys/dev/usb/wlan/if_rsu.c Fri Sep 18 07:55:33 2015 (r287954) @@ -742,9 +742,7 @@ _rsu_getbuf(struct rsu_softc *sc) STAILQ_REMOVE_HEAD(&sc->sc_tx_inactive, next); else bf = NULL; - if (bf == NULL) - DPRINTF("out of xmit buffers\n"); - return (bf); + return (bf); } static struct rsu_data * @@ -755,8 +753,6 @@ rsu_getbuf(struct rsu_softc *sc) RSU_ASSERT_LOCKED(sc); bf = _rsu_getbuf(sc); - if (bf == NULL) - DPRINTF("stop queue\n"); return (bf); } @@ -947,6 +943,8 @@ rsu_fw_cmd(struct rsu_softc *sc, uint8_t int cmdsz; int xferlen; + RSU_ASSERT_LOCKED(sc); + data = rsu_getbuf(sc); if (data == NULL) return (ENOMEM); @@ -1124,6 +1122,9 @@ rsu_site_survey(struct rsu_softc *sc, st { struct r92s_fw_cmd_sitesurvey cmd; struct ieee80211com *ic = &sc->sc_ic; + int r; + + RSU_ASSERT_LOCKED(sc); memset(&cmd, 0, sizeof(cmd)); if ((ic->ic_flags & IEEE80211_F_ASCAN) || sc->sc_scan_pass == 1) @@ -1137,7 +1138,11 @@ rsu_site_survey(struct rsu_softc *sc, st } DPRINTF("sending site survey command, pass=%d\n", sc->sc_scan_pass); - return (rsu_fw_cmd(sc, R92S_CMD_SITE_SURVEY, &cmd, sizeof(cmd))); + r = rsu_fw_cmd(sc, R92S_CMD_SITE_SURVEY, &cmd, sizeof(cmd)); + if (r == 0) { + sc->sc_scanning = 1; + } + return (r); } static int @@ -1152,6 +1157,27 @@ rsu_join_bss(struct rsu_softc *sc, struc uint8_t *frm; uint8_t opmode; int error; + int cnt; + char *msg = "rsujoin"; + + RSU_ASSERT_LOCKED(sc); + + /* + * Until net80211 scanning doesn't automatically finish + * before we tell it to, let's just wait until any pending + * scan is done. + * + * XXX TODO: yes, this releases and re-acquires the lock. + * We should re-verify the state whenever we re-attempt this! + */ + cnt = 0; + while (sc->sc_scanning && cnt < 10) { + device_printf(sc->sc_dev, + "%s: still scanning! (attempt %d)\n", + __func__, cnt); + msleep(msg, &sc->sc_mtx, 0, msg, hz / 2); + cnt++; + } /* Let the FW decide the opmode based on the capinfo field. */ opmode = NDIS802_11AUTOUNKNOWN; @@ -1309,12 +1335,18 @@ rsu_event_join_bss(struct rsu_softc *sc, RSU_DPRINTF(sc, RSU_DEBUG_STATE | RSU_DEBUG_FWCMD, "%s: Rx join BSS event len=%d res=%d\n", __func__, len, res); + + /* + * XXX Don't do this; there's likely a better way to tell + * the caller we failed. + */ if (res <= 0) { RSU_UNLOCK(sc); ieee80211_new_state(vap, IEEE80211_S_SCAN, -1); RSU_LOCK(sc); return; } + tmp = le32toh(rsp->associd); if (tmp >= vap->iv_max_aid) { DPRINTF("Assoc ID overflow\n"); @@ -1376,8 +1408,14 @@ rsu_rx_event(struct rsu_softc *sc, uint8 RSU_DPRINTF(sc, RSU_DEBUG_SCAN, "%s: site survey pass %d done, found %d BSS\n", __func__, sc->sc_scan_pass, le32toh(*(uint32_t *)buf)); + sc->sc_scanning = 0; if (vap->iv_state != IEEE80211_S_SCAN) break; /* Ignore if not scanning. */ + + /* + * XXX TODO: This needs to be done without a transition to + * the SCAN state again. Grr. + */ if (sc->sc_scan_pass == 0 && vap->iv_des_nssid != 0) { /* Schedule a directed scan for hidden APs. */ /* XXX bad! */ @@ -2594,6 +2632,7 @@ rsu_init(struct rsu_softc *sc) /* We're ready to go. */ sc->sc_running = 1; + sc->sc_scanning = 0; return; fail: /* Need to stop all failed transfers, if any */ Modified: head/sys/dev/usb/wlan/if_rsureg.h ============================================================================== --- head/sys/dev/usb/wlan/if_rsureg.h Fri Sep 18 07:26:34 2015 (r287953) +++ head/sys/dev/usb/wlan/if_rsureg.h Fri Sep 18 07:55:33 2015 (r287954) @@ -747,6 +747,7 @@ struct rsu_softc { u_int sc_running:1, sc_calibrating:1, + sc_scanning:1, sc_scan_pass:1; u_int cut; struct rsu_host_cmd_ring cmdq; From owner-svn-src-head@freebsd.org Fri Sep 18 10:23:18 2015 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 8A2399CF0D9; Fri, 18 Sep 2015 10:23:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 7A2AD1AF0; Fri, 18 Sep 2015 10:23:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8IANIJ0074086; Fri, 18 Sep 2015 10:23:18 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8IANIo1074085; Fri, 18 Sep 2015 10:23:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509181023.t8IANIo1074085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 18 Sep 2015 10:23:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287955 - head/sys/cam/scsi X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 10:23:18 -0000 Author: mav Date: Fri Sep 18 10:23:17 2015 New Revision: 287955 URL: https://svnweb.freebsd.org/changeset/base/287955 Log: Update list of ASC/ASCQ codes from 5/20/12 to 8/12/15. Modified: head/sys/cam/scsi/scsi_all.c Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Fri Sep 18 07:55:33 2015 (r287954) +++ head/sys/cam/scsi/scsi_all.c Fri Sep 18 10:23:17 2015 (r287955) @@ -969,7 +969,7 @@ static struct asc_table_entry asc_table[ * * SCSI ASC/ASCQ Assignments * Numeric Sorted Listing - * as of 5/20/12 + * as of 8/12/15 * * D - DIRECT ACCESS DEVICE (SBC-2) device column key * .T - SEQUENTIAL ACCESS DEVICE (SSC) ------------------- @@ -1061,6 +1061,9 @@ static struct asc_table_entry asc_table[ /* DT P B */ { SST(0x00, 0x20, SS_RDEF, /* XXX TBD */ "Extended copy information available") }, + /* D */ + { SST(0x00, 0x21, SS_RDEF, /* XXX TBD */ + "Atomic command aborted due to ACA") }, /* D W O BK */ { SST(0x01, 0x00, SS_RDEF, "No index/sector signal") }, @@ -1118,6 +1121,9 @@ static struct asc_table_entry asc_table[ /* F */ { SST(0x04, 0x0D, SS_RDEF, /* XXX TBD */ "Logical unit not ready, structure check required") }, + /* DTL WR MAEBKVF */ + { SST(0x04, 0x0E, SS_RDEF, /* XXX TBD */ + "Logical unit not ready, security session in progress") }, /* DT WROM B */ { SST(0x04, 0x10, SS_RDEF, /* XXX TBD */ "Logical unit not ready, auxiliary memory not accessible") }, @@ -1157,6 +1163,24 @@ static struct asc_table_entry asc_table[ /* DT MAEB */ { SST(0x04, 0x1C, SS_RDEF, /* XXX TBD */ "Logical unit not ready, additional power use not yet granted") }, + /* D */ + { SST(0x04, 0x1D, SS_RDEF, /* XXX TBD */ + "Logical unit not ready, configuration in progress") }, + /* D */ + { SST(0x04, 0x1E, SS_FATAL | ENXIO, + "Logical unit not ready, microcode activation required") }, + /* DTLPWROMAEBKVF */ + { SST(0x04, 0x1F, SS_FATAL | ENXIO, + "Logical unit not ready, microcode download required") }, + /* DTLPWROMAEBKVF */ + { SST(0x04, 0x20, SS_RDEF, /* XXX TBD */ + "Logical unit not ready, logical unit reset required") }, + /* DTLPWROMAEBKVF */ + { SST(0x04, 0x21, SS_RDEF, /* XXX TBD */ + "Logical unit not ready, hard reset required") }, + /* DTLPWROMAEBKVF */ + { SST(0x04, 0x22, SS_RDEF, /* XXX TBD */ + "Logical unit not ready, power cycle required") }, /* DTL WROMAEBKVF */ { SST(0x05, 0x00, SS_RDEF, "Logical unit does not respond to selection") }, @@ -1196,6 +1220,9 @@ static struct asc_table_entry asc_table[ /* DT WRO B */ { SST(0x09, 0x04, SS_RDEF, "Head select fault") }, + /* DT RO B */ + { SST(0x09, 0x05, SS_RDEF, + "Vibration induced tracking error") }, /* DTLPWROMAEBKVF */ { SST(0x0A, 0x00, SS_FATAL | ENOSPC, "Error log overflow") }, @@ -1229,6 +1256,30 @@ static struct asc_table_entry asc_table[ /* D */ { SST(0x0B, 0x09, SS_RDEF, /* XXX TBD */ "Warning - device statistics notification available") }, + /* DTLPWROMAEBKVF */ + { SST(0x0B, 0x0A, SS_RDEF, /* XXX TBD */ + "Warning - High critical temperature limit exceeded") }, + /* DTLPWROMAEBKVF */ + { SST(0x0B, 0x0B, SS_RDEF, /* XXX TBD */ + "Warning - Low critical temperature limit exceeded") }, + /* DTLPWROMAEBKVF */ + { SST(0x0B, 0x0C, SS_RDEF, /* XXX TBD */ + "Warning - High operating temperature limit exceeded") }, + /* DTLPWROMAEBKVF */ + { SST(0x0B, 0x0D, SS_RDEF, /* XXX TBD */ + "Warning - Low operating temperature limit exceeded") }, + /* DTLPWROMAEBKVF */ + { SST(0x0B, 0x0E, SS_RDEF, /* XXX TBD */ + "Warning - High citical humidity limit exceeded") }, + /* DTLPWROMAEBKVF */ + { SST(0x0B, 0x0F, SS_RDEF, /* XXX TBD */ + "Warning - Low citical humidity limit exceeded") }, + /* DTLPWROMAEBKVF */ + { SST(0x0B, 0x10, SS_RDEF, /* XXX TBD */ + "Warning - High operating humidity limit exceeded") }, + /* DTLPWROMAEBKVF */ + { SST(0x0B, 0x11, SS_RDEF, /* XXX TBD */ + "Warning - Low operating humidity limit exceeded") }, /* T R */ { SST(0x0C, 0x00, SS_RDEF, "Write error") }, @@ -1277,6 +1328,15 @@ static struct asc_table_entry asc_table[ /* R */ { SST(0x0C, 0x0F, SS_RDEF, /* XXX TBD */ "Defects in error window") }, + /* D */ + { SST(0x0C, 0x10, SS_RDEF, /* XXX TBD */ + "Incomplete multiple atomic write operations") }, + /* D */ + { SST(0x0C, 0x11, SS_RDEF, /* XXX TBD */ + "Write error - recovery scan needed") }, + /* D */ + { SST(0x0C, 0x12, SS_RDEF, /* XXX TBD */ + "Write error - insufficient zone resources") }, /* DTLPWRO A K */ { SST(0x0D, 0x00, SS_RDEF, /* XXX TBD */ "Error detected by third party temporary initiator") }, @@ -1388,6 +1448,9 @@ static struct asc_table_entry asc_table[ /* D */ { SST(0x11, 0x14, SS_RDEF, /* XXX TBD */ "Read error - LBA marked bad by application client") }, + /* D */ + { SST(0x11, 0x15, SS_RDEF, /* XXX TBD */ + "Write after sanitize required") }, /* D W O BK */ { SST(0x12, 0x00, SS_RDEF, "Address mark not found for ID field") }, @@ -1590,6 +1653,18 @@ static struct asc_table_entry asc_table[ { SST(0x21, 0x03, SS_RDEF, /* XXX TBD */ "Invalid write crossing layer jump") }, /* D */ + { SST(0x21, 0x04, SS_RDEF, /* XXX TBD */ + "Unaligned write command") }, + /* D */ + { SST(0x21, 0x05, SS_RDEF, /* XXX TBD */ + "Write boundary violation") }, + /* D */ + { SST(0x21, 0x06, SS_RDEF, /* XXX TBD */ + "Attempt to read invalid data") }, + /* D */ + { SST(0x21, 0x07, SS_RDEF, /* XXX TBD */ + "Read boundary violation") }, + /* D */ { SST(0x22, 0x00, SS_FATAL | EINVAL, "Illegal function (use 20 00, 24 00, or 26 00)") }, /* DT P B */ @@ -1712,6 +1787,9 @@ static struct asc_table_entry asc_table[ /* T */ { SST(0x26, 0x12, SS_RDEF, /* XXX TBD */ "Vendor specific key reference not found") }, + /* D */ + { SST(0x26, 0x13, SS_RDEF, /* XXX TBD */ + "Application tag mode page is invalid") }, /* DT WRO BK */ { SST(0x27, 0x00, SS_FATAL | EACCES, "Write protected") }, @@ -1736,6 +1814,9 @@ static struct asc_table_entry asc_table[ /* D B */ { SST(0x27, 0x07, SS_FATAL | ENOSPC, "Space allocation failed write protect") }, + /* D */ + { SST(0x27, 0x08, SS_FATAL | EACCES, + "Zone is read only") }, /* DTLPWROMAEBKVF */ { SST(0x28, 0x00, SS_FATAL | ENXIO, "Not ready to ready change, medium may have changed") }, @@ -1879,12 +1960,33 @@ static struct asc_table_entry asc_table[ /* D */ { SST(0x2C, 0x0C, SS_RDEF, /* XXX TBD */ "ORWRITE generation does not match") }, + /* D */ + { SST(0x2C, 0x0D, SS_RDEF, /* XXX TBD */ + "Reset write pointer not allowed") }, + /* D */ + { SST(0x2C, 0x0E, SS_RDEF, /* XXX TBD */ + "Zone is offline") }, + /* D */ + { SST(0x2C, 0x0F, SS_RDEF, /* XXX TBD */ + "Stream not open") }, + /* D */ + { SST(0x2C, 0x10, SS_RDEF, /* XXX TBD */ + "Unwritten data in zone") }, /* T */ { SST(0x2D, 0x00, SS_RDEF, "Overwrite error on update in place") }, /* R */ { SST(0x2E, 0x00, SS_RDEF, /* XXX TBD */ "Insufficient time for operation") }, + /* D */ + { SST(0x2E, 0x01, SS_RDEF, /* XXX TBD */ + "Command timeout before processing") }, + /* D */ + { SST(0x2E, 0x02, SS_RDEF, /* XXX TBD */ + "Command timeout during processing") }, + /* D */ + { SST(0x2E, 0x03, SS_RDEF, /* XXX TBD */ + "Command timeout during processing due to error recovery") }, /* DTLPWROMAEBKVF */ { SST(0x2F, 0x00, SS_RDEF, "Commands cleared by another initiator") }, @@ -1894,6 +1996,9 @@ static struct asc_table_entry asc_table[ /* DTLPWROMAEBKVF */ { SST(0x2F, 0x02, SS_RDEF, /* XXX TBD */ "Commands cleared by device server") }, + /* DTLPWROMAEBKVF */ + { SST(0x2F, 0x03, SS_RDEF, /* XXX TBD */ + "Some commands cleared by queuing layer event") }, /* DT WROM BK */ { SST(0x30, 0x00, SS_RDEF, "Incompatible medium installed") }, @@ -2191,6 +2296,15 @@ static struct asc_table_entry asc_table[ /* DTLPWR MAEBK F */ { SST(0x3F, 0x14, SS_RDEF, /* XXX TBD */ "iSCSI IP address changed") }, + /* DTLPWR MAEBK */ + { SST(0x3F, 0x15, SS_RDEF, /* XXX TBD */ + "Inspect referrals sense descriptors") }, + /* DTLPWROMAEBKVF */ + { SST(0x3F, 0x16, SS_RDEF, /* XXX TBD */ + "Microcode has been changed without reset") }, + /* D */ + { SST(0x3F, 0x17, SS_RDEF, /* XXX TBD */ + "Zone transition to full") }, /* D */ { SST(0x40, 0x00, SS_RDEF, "RAM failure") }, /* deprecated - use 40 NN instead */ @@ -2300,6 +2414,30 @@ static struct asc_table_entry asc_table[ /* DT PWROMAEBK F */ { SST(0x4B, 0x0D, SS_RDEF, /* XXX TBD */ "Data-out buffer error") }, + /* DT PWROMAEBK F */ + { SST(0x4B, 0x0E, SS_RDEF, /* XXX TBD */ + "PCIe fabric error") }, + /* DT PWROMAEBK F */ + { SST(0x4B, 0x0F, SS_RDEF, /* XXX TBD */ + "PCIe completion timeout") }, + /* DT PWROMAEBK F */ + { SST(0x4B, 0x10, SS_RDEF, /* XXX TBD */ + "PCIe completer abort") }, + /* DT PWROMAEBK F */ + { SST(0x4B, 0x11, SS_RDEF, /* XXX TBD */ + "PCIe poisoned TLP received") }, + /* DT PWROMAEBK F */ + { SST(0x4B, 0x12, SS_RDEF, /* XXX TBD */ + "PCIe ECRC check failed") }, + /* DT PWROMAEBK F */ + { SST(0x4B, 0x13, SS_RDEF, /* XXX TBD */ + "PCIe unsupported request") }, + /* DT PWROMAEBK F */ + { SST(0x4B, 0x14, SS_RDEF, /* XXX TBD */ + "PCIe ACS violation") }, + /* DT PWROMAEBK F */ + { SST(0x4B, 0x15, SS_RDEF, /* XXX TBD */ + "PCIe TLP prefix blocket") }, /* DTLPWROMAEBKVF */ { SST(0x4C, 0x00, SS_RDEF, "Logical unit failed self-configuration") }, @@ -2357,6 +2495,21 @@ static struct asc_table_entry asc_table[ /* M */ { SST(0x53, 0x08, SS_RDEF, /* XXX TBD */ "Element status unknown") }, + /* M */ + { SST(0x53, 0x09, SS_RDEF, /* XXX TBD */ + "Data transfer device error - load failed") }, + /* M */ + { SST(0x53, 0x0A, SS_RDEF, /* XXX TBD */ + "Data transfer device error - unload failed") }, + /* M */ + { SST(0x53, 0x0B, SS_RDEF, /* XXX TBD */ + "Data transfer device error - unload missing") }, + /* M */ + { SST(0x53, 0x0C, SS_RDEF, /* XXX TBD */ + "Data transfer device error - eject failed") }, + /* M */ + { SST(0x53, 0x0D, SS_RDEF, /* XXX TBD */ + "Data transfer device error - library communication failed") }, /* P */ { SST(0x54, 0x00, SS_RDEF, "SCSI to host system interface failure") }, @@ -2402,6 +2555,15 @@ static struct asc_table_entry asc_table[ /* DT P B */ { SST(0x55, 0x0D, SS_RDEF, /* XXX TBD */ "Insufficient resources to create ROD token") }, + /* D */ + { SST(0x55, 0x0E, SS_RDEF, /* XXX TBD */ + "Insufficient zone resources") }, + /* D */ + { SST(0x55, 0x0F, SS_RDEF, /* XXX TBD */ + "Insufficient zone resources to complete write") }, + /* D */ + { SST(0x55, 0x10, SS_RDEF, /* XXX TBD */ + "Maximum number of streams open") }, /* R */ { SST(0x57, 0x00, SS_RDEF, "Unable to recover table-of-contents") }, @@ -2822,6 +2984,9 @@ static struct asc_table_entry asc_table[ /* A */ { SST(0x68, 0x00, SS_RDEF, "Logical unit not configured") }, + /* D */ + { SST(0x68, 0x01, SS_RDEF, + "Subsidiary logical unit not configured") }, /* A */ { SST(0x69, 0x00, SS_RDEF, "Data loss on logical unit") }, From owner-svn-src-head@freebsd.org Fri Sep 18 10:44:26 2015 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 CB26E9CFACB; Fri, 18 Sep 2015 10:44:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 BBF9D13DC; Fri, 18 Sep 2015 10:44:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8IAiQcU082401; Fri, 18 Sep 2015 10:44:26 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8IAiQsj082400; Fri, 18 Sep 2015 10:44:26 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509181044.t8IAiQsj082400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 18 Sep 2015 10:44:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287956 - head/sys/cam/scsi X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 10:44:26 -0000 Author: mav Date: Fri Sep 18 10:44:25 2015 New Revision: 287956 URL: https://svnweb.freebsd.org/changeset/base/287956 Log: Update list of opcodes to 5/26/15. Modified: head/sys/cam/scsi/scsi_all.c Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Fri Sep 18 10:23:17 2015 (r287955) +++ head/sys/cam/scsi/scsi_all.c Fri Sep 18 10:44:25 2015 (r287956) @@ -175,7 +175,7 @@ static struct op_table_entry scsi_op_cod * * SCSI Operation Codes * Numeric Sorted Listing - * as of 3/11/08 + * as of 5/26/15 * * D - DIRECT ACCESS DEVICE (SBC-2) device column key * .T - SEQUENTIAL ACCESS DEVICE (SSC-2) ----------------- @@ -501,17 +501,22 @@ static struct op_table_entry scsi_op_cod { 0x93, D, "WRITE SAME(16)" }, /* 93 M ERASE(16) */ { 0x93, T, "ERASE(16)" }, - /* 94 [usage proposed by SCSI Socket Services project] */ - /* 95 [usage proposed by SCSI Socket Services project] */ - /* 96 [usage proposed by SCSI Socket Services project] */ - /* 97 [usage proposed by SCSI Socket Services project] */ + /* 94 O ZBC OUT */ + { 0x94, D, "ZBC OUT" }, + /* 95 O ZBC OUT */ + { 0x95, D, "ZBC OUT" }, + /* 96 */ + /* 97 */ /* 98 */ /* 99 */ - /* 9A */ - /* 9B */ + /* 9A O WRITE STREAM(16) */ + { 0x9A, D, "WRITE STREAM(16)" }, + /* 9B OOOOOOOOOO OOO READ BUFFER(16) */ + { 0x9B, ALL & ~(B) , "READ BUFFER(16)" }, /* 9C O WRITE ATOMIC(16) */ { 0x9C, D, "WRITE ATOMIC(16)" }, - /* 9D */ + /* 9D SERVICE ACTION BIDIRECTIONAL */ + { 0x9D, ALL, "SERVICE ACTION BIDIRECTIONAL" }, /* XXX KDM ALL for this? op-num.txt defines it for none.. */ /* 9E SERVICE ACTION IN(16) */ { 0x9E, ALL, "SERVICE ACTION IN(16)" }, From owner-svn-src-head@freebsd.org Fri Sep 18 12:08:02 2015 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 4DCEA9CFE8A; Fri, 18 Sep 2015 12:08:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 3E1EA1E52; Fri, 18 Sep 2015 12:08:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8IC82iV015930; Fri, 18 Sep 2015 12:08:02 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8IC81ev015927; Fri, 18 Sep 2015 12:08:01 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509181208.t8IC81ev015927@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 18 Sep 2015 12:08:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287957 - head/sys/cam/ctl X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 12:08:02 -0000 Author: mav Date: Fri Sep 18 12:08:00 2015 New Revision: 287957 URL: https://svnweb.freebsd.org/changeset/base/287957 Log: Kill HA link and shutdown the threads on shutdown. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_ha.c head/sys/cam/ctl/ctl_ha.h Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Fri Sep 18 10:44:25 2015 (r287956) +++ head/sys/cam/ctl/ctl.c Fri Sep 18 12:08:00 2015 (r287957) @@ -1581,13 +1581,12 @@ ctl_shutdown(void) softc = (struct ctl_softc *)control_softc; if (softc->is_single == 0) { + ctl_ha_msg_shutdown(softc); if (ctl_ha_msg_deregister(CTL_HA_CHAN_CTL) - != CTL_HA_STATUS_SUCCESS) { - printf("ctl_shutdown: ctl_ha_msg_deregister failed.\n"); - } - if (ctl_ha_msg_shutdown(softc) != CTL_HA_STATUS_SUCCESS) { - printf("ctl_shutdown: ctl_ha_msg_shutdown failed.\n"); - } + != CTL_HA_STATUS_SUCCESS) + printf("%s: ctl_ha_msg_deregister failed.\n", __func__); + if (ctl_ha_msg_destroy(softc) != CTL_HA_STATUS_SUCCESS) + printf("%s: ctl_ha_msg_destroy failed.\n", __func__); ctl_frontend_deregister(&ha_frontend); } Modified: head/sys/cam/ctl/ctl_ha.c ============================================================================== --- head/sys/cam/ctl/ctl_ha.c Fri Sep 18 10:44:25 2015 (r287956) +++ head/sys/cam/ctl/ctl_ha.c Fri Sep 18 12:08:00 2015 (r287957) @@ -155,6 +155,8 @@ struct ha_softc { int ha_receiving; int ha_wakeup; int ha_disconnect; + int ha_shutdown; + eventhandler_tag ha_shutdown_eh; TAILQ_HEAD(, ctl_ha_dt_req) ha_dts; } ha_softc; @@ -568,10 +570,12 @@ ctl_ha_conn_thread(void *arg) int error; while (1) { - if (softc->ha_disconnect) { + if (softc->ha_disconnect || softc->ha_shutdown) { ctl_ha_close(softc); ctl_ha_lclose(softc); softc->ha_disconnect = 0; + if (softc->ha_shutdown) + break; } else if (softc->ha_so != NULL && (softc->ha_so->so_error || softc->ha_so->so_rcv.sb_state & SBS_CANTRCVMORE)) @@ -614,6 +618,11 @@ ctl_ha_conn_thread(void *arg) softc->ha_wakeup = 0; mtx_unlock(&softc->ha_lock); } + mtx_lock(&softc->ha_lock); + softc->ha_shutdown = 2; + wakeup(&softc->ha_wakeup); + mtx_unlock(&softc->ha_lock); + kthread_exit(); } static int @@ -936,6 +945,8 @@ ctl_ha_msg_init(struct ctl_softc *ctl_so mtx_destroy(&softc->ha_lock); return (CTL_HA_STATUS_ERROR); } + softc->ha_shutdown_eh = EVENTHANDLER_REGISTER(shutdown_pre_sync, + ctl_ha_msg_shutdown, ctl_softc, SHUTDOWN_PRI_FIRST); SYSCTL_ADD_PROC(&ctl_softc->sysctl_ctx, SYSCTL_CHILDREN(ctl_softc->sysctl_tree), OID_AUTO, "ha_peer", CTLTYPE_STRING | CTLFLAG_RWTUN, @@ -949,14 +960,40 @@ ctl_ha_msg_init(struct ctl_softc *ctl_so return (CTL_HA_STATUS_SUCCESS); }; -ctl_ha_status +void ctl_ha_msg_shutdown(struct ctl_softc *ctl_softc) { struct ha_softc *softc = &ha_softc; - if (ctl_ha_msg_deregister(CTL_HA_CHAN_DATA) != CTL_HA_STATUS_SUCCESS) { - printf("%s: ctl_ha_msg_deregister failed.\n", __func__); + /* Disconnect and shutdown threads. */ + mtx_lock(&softc->ha_lock); + if (softc->ha_shutdown < 2) { + softc->ha_shutdown = 1; + softc->ha_wakeup = 1; + wakeup(&softc->ha_wakeup); + while (softc->ha_shutdown < 2) { + msleep(&softc->ha_wakeup, &softc->ha_lock, 0, + "shutdown", hz); + } } + mtx_unlock(&softc->ha_lock); +}; + +ctl_ha_status +ctl_ha_msg_destroy(struct ctl_softc *ctl_softc) +{ + struct ha_softc *softc = &ha_softc; + + if (softc->ha_shutdown_eh != NULL) { + EVENTHANDLER_DEREGISTER(shutdown_pre_sync, + softc->ha_shutdown_eh); + softc->ha_shutdown_eh = NULL; + } + + ctl_ha_msg_shutdown(ctl_softc); /* Just in case. */ + + if (ctl_ha_msg_deregister(CTL_HA_CHAN_DATA) != CTL_HA_STATUS_SUCCESS) + printf("%s: ctl_ha_msg_deregister failed.\n", __func__); mtx_destroy(&softc->ha_lock); return (CTL_HA_STATUS_SUCCESS); Modified: head/sys/cam/ctl/ctl_ha.h ============================================================================== --- head/sys/cam/ctl/ctl_ha.h Fri Sep 18 10:44:25 2015 (r287956) +++ head/sys/cam/ctl/ctl_ha.h Fri Sep 18 12:08:00 2015 (r287957) @@ -109,7 +109,8 @@ struct ctl_ha_dt_req { struct ctl_softc; ctl_ha_status ctl_ha_msg_init(struct ctl_softc *softc); -ctl_ha_status ctl_ha_msg_shutdown(struct ctl_softc *softc); +void ctl_ha_msg_shutdown(struct ctl_softc *softc); +ctl_ha_status ctl_ha_msg_destroy(struct ctl_softc *softc); typedef void (*ctl_evt_handler)(ctl_ha_channel channel, ctl_ha_event event, int param); From owner-svn-src-head@freebsd.org Fri Sep 18 13:44:16 2015 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 418449CFB03; Fri, 18 Sep 2015 13:44:16 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 3212A1A7B; Fri, 18 Sep 2015 13:44:16 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8IDiGVj061746; Fri, 18 Sep 2015 13:44:16 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8IDiGNH061745; Fri, 18 Sep 2015 13:44:16 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201509181344.t8IDiGNH061745@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 18 Sep 2015 13:44:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287959 - head/sys/arm64/arm64 X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 13:44:16 -0000 Author: andrew Date: Fri Sep 18 13:44:15 2015 New Revision: 287959 URL: https://svnweb.freebsd.org/changeset/base/287959 Log: Don't read the floating-point registers for now. We will need to enable the VFP around the read of these instructions as they may raise an exception. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/arm64/machdep.c Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Fri Sep 18 12:50:03 2015 (r287958) +++ head/sys/arm64/arm64/machdep.c Fri Sep 18 13:44:15 2015 (r287959) @@ -894,8 +894,11 @@ DB_SHOW_COMMAND(specialregs, db_show_spr PRINT_REG(elr_el1); PRINT_REG(esr_el1); PRINT_REG(far_el1); +#if 0 + /* ARM64TODO: Enable VFP before reading floating-point registers */ PRINT_REG(fpcr); PRINT_REG(fpsr); +#endif PRINT_REG(id_aa64afr0_el1); PRINT_REG(id_aa64afr1_el1); PRINT_REG(id_aa64dfr0_el1); From owner-svn-src-head@freebsd.org Fri Sep 18 15:46:04 2015 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 C78F99CF9CA; Fri, 18 Sep 2015 15:46:04 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A16CD1C3E; Fri, 18 Sep 2015 15:46:04 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A4096B983; Fri, 18 Sep 2015 11:46:03 -0400 (EDT) From: John Baldwin To: "Bjoern A. Zeeb" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r287934 - head/sys/boot/efi/loader Date: Thu, 17 Sep 2015 16:30:42 -0700 Message-ID: <1581085.vcsbvoROWY@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-PRERELEASE; KDE/4.14.3; amd64; ; ) In-Reply-To: References: <201509172036.t8HKalKU088025@repo.freebsd.org> <5683583.PWsk0G3i3G@ralph.baldwin.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 18 Sep 2015 11:46:03 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Fri, 18 Sep 2015 15:46:04 -0000 On Thursday, September 17, 2015 10:30:15 PM Bjoern A. Zeeb wrote: > > > On 17 Sep 2015, at 20:43 , John Baldwin wrote: > > > > On Thursday, September 17, 2015 08:36:47 PM John Baldwin wrote: > >> Author: jhb > >> Date: Thu Sep 17 20:36:46 2015 > >> New Revision: 287934 > >> URL: https://svnweb.freebsd.org/changeset/base/287934 > >> > >> Log: > >> The EFI boot loader allocates a single chunk of contiguous memory to > >> hold the kernel, modules, and any other loaded data. This memory block > >> is relocated to the kernel's expected location during the transfer of > >> control from the loader to the kernel. > >> > >> The GENERIC kernel on amd64 has recently grown such that a kernel + zfs.ko > >> no longer fits in the default staging size. Bump the default size from > >> 32MB to 48MB to provide more breathing room. > > > > I believe that this should work fine for any system with 64MB of RAM. One > > downside of the static size is that the loader fails if it can't allocate > > a contiguous staging size (it isn't able to grow the staging area on > > demand). > > how do md_images work in that case? The md_image has to fit into the same staging area (kernel plus any other files loaded by the loader including modules and md_images all have to fit in the staging area). That was the original motivation for making the staging area a build-time tunable rather than always hardcoded at 32MB so that people who wished to deploy a large md_image can use a make flag to build a loader with a larger staging size (I tested this with a 200+MB mfsroot). -- John Baldwin From owner-svn-src-head@freebsd.org Fri Sep 18 16:52:19 2015 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 B4FBB9CFC8A; Fri, 18 Sep 2015 16:52:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 A35D613E4; Fri, 18 Sep 2015 16:52:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8IGqJm9059478; Fri, 18 Sep 2015 16:52:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8IGqJac059476; Fri, 18 Sep 2015 16:52:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201509181652.t8IGqJac059476@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 18 Sep 2015 16:52:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287960 - in head/sys/arm64: arm64 include X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 16:52:19 -0000 Author: kib Date: Fri Sep 18 16:52:18 2015 New Revision: 287960 URL: https://svnweb.freebsd.org/changeset/base/287960 Log: Clear exclusive monitors when handling data aborts, the monitors are in unknown state per spec. Reviewed by: andrew (previous version) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3668 Modified: head/sys/arm64/arm64/trap.c head/sys/arm64/include/cpufunc.h Modified: head/sys/arm64/arm64/trap.c ============================================================================== --- head/sys/arm64/arm64/trap.c Fri Sep 18 13:44:15 2015 (r287959) +++ head/sys/arm64/arm64/trap.c Fri Sep 18 16:52:18 2015 (r287960) @@ -155,6 +155,13 @@ data_abort(struct trapframe *frame, uint uint64_t far; int error, sig, ucode; + /* + * According to the ARMv8-A rev. A.g, B2.10.5 "Load-Exclusive + * and Store-Exclusive instruction usage restrictions", state + * of the exclusive monitors after data abort exception is unknown. + */ + clrex(); + #ifdef KDB if (kdb_active) { kdb_reenter(); Modified: head/sys/arm64/include/cpufunc.h ============================================================================== --- head/sys/arm64/include/cpufunc.h Fri Sep 18 13:44:15 2015 (r287959) +++ head/sys/arm64/include/cpufunc.h Fri Sep 18 16:52:18 2015 (r287960) @@ -108,6 +108,17 @@ get_mpidr(void) return (mpidr); } +static __inline void +clrex(void) +{ + + /* + * Ensure compiler barrier, otherwise the monitor clear might + * occur too late for us ? + */ + __asm __volatile("clrex" : : : "memory"); +} + #define cpu_nullop() arm64_nullop() #define cpufunc_nullop() arm64_nullop() #define cpu_setttb(a) arm64_setttb(a) From owner-svn-src-head@freebsd.org Fri Sep 18 17:10:00 2015 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 3F1489CF5A1; Fri, 18 Sep 2015 17:10:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 2F7531FC3; Fri, 18 Sep 2015 17:10:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8IHA0TB066000; Fri, 18 Sep 2015 17:10:00 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8IHA0np065993; Fri, 18 Sep 2015 17:10:00 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201509181710.t8IHA0np065993@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 18 Sep 2015 17:10:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287961 - head/sys/arm64/arm64 X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 17:10:00 -0000 Author: kib Date: Fri Sep 18 17:09:59 2015 New Revision: 287961 URL: https://svnweb.freebsd.org/changeset/base/287961 Log: Do not execute exception handlers with disabled interrupts. We should not call vm_fault(), or send a signal, with interrupts disabled. MI kernel code is not prepared for such environment, not to mention that this increases system latency, since code appears to be executing as being under spinlock. The FAR register for data aborts is read before the interrupts are enabled, to avoid its corruption due to nested exception or context switch. Add asserts, similar to the checks done by other architectures, about not taking page faults in non-sleepable contexts, rather than die with late and somewhat confusing witness diagnostic. Reviewed by: andrew Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3669 Modified: head/sys/arm64/arm64/trap.c Modified: head/sys/arm64/arm64/trap.c ============================================================================== --- head/sys/arm64/arm64/trap.c Fri Sep 18 16:52:18 2015 (r287960) +++ head/sys/arm64/arm64/trap.c Fri Sep 18 17:09:59 2015 (r287961) @@ -76,6 +76,7 @@ extern register_t fsu_intr_fault; void do_el1h_sync(struct trapframe *); void do_el0_sync(struct trapframe *); void do_el0_error(struct trapframe *); +static void print_registers(struct trapframe *frame); int (*dtrace_invop_jump_addr)(struct trapframe *); @@ -144,7 +145,7 @@ svc_handler(struct trapframe *frame) } static void -data_abort(struct trapframe *frame, uint64_t esr, int lower) +data_abort(struct trapframe *frame, uint64_t esr, uint64_t far, int lower) { struct vm_map *map; struct thread *td; @@ -152,7 +153,6 @@ data_abort(struct trapframe *frame, uint struct pcb *pcb; vm_prot_t ftype; vm_offset_t va; - uint64_t far; int error, sig, ucode; /* @@ -181,17 +181,23 @@ data_abort(struct trapframe *frame, uint return; } - far = READ_SPECIALREG(far_el1); - p = td->td_proc; + KASSERT(td->td_md.md_spinlock_count == 0, + ("data abort with spinlock held")); + if (td->td_critnest != 0 || WITNESS_CHECK(WARN_SLEEPOK | + WARN_GIANTOK, NULL, "Kernel page fault") != 0) { + print_registers(frame); + panic("data abort in critical section or under mutex"); + } + p = td->td_proc; if (lower) - map = &td->td_proc->p_vmspace->vm_map; + map = &p->p_vmspace->vm_map; else { /* The top bit tells us which range to use */ if ((far >> 63) == 1) map = kernel_map; else - map = &td->td_proc->p_vmspace->vm_map; + map = &p->p_vmspace->vm_map; } va = trunc_page(far); @@ -246,7 +252,7 @@ void do_el1h_sync(struct trapframe *frame) { uint32_t exception; - uint64_t esr; + uint64_t esr, far; /* Read the esr register to get the exception details */ esr = READ_SPECIALREG(esr_el1); @@ -281,7 +287,9 @@ do_el1h_sync(struct trapframe *frame) print_registers(frame); panic("VFP exception in the kernel"); case EXCP_DATA_ABORT: - data_abort(frame, esr, 0); + far = READ_SPECIALREG(far_el1); + intr_enable(); + data_abort(frame, esr, far, 0); break; case EXCP_BRK: #ifdef KDTRACE_HOOKS @@ -328,7 +336,7 @@ do_el0_sync(struct trapframe *frame) { struct thread *td; uint32_t exception; - uint64_t esr; + uint64_t esr, far; /* Check we have a sane environment when entering from userland */ KASSERT((uintptr_t)get_pcpu() >= VM_MIN_KERNEL_ADDRESS, @@ -337,6 +345,13 @@ do_el0_sync(struct trapframe *frame) esr = READ_SPECIALREG(esr_el1); exception = ESR_ELx_EXCEPTION(esr); + switch (exception) { + case EXCP_INSN_ABORT_L: + case EXCP_DATA_ABORT_L: + case EXCP_DATA_ABORT: + far = READ_SPECIALREG(far_el1); + } + intr_enable(); CTR4(KTR_TRAP, "do_el0_sync: curthread: %p, esr %lx, elr: %lx, frame: %p", @@ -352,18 +367,12 @@ do_el0_sync(struct trapframe *frame) #endif break; case EXCP_SVC: - /* - * Ensure the svc_handler is being run with interrupts enabled. - * They will be automatically restored when returning from - * exception handler. - */ - intr_enable(); svc_handler(frame); break; case EXCP_INSN_ABORT_L: case EXCP_DATA_ABORT_L: case EXCP_DATA_ABORT: - data_abort(frame, esr, 1); + data_abort(frame, esr, far, 1); break; case EXCP_UNKNOWN: el0_excp_unknown(frame); From owner-svn-src-head@freebsd.org Fri Sep 18 17:32:24 2015 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 AD8559CE608; Fri, 18 Sep 2015 17:32:24 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 91E561BA7; Fri, 18 Sep 2015 17:32:24 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8IHWOTh081717; Fri, 18 Sep 2015 17:32:24 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8IHWNso081709; Fri, 18 Sep 2015 17:32:23 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201509181732.t8IHWNso081709@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 18 Sep 2015 17:32:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287964 - in head: lib/libc/sys sys/kern sys/sys X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 17:32:24 -0000 Author: trasz Date: Fri Sep 18 17:32:22 2015 New Revision: 287964 URL: https://svnweb.freebsd.org/changeset/base/287964 Log: Kernel part of reroot support - a way to change rootfs without reboot. Note that the mountlist manipulations are somewhat fragile, and not very pretty. The reason for this is to avoid changing vfs_mountroot(), which is (obviously) rather mission-critical, but not very well documented, and thus hard to test properly. It might be possible to rework it to use its own simple root mount mechanism instead of vfs_mountroot(). Reviewed by: kib@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2698 Modified: head/lib/libc/sys/reboot.2 head/sys/kern/kern_shutdown.c head/sys/kern/vfs_mountroot.c head/sys/sys/reboot.h Modified: head/lib/libc/sys/reboot.2 ============================================================================== --- head/lib/libc/sys/reboot.2 Fri Sep 18 17:29:24 2015 (r287963) +++ head/lib/libc/sys/reboot.2 Fri Sep 18 17:32:22 2015 (r287964) @@ -113,6 +113,13 @@ Normally, the disks are sync'd (see before the processor is halted or rebooted. This option may be useful if file system changes have been made manually or if the processor is on fire. +.It Dv RB_REROOT +Instead of rebooting, unmount all filesystems except the one containing +currently-running executable, and mount root filesystem using the same +mechanism which is used during normal boot, based on +vfs.root.mountfrom +.Xr kenv 8 +variable. .It Dv RB_RDONLY Initially mount the root file system read-only. This is currently the default, and this option has been deprecated. Modified: head/sys/kern/kern_shutdown.c ============================================================================== --- head/sys/kern/kern_shutdown.c Fri Sep 18 17:29:24 2015 (r287963) +++ head/sys/kern/kern_shutdown.c Fri Sep 18 17:32:22 2015 (r287964) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -150,10 +151,16 @@ static struct dumperinfo dumper; /* our static struct pcb dumppcb; /* Registers. */ lwpid_t dumptid; /* Thread ID. */ +static struct cdevsw reroot_cdevsw = { + .d_version = D_VERSION, + .d_name = "reroot", +}; + static void poweroff_wait(void *, int); static void shutdown_halt(void *junk, int howto); static void shutdown_panic(void *junk, int howto); static void shutdown_reset(void *junk, int howto); +static int kern_reroot(void); /* register various local shutdown events */ static void @@ -173,6 +180,26 @@ shutdown_conf(void *unused) SYSINIT(shutdown_conf, SI_SUB_INTRINSIC, SI_ORDER_ANY, shutdown_conf, NULL); /* + * The only reason this exists is to create the /dev/reroot/ directory, + * used by reroot code in init(8) as a mountpoint for tmpfs. + */ +static void +reroot_conf(void *unused) +{ + int error; + struct cdev *cdev; + + error = make_dev_p(MAKEDEV_CHECKNAME | MAKEDEV_WAITOK, &cdev, + &reroot_cdevsw, NULL, UID_ROOT, GID_WHEEL, 0600, "reroot/reroot"); + if (error != 0) { + printf("%s: failed to create device node, error %d", + __func__, error); + } +} + +SYSINIT(reroot_conf, SI_SUB_DEVFS, SI_ORDER_ANY, reroot_conf, NULL); + +/* * The system call that results in a reboot. */ /* ARGSUSED */ @@ -188,9 +215,13 @@ sys_reboot(struct thread *td, struct reb if (error == 0) error = priv_check(td, PRIV_REBOOT); if (error == 0) { - mtx_lock(&Giant); - kern_reboot(uap->opt); - mtx_unlock(&Giant); + if (uap->opt & RB_REROOT) { + error = kern_reroot(); + } else { + mtx_lock(&Giant); + kern_reboot(uap->opt); + mtx_unlock(&Giant); + } } return (error); } @@ -336,6 +367,102 @@ kern_reboot(int howto) } /* + * The system call that results in changing the rootfs. + */ +static int +kern_reroot(void) +{ + struct vnode *oldrootvnode, *vp; + struct mount *mp, *devmp; + int error; + + if (curproc != initproc) + return (EPERM); + + /* + * Mark the filesystem containing currently-running executable + * (the temporary copy of init(8)) busy. + */ + vp = curproc->p_textvp; + error = vn_lock(vp, LK_SHARED); + if (error != 0) + return (error); + mp = vp->v_mount; + error = vfs_busy(mp, MBF_NOWAIT); + if (error != 0) { + vfs_ref(mp); + VOP_UNLOCK(vp, 0); + error = vfs_busy(mp, 0); + vn_lock(vp, LK_SHARED | LK_RETRY); + vfs_rel(mp); + if (error != 0) { + VOP_UNLOCK(vp, 0); + return (ENOENT); + } + if (vp->v_iflag & VI_DOOMED) { + VOP_UNLOCK(vp, 0); + vfs_unbusy(mp); + return (ENOENT); + } + } + VOP_UNLOCK(vp, 0); + + /* + * Remove the filesystem containing currently-running executable + * from the mount list, to prevent it from being unmounted + * by vfs_unmountall(), and to avoid confusing vfs_mountroot(). + * + * Also preserve /dev - forcibly unmounting it could cause driver + * reinitialization. + */ + + vfs_ref(rootdevmp); + devmp = rootdevmp; + rootdevmp = NULL; + + mtx_lock(&mountlist_mtx); + TAILQ_REMOVE(&mountlist, mp, mnt_list); + TAILQ_REMOVE(&mountlist, devmp, mnt_list); + mtx_unlock(&mountlist_mtx); + + oldrootvnode = rootvnode; + + /* + * Unmount everything except for the two filesystems preserved above. + */ + vfs_unmountall(); + + /* + * Add /dev back; vfs_mountroot() will move it into its new place. + */ + mtx_lock(&mountlist_mtx); + TAILQ_INSERT_HEAD(&mountlist, devmp, mnt_list); + mtx_unlock(&mountlist_mtx); + rootdevmp = devmp; + vfs_rel(rootdevmp); + + /* + * Mount the new rootfs. + */ + vfs_mountroot(); + + /* + * Update all references to the old rootvnode. + */ + mountcheckdirs(oldrootvnode, rootvnode); + + /* + * Add the temporary filesystem back and unbusy it. + */ + mtx_lock(&mountlist_mtx); + TAILQ_INSERT_TAIL(&mountlist, mp, mnt_list); + mtx_unlock(&mountlist_mtx); + vfs_unbusy(mp); + + return (0); +} + +/* * If the shutdown was a clean halt, behave accordingly. */ static void Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Fri Sep 18 17:29:24 2015 (r287963) +++ head/sys/kern/vfs_mountroot.c Fri Sep 18 17:32:22 2015 (r287964) @@ -220,28 +220,39 @@ vfs_mountroot_devfs(struct thread *td, s *mpp = NULL; - vfsp = vfs_byname("devfs"); - KASSERT(vfsp != NULL, ("Could not find devfs by name")); - if (vfsp == NULL) - return (ENOENT); + if (rootdevmp != NULL) { + /* + * Already have /dev; this happens during rerooting. + */ + error = vfs_busy(rootdevmp, 0); + if (error != 0) + return (error); + *mpp = rootdevmp; + } else { + vfsp = vfs_byname("devfs"); + KASSERT(vfsp != NULL, ("Could not find devfs by name")); + if (vfsp == NULL) + return (ENOENT); - mp = vfs_mount_alloc(NULLVP, vfsp, "/dev", td->td_ucred); + mp = vfs_mount_alloc(NULLVP, vfsp, "/dev", td->td_ucred); - error = VFS_MOUNT(mp); - KASSERT(error == 0, ("VFS_MOUNT(devfs) failed %d", error)); - if (error) - return (error); + error = VFS_MOUNT(mp); + KASSERT(error == 0, ("VFS_MOUNT(devfs) failed %d", error)); + if (error) + return (error); - opts = malloc(sizeof(struct vfsoptlist), M_MOUNT, M_WAITOK); - TAILQ_INIT(opts); - mp->mnt_opt = opts; + opts = malloc(sizeof(struct vfsoptlist), M_MOUNT, M_WAITOK); + TAILQ_INIT(opts); + mp->mnt_opt = opts; + + mtx_lock(&mountlist_mtx); + TAILQ_INSERT_HEAD(&mountlist, mp, mnt_list); + mtx_unlock(&mountlist_mtx); - mtx_lock(&mountlist_mtx); - TAILQ_INSERT_HEAD(&mountlist, mp, mnt_list); - mtx_unlock(&mountlist_mtx); + *mpp = mp; + rootdevmp = mp; + } - *mpp = mp; - rootdevmp = mp; set_rootvnode(); error = kern_symlinkat(td, "/", AT_FDCWD, "dev", UIO_SYSSPACE); Modified: head/sys/sys/reboot.h ============================================================================== --- head/sys/sys/reboot.h Fri Sep 18 17:29:24 2015 (r287963) +++ head/sys/sys/reboot.h Fri Sep 18 17:32:22 2015 (r287964) @@ -59,6 +59,7 @@ #define RB_RESERVED1 0x40000 /* reserved for internal use of boot blocks */ #define RB_RESERVED2 0x80000 /* reserved for internal use of boot blocks */ #define RB_PAUSE 0x100000 /* pause after each output line during probe */ +#define RB_REROOT 0x200000 /* unmount the rootfs and mount it again */ #define RB_MULTIPLE 0x20000000 /* use multiple consoles */ #define RB_BOOTINFO 0x80000000 /* have `struct bootinfo *' arg */ From owner-svn-src-head@freebsd.org Fri Sep 18 17:39:32 2015 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 CB43E9CEA36; Fri, 18 Sep 2015 17:39:32 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 BC4C510E9; Fri, 18 Sep 2015 17:39:32 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8IHdWfA082737; Fri, 18 Sep 2015 17:39:32 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8IHdWTs082736; Fri, 18 Sep 2015 17:39:32 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509181739.t8IHdWTs082736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 18 Sep 2015 17:39:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287965 - head/sys/dev/iwm X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 17:39:32 -0000 Author: adrian Date: Fri Sep 18 17:39:31 2015 New Revision: 287965 URL: https://svnweb.freebsd.org/changeset/base/287965 Log: Ensure the ring state is also blanked upon reset, otherwise duplicate rx events get handled during reset paths. Submitted by: Matthew Dillion Obtained from: DragonflyBSD Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri Sep 18 17:32:22 2015 (r287964) +++ head/sys/dev/iwm/if_iwm.c Fri Sep 18 17:39:31 2015 (r287965) @@ -884,7 +884,9 @@ iwm_reset_rx_ring(struct iwm_softc *sc, (void) iwm_pcie_rx_stop(sc); iwm_nic_unlock(sc); } + /* Reset the ring state */ ring->cur = 0; + memset(sc->rxq.stat, 0, sizeof(*sc->rxq.stat)); } static void From owner-svn-src-head@freebsd.org Fri Sep 18 18:52:17 2015 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 E81219D01CB; Fri, 18 Sep 2015 18:52:16 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 80D2A1A15; Fri, 18 Sep 2015 18:52:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.15.2/8.15.2) with ESMTPS id t8IIq7vu029851 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 18 Sep 2015 21:52:07 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.15.2/8.15.2/Submit) id t8IIq7Q6029850; Fri, 18 Sep 2015 21:52:07 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 18 Sep 2015 21:52:07 +0300 From: Gleb Smirnoff To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r287780 - in head: share/man/man9 sys/kern sys/sys Message-ID: <20150918185207.GF1023@FreeBSD.org> References: <201509141052.t8EAqRWf008293@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201509141052.t8EAqRWf008293@repo.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Fri, 18 Sep 2015 18:52:17 -0000 Hans, on behalf of core, I ask you to revert this change due to lack of review and due to previous issues in this area. On Mon, Sep 14, 2015 at 10:52:27AM +0000, Hans Petter Selasky wrote: H> Author: hselasky H> Date: Mon Sep 14 10:52:26 2015 H> New Revision: 287780 H> URL: https://svnweb.freebsd.org/changeset/base/287780 H> H> Log: H> Implement callout_drain_async(), inspired by the projects/hps_head H> branch. H> H> This function is used to drain a callout via a callback instead of H> blocking the caller until the drain is complete. Refer to the H> callout_drain_async() manual page for a detailed description. H> H> Limitation: If a lock is used with the callout, the callout can only H> be drained asynchronously one time unless the callout_init_mtx() H> function is called again. This limitation is not present in H> projects/hps_head and will require more invasive changes to the H> timeout code, which was not in the scope of this patch. H> H> Differential Revision: https://reviews.freebsd.org/D3521 H> Reviewed by: wblock H> MFC after: 1 month H> H> Modified: H> head/share/man/man9/Makefile H> head/share/man/man9/timeout.9 H> head/sys/kern/kern_timeout.c H> head/sys/sys/_callout.h H> head/sys/sys/callout.h H> H> Modified: head/share/man/man9/Makefile H> ============================================================================== H> --- head/share/man/man9/Makefile Mon Sep 14 10:28:47 2015 (r287779) H> +++ head/share/man/man9/Makefile Mon Sep 14 10:52:26 2015 (r287780) H> @@ -1641,6 +1641,7 @@ MLINKS+=timeout.9 callout.9 \ H> timeout.9 callout_active.9 \ H> timeout.9 callout_deactivate.9 \ H> timeout.9 callout_drain.9 \ H> + timeout.9 callout_drain_async.9 \ H> timeout.9 callout_handle_init.9 \ H> timeout.9 callout_init.9 \ H> timeout.9 callout_init_mtx.9 \ H> H> Modified: head/share/man/man9/timeout.9 H> ============================================================================== H> --- head/share/man/man9/timeout.9 Mon Sep 14 10:28:47 2015 (r287779) H> +++ head/share/man/man9/timeout.9 Mon Sep 14 10:52:26 2015 (r287780) H> @@ -36,6 +36,7 @@ H> .Nm callout_active , H> .Nm callout_deactivate , H> .Nm callout_drain , H> +.Nm callout_drain_async , H> .Nm callout_handle_init , H> .Nm callout_init , H> .Nm callout_init_mtx , H> @@ -70,6 +71,8 @@ typedef void timeout_t (void *); H> .Fn callout_deactivate "struct callout *c" H> .Ft int H> .Fn callout_drain "struct callout *c" H> +.Ft int H> +.Fn callout_drain_async "struct callout *c" "callout_func_t *fn" "void *arg" H> .Ft void H> .Fn callout_handle_init "struct callout_handle *handle" H> .Bd -literal H> @@ -264,6 +267,24 @@ fully stopped before H> .Fn callout_drain H> returns. H> .Pp H> +The function H> +.Fn callout_drain_async H> +is non-blocking and works the same as the H> +.Fn callout_stop H> +function. H> +When this function returns non-zero, do not call it again until the callback function given by H> +.Fa fn H> +has been called with argument H> +.Fa arg . H> +Only one of H> +.Fn callout_drain H> +or H> +.Fn callout_drain_async H> +should be called at a time to drain a callout. H> +If this function returns zero, it is safe to free the callout structure pointed to by the H> +.Fa c H> +argument immediately. H> +.Pp H> The H> .Fn callout_reset H> and H> H> Modified: head/sys/kern/kern_timeout.c H> ============================================================================== H> --- head/sys/kern/kern_timeout.c Mon Sep 14 10:28:47 2015 (r287779) H> +++ head/sys/kern/kern_timeout.c Mon Sep 14 10:52:26 2015 (r287780) H> @@ -1145,6 +1145,45 @@ callout_schedule(struct callout *c, int H> } H> H> int H> +callout_drain_async(struct callout *c, callout_func_t *func, void *arg) H> +{ H> + struct callout_cpu *cc; H> + struct lock_class *class; H> + int retval; H> + int direct; H> + H> + /* stop callout */ H> + callout_stop(c); H> + H> + /* check if callback is being called */ H> + cc = callout_lock(c); H> + if (c->c_iflags & CALLOUT_DIRECT) { H> + direct = 1; H> + } else { H> + direct = 0; H> + } H> + retval = (cc_exec_curr(cc, direct) == c); H> + H> + /* drop locks, if any */ H> + if (retval && c->c_lock != NULL && H> + c->c_lock != &Giant.lock_object) { H> + /* ensure we are properly locked */ H> + class = LOCK_CLASS(c->c_lock); H> + class->lc_assert(c->c_lock, LA_XLOCKED); H> + /* the final callback should not be called locked */ H> + c->c_lock = NULL; H> + c->c_iflags |= CALLOUT_RETURNUNLOCKED; H> + } H> + CC_UNLOCK(cc); H> + H> + /* check if we should queue final callback */ H> + if (retval) H> + callout_reset(c, 1, func, arg); H> + H> + return (retval); H> +} H> + H> +int H> _callout_stop_safe(struct callout *c, int safe) H> { H> struct callout_cpu *cc, *old_cc; H> H> Modified: head/sys/sys/_callout.h H> ============================================================================== H> --- head/sys/sys/_callout.h Mon Sep 14 10:28:47 2015 (r287779) H> +++ head/sys/sys/_callout.h Mon Sep 14 10:52:26 2015 (r287780) H> @@ -46,6 +46,8 @@ LIST_HEAD(callout_list, callout); H> SLIST_HEAD(callout_slist, callout); H> TAILQ_HEAD(callout_tailq, callout); H> H> +typedef void callout_func_t(void *); H> + H> struct callout { H> union { H> LIST_ENTRY(callout) le; H> H> Modified: head/sys/sys/callout.h H> ============================================================================== H> --- head/sys/sys/callout.h Mon Sep 14 10:28:47 2015 (r287779) H> +++ head/sys/sys/callout.h Mon Sep 14 10:52:26 2015 (r287780) H> @@ -82,6 +82,7 @@ struct callout_handle { H> #define callout_active(c) ((c)->c_flags & CALLOUT_ACTIVE) H> #define callout_deactivate(c) ((c)->c_flags &= ~CALLOUT_ACTIVE) H> #define callout_drain(c) _callout_stop_safe(c, 1) H> +int callout_drain_async(struct callout *, callout_func_t *, void *); H> void callout_init(struct callout *, int); H> void _callout_init_lock(struct callout *, struct lock_object *, int); H> #define callout_init_mtx(c, mtx, flags) \ H> _______________________________________________ H> svn-src-all@freebsd.org mailing list H> https://lists.freebsd.org/mailman/listinfo/svn-src-all H> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" -- Totus tuus, Glebius. From owner-svn-src-head@freebsd.org Fri Sep 18 18:57:10 2015 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 AFD269D0381; Fri, 18 Sep 2015 18:57:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 A0D8D1CC1; Fri, 18 Sep 2015 18:57:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8IIvAhp019311; Fri, 18 Sep 2015 18:57:10 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8IIvANT019310; Fri, 18 Sep 2015 18:57:10 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509181857.t8IIvANT019310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 18 Sep 2015 18:57:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287966 - head/share/mk X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 18:57:10 -0000 Author: bdrewery Date: Fri Sep 18 18:57:09 2015 New Revision: 287966 URL: https://svnweb.freebsd.org/changeset/base/287966 Log: Avoid /usr/obj// from r287899 Modified: head/share/mk/local.meta.sys.mk Modified: head/share/mk/local.meta.sys.mk ============================================================================== --- head/share/mk/local.meta.sys.mk Fri Sep 18 17:39:31 2015 (r287965) +++ head/share/mk/local.meta.sys.mk Fri Sep 18 18:57:09 2015 (r287966) @@ -29,7 +29,7 @@ SB_OBJROOT ?= ${SB}/obj/ # this is what we use below OBJROOT ?= ${SB_OBJROOT} .endif -OBJROOT ?= /usr/obj/${SRCTOP}/ +OBJROOT ?= /usr/obj${SRCTOP}/ .if ${OBJROOT:M*/} != "" OBJROOT:= ${OBJROOT:H:tA}/ .else From owner-svn-src-head@freebsd.org Fri Sep 18 19:27:28 2015 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 5F2C39D0F75; Fri, 18 Sep 2015 19:27:28 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-yk0-x22b.google.com (mail-yk0-x22b.google.com [IPv6:2607:f8b0:4002:c07::22b]) (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 1C2081A8E; Fri, 18 Sep 2015 19:27:28 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: by ykdg206 with SMTP id g206so55744071ykd.1; Fri, 18 Sep 2015 12:27:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=lnLkq2s0unHZT1cS/w8ErpPKwNoPmCsvv0T4yS/Kdh4=; b=x/q2QIqaBqbuj+AosAUIbf9iBoc6Mxzx7RyTPgcZEqPiyRecLFwRudPrn8MjqPSupo 5ENC9jF+z1MDEIwX3UzPrAL9VBRNriDftvFC9VWJMR29+YbarVzCz43LnvkApC2pKnDk VJVL67l3+YYxc1WP7/vJEN8En0jy8Nexs0cQZVIDrMwl2hmigOGCYrKCfn6eVgkfZIU5 TxvSLNmO+lL7OMLoPlucQ74Lf6t6EtL7pMKg7c4PhRyYTEu6SkRAH48psyUXhoAFzDXj 74yLJOJ+TtQaCTb1qM8DWcS+ttumF0ZcMbyiLtn18g7UyAyoQ73sTUZThywchFcg0u5B X0rA== MIME-Version: 1.0 X-Received: by 10.129.2.138 with SMTP id 132mr2112148ywc.73.1442604447086; Fri, 18 Sep 2015 12:27:27 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.37.111.214 with HTTP; Fri, 18 Sep 2015 12:27:27 -0700 (PDT) In-Reply-To: <201509181732.t8IHWNso081709@repo.freebsd.org> References: <201509181732.t8IHWNso081709@repo.freebsd.org> Date: Fri, 18 Sep 2015 12:27:27 -0700 X-Google-Sender-Auth: 6GavqrVWWIxwVMTvmB3X7Zgo-A8 Message-ID: Subject: Re: svn commit: r287964 - in head: lib/libc/sys sys/kern sys/sys From: Craig Rodrigues To: Edward Tomasz Napierala Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Fri, 18 Sep 2015 19:27:28 -0000 On Fri, Sep 18, 2015 at 10:32 AM, Edward Tomasz Napierala wrote: > pretty. The reason for this is to avoid changing vfs_mountroot(), which > is (obviously) rather mission-critical, but not very well documented, > and thus hard to test properly. > vfs_mounroot() is indeed quite involved. It's not perfect, but I took an initial pass at writing the mount.conf(8) man page, which tries to document some stuff. -- Craig From owner-svn-src-head@freebsd.org Fri Sep 18 19:43:15 2015 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 E67B79CE7EC; Fri, 18 Sep 2015 19:43:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 D74EC1276; Fri, 18 Sep 2015 19:43:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8IJhFhZ039329; Fri, 18 Sep 2015 19:43:15 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8IJhEri039325; Fri, 18 Sep 2015 19:43:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509181943.t8IJhEri039325@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 18 Sep 2015 19:43:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287967 - head/sys/cam/ctl X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 19:43:16 -0000 Author: mav Date: Fri Sep 18 19:43:14 2015 New Revision: 287967 URL: https://svnweb.freebsd.org/changeset/base/287967 Log: Relax serseq option operation for reads. Previously, with serseq enabled, next command was unblocked only after previous completed. With this change, for read operations, next command is unblocked as soon as last media read completed. This is important for frontends that actually wait for data move completion (like camtgt), or when data are moved through the HA link, or especially when both. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl.h head/sys/cam/ctl/ctl_backend_block.c head/sys/cam/ctl/ctl_io.h Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Fri Sep 18 18:57:09 2015 (r287966) +++ head/sys/cam/ctl/ctl.c Fri Sep 18 19:43:14 2015 (r287967) @@ -10592,6 +10592,8 @@ ctl_extent_check(union ctl_io *io1, unio if (ctl_get_lba_len(io1, &lba1, &len1) != 0) return (CTL_ACTION_ERROR); + if (io1->io_hdr.flags & CTL_FLAG_SERSEQ_DONE) + seq = FALSE; return (ctl_extent_check_lba(lba1, len1, lba2, len2, seq)); } @@ -10601,6 +10603,8 @@ ctl_extent_check_seq(union ctl_io *io1, uint64_t lba1, lba2; uint64_t len1, len2; + if (io1->io_hdr.flags & CTL_FLAG_SERSEQ_DONE) + return (CTL_ACTION_PASS); if (ctl_get_lba_len(io1, &lba1, &len1) != 0) return (CTL_ACTION_ERROR); if (ctl_get_lba_len(io2, &lba2, &len2) != 0) @@ -13218,6 +13222,21 @@ ctl_done_timer_wakeup(void *arg) #endif /* CTL_IO_DELAY */ void +ctl_serseq_done(union ctl_io *io) +{ + struct ctl_lun *lun; + + lun = (struct ctl_lun *)io->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + if (lun->be_lun == NULL || + lun->be_lun->serseq == CTL_LUN_SERSEQ_OFF) + return; + mtx_lock(&lun->lun_lock); + io->io_hdr.flags |= CTL_FLAG_SERSEQ_DONE; + ctl_check_blocked(lun); + mtx_unlock(&lun->lun_lock); +} + +void ctl_done(union ctl_io *io) { Modified: head/sys/cam/ctl/ctl.h ============================================================================== --- head/sys/cam/ctl/ctl.h Fri Sep 18 18:57:09 2015 (r287966) +++ head/sys/cam/ctl/ctl.h Fri Sep 18 19:43:14 2015 (r287967) @@ -172,6 +172,7 @@ int ctl_sap_log_sense_handler(struct ctl int pc); int ctl_config_move_done(union ctl_io *io); void ctl_datamove(union ctl_io *io); +void ctl_serseq_done(union ctl_io *io); void ctl_done(union ctl_io *io); void ctl_data_submit_done(union ctl_io *io); void ctl_config_read_done(union ctl_io *io); Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Fri Sep 18 18:57:09 2015 (r287966) +++ head/sys/cam/ctl/ctl_backend_block.c Fri Sep 18 19:43:14 2015 (r287967) @@ -562,8 +562,10 @@ ctl_be_block_biodone(struct bio *bio) ctl_complete_beio(beio); } else { if ((ARGS(io)->flags & CTL_LLF_READ) && - beio->beio_cont == NULL) + beio->beio_cont == NULL) { ctl_set_success(&io->scsiio); + ctl_serseq_done(io); + } #ifdef CTL_TIME_IO getbintime(&io->io_hdr.dma_start_bt); #endif @@ -782,8 +784,10 @@ ctl_be_block_dispatch_file(struct ctl_be ctl_complete_beio(beio); } else { if ((ARGS(io)->flags & CTL_LLF_READ) && - beio->beio_cont == NULL) + beio->beio_cont == NULL) { ctl_set_success(&io->scsiio); + ctl_serseq_done(io); + } #ifdef CTL_TIME_IO getbintime(&io->io_hdr.dma_start_bt); #endif @@ -951,8 +955,10 @@ ctl_be_block_dispatch_zvol(struct ctl_be ctl_complete_beio(beio); } else { if ((ARGS(io)->flags & CTL_LLF_READ) && - beio->beio_cont == NULL) + beio->beio_cont == NULL) { ctl_set_success(&io->scsiio); + ctl_serseq_done(io); + } #ifdef CTL_TIME_IO getbintime(&io->io_hdr.dma_start_bt); #endif Modified: head/sys/cam/ctl/ctl_io.h ============================================================================== --- head/sys/cam/ctl/ctl_io.h Fri Sep 18 18:57:09 2015 (r287966) +++ head/sys/cam/ctl/ctl_io.h Fri Sep 18 19:43:14 2015 (r287967) @@ -115,7 +115,8 @@ typedef enum { CTL_FLAG_FAILOVER = 0x04000000, /* Killed by a failover */ CTL_FLAG_IO_ACTIVE = 0x08000000, /* I/O active on this SC */ - CTL_FLAG_STATUS_SENT = 0x10000000 /* Status sent by datamove */ + CTL_FLAG_STATUS_SENT = 0x10000000, /* Status sent by datamove */ + CTL_FLAG_SERSEQ_DONE = 0x20000000 /* All storage I/O started */ } ctl_io_flags; From owner-svn-src-head@freebsd.org Fri Sep 18 20:11:10 2015 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 EC1629CF5E7; Fri, 18 Sep 2015 20:11:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 DA751114C; Fri, 18 Sep 2015 20:11:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8IKBATd050796; Fri, 18 Sep 2015 20:11:10 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8IKBApp050795; Fri, 18 Sep 2015 20:11:10 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509182011.t8IKBApp050795@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 18 Sep 2015 20:11:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287968 - head/sys/cam/ctl X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 20:11:11 -0000 Author: mav Date: Fri Sep 18 20:11:10 2015 New Revision: 287968 URL: https://svnweb.freebsd.org/changeset/base/287968 Log: Mark I/Os with DMA flag while moving data through the HA link. Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Fri Sep 18 19:43:14 2015 (r287967) +++ head/sys/cam/ctl/ctl.c Fri Sep 18 20:11:10 2015 (r287968) @@ -1148,6 +1148,7 @@ ctl_isc_event_handler(ctl_ha_channel cha */ io = msg->hdr.serializing_sc; io->io_hdr.msg_type = CTL_MSG_DATAMOVE_DONE; + io->io_hdr.flags &= ~CTL_FLAG_DMA_INPROG; io->io_hdr.flags |= CTL_FLAG_IO_ACTIVE; io->io_hdr.port_status = msg->scsi.fetd_status; io->scsiio.residual = msg->scsi.residual; @@ -11058,6 +11059,7 @@ ctl_failover_lun(struct ctl_lun *lun) io->flags |= CTL_FLAG_FAILOVER; } else { /* This can be only due to DATAMOVE */ io->msg_type = CTL_MSG_DATAMOVE_DONE; + io->flags &= ~CTL_FLAG_DMA_INPROG; io->flags |= CTL_FLAG_IO_ACTIVE; io->port_status = 31340; ctl_enqueue_isc((union ctl_io *)io); @@ -12443,6 +12445,7 @@ ctl_datamove(union ctl_io *io) return; } io->io_hdr.flags &= ~CTL_FLAG_IO_ACTIVE; + io->io_hdr.flags |= CTL_FLAG_DMA_INPROG; if (lun) mtx_unlock(&lun->lun_lock); } else { From owner-svn-src-head@freebsd.org Fri Sep 18 20:28:38 2015 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 A2B209CFDD2; Fri, 18 Sep 2015 20:28:38 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 8D6CD19A5; Fri, 18 Sep 2015 20:28:38 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8IKScZR057722; Fri, 18 Sep 2015 20:28:38 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8IKScv7057721; Fri, 18 Sep 2015 20:28:38 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201509182028.t8IKScv7057721@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 18 Sep 2015 20:28:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287969 - head/lib/libc/sys X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 20:28:38 -0000 Author: delphij Date: Fri Sep 18 20:28:37 2015 New Revision: 287969 URL: https://svnweb.freebsd.org/changeset/base/287969 Log: There is no HP 300 support in FreeBSD anymore, so remove the obsolete BUGS section. While I'm there also bump Dd date. MFC after: 2 weeks Modified: head/lib/libc/sys/reboot.2 Modified: head/lib/libc/sys/reboot.2 ============================================================================== --- head/lib/libc/sys/reboot.2 Fri Sep 18 20:11:10 2015 (r287968) +++ head/lib/libc/sys/reboot.2 Fri Sep 18 20:28:37 2015 (r287969) @@ -28,7 +28,7 @@ .\" @(#)reboot.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd September 18, 2015 .Dt REBOOT 2 .Os .Sh NAME @@ -166,8 +166,3 @@ The .Fn reboot system call appeared in .Bx 4.0 . -.Sh BUGS -The HP300 implementation supports neither -.Dv RB_DFLTROOT -nor -.Dv RB_KDB . From owner-svn-src-head@freebsd.org Fri Sep 18 20:33:52 2015 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 5E9C79CF110; Fri, 18 Sep 2015 20:33:52 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-yk0-x235.google.com (mail-yk0-x235.google.com [IPv6:2607:f8b0:4002:c07::235]) (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 1F4571DDD; Fri, 18 Sep 2015 20:33:52 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: by ykdu9 with SMTP id u9so57291819ykd.2; Fri, 18 Sep 2015 13:33:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=Y6WrCiVZ2STFpwL5Wt0nzVv9jMUkXnTDGzDHJnyOfiI=; b=JeN4/wUj6HfTL+YcTmS8T1lYCi09wfZdXxBwoHOX1MFj2fwEhhMlTVD5oRji9WvcUB BspkwB/36bRBmKsKSmQ/BOmL5LJ2e+InlBYLLw9/BPuPnUL2muCMVXpIm66Zfo21qD7M J9wrHj104RYJefV24IubhIRmVFWF2iEnJJVuz0Cw3MEpQ6FcvW/GOSJXcLQ2NFP+pR3L G1sja5bh8GDrAmH6vGcM80+ak0uDKolGKVa3UqMd9Ly2PPxu//HgrCtPM4rReQdPzt2D EK+mVGPTwiaL0PLf1Hsxo2gcLAe5rc/L8FALWsgNvGWfz7mzGpFqD6b4NnlnNGaaFYqG 1eSg== X-Received: by 10.129.84.132 with SMTP id i126mr6665425ywb.96.1442608431136; Fri, 18 Sep 2015 13:33:51 -0700 (PDT) MIME-Version: 1.0 Sender: davide.italiano@gmail.com Received: by 10.37.17.134 with HTTP; Fri, 18 Sep 2015 13:33:11 -0700 (PDT) In-Reply-To: <55FA69BD.10507@selasky.org> References: <201509141052.t8EAqRWf008293@repo.freebsd.org> <20150916220559.GS1023@FreeBSD.org> <55FA69BD.10507@selasky.org> From: Davide Italiano Date: Fri, 18 Sep 2015 13:33:11 -0700 X-Google-Sender-Auth: -9JHCQJZSd-y9JIROMBsqRSOSn0 Message-ID: Subject: Re: svn commit: r287780 - in head: share/man/man9 sys/kern sys/sys To: Hans Petter Selasky Cc: Gleb Smirnoff , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Fri, 18 Sep 2015 20:33:52 -0000 On Thu, Sep 17, 2015 at 12:20 AM, Hans Petter Selasky wrote: > On 09/17/15 00:05, Gleb Smirnoff wrote: >> >> Weren't you explicitly asked not to touch this system without a proper >> review and discussion? > > > Adding a new function is not touching code. > > --HPS > I tried to stay away from this conversation as much as I could, partly because I haven't touched this code in a couple of years, partly because others have already expressed concerns. Sorry if I sound a little bit harsh here but this is not your playground. As somebody who spent a lot of time working on callout in the past I'm completely opposed to introducing new KPI without proper review. This has several problems: 1) It's a dead KPI, i.e. it has no consumers, which is a fairly bad engineering practice. 2) Your commit message didn't explain what (if any) is the use case for this. 3) You didn't discuss it with anybody else. Review timeout is not an excuse. If you want somebody to review this code ping -current or in the worst case developers@. Writing interfaces is hard, most of the times when you introduce a new one you may miss something useful, that's why we have reviews. It happened in the past when me and mav@ introduced the new callout precision API and we had to change all the functions in the middle of development because of external feedback. Not even talking about the possibility of us changing our mind and removing this KPI after 11 is shipped, while third-party vendors started using it and very unhappily have to #ifdef their drivers, or even worse drop FreeBSD support. tl;dr: I personally don't think that your past/records have some influence on this. You introduced a new KPI, you took this decision lightly, and completely ignored complaints from others. This is a very bad attitude problem, and that's so much worse than all the technical problems this commit brings. -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-head@freebsd.org Fri Sep 18 21:01:53 2015 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 64D239CFD76; Fri, 18 Sep 2015 21:01:53 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 55D8E1B08; Fri, 18 Sep 2015 21:01:53 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8IL1rw7072930; Fri, 18 Sep 2015 21:01:53 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8IL1rAk072929; Fri, 18 Sep 2015 21:01:53 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509182101.t8IL1rAk072929@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 18 Sep 2015 21:01:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287970 - head/usr.bin/tip/tip X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 21:01:53 -0000 Author: bdrewery Date: Fri Sep 18 21:01:52 2015 New Revision: 287970 URL: https://svnweb.freebsd.org/changeset/base/287970 Log: Don't hide build commands. Modified: head/usr.bin/tip/tip/Makefile Modified: head/usr.bin/tip/tip/Makefile ============================================================================== --- head/usr.bin/tip/tip/Makefile Fri Sep 18 20:28:37 2015 (r287969) +++ head/usr.bin/tip/tip/Makefile Fri Sep 18 21:01:52 2015 (r287970) @@ -53,5 +53,5 @@ acutab.o log.o remote.o: Makefile # is no cu(1) with the schg-bit set. beforeinstall: .if exists(${DESTDIR}${BINDIR}/cu) - -@chflags noschg ${DESTDIR}${BINDIR}/cu + -chflags noschg ${DESTDIR}${BINDIR}/cu .endif From owner-svn-src-head@freebsd.org Fri Sep 18 21:18:45 2015 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 9E2FFA00810; Fri, 18 Sep 2015 21:18:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 8EE5E1904; Fri, 18 Sep 2015 21:18:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8ILIjKV078844; Fri, 18 Sep 2015 21:18:45 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8ILIjCc078843; Fri, 18 Sep 2015 21:18:45 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509182118.t8ILIjCc078843@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 18 Sep 2015 21:18:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287971 - head/cddl/lib/libdtrace X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 21:18:45 -0000 Author: bdrewery Date: Fri Sep 18 21:18:44 2015 New Revision: 287971 URL: https://svnweb.freebsd.org/changeset/base/287971 Log: Use FILES for installing the dtrace scripts. The BSD.usr.dist mtree always creates /usr/lib/dtrace so there is no need to check if it exists. The FILES mechanism already supports LIBRARIES_ONLY. Sponsored by: EMC / Isilon Storage Division Modified: head/cddl/lib/libdtrace/Makefile Modified: head/cddl/lib/libdtrace/Makefile ============================================================================== --- head/cddl/lib/libdtrace/Makefile Fri Sep 18 21:01:52 2015 (r287970) +++ head/cddl/lib/libdtrace/Makefile Fri Sep 18 21:18:44 2015 (r287971) @@ -56,6 +56,10 @@ DSRCS= errno.d \ udp.d \ unistd.d +FILES= ${DSRCS} +FILESDIR= /usr/lib/dtrace +FILESMODE= ${NOBINMODE} + WARNS?= 1 CFLAGS+= -I${.OBJDIR} -I${.CURDIR} \ @@ -120,11 +124,4 @@ dt_names.c: beforedepend: dt_errtags.c dt_names.c -beforeinstall: -.if !defined(LIBRARIES_ONLY) && exists(${DESTDIR}/usr/lib/dtrace) -.for file in ${DSRCS} - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} ${.CURDIR}/${file} ${DESTDIR}/usr/lib/dtrace -.endfor -.endif - .include From owner-svn-src-head@freebsd.org Fri Sep 18 21:36:30 2015 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 DE0EE9CF48E; Fri, 18 Sep 2015 21:36:30 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 CF08B1393; Fri, 18 Sep 2015 21:36:30 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8ILaU9X087344; Fri, 18 Sep 2015 21:36:30 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8ILaUPQ087343; Fri, 18 Sep 2015 21:36:30 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509182136.t8ILaUPQ087343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 18 Sep 2015 21:36:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287972 - head/include X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 21:36:31 -0000 Author: bdrewery Date: Fri Sep 18 21:36:29 2015 New Revision: 287972 URL: https://svnweb.freebsd.org/changeset/base/287972 Log: META_MODE: Avoid command changing in 2nd build. If the command to be ran changes then a rebuild is caused. Checking exists(${DESTDIR}...) from make results in this on the 2nd and possibly subsequent builds due to staging during build. Avoid this by always running the existence check in the make sh command. Sponsored by: EMC / Isilon Storage Division Modified: head/include/Makefile Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Fri Sep 18 21:18:44 2015 (r287971) +++ head/include/Makefile Fri Sep 18 21:36:29 2015 (r287972) @@ -172,12 +172,12 @@ compat: copies: .for i in ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} crypto machine machine/pc \ ${_MARCHS} -.if exists(${DESTDIR}${INCLUDEDIR}/$i) - cd ${DESTDIR}${INCLUDEDIR}/$i; \ - for h in *.h; do \ - if [ -L $$h ]; then rm -f $$h; fi; \ - done -.endif + if [ -d ${DESTDIR}${INCLUDEDIR}/$i ]; then \ + cd ${DESTDIR}${INCLUDEDIR}/$i; \ + for h in *.h; do \ + if [ -L $$h ]; then rm -f $$h; fi; \ + done; \ + fi .endfor .for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/nand:Ndev/pci} ${LSUBSUBDIRS} cd ${.CURDIR}/../sys; \ From owner-svn-src-head@freebsd.org Fri Sep 18 22:22:33 2015 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 790949CEE80; Fri, 18 Sep 2015 22:22:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 69BD31D08; Fri, 18 Sep 2015 22:22:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8IMMX8a008961; Fri, 18 Sep 2015 22:22:33 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8IMMXl0008960; Fri, 18 Sep 2015 22:22:33 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509182222.t8IMMXl0008960@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 18 Sep 2015 22:22:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287973 - head/tools/build/options X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 22:22:33 -0000 Author: bdrewery Date: Fri Sep 18 22:22:32 2015 New Revision: 287973 URL: https://svnweb.freebsd.org/changeset/base/287973 Log: Document NO_DIRDEPS for META_MODE and give link to full details. Modified: head/tools/build/options/WITH_META_MODE Modified: head/tools/build/options/WITH_META_MODE ============================================================================== --- head/tools/build/options/WITH_META_MODE Fri Sep 18 21:36:29 2015 (r287972) +++ head/tools/build/options/WITH_META_MODE Fri Sep 18 22:22:32 2015 (r287973) @@ -1,5 +1,8 @@ .\" $FreeBSD$ Enable building in meta mode. +This is an experimental build feature. +For details see +http://www.crufty.net/sjg/docs/freebsd-meta-mode.htm. .Pp The build is driven by dirdeps.mk using .Va DIRDEPS @@ -13,7 +16,10 @@ recursively reads .Va DIRDEPS from Makefile.depend computing a graph of tree dependencies from the current origin. -See http://www.crufty.net/help/sjg/dirdeps.htm +Setting +.Va NO_DIRDEPS +will skip checking dirdep dependencies and will only build in the current +directory. .Pp As each target is made .Xr make 1 From owner-svn-src-head@freebsd.org Fri Sep 18 22:26:26 2015 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 2BA85A010A1; Fri, 18 Sep 2015 22:26:26 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 1C5D51EB2; Fri, 18 Sep 2015 22:26:26 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8IMQPLx009497; Fri, 18 Sep 2015 22:26:25 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8IMQPeZ009496; Fri, 18 Sep 2015 22:26:25 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509182226.t8IMQPeZ009496@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 18 Sep 2015 22:26:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287974 - head/share/man/man5 X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 22:26:26 -0000 Author: bdrewery Date: Fri Sep 18 22:26:25 2015 New Revision: 287974 URL: https://svnweb.freebsd.org/changeset/base/287974 Log: Regenerate Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Fri Sep 18 22:22:32 2015 (r287973) +++ head/share/man/man5/src.conf.5 Fri Sep 18 22:26:25 2015 (r287974) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 287942 2015-09-17 22:04:46Z bdrewery .\" $FreeBSD$ -.Dd September 17, 2015 +.Dd September 18, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -909,8 +909,11 @@ This must be set in the environment, mak not .Pa /etc/src.conf . .It Va WITH_META_MODE -.\" from FreeBSD: head/tools/build/options/WITH_META_MODE 287932 2015-09-17 20:33:52Z bdrewery +.\" from FreeBSD: head/tools/build/options/WITH_META_MODE 287973 2015-09-18 22:22:32Z bdrewery Enable building in meta mode. +This is an experimental build feature. +For details see +http://www.crufty.net/sjg/docs/freebsd-meta-mode.htm. .Pp The build is driven by dirdeps.mk using .Va DIRDEPS @@ -924,7 +927,10 @@ recursively reads .Va DIRDEPS from Makefile.depend computing a graph of tree dependencies from the current origin. -See http://www.crufty.net/help/sjg/dirdeps.htm +Setting +.Va NO_DIRDEPS +will skip checking dirdep dependencies and will only build in the current +directory. .Pp As each target is made .Xr make 1 From owner-svn-src-head@freebsd.org Fri Sep 18 22:28:14 2015 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 8BD8DA01160; Fri, 18 Sep 2015 22:28:14 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 7CEAD1075; Fri, 18 Sep 2015 22:28:14 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8IMSEx8009768; Fri, 18 Sep 2015 22:28:14 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8IMSEOB009765; Fri, 18 Sep 2015 22:28:14 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509182228.t8IMSEOB009765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 18 Sep 2015 22:28:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287975 - head/share/mk X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 22:28:14 -0000 Author: bdrewery Date: Fri Sep 18 22:28:13 2015 New Revision: 287975 URL: https://svnweb.freebsd.org/changeset/base/287975 Log: Garbage collect _SHLIBDIRPREFIX leftovers from r284898. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.lib.mk head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Fri Sep 18 22:26:25 2015 (r287974) +++ head/share/mk/bsd.lib.mk Fri Sep 18 22:28:13 2015 (r287975) @@ -214,9 +214,8 @@ ${SHLIB_NAME_FULL}: beforelinking .endif .if defined(SHLIB_LINK) -# ${_SHLIBDIRPREFIX} and ${_LDSCRIPTROOT} are both needed when cross-building -# and when building 32 bits library shims. ${_SHLIBDIRPREFIX} is the directory -# prefix where shared objects will be installed by the install target. +# ${_LDSCRIPTROOT} is needed when cross-building +# and when building 32 bits library shims. # # ${_LDSCRIPTROOT} is the directory prefix that will be used when generating # ld(1) scripts. The crosstools' ld is configured to lookup libraries in an Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Fri Sep 18 22:26:25 2015 (r287974) +++ head/share/mk/bsd.sys.mk Fri Sep 18 22:28:13 2015 (r287975) @@ -186,7 +186,6 @@ staging stage_libs stage_files stage_as .else # allow targets like beforeinstall to be leveraged DESTDIR= ${STAGE_OBJTOP} -_SHLIBDIRPREFIX= ${STAGE_OBJTOP} .if commands(beforeinstall) .if !empty(_LIBS) || ${MK_STAGING_PROG} != "no" From owner-svn-src-head@freebsd.org Fri Sep 18 22:55:19 2015 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 1A1359CF1B0; Fri, 18 Sep 2015 22:55:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 0A7BA1D6A; Fri, 18 Sep 2015 22:55:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8IMtIDc024284; Fri, 18 Sep 2015 22:55:18 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8IMtIBD024283; Fri, 18 Sep 2015 22:55:18 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509182255.t8IMtIBD024283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 18 Sep 2015 22:55:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287976 - head/share/msgdef X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 22:55:19 -0000 Author: bdrewery Date: Fri Sep 18 22:55:18 2015 New Revision: 287976 URL: https://svnweb.freebsd.org/changeset/base/287976 Log: Remove rm -Rf beforeinstall hack that was needed due to a change that only lasted 3 days in HEAD in 2001 (r88348 - r88459) Sponsored by: EMC / Isilon Storage Division Modified: head/share/msgdef/Makefile Modified: head/share/msgdef/Makefile ============================================================================== --- head/share/msgdef/Makefile Fri Sep 18 22:28:13 2015 (r287975) +++ head/share/msgdef/Makefile Fri Sep 18 22:55:18 2015 (r287976) @@ -134,11 +134,4 @@ SYMLINKS+= ../${lang_terr:C/:.*$//}.${en .endfor .endfor -beforeinstall: -.for locale in ${LOCALES} -.if exists(${DESTDIR}${LOCALEDIR}/${locale}/LC_MESSAGES/) - rm -rf ${DESTDIR}${LOCALEDIR}/${locale}/LC_MESSAGES -.endif -.endfor - .include From owner-svn-src-head@freebsd.org Fri Sep 18 23:12:39 2015 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 4B5DB9CFAD2; Fri, 18 Sep 2015 23:12:39 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 355FD179A; Fri, 18 Sep 2015 23:12:39 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8INCdeM035201; Fri, 18 Sep 2015 23:12:39 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8INCdFu035200; Fri, 18 Sep 2015 23:12:39 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509182312.t8INCdFu035200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 18 Sep 2015 23:12:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287977 - head/libexec/rtld-elf X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 23:12:39 -0000 Author: bdrewery Date: Fri Sep 18 23:12:38 2015 New Revision: 287977 URL: https://svnweb.freebsd.org/changeset/base/287977 Log: META_MODE: No need to fix the link in this case. The exists(${DESTDIR}...) check runs with DESTDIR being blank. When the target runs it does have DESTDIR=${STAGE_OBJTOP} via bsd.sys.mk. This results in the first execution warning that the symlink is missing. The second run does run fine. However, this chflags is not needed at all for META_MODE/STAGING since we never had this path being a schg file while using META_MODE. Sponsored by: EMC / Isilon Storage Division Modified: head/libexec/rtld-elf/Makefile Modified: head/libexec/rtld-elf/Makefile ============================================================================== --- head/libexec/rtld-elf/Makefile Fri Sep 18 22:55:18 2015 (r287976) +++ head/libexec/rtld-elf/Makefile Fri Sep 18 23:12:38 2015 (r287977) @@ -77,7 +77,7 @@ SYMBOL_MAPS+= ${.CURDIR}/${RTLD_ARCH}/Sy # Since moving rtld-elf to /libexec, we need to create a symlink. # Fixup the existing binary that's there so we can symlink over it. beforeinstall: -.if exists(${DESTDIR}/usr/libexec/${PROG}) +.if exists(${DESTDIR}/usr/libexec/${PROG}) && ${MK_STAGING} == "no" -chflags -h noschg ${DESTDIR}/usr/libexec/${PROG} .endif From owner-svn-src-head@freebsd.org Fri Sep 18 23:25:44 2015 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 ACAFF9D0244; Fri, 18 Sep 2015 23:25:44 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 9D48B1ED4; Fri, 18 Sep 2015 23:25:44 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8INPimU040572; Fri, 18 Sep 2015 23:25:44 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8INPilN040571; Fri, 18 Sep 2015 23:25:44 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509182325.t8INPilN040571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 18 Sep 2015 23:25:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287978 - head/share/mk X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 23:25:44 -0000 Author: bdrewery Date: Fri Sep 18 23:25:43 2015 New Revision: 287978 URL: https://svnweb.freebsd.org/changeset/base/287978 Log: Fix LIBRARIES_ONLY It was erroring: make: don't know how to make _manpages. Stop Sponsored by: EMC / Isilon Storage Division MFC after: 1 week Modified: head/share/mk/bsd.lib.mk Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Fri Sep 18 23:12:38 2015 (r287977) +++ head/share/mk/bsd.lib.mk Fri Sep 18 23:25:43 2015 (r287978) @@ -294,7 +294,7 @@ all: .else all: ${_LIBS} -.if ${MK_MAN} != "no" +.if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) all: _manpages .endif .endif From owner-svn-src-head@freebsd.org Fri Sep 18 23:34:48 2015 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 556F49D066A; Fri, 18 Sep 2015 23:34:48 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 4667B12D5; Fri, 18 Sep 2015 23:34:48 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8INYmuv045357; Fri, 18 Sep 2015 23:34:48 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8INYmnK045356; Fri, 18 Sep 2015 23:34:48 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509182334.t8INYmnK045356@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 18 Sep 2015 23:34:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287979 - head/usr.sbin/sysrc X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 23:34:48 -0000 Author: bdrewery Date: Fri Sep 18 23:34:47 2015 New Revision: 287979 URL: https://svnweb.freebsd.org/changeset/base/287979 Log: Remove redundant beforeinstall. Modified: head/usr.sbin/sysrc/Makefile Modified: head/usr.sbin/sysrc/Makefile ============================================================================== --- head/usr.sbin/sysrc/Makefile Fri Sep 18 23:25:43 2015 (r287978) +++ head/usr.sbin/sysrc/Makefile Fri Sep 18 23:34:47 2015 (r287979) @@ -4,8 +4,4 @@ SCRIPTS= sysrc MAN= sysrc.8 -beforeinstall: - mkdir -p ${DESTDIR}${SCRIPTSDIR} - mkdir -p ${DESTDIR}${MANDIR}8 - .include From owner-svn-src-head@freebsd.org Fri Sep 18 23:49:34 2015 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 D39419D0C91; Fri, 18 Sep 2015 23:49:34 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 C38691970; Fri, 18 Sep 2015 23:49:34 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8INnY08050923; Fri, 18 Sep 2015 23:49:34 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8INnXoT050918; Fri, 18 Sep 2015 23:49:33 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509182349.t8INnXoT050918@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 18 Sep 2015 23:49:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287980 - in head: gnu/usr.bin/groff/src/utils/indxbib lib/liblzma lib/libusb lib/libz X-SVN-Group: head 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.20 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: Fri, 18 Sep 2015 23:49:35 -0000 Author: bdrewery Date: Fri Sep 18 23:49:32 2015 New Revision: 287980 URL: https://svnweb.freebsd.org/changeset/base/287980 Log: Replace beforeinstall: handling with FILES. This actually fixes some cases to respect LIBRARIES_ONLY. Sponsored by: EMC / Isilon Storage Division Modified: head/gnu/usr.bin/groff/src/utils/indxbib/Makefile head/lib/liblzma/Makefile head/lib/libusb/Makefile head/lib/libz/Makefile Modified: head/gnu/usr.bin/groff/src/utils/indxbib/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/utils/indxbib/Makefile Fri Sep 18 23:34:47 2015 (r287979) +++ head/gnu/usr.bin/groff/src/utils/indxbib/Makefile Fri Sep 18 23:49:32 2015 (r287980) @@ -5,9 +5,7 @@ SRCS= indxbib.cpp signal.c DPADD= ${LIBBIB} ${LIBGROFF} ${LIBM} LDADD= ${LIBBIB} ${LIBGROFF} -lm CLEANFILES= ${MAN} - -beforeinstall: - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ - ${DIST_DIR}/eign ${DESTDIR}${SHAREDIR}/dict/ +FILES= ${DIST_DIR}/eign +FILESDIR= ${SHAREDIR}/dict/ .include Modified: head/lib/liblzma/Makefile ============================================================================== --- head/lib/liblzma/Makefile Fri Sep 18 23:34:47 2015 (r287979) +++ head/lib/liblzma/Makefile Fri Sep 18 23:49:32 2015 (r287980) @@ -154,10 +154,11 @@ CFLAGS+= -DSYMBOL_VERSIONING CLEANFILES+= liblzma.pc -.if !defined(LIBRARIES_ONLY) -all: liblzma.pc +FILES= liblzma.pc +FILESDIR= ${LIBDATADIR}/pkgconfig + liblzma.pc: liblzma.pc.in - @sed -e 's,@prefix@,/usr,g ; \ + sed -e 's,@prefix@,/usr,g ; \ s,@exec_prefix@,/usr,g ; \ s,@libdir@,/usr/lib,g ; \ s,@includedir@,/usr/include,g ; \ @@ -166,9 +167,4 @@ liblzma.pc: liblzma.pc.in s,@PTHREAD_CFLAGS@,,g ; \ s,@PTHREAD_LIBS@,,g' ${.ALLSRC} > ${.TARGET} -beforeinstall: - @${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - liblzma.pc ${DESTDIR}${LIBDATADIR}/pkgconfig -.endif - .include Modified: head/lib/libusb/Makefile ============================================================================== --- head/lib/libusb/Makefile Fri Sep 18 23:34:47 2015 (r287979) +++ head/lib/libusb/Makefile Fri Sep 18 23:49:32 2015 (r287980) @@ -35,16 +35,9 @@ SRCS+= libusb10_io.c .if defined(COMPAT_32BIT) CFLAGS+= -DCOMPAT_32BIT -.endif - -.ifndef COMPAT_32BIT -beforeinstall: - ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${.CURDIR}/libusb-0.1.pc ${DESTDIR}${LIBDATADIR}/pkgconfig - ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${.CURDIR}/libusb-1.0.pc ${DESTDIR}${LIBDATADIR}/pkgconfig - ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${.CURDIR}/libusb-2.0.pc ${DESTDIR}${LIBDATADIR}/pkgconfig +.else +FILES= libusb-0.1.pc libusb-1.0.pc libusb-2.0.pc +FILESDIR= ${LIBDATADIR}/pkgconfig .endif # Modified: head/lib/libz/Makefile ============================================================================== --- head/lib/libz/Makefile Fri Sep 18 23:34:47 2015 (r287979) +++ head/lib/libz/Makefile Fri Sep 18 23:49:32 2015 (r287980) @@ -69,9 +69,8 @@ test: example minigzip echo hello world | ./minigzip | ./minigzip -d ) .ifndef COMPAT_32BIT -beforeinstall: - ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${.CURDIR}/zlib.pc ${DESTDIR}${LIBDATADIR}/pkgconfig +FILES= zlib.pc +FILESDIR= ${LIBDATADIR}/pkgconfig .endif .include From owner-svn-src-head@freebsd.org Sat Sep 19 03:46:11 2015 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 ED7E5A033FC; Sat, 19 Sep 2015 03:46:11 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 DDF211276; Sat, 19 Sep 2015 03:46:11 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8J3kB7M063571; Sat, 19 Sep 2015 03:46:11 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8J3kBHB063569; Sat, 19 Sep 2015 03:46:11 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509190346.t8J3kBHB063569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 19 Sep 2015 03:46:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287981 - in head: . secure/lib/libcrypto X-SVN-Group: head 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.20 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, 19 Sep 2015 03:46:12 -0000 Author: bdrewery Date: Sat Sep 19 03:46:10 2015 New Revision: 287981 URL: https://svnweb.freebsd.org/changeset/base/287981 Log: Replace afterinstall: hack from r111083 with 'make delete-old' functionality. Sponsored by: EMC / Isilon Storage Division Modified: head/ObsoleteFiles.inc head/secure/lib/libcrypto/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Sep 18 23:49:32 2015 (r287980) +++ head/ObsoleteFiles.inc Sat Sep 19 03:46:10 2015 (r287981) @@ -7234,6 +7234,12 @@ OLD_LIBS+=usr/lib/libposix1e.so.2 OLD_LIBS+=usr/lib/libskey.so.2 OLD_LIBS+=usr/lib/libusbhid.so.0 OLD_LIBS+=usr/lib/libvgl.so.2 +# 20030218: OpenSSL 0.9.7 import +OLD_FILES+=usr/include/des.h +OLD_FILES+=usr/lib/libdes.a +OLD_FILES+=usr/lib/libdes.so +OLD_LIBS+=usr/lib/libdes.so.3 +OLD_FILES+=usr/lib/libdes_p.a # 200302XX OLD_LIBS+=usr/lib/libacl.so.3 OLD_LIBS+=usr/lib/libasn1.so.5 Modified: head/secure/lib/libcrypto/Makefile ============================================================================== --- head/secure/lib/libcrypto/Makefile Fri Sep 18 23:49:32 2015 (r287980) +++ head/secure/lib/libcrypto/Makefile Sat Sep 19 03:46:10 2015 (r287981) @@ -402,14 +402,6 @@ opensslconf.h: opensslconf-${MACHINE_CPU .endif ${CP} ${.ALLSRC} ${.TARGET} -OLDSYMLINKS+= libdes.a libdes.so libdes.so.3 libdes_p.a -afterinstall: - @${ECHO} "Removing stale symlinks." - rm -f ${DESTDIR}${INCLUDEDIR}/des.h -.for symlink in ${OLDSYMLINKS} - rm -f ${DESTDIR}${LIBDIR}/${symlink} -.endfor - .include .if ${MACHINE_CPUARCH} == "amd64" From owner-svn-src-head@freebsd.org Sat Sep 19 03:51:20 2015 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 D8838A0372F; Sat, 19 Sep 2015 03:51:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 C60E01789; Sat, 19 Sep 2015 03:51:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8J3pKGS067418; Sat, 19 Sep 2015 03:51:20 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8J3pKl1067415; Sat, 19 Sep 2015 03:51:20 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509190351.t8J3pKl1067415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 19 Sep 2015 03:51:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287982 - in head: . usr.sbin/ntp/ntpdc X-SVN-Group: head 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.20 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, 19 Sep 2015 03:51:20 -0000 Author: bdrewery Date: Sat Sep 19 03:51:19 2015 New Revision: 287982 URL: https://svnweb.freebsd.org/changeset/base/287982 Log: Replace afterinstall: hack from r54681 with 'make delete-old' functionality. Sponsored by: EMC / Isilon Storage Division Modified: head/ObsoleteFiles.inc head/usr.sbin/ntp/ntpdc/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sat Sep 19 03:46:10 2015 (r287981) +++ head/ObsoleteFiles.inc Sat Sep 19 03:51:19 2015 (r287982) @@ -7298,6 +7298,8 @@ OLD_LIBS+=usr/lib/libtermcap.so.2 OLD_LIBS+=usr/lib/libutil.so.2 OLD_LIBS+=usr/lib/libvgl.so.1 OLD_LIBS+=usr/lib/libwrap.so.2 +# 19991216 +OLD_FILES+=usr/sbin/xntpdc # 199909XX OLD_LIBS+=usr/lib/libc_r.so.3 # ??? Modified: head/usr.sbin/ntp/ntpdc/Makefile ============================================================================== --- head/usr.sbin/ntp/ntpdc/Makefile Sat Sep 19 03:46:10 2015 (r287981) +++ head/usr.sbin/ntp/ntpdc/Makefile Sat Sep 19 03:51:19 2015 (r287982) @@ -33,7 +33,4 @@ CLEANFILES+= .version version.c version.c: sh -e ${.CURDIR}/../scripts/mkver ntpdc -afterinstall: - rm -f ${DESTDIR}/usr/sbin/xntpdc - .include From owner-svn-src-head@freebsd.org Sat Sep 19 03:53:37 2015 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 EA461A03952; Sat, 19 Sep 2015 03:53:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 D6B551A75; Sat, 19 Sep 2015 03:53:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8J3rboB067549; Sat, 19 Sep 2015 03:53:37 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8J3rbRe067548; Sat, 19 Sep 2015 03:53:37 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509190353.t8J3rbRe067548@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 19 Sep 2015 03:53:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287983 - head/gnu/usr.bin/binutils/ld X-SVN-Group: head 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.20 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, 19 Sep 2015 03:53:38 -0000 Author: bdrewery Date: Sat Sep 19 03:53:37 2015 New Revision: 287983 URL: https://svnweb.freebsd.org/changeset/base/287983 Log: Replace afterinstall: hack with FILES mechanism. Sponsored by: EMC / Isilon Storage Division Modified: head/gnu/usr.bin/binutils/ld/Makefile Modified: head/gnu/usr.bin/binutils/ld/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile Sat Sep 19 03:51:19 2015 (r287982) +++ head/gnu/usr.bin/binutils/ld/Makefile Sat Sep 19 03:53:37 2015 (r287983) @@ -45,6 +45,12 @@ LDADD= ${DPADD} CLEANDIRS+= ldscripts CLEANFILES+= ldemul-list.h stringify.sed +FILES= ${LDSCRIPTS:S|^|ldscripts/|} +FILESOWN= ${LIBOWN} +FILESGRP= ${LIBGRP} +FILESMODE= ${LIBMODE} +FILESDIR= ${SCRIPTDIR} + HOST= ${TARGET_TUPLE} LIBSEARCHPATH= \"${TOOLS_PREFIX}/lib\":\"${TOOLS_PREFIX}/usr/lib\" ELF_SCR_EXT= x xbn xc xd xdc xdw xn xr xs xsc xsw xu xw @@ -66,10 +72,6 @@ ldemul-list.h: stringify.sed: ln -sf ${SRCDIR}/ld/emultempl/astring.sed ${.TARGET} -afterinstall: - ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${LDSCRIPTS:S|^|ldscripts/|} ${DESTDIR}${SCRIPTDIR} - GENDIRDEPS_FILTER.host+= Nusr.bin/yacc .include From owner-svn-src-head@freebsd.org Sat Sep 19 08:53:38 2015 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 E2181A05E53; Sat, 19 Sep 2015 08:53:37 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (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 5DB3A1C1A; Sat, 19 Sep 2015 08:53:33 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id D7BB21FE023; Sat, 19 Sep 2015 10:53:31 +0200 (CEST) Subject: Re: svn commit: r287780 - in head: share/man/man9 sys/kern sys/sys To: Davide Italiano References: <201509141052.t8EAqRWf008293@repo.freebsd.org> <20150916220559.GS1023@FreeBSD.org> <55FA69BD.10507@selasky.org> Cc: Gleb Smirnoff , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Julien Charbon , rss@freebsd.org From: Hans Petter Selasky Message-ID: <55FD22E9.2040508@selasky.org> Date: Sat, 19 Sep 2015 10:55:05 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 19 Sep 2015 08:53:38 -0000 On 09/18/15 22:33, Davide Italiano wrote: > On Thu, Sep 17, 2015 at 12:20 AM, Hans Petter Selasky wrote: >> On 09/17/15 00:05, Gleb Smirnoff wrote: >>> >>> Weren't you explicitly asked not to touch this system without a proper >>> review and discussion? >> >> >> Adding a new function is not touching code. >> >> --HPS >> > > I tried to stay away from this conversation as much as I could, partly > because I haven't touched this code in a couple of years, partly > because others have already expressed concerns. Sorry if I sound a > little bit harsh here but this is not your playground. Hi Davide, If sys/kern/kern_timeout.c is not open for all, please state this in MAINTAINERS then. I will respect that. > As somebody who spent a lot of time working on callout in the past I'm > completely opposed to introducing new KPI without proper review. > This has several problems: > 1) It's a dead KPI, i.e. it has no consumers, which is a fairly bad > engineering practice. > 2) Your commit message didn't explain what (if any) is the use case for this. It currently has one critical client, and that is destruction of TCP connections. The last 6 months there has been terribly much discussion, bugs and panics in the callout area, and there seems no end with recent panics posted to -current. Even the updates which rss & more did slipped in new bugs. I'm going to let Julien finish his work first. If he doesn't need the KPI it will be removed. Else I want that it stays in. > 3) You didn't discuss it with anybody else. Review timeout is not an > excuse. If you want somebody to review this code ping -current or in > the worst case developers@. Writing interfaces is hard, most of the > times when you introduce a new one you may miss something useful, > that's why we have reviews. It happened in the past when me and mav@ > introduced the new callout precision API and we had to change all the > functions in the middle of development because of external feedback. There has been plenty discussion about callout_drain_async() at this very list. Refer to discussions earlier this year, where several people stated the need for a callout drain async function. Even rss promised to make an implementation. > Not even talking about the possibility of us changing our mind and > removing this KPI after 11 is shipped, while third-party vendors > started using it and very unhappily have to #ifdef their > drivers, or even worse drop FreeBSD support. > I personally don't think that your past/records have some influence on > this. You introduced a new KPI, you took this decision lightly, and > completely ignored complaints from others. This is a very bad attitude > problem, and that's so much worse than all the technical problems this > commit brings. Again, please add to MAINTAINERS who owns kern/kern_timeout.c and does pre-commit reviews. I will respect that and not that developers claim sudden ownership of code. --HPS From owner-svn-src-head@freebsd.org Sat Sep 19 08:57:13 2015 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 60233A05FA9; Sat, 19 Sep 2015 08:57:13 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (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 272A11DAE; Sat, 19 Sep 2015 08:57:13 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id EFA2D1FE023; Sat, 19 Sep 2015 10:57:10 +0200 (CEST) Subject: Re: svn commit: r287780 - in head: share/man/man9 sys/kern sys/sys To: David Chisnall References: <201509141052.t8EAqRWf008293@repo.freebsd.org> <20150916220559.GS1023@FreeBSD.org> <55FA69BD.10507@selasky.org> <0952027A-5276-487D-99B8-74747B0EEF5D@FreeBSD.org> Cc: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: <55FD23C5.5010008@selasky.org> Date: Sat, 19 Sep 2015 10:58:45 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <0952027A-5276-487D-99B8-74747B0EEF5D@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 19 Sep 2015 08:57:13 -0000 On 09/17/15 11:07, David Chisnall wrote: > I would expect*anyone* making a change like this to have both the design and code reviewed for sanity checking. Please add an entry to MAINTAINERS for those parts of the kernel which require this strict reviews. --HPS From owner-svn-src-head@freebsd.org Sat Sep 19 11:23:48 2015 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 996029CF33F; Sat, 19 Sep 2015 11:23:48 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (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 572661DE9; Sat, 19 Sep 2015 11:23:47 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 25EEE1FE023; Sat, 19 Sep 2015 13:23:40 +0200 (CEST) Subject: Re: svn commit: r287780 - in head: share/man/man9 sys/kern sys/sys To: Davide Italiano References: <201509141052.t8EAqRWf008293@repo.freebsd.org> <20150916220559.GS1023@FreeBSD.org> <55FA69BD.10507@selasky.org> <55FD22E9.2040508@selasky.org> Cc: Gleb Smirnoff , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Julien Charbon , Randall Stewart From: Hans Petter Selasky Message-ID: <55FD461A.4030101@selasky.org> Date: Sat, 19 Sep 2015 13:25:14 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <55FD22E9.2040508@selasky.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 19 Sep 2015 11:23:48 -0000 On 09/19/15 10:55, Hans Petter Selasky wrote: > It currently has one critical client, and that is destruction of TCP > connections. In general I see the added function extremely useful when creating protocols which use callouts, which destruct their "PCBs" from interrupt context, that you don't need a sleeping context to destruct "PCBs" in general. Further with non-MPSAFE callouts, tracking the return value of callout_reset_xxx() and callout_stop_xxx() is not an option. callout_reset_async() is a requirement for non-blocking and sane callout operation. We need this functionality in the callout subsystem simply! It is a failure not to have it. --HPS Minor typo: s/rss/rrs From owner-svn-src-head@freebsd.org Sat Sep 19 11:50:03 2015 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 4FA7D9CFEFB; Sat, 19 Sep 2015 11:50:03 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 401FB15CC; Sat, 19 Sep 2015 11:50:03 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8JBo38c066340; Sat, 19 Sep 2015 11:50:03 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8JBo3mL066339; Sat, 19 Sep 2015 11:50:03 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201509191150.t8JBo3mL066339@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 19 Sep 2015 11:50:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287985 - head/sys/netinet6 X-SVN-Group: head 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.20 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, 19 Sep 2015 11:50:03 -0000 Author: melifaro Date: Sat Sep 19 11:50:02 2015 New Revision: 287985 URL: https://svnweb.freebsd.org/changeset/base/287985 Log: Cleanup nd6_cache_lladdr(). No functional changes. * Since new extries are now allocated explicitly, fill in all the necessary fields for lle _before_ attaching it to the table. * Remove ND6_LLINFO_INCOMPLETE check which was unused even in first KAME merge (r53541). * After that, the only new state that function can set, was ND6_LLINFO_STALE. Given everything above, simplify logic besides do_update and is_newentry. * Fix nd_resolve() comment. Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Sat Sep 19 03:58:31 2015 (r287984) +++ head/sys/netinet6/nd6.c Sat Sep 19 11:50:02 2015 (r287985) @@ -1689,7 +1689,6 @@ nd6_cache_lladdr(struct ifnet *ifp, stru int olladdr; int llchange; int flags; - int newstate = 0; uint16_t router = 0; struct sockaddr_in6 sin6; struct mbuf *chain = NULL; @@ -1722,6 +1721,16 @@ nd6_cache_lladdr(struct ifnet *ifp, stru ln = nd6_alloc(from, 0, ifp); if (ln == NULL) return; + + /* + * Since we already know all the data for the new entry, + * fill it before insertion. + */ + if (lladdr != NULL) { + bcopy(lladdr, &ln->ll_addr, ifp->if_addrlen); + ln->la_flags |= LLE_VALID; + ln->ln_state = ND6_LLINFO_STALE; + } IF_AFDATA_WLOCK(ifp); LLE_WLOCK(ln); /* Prefer any existing lle over newly-created one */ @@ -1767,6 +1776,10 @@ nd6_cache_lladdr(struct ifnet *ifp, stru * 1 -- y -- (7) * STALE */ + do_update = 0; + if (!is_newentry && llchange != 0) + do_update = 1; /* (3,5) */ + if (lladdr) { /* (3-5) and (7) */ /* * Record source link-layer address @@ -1774,35 +1787,13 @@ nd6_cache_lladdr(struct ifnet *ifp, stru */ bcopy(lladdr, &ln->ll_addr, ifp->if_addrlen); ln->la_flags |= LLE_VALID; - EVENTHANDLER_INVOKE(lle_event, ln, LLENTRY_RESOLVED); - } + ln->ln_state = ND6_LLINFO_STALE; - if (!is_newentry) { - if (llchange != 0) { /* (3,5) */ - do_update = 1; - newstate = ND6_LLINFO_STALE; - } else /* (1-2,4) */ - do_update = 0; - } else { - do_update = 1; - if (lladdr == NULL) /* (6) */ - newstate = ND6_LLINFO_NOSTATE; - else /* (7) */ - newstate = ND6_LLINFO_STALE; - } - - if (do_update) { - /* - * Update the state of the neighbor cache. - */ - ln->ln_state = newstate; + EVENTHANDLER_INVOKE(lle_event, ln, LLENTRY_RESOLVED); - if (ln->ln_state == ND6_LLINFO_STALE) { + if (do_update) { if (ln->la_hold != NULL) nd6_grab_holdchain(ln, &chain, &sin6); - } else if (ln->ln_state == ND6_LLINFO_INCOMPLETE) { - /* probe right away */ - nd6_llinfo_settimer_locked((void *)ln, 0); } } @@ -1838,7 +1829,7 @@ nd6_cache_lladdr(struct ifnet *ifp, stru * for those are not autoconfigured hosts, we explicitly avoid such * cases for safety. */ - if (do_update && router && + if ((do_update || is_newentry) && router && ND_IFINFO(ifp)->flags & ND6_IFF_ACCEPT_RTADV) { /* * guaranteed recursion @@ -2005,7 +1996,7 @@ nd6_resolve(struct ifnet *ifp, int is_gw /* * Perform fast path for the following cases: * 1) lle state is REACHABLE - * 2) lle state is DELAY (NS message sentNS message sent) + * 2) lle state is DELAY (NS message sent) * * Every other case involves lle modification, so we handle * them separately. From owner-svn-src-head@freebsd.org Sat Sep 19 13:12:10 2015 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 1F2DBA05F26; Sat, 19 Sep 2015 13:12:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 037AF1239; Sat, 19 Sep 2015 13:12:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8JDC9o5002791; Sat, 19 Sep 2015 13:12:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8JDC9VY002790; Sat, 19 Sep 2015 13:12:09 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509191312.t8JDC9VY002790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 19 Sep 2015 13:12:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287986 - head/sys/cam/ctl X-SVN-Group: head 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.20 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, 19 Sep 2015 13:12:10 -0000 Author: mav Date: Sat Sep 19 13:12:09 2015 New Revision: 287986 URL: https://svnweb.freebsd.org/changeset/base/287986 Log: Fix memory corruption when >128K transferred through HA link. While there, do some cleaning. Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Sat Sep 19 11:50:02 2015 (r287985) +++ head/sys/cam/ctl/ctl.c Sat Sep 19 13:12:09 2015 (r287986) @@ -1080,7 +1080,7 @@ ctl_isc_event_handler(ctl_ha_channel cha if (msg->dt.sg_sequence == 0) { i = msg->dt.kern_sg_entries + - io->scsiio.kern_data_len / + msg->dt.kern_data_len / CTL_HA_DATAMOVE_SEGMENT + 1; sgl = malloc(sizeof(*sgl) * i, M_CTL, M_WAITOK | M_ZERO); @@ -1116,11 +1116,8 @@ ctl_isc_event_handler(ctl_ha_channel cha sgl[i].len = msg->dt.sg_list[j].len; #if 0 - printf("%s: L: %p,%d -> %p,%d j=%d, i=%d\n", - __func__, - msg->dt.sg_list[j].addr, - msg->dt.sg_list[j].len, - sgl[i].addr, sgl[i].len, j, i); + printf("%s: DATAMOVE: %p,%lu j=%d, i=%d\n", + __func__, sgl[i].addr, sgl[i].len, j, i); #endif } @@ -12537,11 +12534,8 @@ ctl_datamove_remote_dm_write_cb(union ct { int retval; - retval = 0; - retval = ctl_datamove_remote_xfer(io, CTL_HA_DT_CMD_WRITE, ctl_datamove_remote_write_cb); - return (retval); } @@ -12571,11 +12565,7 @@ ctl_datamove_remote_write(union ctl_io * io->scsiio.be_move_done = ctl_datamove_remote_dm_write_cb; fe_datamove = ctl_io_port(&io->io_hdr)->fe_datamove; - fe_datamove(io); - - return; - } static int @@ -12650,14 +12640,13 @@ ctl_datamove_remote_read_cb(struct ctl_h /* XXX KDM add checks like the ones in ctl_datamove? */ fe_datamove = ctl_io_port(&io->io_hdr)->fe_datamove; - fe_datamove(io); } static int ctl_datamove_remote_sgl_setup(union ctl_io *io) { - struct ctl_sg_entry *local_sglist, *remote_sglist; + struct ctl_sg_entry *local_sglist; struct ctl_softc *softc; uint32_t len_to_go; int retval; @@ -12666,7 +12655,6 @@ ctl_datamove_remote_sgl_setup(union ctl_ retval = 0; softc = control_softc; local_sglist = io->io_hdr.local_sglist; - remote_sglist = io->io_hdr.remote_sglist; len_to_go = io->scsiio.kern_data_len; /* @@ -12692,7 +12680,7 @@ ctl_datamove_remote_sgl_setup(union ctl_ printf("%s: kern_sg_entries = %d\n", __func__, io->scsiio.kern_sg_entries); for (i = 0; i < io->scsiio.kern_sg_entries; i++) - printf("%s: sg[%d] = %p, %d\n", __func__, i, + printf("%s: sg[%d] = %p, %lu\n", __func__, i, local_sglist[i].addr, local_sglist[i].len); #endif @@ -12810,7 +12798,7 @@ ctl_datamove_remote_xfer(union ctl_io *i rq->callback = callback; #if 0 - printf("%s: %s: local %#x remote %#x size %d\n", __func__, + printf("%s: %s: local %p remote %p size %d\n", __func__, (command == CTL_HA_DT_CMD_WRITE) ? "WRITE" : "READ", rq->local, rq->remote, rq->size); #endif @@ -12856,8 +12844,6 @@ ctl_datamove_remote_read(union ctl_io *i io->io_hdr.remote_sglist = NULL; io->io_hdr.local_sglist = NULL; } - - return; } /* From owner-svn-src-head@freebsd.org Sat Sep 19 16:00:51 2015 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 5AEC79CF667; Sat, 19 Sep 2015 16:00:51 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 4B71013B9; Sat, 19 Sep 2015 16:00:51 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8JG0pA3070626; Sat, 19 Sep 2015 16:00:51 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8JG0pcv070625; Sat, 19 Sep 2015 16:00:51 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201509191600.t8JG0pcv070625@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 19 Sep 2015 16:00:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287987 - head/usr.bin/man X-SVN-Group: head 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.20 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, 19 Sep 2015 16:00:51 -0000 Author: bapt Date: Sat Sep 19 16:00:50 2015 New Revision: 287987 URL: https://svnweb.freebsd.org/changeset/base/287987 Log: Restore man -t for manpages rendered by mandoc Reported by: swills Modified: head/usr.bin/man/man.sh Modified: head/usr.bin/man/man.sh ============================================================================== --- head/usr.bin/man/man.sh Sat Sep 19 13:12:09 2015 (r287986) +++ head/usr.bin/man/man.sh Sat Sep 19 16:00:50 2015 (r287987) @@ -315,7 +315,11 @@ man_display_page() { mandoc_args="-O width=${use_width}" fi testline="mandoc -Tlint -Wunsupp 2>/dev/null" - pipeline="mandoc $mandoc_args | $MANPAGER" + if [ -n "$tflag" ]; then + pipeline="mandoc -Tps $mandoc_args" + else + pipeline="mandoc $mandoc_args | $MANPAGER" + fi if ! eval "$cattool $manpage | $testline" ;then if which -s groff; then From owner-svn-src-head@freebsd.org Sat Sep 19 16:36:47 2015 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 18025A056E2; Sat, 19 Sep 2015 16:36:47 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 071C5120A; Sat, 19 Sep 2015 16:36:47 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8JGaklE086074; Sat, 19 Sep 2015 16:36:46 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8JGajvd086067; Sat, 19 Sep 2015 16:36:45 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201509191636.t8JGajvd086067@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 19 Sep 2015 16:36:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287988 - head/usr.sbin/sesutil X-SVN-Group: head 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.20 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, 19 Sep 2015 16:36:47 -0000 Author: allanjude Date: Sat Sep 19 16:36:45 2015 New Revision: 287988 URL: https://svnweb.freebsd.org/changeset/base/287988 Log: Improve and expand sesutil(8) - Return an error if no matching device is found when the locate command is run - Enhance the locate command to be able to address drive bays with no disk, or where the SES controller has not made the mapping to the device name - Added the fault command, similar to locate, but a different SES property. On some of my controllers locate blinks the activity light, others the fault light. The fault command keeps the fault light on constant. - Improve the usage() output and use it everywhere - Added the map command, displays all elements connected to each (or the specified) ses(4) controller - Added the status command, returns the overall status of the ses(4) controller Reviewed by: wblock (man page, earlier version) Approved by: bapt (mentor) MFC after: 3 weeks Relnotes: yes Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D3580 Added: head/usr.sbin/sesutil/eltsub.c - copied, changed from r287491, head/share/examples/ses/srcs/eltsub.c head/usr.sbin/sesutil/eltsub.h - copied unchanged from r287491, head/share/examples/ses/srcs/eltsub.h Modified: head/usr.sbin/sesutil/Makefile head/usr.sbin/sesutil/sesutil.8 head/usr.sbin/sesutil/sesutil.c Modified: head/usr.sbin/sesutil/Makefile ============================================================================== --- head/usr.sbin/sesutil/Makefile Sat Sep 19 16:00:50 2015 (r287987) +++ head/usr.sbin/sesutil/Makefile Sat Sep 19 16:36:45 2015 (r287988) @@ -1,6 +1,7 @@ # $FreeBSD$ PROG= sesutil +SRCS= sesutil.c eltsub.c MAN= sesutil.8 .include Copied and modified: head/usr.sbin/sesutil/eltsub.c (from r287491, head/share/examples/ses/srcs/eltsub.c) ============================================================================== --- head/share/examples/ses/srcs/eltsub.c Sat Sep 5 19:28:41 2015 (r287491, copy source) +++ head/usr.sbin/sesutil/eltsub.c Sat Sep 19 16:36:45 2015 (r287988) @@ -175,16 +175,20 @@ scode2ascii(u_char code) char * -stat2ascii(int eletype __unused, u_char *cstat) +stat2ascii(int eletype, u_char *cstat) { static char ebuf[256], *scode; scode = scode2ascii(cstat[0]); - sprintf(ebuf, "status: %s%s%s%s (0x%02x 0x%02x 0x%02x 0x%02x)", + sprintf(ebuf, "%s%s%s%s%s%s (0x%02x 0x%02x 0x%02x 0x%02x)", scode, (cstat[0] & 0x40) ? ", Prd.Fail" : "", (cstat[0] & 0x20) ? ", Disabled" : "", (cstat[0] & 0x10) ? ", Swapped" : "", + (eletype == ELMTYP_DEVICE && (cstat[2] & 0x02)) ? + ", LED=Locate" : "", + (eletype == ELMTYP_DEVICE && (cstat[3] & 0x20)) ? + ", LED=Fault" : "", cstat[0], cstat[1], cstat[2], cstat[3]); return (ebuf); } Copied: head/usr.sbin/sesutil/eltsub.h (from r287491, head/share/examples/ses/srcs/eltsub.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/sesutil/eltsub.h Sat Sep 19 16:36:45 2015 (r287988, copy of r287491, head/share/examples/ses/srcs/eltsub.h) @@ -0,0 +1,36 @@ +/* $FreeBSD$ */ +/* + * Copyright (c) 2000 by Matthew Jacob + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification, immediately at the beginning of the file. + * 2. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * the GNU Public License ("GPL"). + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * Matthew Jacob + * Feral Software + * mjacob@feral.com + */ + +char * geteltnm(int); +char * stat2ascii(int, u_char *); Modified: head/usr.sbin/sesutil/sesutil.8 ============================================================================== --- head/usr.sbin/sesutil/sesutil.8 Sat Sep 19 16:00:50 2015 (r287987) +++ head/usr.sbin/sesutil/sesutil.8 Sat Sep 19 16:36:45 2015 (r287988) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 1, 2015 +.Dd September 6, 2015 .Dt SESUTIL 8 .Os .Sh NAME @@ -32,34 +32,87 @@ .Nd Utility for managing SCSI Enclosure Services (SES) device .Sh SYNOPSIS .Nm -.Cm locate Ar disk Bq on|off +.Cm fault +.Op Fl u Ar /dev/sesN +.Aq Ar disk | Ar sesid | Li all +.Op on | off +.Nm +.Cm locate +.Op Fl u Ar /dev/sesN +.Aq Ar disk | Ar sesid | Li all +.Op on | off +.Nm +.Cm map +.Op Fl u Ar /dev/sesN +.Nm +.Cm status +.Op Fl u Ar /dev/sesN .Sh DESCRIPTION The .Nm -utility can be used to modify various parameter on SCSI Enclosure Services -(SES) device. +utility can be used to query and modify various parameter of SCSI Enclosure +Services (SES) devices. .Pp List of supported commands: .Bl -tag -width indent -.It Cm locate Ar disk Bq on|off -Change the state of the external LED associated with +.It Cm fault Oo Fl u Ar /dev/sesN Oc Ao Ar disk | Li all Ac Op on | off +Change the state of the external fault LED associated with +.Ar disk . +.Ar disk +can be the device name of the disk, like +.Cm da12 , +or +.Ql all . +to indicate all disks attached to SES controllers. +.It Cm fault Fl u Ar /dev/sesN Ar sesid Op on | off +Change the state of the external fault LED associated with an element +connected to the SES controller. +.Ar sesid +must be the element ID of a valid item attached to the controller. +Use the +.Cm map +command to list the elements attached to a controller. +.It Cm locate Oo Fl u Ar /dev/sesN Oc Ao Ar disk | Li all Ac Op on | off +Change the state of the external locate LED associated with .Ar disk . .Ar disk can be the device name of the disk, like .Cm da12 , or -.Cm all . +.Ql all . to indicate all disks attached to SES controllers. +.It Cm locate Fl u Ar /dev/sesN Ar sesid Op on | off +Change the state of the external locate LED associated with an element +connected to the SES controller. +.Ar sesid +must be the element ID of a valid item attached to the controller. +Use the +.Cm map +command to list the elements attached to a controller. +.It Cm map Op Fl u Ar /dev/sesN +Display a map of all elements connected to the specified +.Xr ses 4 +controller. +If no controller is specified, all controllers are mapped. +.It Cm status Op Fl u Ar /dev/sesN +Display the status of the specified +.Xr ses 4 +controller. +If no controller is specified, the status of each controller is returned. .El .Sh EXAMPLES -Turn off all external LEDs: +Turn off all locate LEDs: .Pp .Dl Nm Cm locate all off .Pp -Turn on the external LED of drive +Turn on the locate LED for the drive bay corresponding to .Pa da15 : .Pp .Dl Nm Cm locate da15 on +.Pp +Turn on the fault LED for a drive bay not associated with a device: +.Pp +.Dl Nm Cm fault -u /dev/ses2 7 on .Sh SEE ALSO .Xr ses 4 .Sh HISTORY @@ -68,6 +121,10 @@ The utility first appeared in .Fx 11.0 . .Sh AUTHORS +.An -nosplit The -.Nm utility was written by -.An Baptiste Daroussin Aq Mt bapt@FreeBSD.org . +.Nm +utility was written by +.An Baptiste Daroussin Aq Mt bapt@FreeBSD.org +and +.An Allan Jude Aq Mt allanjude@FreeBSD.org . Modified: head/usr.sbin/sesutil/sesutil.c ============================================================================== --- head/usr.sbin/sesutil/sesutil.c Sat Sep 19 16:00:50 2015 (r287987) +++ head/usr.sbin/sesutil/sesutil.c Sat Sep 19 16:36:45 2015 (r287988) @@ -1,5 +1,7 @@ /*- * Copyright (c) 2015 Baptiste Daroussin + * Copyright (c) 2015 Allan Jude + * Copyright (c) 2000 by Matthew Jacob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -45,21 +48,66 @@ __FBSDID("$FreeBSD$"); #include #include +#include "eltsub.h" + +static int encstatus(int argc, char **argv); +static int fault(int argc, char **argv); static int locate(int argc, char **argv); +static int objmap(int argc, char **argv); +static int sesled(int argc, char **argv, bool fault); static struct command { const char *name; + const char *param; const char *desc; int (*exec)(int argc, char **argv); } cmds[] = { - { "locate", "Change the state of the external LED associated with a" - " disk", locate} , + { "fault", + "(||all) (on|off)", + "Change the state of the fault LED associated with a disk", + fault }, + { "locate", + "(||all) (on|off)", + "Change the state of the locate LED associated with a disk", + locate }, + { "map", "", + "Print a map of the devices managed by the enclosure", objmap } , + { "status", "", "Print the status of the enclosure", + encstatus }, }; static const int nbcmds = nitems(cmds); +static const char *uflag; + +static void +usage(FILE *out, const char *subcmd) +{ + int i; + + if (subcmd == NULL) { + fprintf(out, "Usage: %s [-u /dev/ses] [options]\n", + getprogname()); + fprintf(out, "Commands supported:\n"); + } + for (i = 0; i < nbcmds; i++) { + if (subcmd != NULL) { + if (strcmp(subcmd, cmds[i].name) == 0) { + fprintf(out, "Usage: %s %s [-u /dev/ses] " + "%s\n\t%s\n", getprogname(), subcmd, + cmds[i].param, cmds[i].desc); + break; + } + continue; + } + fprintf(out, " %-12s%s\n\t\t%s\n\n", cmds[i].name, + cmds[i].param, cmds[i].desc); + } + + exit(EXIT_FAILURE); +} static void -do_locate(int fd, unsigned int idx, bool onoff) +do_led(int fd, unsigned int idx, bool onoff, bool fault) { encioc_elm_status_t o; @@ -69,10 +117,11 @@ do_locate(int fd, unsigned int idx, bool err(EXIT_FAILURE, "ENCIOC_GETELMSTAT"); } o.cstat[0] |= 0x80; - if (onoff) - o.cstat[2] |= 0x02; - else - o.cstat[2] &= 0xfd; + if (onoff) { + o.cstat[2] |= (fault ? 0x20 : 0x02); + } else { + o.cstat[2] &= (fault ? 0xdf : 0xfd); + } if (ioctl(fd, ENCIOC_SETELMSTAT, (caddr_t) &o) < 0) { close(fd); @@ -87,39 +136,54 @@ disk_match(const char *devnames, const c dname = devnames; while ((dname = strstr(dname, disk)) != NULL) { - if (dname[len] == '\0' || dname[len] == ',') + if (dname[len] == '\0' || dname[len] == ',') { return (true); + } dname++; } + return (false); } static int -locate(int argc, char **argv) +sesled(int argc, char **argv, bool fault) { encioc_elm_devnames_t objdn; encioc_element_t *objp; glob_t g; - char *disk; - size_t len, i; - int fd, nobj, j; - bool all = false; - bool onoff; - - if (argc != 2) { - errx(EXIT_FAILURE, "usage: %s locate [disk] [on|off]", - getprogname()); + char *disk, *endptr; + size_t len, i, ndisks; + int fd; + unsigned int nobj, j, sesid; + bool all, isses, onoff; + + isses = false; + all = false; + onoff = false; + + if (argc != 3) { + usage(stderr, (fault ? "fault" : "locate")); + } + + disk = argv[1]; + + sesid = strtoul(disk, &endptr, 10); + if (*endptr == '\0') { + endptr = strrchr(uflag, '*'); + if (*endptr == '*') { + warnx("Must specifying a SES device (-u) to use a SES " + "id# to identify a disk"); + usage(stderr, (fault ? "fault" : "locate")); + } + isses = true; } - disk = argv[0]; - - if (strcmp(argv[1], "on") == 0) { + if (strcmp(argv[2], "on") == 0) { onoff = true; - } else if (strcmp(argv[1], "off") == 0) { + } else if (strcmp(argv[2], "off") == 0) { onoff = false; } else { - errx(EXIT_FAILURE, "usage: %s locate [disk] [on|off]", - getprogname()); + usage(stderr, (fault ? "fault" : "locate")); } if (strcmp(disk, "all") == 0) { @@ -128,97 +192,347 @@ locate(int argc, char **argv) len = strlen(disk); /* Get the list of ses devices */ - if (glob("/dev/ses[0-9]*", 0, NULL, &g) == GLOB_NOMATCH) { + if (glob((uflag != NULL ? uflag : "/dev/ses[0-9]*"), 0, NULL, &g) == + GLOB_NOMATCH) { globfree(&g); errx(EXIT_FAILURE, "No SES devices found"); } + + ndisks = 0; for (i = 0; i < g.gl_pathc; i++) { /* ensure we only got numbers after ses */ if (strspn(g.gl_pathv[i] + 8, "0123456789") != - strlen(g.gl_pathv[i] + 8)) + strlen(g.gl_pathv[i] + 8)) { continue; + } if ((fd = open(g.gl_pathv[i], O_RDWR)) < 0) { - if (errno == EACCES) - err(EXIT_FAILURE, "enable to access SES device"); - break; + /* + * Don't treat non-access errors as critical if we are + * accessing all devices + */ + if (errno == EACCES && g.gl_pathc > 1) { + err(EXIT_FAILURE, "unable to access SES device"); + } + warn("unable to access SES device: %s", g.gl_pathv[i]); + continue; } - if (ioctl(fd, ENCIOC_GETNELM, (caddr_t) &nobj) < 0) + if (ioctl(fd, ENCIOC_GETNELM, (caddr_t) &nobj) < 0) { + close(fd); err(EXIT_FAILURE, "ENCIOC_GETNELM"); + } objp = calloc(nobj, sizeof(encioc_element_t)); - if (objp == NULL) + if (objp == NULL) { + close(fd); err(EXIT_FAILURE, "calloc()"); + } - if (ioctl(fd, ENCIOC_GETELMMAP, (caddr_t) objp) < 0) + if (ioctl(fd, ENCIOC_GETELMMAP, (caddr_t) objp) < 0) { + close(fd); err(EXIT_FAILURE, "ENCIOC_GETELMMAP"); + } + if (isses) { + if (sesid > nobj) { + close(fd); + errx(EXIT_FAILURE, + "Requested SES ID does not exist"); + } + do_led(fd, sesid, onoff, fault); + ndisks++; + close(fd); + break; + } for (j = 0; j < nobj; j++) { memset(&objdn, 0, sizeof(objdn)); objdn.elm_idx = objp[j].elm_idx; objdn.elm_names_size = 128; objdn.elm_devnames = calloc(128, sizeof(char)); - if (objdn.elm_devnames == NULL) + if (objdn.elm_devnames == NULL) { + close(fd); err(EXIT_FAILURE, "calloc()"); + } if (ioctl(fd, ENCIOC_GETELMDEVNAMES, - (caddr_t) &objdn) <0) + (caddr_t) &objdn) <0) { continue; + } if (objdn.elm_names_len > 0) { if (all) { - do_locate(fd, objdn.elm_idx, onoff); + do_led(fd, objdn.elm_idx, + onoff, fault); continue; } if (disk_match(objdn.elm_devnames, disk, len)) { - do_locate(fd, objdn.elm_idx, onoff); + do_led(fd, objdn.elm_idx, + onoff, fault); + ndisks++; break; } } - } + } close(fd); } globfree(&g); + if (ndisks == 0 && all == false) { + errx(EXIT_FAILURE, "Count not find the SES id of device '%s'", + disk); + } return (EXIT_SUCCESS); } -static void -usage(FILE *out) +static int +locate(int argc, char **argv) { - int i; - fprintf(out, "Usage: %s [command] [options]\n", getprogname()); - fprintf(out, "Commands supported:\n"); - for (i = 0; i < nbcmds; i++) - fprintf(out, "\t%-15s%s\n", cmds[i].name, cmds[i].desc); + return (sesled(argc, argv, false)); +} + +static int +fault(int argc, char **argv) +{ + + return (sesled(argc, argv, true)); +} + +static int +objmap(int argc, char **argv __unused) +{ + encioc_elm_devnames_t e_devname; + encioc_elm_status_t e_status; + encioc_elm_desc_t e_desc; + encioc_element_t *e_ptr; + glob_t g; + int fd; + unsigned int j, nobj; + size_t i; + + if (argc != 1) { + usage(stderr, "map"); + } + + /* Get the list of ses devices */ + if (glob(uflag, 0, NULL, &g) == GLOB_NOMATCH) { + globfree(&g); + errx(EXIT_FAILURE, "No SES devices found"); + } + for (i = 0; i < g.gl_pathc; i++) { + /* ensure we only got numbers after ses */ + if (strspn(g.gl_pathv[i] + 8, "0123456789") != + strlen(g.gl_pathv[i] + 8)) { + continue; + } + if ((fd = open(g.gl_pathv[i], O_RDWR)) < 0) { + /* + * Don't treat non-access errors as critical if we are + * accessing all devices + */ + if (errno == EACCES && g.gl_pathc > 1) { + err(EXIT_FAILURE, "unable to access SES device"); + } + warn("unable to access SES device: %s", g.gl_pathv[i]); + continue; + } + + if (ioctl(fd, ENCIOC_GETNELM, (caddr_t) &nobj) < 0) { + close(fd); + err(EXIT_FAILURE, "ENCIOC_GETNELM"); + } + + e_ptr = calloc(nobj, sizeof(encioc_element_t)); + if (e_ptr == NULL) { + close(fd); + err(EXIT_FAILURE, "calloc()"); + } + + if (ioctl(fd, ENCIOC_GETELMMAP, (caddr_t) e_ptr) < 0) { + close(fd); + err(EXIT_FAILURE, "ENCIOC_GETELMMAP"); + } + + printf("%s:\n", g.gl_pathv[i] + 5); + for (j = 0; j < nobj; j++) { + /* Get the status of the element */ + memset(&e_status, 0, sizeof(e_status)); + e_status.elm_idx = e_ptr[j].elm_idx; + if (ioctl(fd, ENCIOC_GETELMSTAT, + (caddr_t) &e_status) < 0) { + close(fd); + err(EXIT_FAILURE, "ENCIOC_GETELMSTAT"); + } + /* Get the description of the element */ + memset(&e_desc, 0, sizeof(e_desc)); + e_desc.elm_idx = e_ptr[j].elm_idx; + e_desc.elm_desc_len = UINT16_MAX; + e_desc.elm_desc_str = calloc(UINT16_MAX, sizeof(char)); + if (e_desc.elm_desc_str == NULL) { + close(fd); + err(EXIT_FAILURE, "calloc()"); + } + if (ioctl(fd, ENCIOC_GETELMDESC, + (caddr_t) &e_desc) < 0) { + close(fd); + err(EXIT_FAILURE, "ENCIOC_GETELMDESC"); + } + /* Get the device name(s) of the element */ + memset(&e_devname, 0, sizeof(e_devname)); + e_devname.elm_idx = e_ptr[j].elm_idx; + e_devname.elm_names_size = 128; + e_devname.elm_devnames = calloc(128, sizeof(char)); + if (e_devname.elm_devnames == NULL) { + close(fd); + err(EXIT_FAILURE, "calloc()"); + } + if (ioctl(fd, ENCIOC_GETELMDEVNAMES, + (caddr_t) &e_devname) <0) { + /* We don't care if this fails */ + e_devname.elm_devnames[0] = '\0'; + } + printf("\tElement %u, Type: %s\n", e_ptr[j].elm_idx, + geteltnm(e_ptr[j].elm_type)); + printf("\t\tStatus: %s\n", + stat2ascii(e_ptr[i].elm_type, e_status.cstat)); + if (e_desc.elm_desc_len > 0) { + printf("\t\tDescription: %s\n", + e_desc.elm_desc_str); + } + if (e_devname.elm_names_len > 0) { + printf("\t\tDevice Names: %s\n", + e_devname.elm_devnames); + } + free(e_devname.elm_devnames); + } + close(fd); + } + globfree(&g); + + return (EXIT_SUCCESS); +} + +static int +encstatus(int argc, char **argv __unused) +{ + glob_t g; + int fd, status; + size_t i, e; + u_char estat; + + status = 0; + if (argc != 1) { + usage(stderr, "status"); + } + + /* Get the list of ses devices */ + if (glob(uflag, 0, NULL, &g) == GLOB_NOMATCH) { + globfree(&g); + errx(EXIT_FAILURE, "No SES devices found"); + } + for (i = 0; i < g.gl_pathc; i++) { + /* ensure we only got numbers after ses */ + if (strspn(g.gl_pathv[i] + 8, "0123456789") != + strlen(g.gl_pathv[i] + 8)) { + continue; + } + if ((fd = open(g.gl_pathv[i], O_RDWR)) < 0) { + /* + * Don't treat non-access errors as critical if we are + * accessing all devices + */ + if (errno == EACCES && g.gl_pathc > 1) { + err(EXIT_FAILURE, "unable to access SES device"); + } + warn("unable to access SES device: %s", g.gl_pathv[i]); + continue; + } + + if (ioctl(fd, ENCIOC_GETENCSTAT, (caddr_t) &estat) < 0) { + close(fd); + err(EXIT_FAILURE, "ENCIOC_GETENCSTAT"); + } + + printf("%s: ", g.gl_pathv[i] + 5); + e = 0; + if (estat == 0) { + if (status == 0) { + status = 1; + } + printf("OK"); + } else { + if (estat & SES_ENCSTAT_INFO) { + printf("INFO"); + e++; + } + if (estat & SES_ENCSTAT_NONCRITICAL) { + if (e) + printf(","); + printf("NONCRITICAL"); + e++; + } + if (estat & SES_ENCSTAT_CRITICAL) { + if (e) + printf(","); + printf("CRITICAL"); + e++; + status = -1; + } + if (estat & SES_ENCSTAT_UNRECOV) { + if (e) + printf(","); + printf("UNRECOV"); + e++; + status = -1; + } + } + printf("\n"); + + close(fd); + } + globfree(&g); + + if (status == 1) { + return (EXIT_SUCCESS); + } else { + return (EXIT_FAILURE); + } } int main(int argc, char **argv) { - int i; + int i, ch; struct command *cmd = NULL; - if (argc < 2) { + uflag = "/dev/ses[0-9]*"; + while ((ch = getopt_long(argc, argv, "u:", NULL, NULL)) != -1) { + switch (ch) { + case 'u': + uflag = optarg; + break; + case '?': + default: + usage(stderr, NULL); + } + } + argc -= optind; + argv += optind; + + if (argc < 1) { warnx("Missing command"); - usage(stderr); - return (EXIT_FAILURE); + usage(stderr, NULL); } for (i = 0; i < nbcmds; i++) { - if (strcmp(argv[1], cmds[i].name) == 0) { + if (strcmp(argv[0], cmds[i].name) == 0) { cmd = &cmds[i]; break; } } if (cmd == NULL) { - warnx("unknown command %s", argv[1]); - usage(stderr); - return (EXIT_FAILURE); + warnx("unknown command %s", argv[0]); + usage(stderr, NULL); } - argc-=2; - argv+=2; - return (cmd->exec(argc, argv)); } From owner-svn-src-head@freebsd.org Sat Sep 19 16:37:55 2015 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 59A44A0575B; Sat, 19 Sep 2015 16:37:55 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from smtp.hungerhost.com (smtp.hungerhost.com [216.38.53.177]) (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 2FEF3137B; Sat, 19 Sep 2015 16:37:54 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from pool-108-54-164-204.nycmny.fios.verizon.net ([108.54.164.204]:50234 helo=[192.168.1.8]) by vps2.hungerhost.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.85) (envelope-from ) id 1ZdL96-00037y-O6; Sat, 19 Sep 2015 12:37:52 -0400 From: "George Neville-Neil" To: "Hans Petter Selasky" Cc: "David Chisnall" , "Gleb Smirnoff" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r287780 - in head: share/man/man9 sys/kern sys/sys Date: Sat, 19 Sep 2015 12:37:52 -0400 Message-ID: <64D8263B-1F5D-40E5-994C-479C39B69DC9@neville-neil.com> In-Reply-To: <55FD23C5.5010008@selasky.org> References: <201509141052.t8EAqRWf008293@repo.freebsd.org> <20150916220559.GS1023@FreeBSD.org> <55FA69BD.10507@selasky.org> <0952027A-5276-487D-99B8-74747B0EEF5D@FreeBSD.org> <55FD23C5.5010008@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Mailer: MailMate (1.9.2r5107) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps2.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - neville-neil.com X-Get-Message-Sender-Via: vps2.hungerhost.com: authenticated_id: gnn@neville-neil.com X-Source: X-Source-Args: X-Source-Dir: X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 19 Sep 2015 16:37:55 -0000 On 19 Sep 2015, at 4:58, Hans Petter Selasky wrote: > On 09/17/15 11:07, David Chisnall wrote: >> I would expect*anyone* making a change like this to have both the >> design and code reviewed for sanity checking. > > Please add an entry to MAINTAINERS for those parts of the kernel which > require this strict reviews. > This is not about MAINTAINERS, this is about review. Several commenters on this thread have pointed out that this code, which is part of a core component of the system, was committed without review. Please back this out and then put whatever you propose to do up in the reviews.freebsd.org system. Best, George From owner-svn-src-head@freebsd.org Sat Sep 19 17:39:41 2015 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 08093A05545 for ; Sat, 19 Sep 2015 17:39:41 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from erouter6.ore.mailhop.org (erouter6.ore.mailhop.org [54.187.213.119]) (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 537DE13B7 for ; Sat, 19 Sep 2015 17:39:40 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound3.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Sat, 19 Sep 2015 17:38:32 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t8JHdTtK005522; Sat, 19 Sep 2015 11:39:29 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1442684369.1224.179.camel@freebsd.org> Subject: Re: svn commit: r287780 - in head: share/man/man9 sys/kern sys/sys From: Ian Lepore To: George Neville-Neil Cc: Hans Petter Selasky , David Chisnall , Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sat, 19 Sep 2015 11:39:29 -0600 In-Reply-To: <64D8263B-1F5D-40E5-994C-479C39B69DC9@neville-neil.com> References: <201509141052.t8EAqRWf008293@repo.freebsd.org> <20150916220559.GS1023@FreeBSD.org> <55FA69BD.10507@selasky.org> <0952027A-5276-487D-99B8-74747B0EEF5D@FreeBSD.org> <55FD23C5.5010008@selasky.org> <64D8263B-1F5D-40E5-994C-479C39B69DC9@neville-neil.com> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 19 Sep 2015 17:39:41 -0000 On Sat, 2015-09-19 at 12:37 -0400, George Neville-Neil wrote: > > On 19 Sep 2015, at 4:58, Hans Petter Selasky wrote: > > > On 09/17/15 11:07, David Chisnall wrote: > >> I would expect*anyone* making a change like this to have both the > >> design and code reviewed for sanity checking. > > > > Please add an entry to MAINTAINERS for those parts of the kernel which > > require this strict reviews. > > > > This is not about MAINTAINERS, this is about review. Several commenters > on this thread > have pointed out that this code, which is part of a core component of > the system, was committed > without review. Please back this out and then put whatever you propose > to do up in the reviews.freebsd.org > system. > > Best, > George > > I'm afraid this message can be interpetted as "reviews are now mandatory for a 'core component of the system' (whatever that means)". If so, this would be a Big Change from the last thing I heard about code reviews, which was basically: as much as some people would like it to be so, they are not mandatory. Another way to interpret this might be "While code reviews are not generally mandatory, if multiple developers request a review of some change, even after the fact, then that should (must?) be honored." Could we please get some clarification (officially, from core) about this? And yes I know that certain areas of the system, such as crypto-related code, have always been treated differently, but that has never involved a definition as meaningless and vague as "a core component of the system". -- Ian From owner-svn-src-head@freebsd.org Sat Sep 19 17:47:37 2015 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 CFA28A05931; Sat, 19 Sep 2015 17:47:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 A68BC1AB1; Sat, 19 Sep 2015 17:47:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8JHlbNb015312; Sat, 19 Sep 2015 17:47:37 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8JHlaZ3015308; Sat, 19 Sep 2015 17:47:36 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509191747.t8JHlaZ3015308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 19 Sep 2015 17:47:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287989 - in head: targets/pseudo/userland usr.bin/numactl usr.sbin/sesutil X-SVN-Group: head 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.20 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, 19 Sep 2015 17:47:37 -0000 Author: bdrewery Date: Sat Sep 19 17:47:36 2015 New Revision: 287989 URL: https://svnweb.freebsd.org/changeset/base/287989 Log: Connect sesutil(1) and numactl(1) for META_MODE. Sponsored by: EMC / Isilon Storage Division Added: head/usr.bin/numactl/Makefile.depend (contents, props changed) head/usr.sbin/sesutil/Makefile.depend (contents, props changed) Modified: head/targets/pseudo/userland/Makefile.depend Modified: head/targets/pseudo/userland/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/Makefile.depend Sat Sep 19 16:36:45 2015 (r287988) +++ head/targets/pseudo/userland/Makefile.depend Sat Sep 19 17:47:36 2015 (r287989) @@ -304,6 +304,7 @@ DIRDEPS+= \ usr.bin/nohup \ usr.bin/nslookup \ usr.bin/nsupdate \ + usr.bin/numactl \ usr.bin/opieinfo \ usr.bin/opiekey \ usr.bin/opiepasswd \ @@ -653,6 +654,7 @@ DIRDEPS+= \ usr.sbin/sendmail \ usr.sbin/service \ usr.sbin/services_mkdb \ + usr.sbin/sesutil \ usr.sbin/setfib \ usr.sbin/setfmac \ usr.sbin/setpmac \ Added: head/usr.bin/numactl/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/numactl/Makefile.depend Sat Sep 19 17:47:36 2015 (r287989) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/usr.sbin/sesutil/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/sesutil/Makefile.depend Sat Sep 19 17:47:36 2015 (r287989) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif From owner-svn-src-head@freebsd.org Sat Sep 19 17:57:06 2015 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 A0109A05CEF for ; Sat, 19 Sep 2015 17:57:06 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (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 6C63C1F1F for ; Sat, 19 Sep 2015 17:57:06 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id BCBB920B7E for ; Sat, 19 Sep 2015 13:56:57 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Sat, 19 Sep 2015 13:56:57 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.net; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=J4EqEUvixKA5i7iK4ePIKFLSws8=; b=eQBKtO dZZi/aX31jU/rMAo2BE/HY6MQC3CqVO/dG79tmrMd7Y/5m09LmUv2ZZ8p2lOe1tG sjo3ZeeM3SXuQvZMWPc9ymPFN5caed1+M/JGAJWb7ZLVVaVC64o65tJEq5uUbkgd AFc0o+PdqHfh8cGHW6StzPeqt4EnAX13LRmeo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=J4EqEUvixKA5i7i K4ePIKFLSws8=; b=l5n13SN6fUKaO1+gZvcsRnGOA86+z+K2P54Ega4M2e43yRW O0ZrHqxZhmQG5V9FG2mm+RhV0Ub92FYs3gu2WE0c3XHdh5rANKIaD+SIjE3dJopG RXwhFyna957yPnc30uD5JjK61vk/GzJ6hC3J+wkHn047FyXxIikFMQoJwwRk= X-Sasl-enc: fJUcqPAf1xE9njuvQmJTN7drx+50j5qv0YW2LaczbokA 1442685417 Received: from pion.local (host81-139-223-71.in-addr.btopenworld.com [81.139.223.71]) by mail.messagingengine.com (Postfix) with ESMTPA id 55956C00014; Sat, 19 Sep 2015 13:56:56 -0400 (EDT) Subject: Re: svn commit: r287780 - in head: share/man/man9 sys/kern sys/sys To: Ian Lepore References: <201509141052.t8EAqRWf008293@repo.freebsd.org> <20150916220559.GS1023@FreeBSD.org> <55FA69BD.10507@selasky.org> <0952027A-5276-487D-99B8-74747B0EEF5D@FreeBSD.org> <55FD23C5.5010008@selasky.org> <64D8263B-1F5D-40E5-994C-479C39B69DC9@neville-neil.com> <1442684369.1224.179.camel@freebsd.org> Cc: George Neville-Neil , Hans Petter Selasky , David Chisnall , Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bruce Simpson Message-ID: <55FDA1E7.8050007@fastmail.net> Date: Sat, 19 Sep 2015 18:56:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <1442684369.1224.179.camel@freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 19 Sep 2015 17:57:06 -0000 Ian, To paraphrase what I said privately to the various dramatis personae in January: Changes like this need to be reviewed before they go in. As timing is central to the entire OS, change review has to be meticulous, on par with the virtual memory management. We have a VM tsar; we do not have a timing tsar. On 19/09/15 18:39, Ian Lepore wrote: > I'm afraid this message can be interpetted as "reviews are now mandatory > for a 'core component of the system' (whatever that means)". If so, > this would be a Big Change from the last thing I heard about code > reviews, which was basically: as much as some people would like it to be > so, they are not mandatory. ... > a definition as meaningless and vague as[.] I don't believe for one moment that George is advocating for mandatory reviews. But common sense should apply, _as timing is central to the entire OS_. It touches absolutely everything. Hell, I wouldn't feel comfortable checking anything in to e.g. timecounters without at least running it by phk first. So, +1 from me for backout until the change can be reviewed. But to be fair to all involved, perhaps Hans should set out a timeline for how he wants to proceed, subject to the jitter inherent to an all-volunteer project. thanks Bruce From owner-svn-src-head@freebsd.org Sat Sep 19 18:10:03 2015 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 9CAFF9CF293; Sat, 19 Sep 2015 18:10:03 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 56EF51464; Sat, 19 Sep 2015 18:10:02 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 1C58725D37D1; Sat, 19 Sep 2015 18:09:53 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 3E739C76FEC; Sat, 19 Sep 2015 18:09:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id oXvTXX1JkZyB; Sat, 19 Sep 2015 18:09:51 +0000 (UTC) Received: from nv.sbone.de (nv.sbone.de [IPv6:fde9:577b:c1a9:31::2013:138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id EFC0EC76FCD; Sat, 19 Sep 2015 18:09:50 +0000 (UTC) Date: Sat, 19 Sep 2015 18:09:50 +0000 (UTC) From: "Bjoern A. Zeeb" To: Allan Jude cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r287988 - head/usr.sbin/sesutil In-Reply-To: <201509191636.t8JGajvd086067@repo.freebsd.org> Message-ID: References: <201509191636.t8JGajvd086067@repo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 19 Sep 2015 18:10:03 -0000 On Sat, 19 Sep 2015, Allan Jude wrote: > Author: allanjude > Date: Sat Sep 19 16:36:45 2015 > New Revision: 287988 > URL: https://svnweb.freebsd.org/changeset/base/287988 > > Log: > Improve and expand sesutil(8) > > - Return an error if no matching device is found when the locate command is run > - Enhance the locate command to be able to address drive bays with no disk, or where the SES controller has not made the mapping to the device name > - Added the fault command, similar to locate, but a different SES property. On some of my controllers locate blinks the activity light, others the fault light. The fault command keeps the fault light on constant. > - Improve the usage() output and use it everywhere > - Added the map command, displays all elements connected to each (or the specified) ses(4) controller > - Added the status command, returns the overall status of the ses(4) controller > > Reviewed by: wblock (man page, earlier version) > Approved by: bapt (mentor) > MFC after: 3 weeks > Relnotes: yes > Sponsored by: ScaleEngine Inc. > Differential Revision: https://reviews.freebsd.org/D3580 Seems to fail to compile on gcc platforms. From owner-svn-src-head@freebsd.org Sat Sep 19 18:23:04 2015 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 C6CF79CF9D4; Sat, 19 Sep 2015 18:23:04 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 B74341FD7; Sat, 19 Sep 2015 18:23:04 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8JIN4Hu031799; Sat, 19 Sep 2015 18:23:04 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8JIN0eY031778; Sat, 19 Sep 2015 18:23:00 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201509191823.t8JIN0eY031778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sat, 19 Sep 2015 18:23:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287990 - head/sys/dev/e1000 X-SVN-Group: head 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.20 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, 19 Sep 2015 18:23:04 -0000 Author: sbruno Date: Sat Sep 19 18:22:59 2015 New Revision: 287990 URL: https://svnweb.freebsd.org/changeset/base/287990 Log: Revert 287914,287762. Reports of breakage on igb(4) have been narrowed down to 287762 and 287914 is an dependant change. Submitted by: erj Modified: head/sys/dev/e1000/e1000_80003es2lan.c head/sys/dev/e1000/e1000_82540.c head/sys/dev/e1000/e1000_82541.c head/sys/dev/e1000/e1000_82542.c head/sys/dev/e1000/e1000_82543.c head/sys/dev/e1000/e1000_82571.h head/sys/dev/e1000/e1000_82575.c head/sys/dev/e1000/e1000_82575.h head/sys/dev/e1000/e1000_api.c head/sys/dev/e1000/e1000_api.h head/sys/dev/e1000/e1000_defines.h 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_ich8lan.h head/sys/dev/e1000/e1000_mac.c head/sys/dev/e1000/e1000_mac.h head/sys/dev/e1000/e1000_nvm.c head/sys/dev/e1000/e1000_nvm.h head/sys/dev/e1000/e1000_osdep.h head/sys/dev/e1000/e1000_phy.c head/sys/dev/e1000/e1000_regs.h head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_em.h head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/e1000_80003es2lan.c ============================================================================== --- head/sys/dev/e1000/e1000_80003es2lan.c Sat Sep 19 17:47:36 2015 (r287989) +++ head/sys/dev/e1000/e1000_80003es2lan.c Sat Sep 19 18:22:59 2015 (r287990) @@ -851,17 +851,11 @@ static s32 e1000_reset_hw_80003es2lan(st e1000_release_phy_80003es2lan(hw); /* Disable IBIST slave mode (far-end loopback) */ - ret_val = e1000_read_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_INBAND_PARAM, &kum_reg_data); - if (!ret_val) { - kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE; - ret_val = e1000_write_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_INBAND_PARAM, - kum_reg_data); - if (ret_val) - DEBUGOUT("Error disabling far-end loopback\n"); - } else - DEBUGOUT("Error disabling far-end loopback\n"); + e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, + &kum_reg_data); + kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE; + e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, + kum_reg_data); ret_val = e1000_get_auto_rd_done_generic(hw); if (ret_val) @@ -917,18 +911,11 @@ static s32 e1000_init_hw_80003es2lan(str return ret_val; /* Disable IBIST slave mode (far-end loopback) */ - ret_val = - e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, - &kum_reg_data); - if (!ret_val) { - kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE; - ret_val = e1000_write_kmrn_reg_80003es2lan(hw, - E1000_KMRNCTRLSTA_INBAND_PARAM, - kum_reg_data); - if (ret_val) - DEBUGOUT("Error disabling far-end loopback\n"); - } else - DEBUGOUT("Error disabling far-end loopback\n"); + e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, + &kum_reg_data); + kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE; + e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, + kum_reg_data); /* Set the transmit descriptor write-back policy */ reg_data = E1000_READ_REG(hw, E1000_TXDCTL(0)); Modified: head/sys/dev/e1000/e1000_82540.c ============================================================================== --- head/sys/dev/e1000/e1000_82540.c Sat Sep 19 17:47:36 2015 (r287989) +++ head/sys/dev/e1000/e1000_82540.c Sat Sep 19 18:22:59 2015 (r287990) @@ -66,7 +66,7 @@ static s32 e1000_read_mac_addr_82540(st static s32 e1000_init_phy_params_82540(struct e1000_hw *hw) { struct e1000_phy_info *phy = &hw->phy; - s32 ret_val; + s32 ret_val = E1000_SUCCESS; phy->addr = 1; phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; @@ -329,7 +329,7 @@ static s32 e1000_init_hw_82540(struct e1 { struct e1000_mac_info *mac = &hw->mac; u32 txdctl, ctrl_ext; - s32 ret_val; + s32 ret_val = E1000_SUCCESS; u16 i; DEBUGFUNC("e1000_init_hw_82540"); @@ -411,7 +411,7 @@ static s32 e1000_init_hw_82540(struct e1 static s32 e1000_setup_copper_link_82540(struct e1000_hw *hw) { u32 ctrl; - s32 ret_val; + s32 ret_val = E1000_SUCCESS; u16 data; DEBUGFUNC("e1000_setup_copper_link_82540"); @@ -498,7 +498,7 @@ out: **/ static s32 e1000_adjust_serdes_amplitude_82540(struct e1000_hw *hw) { - s32 ret_val; + s32 ret_val = E1000_SUCCESS; u16 nvm_data; DEBUGFUNC("e1000_adjust_serdes_amplitude_82540"); @@ -528,7 +528,7 @@ out: **/ static s32 e1000_set_vco_speed_82540(struct e1000_hw *hw) { - s32 ret_val; + s32 ret_val = E1000_SUCCESS; u16 default_page = 0; u16 phy_data; Modified: head/sys/dev/e1000/e1000_82541.c ============================================================================== --- head/sys/dev/e1000/e1000_82541.c Sat Sep 19 17:47:36 2015 (r287989) +++ head/sys/dev/e1000/e1000_82541.c Sat Sep 19 18:22:59 2015 (r287990) @@ -85,7 +85,7 @@ static const u16 e1000_igp_cable_length_ static s32 e1000_init_phy_params_82541(struct e1000_hw *hw) { struct e1000_phy_info *phy = &hw->phy; - s32 ret_val; + s32 ret_val = E1000_SUCCESS; DEBUGFUNC("e1000_init_phy_params_82541"); @@ -295,7 +295,7 @@ void e1000_init_function_pointers_82541( **/ static s32 e1000_reset_hw_82541(struct e1000_hw *hw) { - u32 ledctl, ctrl, manc; + u32 ledctl, ctrl, icr, manc; DEBUGFUNC("e1000_reset_hw_82541"); @@ -317,7 +317,6 @@ static s32 e1000_reset_hw_82541(struct e /* Must reset the Phy before resetting the MAC */ if ((hw->mac.type == e1000_82541) || (hw->mac.type == e1000_82547)) { E1000_WRITE_REG(hw, E1000_CTRL, (ctrl | E1000_CTRL_PHY_RST)); - E1000_WRITE_FLUSH(hw); msec_delay(5); } @@ -360,7 +359,7 @@ static s32 e1000_reset_hw_82541(struct e E1000_WRITE_REG(hw, E1000_IMC, 0xFFFFFFFF); /* Clear any pending interrupt events. */ - E1000_READ_REG(hw, E1000_ICR); + icr = E1000_READ_REG(hw, E1000_ICR); return E1000_SUCCESS; } Modified: head/sys/dev/e1000/e1000_82542.c ============================================================================== --- head/sys/dev/e1000/e1000_82542.c Sat Sep 19 17:47:36 2015 (r287989) +++ head/sys/dev/e1000/e1000_82542.c Sat Sep 19 18:22:59 2015 (r287990) @@ -317,7 +317,7 @@ static s32 e1000_init_hw_82542(struct e1 static s32 e1000_setup_link_82542(struct e1000_hw *hw) { struct e1000_mac_info *mac = &hw->mac; - s32 ret_val; + s32 ret_val = E1000_SUCCESS; DEBUGFUNC("e1000_setup_link_82542"); @@ -565,7 +565,7 @@ static void e1000_clear_hw_cntrs_82542(s * * Reads the device MAC address from the EEPROM and stores the value. **/ -s32 e1000_read_mac_addr_82542(struct e1000_hw *hw) +static s32 e1000_read_mac_addr_82542(struct e1000_hw *hw) { s32 ret_val = E1000_SUCCESS; u16 offset, nvm_data, i; Modified: head/sys/dev/e1000/e1000_82543.c ============================================================================== --- head/sys/dev/e1000/e1000_82543.c Sat Sep 19 17:47:36 2015 (r287989) +++ head/sys/dev/e1000/e1000_82543.c Sat Sep 19 18:22:59 2015 (r287990) @@ -900,7 +900,7 @@ static s32 e1000_phy_hw_reset_82543(stru **/ static s32 e1000_reset_hw_82543(struct e1000_hw *hw) { - u32 ctrl; + u32 ctrl, icr; s32 ret_val = E1000_SUCCESS; DEBUGFUNC("e1000_reset_hw_82543"); @@ -942,7 +942,7 @@ static s32 e1000_reset_hw_82543(struct e /* Masking off and clearing any pending interrupts */ E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff); - E1000_READ_REG(hw, E1000_ICR); + icr = E1000_READ_REG(hw, E1000_ICR); return ret_val; } Modified: head/sys/dev/e1000/e1000_82571.h ============================================================================== --- head/sys/dev/e1000/e1000_82571.h Sat Sep 19 17:47:36 2015 (r287989) +++ head/sys/dev/e1000/e1000_82571.h Sat Sep 19 18:22:59 2015 (r287990) @@ -50,10 +50,9 @@ #define E1000_EIAC_82574 0x000DC /* Ext. Interrupt Auto Clear - RW */ #define E1000_EIAC_MASK_82574 0x01F00000 -#define E1000_IVAR_INT_ALLOC_VALID 0x8 +#define E1000_NVM_INIT_CTRL2_MNGM 0x6000 /* Manageability Operation Mode mask */ -/* Manageability Operation Mode mask */ -#define E1000_NVM_INIT_CTRL2_MNGM 0x6000 +#define E1000_RXCFGL 0x0B634 /* TimeSync Rx EtherType & Msg Type Reg - RW */ #define E1000_BASE1000T_STATUS 10 #define E1000_IDLE_ERROR_COUNT_MASK 0xFF Modified: head/sys/dev/e1000/e1000_82575.c ============================================================================== --- head/sys/dev/e1000/e1000_82575.c Sat Sep 19 17:47:36 2015 (r287989) +++ head/sys/dev/e1000/e1000_82575.c Sat Sep 19 18:22:59 2015 (r287990) @@ -1235,7 +1235,7 @@ static s32 e1000_check_for_link_media_sw DEBUGFUNC("e1000_check_for_link_media_swap"); - /* Check for copper. */ + /* Check the copper medium. */ ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0); if (ret_val) return ret_val; @@ -1247,7 +1247,7 @@ static s32 e1000_check_for_link_media_sw if (data & E1000_M88E1112_STATUS_LINK) port = E1000_MEDIA_PORT_COPPER; - /* Check for other. */ + /* Check the other medium. */ ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 1); if (ret_val) return ret_val; @@ -1256,6 +1256,11 @@ static s32 e1000_check_for_link_media_sw if (ret_val) return ret_val; + /* reset page to 0 */ + ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0); + if (ret_val) + return ret_val; + if (data & E1000_M88E1112_STATUS_LINK) port = E1000_MEDIA_PORT_OTHER; @@ -1263,20 +1268,8 @@ static s32 e1000_check_for_link_media_sw if (port && (hw->dev_spec._82575.media_port != port)) { hw->dev_spec._82575.media_port = port; hw->dev_spec._82575.media_changed = TRUE; - } - - if (port == E1000_MEDIA_PORT_COPPER) { - /* reset page to 0 */ - ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0); - if (ret_val) - return ret_val; - e1000_check_for_link_82575(hw); } else { - e1000_check_for_link_82575(hw); - /* reset page to 0 */ - ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0); - if (ret_val) - return ret_val; + ret_val = e1000_check_for_link_82575(hw); } return E1000_SUCCESS; @@ -2143,13 +2136,7 @@ void e1000_rx_fifo_flush_82575(struct e1 u32 rctl, rlpml, rxdctl[4], rfctl, temp_rctl, rx_enabled; int i, ms_wait; - DEBUGFUNC("e1000_rx_fifo_flush_82575"); - - /* disable IPv6 options as per hardware errata */ - rfctl = E1000_READ_REG(hw, E1000_RFCTL); - rfctl |= E1000_RFCTL_IPV6_EX_DIS; - E1000_WRITE_REG(hw, E1000_RFCTL, rfctl); - + DEBUGFUNC("e1000_rx_fifo_workaround_82575"); if (hw->mac.type != e1000_82575 || !(E1000_READ_REG(hw, E1000_MANC) & E1000_MANC_RCV_TCO_EN)) return; @@ -2177,6 +2164,7 @@ void e1000_rx_fifo_flush_82575(struct e1 * incoming packets are rejected. Set enable and wait 2ms so that * any packet that was coming in as RCTL.EN was set is flushed */ + rfctl = E1000_READ_REG(hw, E1000_RFCTL); E1000_WRITE_REG(hw, E1000_RFCTL, rfctl & ~E1000_RFCTL_LEF); rlpml = E1000_READ_REG(hw, E1000_RLPML); @@ -2906,13 +2894,11 @@ out: /** * e1000_set_eee_i350 - Enable/disable EEE support * @hw: pointer to the HW structure - * @adv1g: boolean flag enabling 1G EEE advertisement - * @adv100m: boolean flag enabling 100M EEE advertisement * * Enable/disable EEE based on setting in dev_spec structure. * **/ -s32 e1000_set_eee_i350(struct e1000_hw *hw, bool adv1G, bool adv100M) +s32 e1000_set_eee_i350(struct e1000_hw *hw) { u32 ipcnfg, eeer; @@ -2928,16 +2914,7 @@ s32 e1000_set_eee_i350(struct e1000_hw * if (!(hw->dev_spec._82575.eee_disable)) { u32 eee_su = E1000_READ_REG(hw, E1000_EEE_SU); - if (adv100M) - ipcnfg |= E1000_IPCNFG_EEE_100M_AN; - else - ipcnfg &= ~E1000_IPCNFG_EEE_100M_AN; - - if (adv1G) - ipcnfg |= E1000_IPCNFG_EEE_1G_AN; - else - ipcnfg &= ~E1000_IPCNFG_EEE_1G_AN; - + ipcnfg |= (E1000_IPCNFG_EEE_1G_AN | E1000_IPCNFG_EEE_100M_AN); eeer |= (E1000_EEER_TX_LPI_EN | E1000_EEER_RX_LPI_EN | E1000_EEER_LPI_FC); @@ -2961,13 +2938,11 @@ out: /** * e1000_set_eee_i354 - Enable/disable EEE support * @hw: pointer to the HW structure - * @adv1g: boolean flag enabling 1G EEE advertisement - * @adv100m: boolean flag enabling 100M EEE advertisement * * Enable/disable EEE legacy mode based on setting in dev_spec structure. * **/ -s32 e1000_set_eee_i354(struct e1000_hw *hw, bool adv1G, bool adv100M) +s32 e1000_set_eee_i354(struct e1000_hw *hw) { struct e1000_phy_info *phy = &hw->phy; s32 ret_val = E1000_SUCCESS; @@ -3009,16 +2984,8 @@ s32 e1000_set_eee_i354(struct e1000_hw * if (ret_val) goto out; - if (adv100M) - phy_data |= E1000_EEE_ADV_100_SUPPORTED; - else - phy_data &= ~E1000_EEE_ADV_100_SUPPORTED; - - if (adv1G) - phy_data |= E1000_EEE_ADV_1000_SUPPORTED; - else - phy_data &= ~E1000_EEE_ADV_1000_SUPPORTED; - + phy_data |= E1000_EEE_ADV_100_SUPPORTED | + E1000_EEE_ADV_1000_SUPPORTED; ret_val = e1000_write_xmdio_reg(hw, E1000_EEE_ADV_ADDR_I354, E1000_EEE_ADV_DEV_I354, phy_data); Modified: head/sys/dev/e1000/e1000_82575.h ============================================================================== --- head/sys/dev/e1000/e1000_82575.h Sat Sep 19 17:47:36 2015 (r287989) +++ head/sys/dev/e1000/e1000_82575.h Sat Sep 19 18:22:59 2015 (r287990) @@ -495,8 +495,8 @@ void e1000_rlpml_set_vf(struct e1000_hw s32 e1000_promisc_set_vf(struct e1000_hw *, enum e1000_promisc_type type); u16 e1000_rxpbs_adjust_82580(u32 data); s32 e1000_read_emi_reg(struct e1000_hw *hw, u16 addr, u16 *data); -s32 e1000_set_eee_i350(struct e1000_hw *hw, bool adv1G, bool adv100M); -s32 e1000_set_eee_i354(struct e1000_hw *hw, bool adv1G, bool adv100M); +s32 e1000_set_eee_i350(struct e1000_hw *); +s32 e1000_set_eee_i354(struct e1000_hw *); s32 e1000_get_eee_status_i354(struct e1000_hw *, bool *); s32 e1000_initialize_M88E1512_phy(struct e1000_hw *hw); Modified: head/sys/dev/e1000/e1000_api.c ============================================================================== --- head/sys/dev/e1000/e1000_api.c Sat Sep 19 17:47:36 2015 (r287989) +++ head/sys/dev/e1000/e1000_api.c Sat Sep 19 18:22:59 2015 (r287990) @@ -299,12 +299,6 @@ s32 e1000_set_mac_type(struct e1000_hw * case E1000_DEV_ID_PCH_I218_V3: mac->type = e1000_pch_lpt; break; - case E1000_DEV_ID_PCH_SPT_I219_LM: - case E1000_DEV_ID_PCH_SPT_I219_V: - case E1000_DEV_ID_PCH_SPT_I219_LM2: - case E1000_DEV_ID_PCH_SPT_I219_V2: - mac->type = e1000_pch_spt; - break; case E1000_DEV_ID_82575EB_COPPER: case E1000_DEV_ID_82575EB_FIBER_SERDES: case E1000_DEV_ID_82575GB_QUAD_COPPER: @@ -455,7 +449,6 @@ s32 e1000_setup_init_funcs(struct e1000_ case e1000_pchlan: case e1000_pch2lan: case e1000_pch_lpt: - case e1000_pch_spt: e1000_init_function_pointers_ich8lan(hw); break; case e1000_82575: @@ -936,6 +929,21 @@ s32 e1000_mng_enable_host_if(struct e100 } /** + * e1000_set_obff_timer - Set Optimized Buffer Flush/Fill timer + * @hw: pointer to the HW structure + * @itr: u32 indicating itr value + * + * Set the OBFF timer based on the given interrupt rate. + **/ +s32 e1000_set_obff_timer(struct e1000_hw *hw, u32 itr) +{ + if (hw->mac.ops.set_obff_timer) + return hw->mac.ops.set_obff_timer(hw, itr); + + return E1000_SUCCESS; +} + +/** * e1000_check_reset_block - Verifies PHY can be reset * @hw: pointer to the HW structure * @@ -1208,21 +1216,6 @@ s32 e1000_read_pba_length(struct e1000_h } /** - * e1000_read_pba_num - Read device part number - * @hw: pointer to the HW structure - * @pba_num: pointer to device part number - * - * Reads the product board assembly (PBA) number from the EEPROM and stores - * the value in pba_num. - * Currently no func pointer exists and all implementations are handled in the - * generic version of this function. - **/ -s32 e1000_read_pba_num(struct e1000_hw *hw, u32 *pba_num) -{ - return e1000_read_pba_num_generic(hw, pba_num); -} - -/** * e1000_validate_nvm_checksum - Verifies NVM (EEPROM) checksum * @hw: pointer to the HW structure * Modified: head/sys/dev/e1000/e1000_api.h ============================================================================== --- head/sys/dev/e1000/e1000_api.h Sat Sep 19 17:47:36 2015 (r287989) +++ head/sys/dev/e1000/e1000_api.h Sat Sep 19 18:22:59 2015 (r287990) @@ -97,7 +97,6 @@ s32 e1000_phy_commit(struct e1000_hw *hw void e1000_power_up_phy(struct e1000_hw *hw); void e1000_power_down_phy(struct e1000_hw *hw); s32 e1000_read_mac_addr(struct e1000_hw *hw); -s32 e1000_read_pba_num(struct e1000_hw *hw, u32 *part_num); s32 e1000_read_pba_string(struct e1000_hw *hw, u8 *pba_num, u32 pba_num_size); s32 e1000_read_pba_length(struct e1000_hw *hw, u32 *pba_num_size); void e1000_reload_nvm(struct e1000_hw *hw); Modified: head/sys/dev/e1000/e1000_defines.h ============================================================================== --- head/sys/dev/e1000/e1000_defines.h Sat Sep 19 17:47:36 2015 (r287989) +++ head/sys/dev/e1000/e1000_defines.h Sat Sep 19 18:22:59 2015 (r287990) @@ -197,8 +197,6 @@ #define E1000_RCTL_LBM_TCVR 0x000000C0 /* tcvr loopback mode */ #define E1000_RCTL_DTYP_PS 0x00000400 /* Packet Split descriptor */ #define E1000_RCTL_RDMTS_HALF 0x00000000 /* Rx desc min thresh size */ -#define E1000_RCTL_RDMTS_HEX 0x00010000 -#define E1000_RCTL_RDMTS1_HEX E1000_RCTL_RDMTS_HEX #define E1000_RCTL_MO_SHIFT 12 /* multicast offset shift */ #define E1000_RCTL_MO_3 0x00003000 /* multicast offset 15:4 */ #define E1000_RCTL_BAM 0x00008000 /* broadcast enable */ @@ -567,6 +565,9 @@ #define E1000_ICR_THS 0x00800000 /* ICR.THS: Thermal Sensor Event*/ #define E1000_ICR_MDDET 0x10000000 /* Malicious Driver Detect */ +#define E1000_ITR_MASK 0x000FFFFF /* ITR value bitfield */ +#define E1000_ITR_MULT 256 /* ITR mulitplier in nsec */ + /* PBA ECC Register */ #define E1000_PBA_ECC_COUNTER_MASK 0xFFF00000 /* ECC counter mask */ #define E1000_PBA_ECC_COUNTER_SHIFT 20 /* ECC counter shift value */ @@ -752,12 +753,6 @@ #define E1000_TSYNCTXCTL_VALID 0x00000001 /* Tx timestamp valid */ #define E1000_TSYNCTXCTL_ENABLED 0x00000010 /* enable Tx timestamping */ -/* HH Time Sync */ -#define E1000_TSYNCTXCTL_MAX_ALLOWED_DLY_MASK 0x0000F000 /* max delay */ -#define E1000_TSYNCTXCTL_SYNC_COMP_ERR 0x20000000 /* sync err */ -#define E1000_TSYNCTXCTL_SYNC_COMP 0x40000000 /* sync complete */ -#define E1000_TSYNCTXCTL_START_SYNC 0x80000000 /* initiate sync */ - #define E1000_TSYNCRXCTL_VALID 0x00000001 /* Rx timestamp valid */ #define E1000_TSYNCRXCTL_TYPE_MASK 0x0000000E /* Rx type mask */ #define E1000_TSYNCRXCTL_TYPE_L2_V2 0x00 @@ -1025,7 +1020,9 @@ /* NVM Addressing bits based on type 0=small, 1=large */ #define E1000_EECD_ADDR_BITS 0x00000400 #define E1000_EECD_TYPE 0x00002000 /* NVM Type (1-SPI, 0-Microwire) */ +#ifndef E1000_NVM_GRANT_ATTEMPTS #define E1000_NVM_GRANT_ATTEMPTS 1000 /* NVM # attempts to gain grant */ +#endif #define E1000_EECD_AUTO_RD 0x00000200 /* NVM Auto Read done */ #define E1000_EECD_SIZE_EX_MASK 0x00007800 /* NVM Size */ #define E1000_EECD_SIZE_EX_SHIFT 11 @@ -1062,44 +1059,11 @@ /* NVM Word Offsets */ #define NVM_COMPAT 0x0003 #define NVM_ID_LED_SETTINGS 0x0004 -#define NVM_VERSION 0x0005 #define NVM_SERDES_AMPLITUDE 0x0006 /* SERDES output amplitude */ #define NVM_PHY_CLASS_WORD 0x0007 #define E1000_I210_NVM_FW_MODULE_PTR 0x0010 #define E1000_I350_NVM_FW_MODULE_PTR 0x0051 #define NVM_FUTURE_INIT_WORD1 0x0019 -#define NVM_ETRACK_WORD 0x0042 -#define NVM_ETRACK_HIWORD 0x0043 -#define NVM_COMB_VER_OFF 0x0083 -#define NVM_COMB_VER_PTR 0x003d - -/* NVM version defines */ -#define NVM_MAJOR_MASK 0xF000 -#define NVM_MINOR_MASK 0x0FF0 -#define NVM_IMAGE_ID_MASK 0x000F -#define NVM_COMB_VER_MASK 0x00FF -#define NVM_MAJOR_SHIFT 12 -#define NVM_MINOR_SHIFT 4 -#define NVM_COMB_VER_SHFT 8 -#define NVM_VER_INVALID 0xFFFF -#define NVM_ETRACK_SHIFT 16 -#define NVM_ETRACK_VALID 0x8000 -#define NVM_NEW_DEC_MASK 0x0F00 -#define NVM_HEX_CONV 16 -#define NVM_HEX_TENS 10 - -/* FW version defines */ -/* Offset of "Loader patch ptr" in Firmware Header */ -#define E1000_I350_NVM_FW_LOADER_PATCH_PTR_OFFSET 0x01 -/* Patch generation hour & minutes */ -#define E1000_I350_NVM_FW_VER_WORD1_OFFSET 0x04 -/* Patch generation month & day */ -#define E1000_I350_NVM_FW_VER_WORD2_OFFSET 0x05 -/* Patch generation year */ -#define E1000_I350_NVM_FW_VER_WORD3_OFFSET 0x06 -/* Patch major & minor numbers */ -#define E1000_I350_NVM_FW_VER_WORD4_OFFSET 0x07 - #define NVM_MAC_ADDR 0x0000 #define NVM_SUB_DEV_ID 0x000B #define NVM_SUB_VEN_ID 0x000C @@ -1476,6 +1440,8 @@ #define I210_RXPBSIZE_DEFAULT 0x000000A2 /* RXPBSIZE default */ #define I210_TXPBSIZE_DEFAULT 0x04000014 /* TXPBSIZE default */ +#define E1000_DOBFFCTL_OBFFTHR_MASK 0x000000FF /* OBFF threshold */ +#define E1000_DOBFFCTL_EXIT_ACT_MASK 0x01000000 /* Exit active CB */ /* Proxy Filter Control */ #define E1000_PROXYFC_D0 0x00000001 /* Enable offload in D0 */ Modified: head/sys/dev/e1000/e1000_hw.h ============================================================================== --- head/sys/dev/e1000/e1000_hw.h Sat Sep 19 17:47:36 2015 (r287989) +++ head/sys/dev/e1000/e1000_hw.h Sat Sep 19 18:22:59 2015 (r287990) @@ -137,10 +137,6 @@ struct e1000_hw; #define E1000_DEV_ID_PCH_I218_V2 0x15A1 #define E1000_DEV_ID_PCH_I218_LM3 0x15A2 /* Wildcat Point PCH */ #define E1000_DEV_ID_PCH_I218_V3 0x15A3 /* Wildcat Point PCH */ -#define E1000_DEV_ID_PCH_SPT_I219_LM 0x156F /* Sunrise Point PCH */ -#define E1000_DEV_ID_PCH_SPT_I219_V 0x1570 /* Sunrise Point PCH */ -#define E1000_DEV_ID_PCH_SPT_I219_LM2 0x15B7 /* Sunrise Point-H PCH */ -#define E1000_DEV_ID_PCH_SPT_I219_V2 0x15B8 /* Sunrise Point-H PCH */ #define E1000_DEV_ID_82576 0x10C9 #define E1000_DEV_ID_82576_FIBER 0x10E6 #define E1000_DEV_ID_82576_SERDES 0x10E7 @@ -226,7 +222,6 @@ enum e1000_mac_type { e1000_pchlan, e1000_pch2lan, e1000_pch_lpt, - e1000_pch_spt, e1000_82575, e1000_82576, e1000_82580, @@ -708,6 +703,7 @@ struct e1000_mac_operations { int (*rar_set)(struct e1000_hw *, u8*, u32); s32 (*read_mac_addr)(struct e1000_hw *); s32 (*validate_mdi_setting)(struct e1000_hw *); + s32 (*set_obff_timer)(struct e1000_hw *, u32); s32 (*acquire_swfw_sync)(struct e1000_hw *, u16); void (*release_swfw_sync)(struct e1000_hw *, u16); }; @@ -809,7 +805,7 @@ struct e1000_mac_info { enum e1000_serdes_link_state serdes_link_state; bool serdes_has_link; bool tx_pkt_filtering; - u32 max_frame_size; + u32 max_frame_size; }; struct e1000_phy_info { Modified: head/sys/dev/e1000/e1000_i210.c ============================================================================== --- head/sys/dev/e1000/e1000_i210.c Sat Sep 19 17:47:36 2015 (r287989) +++ head/sys/dev/e1000/e1000_i210.c Sat Sep 19 18:22:59 2015 (r287990) @@ -489,105 +489,6 @@ static s32 e1000_read_invm_i210(struct e } /** - * e1000_read_invm_version - Reads iNVM version and image type - * @hw: pointer to the HW structure - * @invm_ver: version structure for the version read - * - * Reads iNVM version and image type. - **/ -s32 e1000_read_invm_version(struct e1000_hw *hw, - struct e1000_fw_version *invm_ver) -{ - u32 *record = NULL; - u32 *next_record = NULL; - u32 i = 0; - u32 invm_dword = 0; - u32 invm_blocks = E1000_INVM_SIZE - (E1000_INVM_ULT_BYTES_SIZE / - E1000_INVM_RECORD_SIZE_IN_BYTES); - u32 buffer[E1000_INVM_SIZE]; - s32 status = -E1000_ERR_INVM_VALUE_NOT_FOUND; - u16 version = 0; - - DEBUGFUNC("e1000_read_invm_version"); - - /* Read iNVM memory */ - for (i = 0; i < E1000_INVM_SIZE; i++) { - invm_dword = E1000_READ_REG(hw, E1000_INVM_DATA_REG(i)); - buffer[i] = invm_dword; - } - - /* Read version number */ - for (i = 1; i < invm_blocks; i++) { - record = &buffer[invm_blocks - i]; - next_record = &buffer[invm_blocks - i + 1]; - - /* Check if we have first version location used */ - if ((i == 1) && ((*record & E1000_INVM_VER_FIELD_ONE) == 0)) { - version = 0; - status = E1000_SUCCESS; - break; - } - /* Check if we have second version location used */ - else if ((i == 1) && - ((*record & E1000_INVM_VER_FIELD_TWO) == 0)) { - version = (*record & E1000_INVM_VER_FIELD_ONE) >> 3; - status = E1000_SUCCESS; - break; - } - /* - * Check if we have odd version location - * used and it is the last one used - */ - else if ((((*record & E1000_INVM_VER_FIELD_ONE) == 0) && - ((*record & 0x3) == 0)) || (((*record & 0x3) != 0) && - (i != 1))) { - version = (*next_record & E1000_INVM_VER_FIELD_TWO) - >> 13; - status = E1000_SUCCESS; - break; - } - /* - * Check if we have even version location - * used and it is the last one used - */ - else if (((*record & E1000_INVM_VER_FIELD_TWO) == 0) && - ((*record & 0x3) == 0)) { - version = (*record & E1000_INVM_VER_FIELD_ONE) >> 3; - status = E1000_SUCCESS; - break; - } - } - - if (status == E1000_SUCCESS) { - invm_ver->invm_major = (version & E1000_INVM_MAJOR_MASK) - >> E1000_INVM_MAJOR_SHIFT; - invm_ver->invm_minor = version & E1000_INVM_MINOR_MASK; - } - /* Read Image Type */ - for (i = 1; i < invm_blocks; i++) { - record = &buffer[invm_blocks - i]; - next_record = &buffer[invm_blocks - i + 1]; - - /* Check if we have image type in first location used */ - if ((i == 1) && ((*record & E1000_INVM_IMGTYPE_FIELD) == 0)) { - invm_ver->invm_img_type = 0; - status = E1000_SUCCESS; - break; - } - /* Check if we have image type in first location used */ - else if ((((*record & 0x3) == 0) && - ((*record & E1000_INVM_IMGTYPE_FIELD) == 0)) || - ((((*record & 0x3) != 0) && (i != 1)))) { - invm_ver->invm_img_type = - (*next_record & E1000_INVM_IMGTYPE_FIELD) >> 23; - status = E1000_SUCCESS; - break; - } - } - return status; -} - -/** * e1000_validate_nvm_checksum_i210 - Validate EEPROM checksum * @hw: pointer to the HW structure * Modified: head/sys/dev/e1000/e1000_i210.h ============================================================================== --- head/sys/dev/e1000/e1000_i210.h Sat Sep 19 17:47:36 2015 (r287989) +++ head/sys/dev/e1000/e1000_i210.h Sat Sep 19 18:22:59 2015 (r287990) @@ -43,8 +43,6 @@ s32 e1000_write_nvm_srwr_i210(struct e10 u16 words, u16 *data); s32 e1000_read_nvm_srrd_i210(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); -s32 e1000_read_invm_version(struct e1000_hw *hw, - struct e1000_fw_version *invm_ver); s32 e1000_acquire_swfw_sync_i210(struct e1000_hw *hw, u16 mask); void e1000_release_swfw_sync_i210(struct e1000_hw *hw, u16 mask); s32 e1000_read_xmdio_reg(struct e1000_hw *hw, u16 addr, u8 dev_addr, Modified: head/sys/dev/e1000/e1000_ich8lan.c ============================================================================== --- head/sys/dev/e1000/e1000_ich8lan.c Sat Sep 19 17:47:36 2015 (r287989) +++ head/sys/dev/e1000/e1000_ich8lan.c Sat Sep 19 18:22:59 2015 (r287990) @@ -92,13 +92,10 @@ static s32 e1000_set_d3_lplu_state_ich8 bool active); static s32 e1000_read_nvm_ich8lan(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); -static s32 e1000_read_nvm_spt(struct e1000_hw *hw, u16 offset, u16 words, - u16 *data); static s32 e1000_write_nvm_ich8lan(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); static s32 e1000_validate_nvm_checksum_ich8lan(struct e1000_hw *hw); static s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw); -static s32 e1000_update_nvm_checksum_spt(struct e1000_hw *hw); static s32 e1000_valid_led_default_ich8lan(struct e1000_hw *hw, u16 *data); static s32 e1000_id_led_init_pchlan(struct e1000_hw *hw); @@ -126,14 +123,6 @@ static s32 e1000_read_flash_byte_ich8la u32 offset, u8 *data); static s32 e1000_read_flash_data_ich8lan(struct e1000_hw *hw, u32 offset, u8 size, u16 *data); -static s32 e1000_read_flash_data32_ich8lan(struct e1000_hw *hw, u32 offset, - u32 *data); -static s32 e1000_read_flash_dword_ich8lan(struct e1000_hw *hw, - u32 offset, u32 *data); -static s32 e1000_write_flash_data32_ich8lan(struct e1000_hw *hw, - u32 offset, u32 data); -static s32 e1000_retry_write_flash_dword_ich8lan(struct e1000_hw *hw, - u32 offset, u32 dword); static s32 e1000_read_flash_word_ich8lan(struct e1000_hw *hw, u32 offset, u16 *data); static s32 e1000_retry_write_flash_byte_ich8lan(struct e1000_hw *hw, @@ -144,6 +133,7 @@ static s32 e1000_check_for_copper_link_i static s32 e1000_set_mdio_slow_mode_hv(struct e1000_hw *hw); static s32 e1000_k1_workaround_lv(struct e1000_hw *hw); static void e1000_gate_hw_phy_config_ich8lan(struct e1000_hw *hw, bool gate); +static s32 e1000_set_obff_timer_pch_lpt(struct e1000_hw *hw, u32 itr); /* ICH GbE Flash Hardware Sequencing Flash Status Register bit breakdown */ /* Offset 04h HSFSTS */ @@ -242,21 +232,16 @@ static bool e1000_phy_is_accessible_pchl if (ret_val) return FALSE; out: - if ((hw->mac.type == e1000_pch_lpt) || - (hw->mac.type == e1000_pch_spt)) { - /* Only unforce SMBus if ME is not active */ - if (!(E1000_READ_REG(hw, E1000_FWSM) & - E1000_ICH_FWSM_FW_VALID)) { - /* Unforce SMBus mode in PHY */ - hw->phy.ops.read_reg_locked(hw, CV_SMB_CTRL, &phy_reg); - phy_reg &= ~CV_SMB_CTRL_FORCE_SMBUS; - hw->phy.ops.write_reg_locked(hw, CV_SMB_CTRL, phy_reg); + if (hw->mac.type == e1000_pch_lpt) { + /* Unforce SMBus mode in PHY */ + hw->phy.ops.read_reg_locked(hw, CV_SMB_CTRL, &phy_reg); + phy_reg &= ~CV_SMB_CTRL_FORCE_SMBUS; + hw->phy.ops.write_reg_locked(hw, CV_SMB_CTRL, phy_reg); - /* Unforce SMBus mode in MAC */ - mac_reg = E1000_READ_REG(hw, E1000_CTRL_EXT); - mac_reg &= ~E1000_CTRL_EXT_FORCE_SMBUS; - E1000_WRITE_REG(hw, E1000_CTRL_EXT, mac_reg); - } + /* Unforce SMBus mode in MAC */ + mac_reg = E1000_READ_REG(hw, E1000_CTRL_EXT); + mac_reg &= ~E1000_CTRL_EXT_FORCE_SMBUS; + E1000_WRITE_REG(hw, E1000_CTRL_EXT, mac_reg); } return TRUE; @@ -343,7 +328,6 @@ static s32 e1000_init_phy_workarounds_pc */ switch (hw->mac.type) { case e1000_pch_lpt: - case e1000_pch_spt: if (e1000_phy_is_accessible_pchlan(hw)) break; @@ -491,7 +475,6 @@ static s32 e1000_init_phy_params_pchlan( /* fall-through */ case e1000_pch2lan: case e1000_pch_lpt: - case e1000_pch_spt: /* In case the PHY needs to be in mdio slow mode, * set slow mode and try to get the PHY id again. */ @@ -634,53 +617,36 @@ static s32 e1000_init_nvm_params_ich8lan struct e1000_dev_spec_ich8lan *dev_spec = &hw->dev_spec.ich8lan; u32 gfpreg, sector_base_addr, sector_end_addr; u16 i; - u32 nvm_size; DEBUGFUNC("e1000_init_nvm_params_ich8lan"); /* Can't read flash registers if the register set isn't mapped. */ nvm->type = e1000_nvm_flash_sw; - /* in SPT, gfpreg doesn't exist. NVM size is taken from the - * STRAP register - */ - if (hw->mac.type == e1000_pch_spt) { - nvm->flash_base_addr = 0; - nvm_size = - (((E1000_READ_REG(hw, E1000_STRAP) >> 1) & 0x1F) + 1) - * NVM_SIZE_MULTIPLIER; - nvm->flash_bank_size = nvm_size / 2; - /* Adjust to word count */ - nvm->flash_bank_size /= sizeof(u16); - /* Set the base address for flash register access */ - hw->flash_address = hw->hw_addr + E1000_FLASH_BASE_ADDR; - } else { - if (!hw->flash_address) { - DEBUGOUT("ERROR: Flash registers not mapped\n"); - return -E1000_ERR_CONFIG; - } - - gfpreg = E1000_READ_FLASH_REG(hw, ICH_FLASH_GFPREG); - - /* sector_X_addr is a "sector"-aligned address (4096 bytes) - * Add 1 to sector_end_addr since this sector is included in - * the overall size. - */ - sector_base_addr = gfpreg & FLASH_GFPREG_BASE_MASK; - sector_end_addr = ((gfpreg >> 16) & FLASH_GFPREG_BASE_MASK) + 1; + if (!hw->flash_address) { + DEBUGOUT("ERROR: Flash registers not mapped\n"); + return -E1000_ERR_CONFIG; + } - /* flash_base_addr is byte-aligned */ - nvm->flash_base_addr = sector_base_addr - << FLASH_SECTOR_ADDR_SHIFT; + gfpreg = E1000_READ_FLASH_REG(hw, ICH_FLASH_GFPREG); - /* find total size of the NVM, then cut in half since the total - * size represents two separate NVM banks. - */ - nvm->flash_bank_size = ((sector_end_addr - sector_base_addr) - << FLASH_SECTOR_ADDR_SHIFT); - nvm->flash_bank_size /= 2; - /* Adjust to word count */ - nvm->flash_bank_size /= sizeof(u16); - } + /* sector_X_addr is a "sector"-aligned address (4096 bytes) + * Add 1 to sector_end_addr since this sector is included in + * the overall size. + */ + sector_base_addr = gfpreg & FLASH_GFPREG_BASE_MASK; + sector_end_addr = ((gfpreg >> 16) & FLASH_GFPREG_BASE_MASK) + 1; + + /* flash_base_addr is byte-aligned */ + nvm->flash_base_addr = sector_base_addr << FLASH_SECTOR_ADDR_SHIFT; + + /* find total size of the NVM, then cut in half since the total + * size represents two separate NVM banks. + */ + nvm->flash_bank_size = ((sector_end_addr - sector_base_addr) + << FLASH_SECTOR_ADDR_SHIFT); + nvm->flash_bank_size /= 2; + /* Adjust to word count */ + nvm->flash_bank_size /= sizeof(u16); nvm->word_size = E1000_SHADOW_RAM_WORDS; @@ -696,13 +662,8 @@ static s32 e1000_init_nvm_params_ich8lan /* Function Pointers */ nvm->ops.acquire = e1000_acquire_nvm_ich8lan; nvm->ops.release = e1000_release_nvm_ich8lan; - if (hw->mac.type == e1000_pch_spt) { - nvm->ops.read = e1000_read_nvm_spt; - nvm->ops.update = e1000_update_nvm_checksum_spt; - } else { - nvm->ops.read = e1000_read_nvm_ich8lan; - nvm->ops.update = e1000_update_nvm_checksum_ich8lan; - } + nvm->ops.read = e1000_read_nvm_ich8lan; + nvm->ops.update = e1000_update_nvm_checksum_ich8lan; nvm->ops.valid_led_default = e1000_valid_led_default_ich8lan; nvm->ops.validate = e1000_validate_nvm_checksum_ich8lan; nvm->ops.write = e1000_write_nvm_ich8lan; @@ -720,7 +681,9 @@ static s32 e1000_init_nvm_params_ich8lan static s32 e1000_init_mac_params_ich8lan(struct e1000_hw *hw) { struct e1000_mac_info *mac = &hw->mac; +#if defined(QV_RELEASE) || !defined(NO_PCH_LPT_B0_SUPPORT) u16 pci_cfg; +#endif /* QV_RELEASE || !defined(NO_PCH_LPT_B0_SUPPORT) */ DEBUGFUNC("e1000_init_mac_params_ich8lan"); @@ -789,21 +752,15 @@ static s32 e1000_init_mac_params_ich8lan mac->ops.rar_set = e1000_rar_set_pch2lan; /* fall-through */ case e1000_pch_lpt: - case e1000_pch_spt: /* multicast address update for pch2 */ mac->ops.update_mc_addr_list = e1000_update_mc_addr_list_pch2lan; - /* fall-through */ case e1000_pchlan: +#if defined(QV_RELEASE) || !defined(NO_PCH_LPT_B0_SUPPORT) /* save PCH revision_id */ e1000_read_pci_cfg(hw, E1000_PCI_REVISION_ID_REG, &pci_cfg); - /* SPT uses full byte for revision ID, - * as opposed to previous generations - */ - if (hw->mac.type >= e1000_pch_spt) - hw->revision_id = (u8)(pci_cfg &= 0x00FF); - else - hw->revision_id = (u8)(pci_cfg &= 0x000F); + hw->revision_id = (u8)(pci_cfg &= 0x000F); +#endif /* QV_RELEASE || !defined(NO_PCH_LPT_B0_SUPPORT) */ /* check management mode */ mac->ops.check_mng_mode = e1000_check_mng_mode_pchlan; /* ID LED init */ @@ -820,11 +777,11 @@ static s32 e1000_init_mac_params_ich8lan break; } - if ((mac->type == e1000_pch_lpt) || - (mac->type == e1000_pch_spt)) { + if (mac->type == e1000_pch_lpt) { mac->rar_entry_count = E1000_PCH_LPT_RAR_ENTRIES; mac->ops.rar_set = e1000_rar_set_pch_lpt; mac->ops.setup_physical_interface = e1000_setup_copper_link_pch_lpt; + mac->ops.set_obff_timer = e1000_set_obff_timer_pch_lpt; } /* Enable PCS Lock-loss workaround for ICH8 */ @@ -1050,9 +1007,8 @@ release: /* clear FEXTNVM6 bit 8 on link down or 10/100 */ fextnvm6 &= ~E1000_FEXTNVM6_REQ_PLL_CLK; - if ((hw->phy.revision > 5) || !link || - ((status & E1000_STATUS_SPEED_100) && - (status & E1000_STATUS_FD))) + if (!link || ((status & E1000_STATUS_SPEED_100) && + (status & E1000_STATUS_FD))) goto update_fextnvm6; ret_val = hw->phy.ops.read_reg(hw, I217_INBAND_CTRL, ®); @@ -1088,6 +1044,168 @@ update_fextnvm6: return ret_val; } +static u64 e1000_ltr2ns(u16 ltr) +{ + u32 value, scale; + + /* Determine the latency in nsec based on the LTR value & scale */ + value = ltr & E1000_LTRV_VALUE_MASK; + scale = (ltr & E1000_LTRV_SCALE_MASK) >> E1000_LTRV_SCALE_SHIFT; + + return value * (1 << (scale * E1000_LTRV_SCALE_FACTOR)); +} + +/** + * e1000_platform_pm_pch_lpt - Set platform power management values + * @hw: pointer to the HW structure + * @link: bool indicating link status + * + * Set the Latency Tolerance Reporting (LTR) values for the "PCIe-like" + * GbE MAC in the Lynx Point PCH based on Rx buffer size and link speed + * when link is up (which must not exceed the maximum latency supported + * by the platform), otherwise specify there is no LTR requirement. + * Unlike TRUE-PCIe devices which set the LTR maximum snoop/no-snoop + * latencies in the LTR Extended Capability Structure in the PCIe Extended + * Capability register set, on this device LTR is set by writing the + * equivalent snoop/no-snoop latencies in the LTRV register in the MAC and + * set the SEND bit to send an Intel On-chip System Fabric sideband (IOSF-SB) + * message to the PMC. + * + * Use the LTR value to calculate the Optimized Buffer Flush/Fill (OBFF) + * high-water mark. + **/ +static s32 e1000_platform_pm_pch_lpt(struct e1000_hw *hw, bool link) +{ + u32 reg = link << (E1000_LTRV_REQ_SHIFT + E1000_LTRV_NOSNOOP_SHIFT) | + link << E1000_LTRV_REQ_SHIFT | E1000_LTRV_SEND; + u16 lat_enc = 0; /* latency encoded */ + s32 obff_hwm = 0; + + DEBUGFUNC("e1000_platform_pm_pch_lpt"); + + if (link) { + u16 speed, duplex, scale = 0; + u16 max_snoop, max_nosnoop; + u16 max_ltr_enc; /* max LTR latency encoded */ + s64 lat_ns; + s64 value; + u32 rxa; + + if (!hw->mac.max_frame_size) { + DEBUGOUT("max_frame_size not set.\n"); + return -E1000_ERR_CONFIG; + } + + hw->mac.ops.get_link_up_info(hw, &speed, &duplex); + if (!speed) { + DEBUGOUT("Speed not set.\n"); + return -E1000_ERR_CONFIG; + } + + /* Rx Packet Buffer Allocation size (KB) */ + rxa = E1000_READ_REG(hw, E1000_PBA) & E1000_PBA_RXA_MASK; + + /* Determine the maximum latency tolerated by the device. + * + * Per the PCIe spec, the tolerated latencies are encoded as + * a 3-bit encoded scale (only 0-5 are valid) multiplied by + * a 10-bit value (0-1023) to provide a range from 1 ns to + * 2^25*(2^10-1) ns. The scale is encoded as 0=2^0ns, + * 1=2^5ns, 2=2^10ns,...5=2^25ns. + */ + lat_ns = ((s64)rxa * 1024 - + (2 * (s64)hw->mac.max_frame_size)) * 8 * 1000; + if (lat_ns < 0) + lat_ns = 0; + else + lat_ns /= speed; + value = lat_ns; + + while (value > E1000_LTRV_VALUE_MASK) { + scale++; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sat Sep 19 18:23:07 2015 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 CA7F39CF9DC; Sat, 19 Sep 2015 18:23:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 BC6551FD8; Sat, 19 Sep 2015 18:23:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8JIN727031844; Sat, 19 Sep 2015 18:23:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8JIN7RP031843; Sat, 19 Sep 2015 18:23:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509191823.t8JIN7RP031843@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 19 Sep 2015 18:23:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287991 - head/sys/cam/ctl X-SVN-Group: head 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.20 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, 19 Sep 2015 18:23:07 -0000 Author: mav Date: Sat Sep 19 18:23:06 2015 New Revision: 287991 URL: https://svnweb.freebsd.org/changeset/base/287991 Log: Pack struct ctl_ha_msg_hdr by 8 bytes. Modified: head/sys/cam/ctl/ctl_io.h Modified: head/sys/cam/ctl/ctl_io.h ============================================================================== --- head/sys/cam/ctl/ctl_io.h Sat Sep 19 18:22:59 2015 (r287990) +++ head/sys/cam/ctl/ctl_io.h Sat Sep 19 18:23:06 2015 (r287991) @@ -385,10 +385,10 @@ struct ctl_pr_info { struct ctl_ha_msg_hdr { ctl_msg_type msg_type; + uint32_t status; /* transaction status */ union ctl_io *original_sc; union ctl_io *serializing_sc; struct ctl_nexus nexus; /* Initiator, port, target, lun */ - uint32_t status; /* transaction status */ }; #define CTL_HA_MAX_SG_ENTRIES 16 From owner-svn-src-head@freebsd.org Sat Sep 19 18:41:25 2015 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 70503A052C8; Sat, 19 Sep 2015 18:41:25 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 54C941C1E; Sat, 19 Sep 2015 18:41:25 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8JIfPts040127; Sat, 19 Sep 2015 18:41:25 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8JIfPCX040126; Sat, 19 Sep 2015 18:41:25 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201509191841.t8JIfPCX040126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 19 Sep 2015 18:41:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287992 - head/usr.sbin/sesutil X-SVN-Group: head 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.20 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, 19 Sep 2015 18:41:25 -0000 Author: allanjude Date: Sat Sep 19 18:41:24 2015 New Revision: 287992 URL: https://svnweb.freebsd.org/changeset/base/287992 Log: Rename some functions and variables inside sesutil(8) to make gcc happy Reported by: bz Approved by: bapt (implicit) Sponsored by: ScaleEngine Inc. Modified: head/usr.sbin/sesutil/sesutil.c Modified: head/usr.sbin/sesutil/sesutil.c ============================================================================== --- head/usr.sbin/sesutil/sesutil.c Sat Sep 19 18:23:06 2015 (r287991) +++ head/usr.sbin/sesutil/sesutil.c Sat Sep 19 18:41:24 2015 (r287992) @@ -107,7 +107,7 @@ usage(FILE *out, const char *subcmd) } static void -do_led(int fd, unsigned int idx, bool onoff, bool fault) +do_led(int fd, unsigned int idx, bool onoff, bool setfault) { encioc_elm_status_t o; @@ -118,9 +118,9 @@ do_led(int fd, unsigned int idx, bool on } o.cstat[0] |= 0x80; if (onoff) { - o.cstat[2] |= (fault ? 0x20 : 0x02); + o.cstat[2] |= (setfault ? 0x20 : 0x02); } else { - o.cstat[2] &= (fault ? 0xdf : 0xfd); + o.cstat[2] &= (setfault ? 0xdf : 0xfd); } if (ioctl(fd, ENCIOC_SETELMSTAT, (caddr_t) &o) < 0) { @@ -146,7 +146,7 @@ disk_match(const char *devnames, const c } static int -sesled(int argc, char **argv, bool fault) +sesled(int argc, char **argv, bool setfault) { encioc_elm_devnames_t objdn; encioc_element_t *objp; @@ -162,7 +162,7 @@ sesled(int argc, char **argv, bool fault onoff = false; if (argc != 3) { - usage(stderr, (fault ? "fault" : "locate")); + usage(stderr, (setfault ? "fault" : "locate")); } disk = argv[1]; @@ -173,7 +173,7 @@ sesled(int argc, char **argv, bool fault if (*endptr == '*') { warnx("Must specifying a SES device (-u) to use a SES " "id# to identify a disk"); - usage(stderr, (fault ? "fault" : "locate")); + usage(stderr, (setfault ? "fault" : "locate")); } isses = true; } @@ -183,7 +183,7 @@ sesled(int argc, char **argv, bool fault } else if (strcmp(argv[2], "off") == 0) { onoff = false; } else { - usage(stderr, (fault ? "fault" : "locate")); + usage(stderr, (setfault ? "fault" : "locate")); } if (strcmp(disk, "all") == 0) { @@ -239,7 +239,7 @@ sesled(int argc, char **argv, bool fault errx(EXIT_FAILURE, "Requested SES ID does not exist"); } - do_led(fd, sesid, onoff, fault); + do_led(fd, sesid, onoff, setfault); ndisks++; close(fd); break; @@ -260,12 +260,12 @@ sesled(int argc, char **argv, bool fault if (objdn.elm_names_len > 0) { if (all) { do_led(fd, objdn.elm_idx, - onoff, fault); + onoff, setfault); continue; } if (disk_match(objdn.elm_devnames, disk, len)) { do_led(fd, objdn.elm_idx, - onoff, fault); + onoff, setfault); ndisks++; break; } From owner-svn-src-head@freebsd.org Sat Sep 19 18:41:46 2015 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 2B9A7A05309; Sat, 19 Sep 2015 18:41:46 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) by mx1.freebsd.org (Postfix) with ESMTP id 0A55A1DA1; Sat, 19 Sep 2015 18:41:45 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (unknown [10.1.1.2]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 3E89C9D0F; Sat, 19 Sep 2015 18:41:45 +0000 (UTC) Subject: Re: svn commit: r287988 - head/usr.sbin/sesutil To: "Bjoern A. Zeeb" References: <201509191636.t8JGajvd086067@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Allan Jude Message-ID: <55FDACD0.2030105@freebsd.org> Date: Sat, 19 Sep 2015 14:43:28 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AbkCRnWgjDukgh6EtTsGPtEBWb0DrH1ag" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 19 Sep 2015 18:41:46 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --AbkCRnWgjDukgh6EtTsGPtEBWb0DrH1ag Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2015-09-19 14:09, Bjoern A. Zeeb wrote: > On Sat, 19 Sep 2015, Allan Jude wrote: >=20 >> Author: allanjude >> Date: Sat Sep 19 16:36:45 2015 >> New Revision: 287988 >> URL: https://svnweb.freebsd.org/changeset/base/287988 >> >> Log: >> Improve and expand sesutil(8) >> >> - Return an error if no matching device is found when the locate >> command is run >> - Enhance the locate command to be able to address drive bays with no= >> disk, or where the SES controller has not made the mapping to the >> device name >> - Added the fault command, similar to locate, but a different SES >> property. On some of my controllers locate blinks the activity light, >> others the fault light. The fault command keeps the fault light on >> constant. >> - Improve the usage() output and use it everywhere >> - Added the map command, displays all elements connected to each (or >> the specified) ses(4) controller >> - Added the status command, returns the overall status of the ses(4) >> controller >> >> Reviewed by: wblock (man page, earlier version) >> Approved by: bapt (mentor) >> MFC after: 3 weeks >> Relnotes: yes >> Sponsored by: ScaleEngine Inc. >> Differential Revision: https://reviews.freebsd.org/D3580 >=20 >=20 > Seems to fail to compile on gcc platforms. >=20 Fixed in r287992, sorry about that. --=20 Allan Jude --AbkCRnWgjDukgh6EtTsGPtEBWb0DrH1ag Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJV/azUAAoJEBmVNT4SmAt+nD8P/jTl5RALqeJOaZxVrbyQRxng nuHScqUCOUss/gArFs7HoEOzgqrGBoRgbax93D3FDG3YMmWPDkCrHmkImIS/4f3i XRgl8POaqltCK/g1Tfb9CxPnQGsp22LGwETm5IFGIm5fDAF+7Vq/ejxv+ITXWPtY JjJIV0faRP77eLzp3+KcBtWbAKCjotDgCuI0dkjMf+tDu2SxcQC1WfZ8afsAXYYb KUH3RjVTsBujk5fE4hWvl2+cZLn6nEW31goCyBHaRKZQgCWTVHXWjO42Wck+dsxz 856+20OsNFXkjCCL1srNWNTYhm9ez8PC50jf9zD9h4v6s71j/hANkuOrYnigw6Pr L7n+N1nMVZWaAkVO6pJIzHHGON+Z+rLle7RHuQOSJ9w2PRLhUImSm6lmXWTS4DEa Nyt9uMjws30ZKhkoTbPx7Y4gQjDJPizm6MsJhvXy+8DV7vrY5EjXtnrcrKpzRYO5 vvQiQgb0Wna2JSSe8wIUqbqjJ+3xsT2xYnG8d/CaQ/8cOC4IQ9V7vABgFcvFPdfM kx1g1WJkFZRRiOGXzO9ln4yRACFkVeEcnGKWQyrQyW4JM1K0VKUS36gK1KOyxQvt a52DVGEaniWowbfz4u1SfLaBIKokFqTKJkUFIZNoXWWfgilcBt6Ld9U0Q7FRFnVV sv1VAzfgZmxEbEO8/71k =d6JN -----END PGP SIGNATURE----- --AbkCRnWgjDukgh6EtTsGPtEBWb0DrH1ag-- From owner-svn-src-head@freebsd.org Sat Sep 19 19:12:00 2015 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 99BE3A05FA3; Sat, 19 Sep 2015 19:12:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 88CEC1A59; Sat, 19 Sep 2015 19:12:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8JJC0Il052453; Sat, 19 Sep 2015 19:12:00 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8JJBxtf052445; Sat, 19 Sep 2015 19:11:59 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509191911.t8JJBxtf052445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 19 Sep 2015 19:11:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287993 - head/sys/cam/ctl X-SVN-Group: head 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.20 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, 19 Sep 2015 19:12:00 -0000 Author: mav Date: Sat Sep 19 19:11:59 2015 New Revision: 287993 URL: https://svnweb.freebsd.org/changeset/base/287993 Log: Split two command flags with different meaning. This is only a cosmetical change. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_cmd_table.c head/sys/cam/ctl/ctl_private.h Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Sat Sep 19 18:41:24 2015 (r287992) +++ head/sys/cam/ctl/ctl.c Sat Sep 19 19:11:59 2015 (r287993) @@ -11174,7 +11174,7 @@ ctl_scsiio_precheck(struct ctl_softc *so * it on the rtr queue. */ if (lun == NULL) { - if (entry->flags & CTL_CMD_FLAG_OK_ON_ALL_LUNS) { + if (entry->flags & CTL_CMD_FLAG_OK_ON_NO_LUN) { ctsio->io_hdr.flags |= CTL_FLAG_IS_WAS_ON_RTR; ctl_enqueue_rtr((union ctl_io *)ctsio); return (retval); @@ -11392,13 +11392,11 @@ ctl_cmd_applicable(uint8_t lun_type, con switch (lun_type) { case T_PROCESSOR: - if (((entry->flags & CTL_CMD_FLAG_OK_ON_PROC) == 0) && - ((entry->flags & CTL_CMD_FLAG_OK_ON_ALL_LUNS) == 0)) + if ((entry->flags & CTL_CMD_FLAG_OK_ON_PROC) == 0) return (0); break; case T_DIRECT: - if (((entry->flags & CTL_CMD_FLAG_OK_ON_SLUN) == 0) && - ((entry->flags & CTL_CMD_FLAG_OK_ON_ALL_LUNS) == 0)) + if ((entry->flags & CTL_CMD_FLAG_OK_ON_SLUN) == 0) return (0); break; default: Modified: head/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- head/sys/cam/ctl/ctl_cmd_table.c Sat Sep 19 18:41:24 2015 (r287992) +++ head/sys/cam/ctl/ctl_cmd_table.c Sat Sep 19 19:11:59 2015 (r287993) @@ -546,7 +546,8 @@ const struct ctl_cmd_entry ctl_cmd_table /* 03 REQUEST SENSE */ {ctl_request_sense, CTL_SERIDX_RQ_SNS, CTL_FLAG_DATA_IN | - CTL_CMD_FLAG_OK_ON_ALL_LUNS | + CTL_CMD_FLAG_OK_ON_NO_LUN | + CTL_CMD_FLAG_OK_ON_BOTH | CTL_CMD_FLAG_ALLOW_ON_RESV | CTL_CMD_FLAG_NO_SENSE | CTL_CMD_FLAG_OK_ON_STOPPED | @@ -607,7 +608,8 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* 12 INQUIRY */ -{ctl_inquiry, CTL_SERIDX_INQ, CTL_CMD_FLAG_OK_ON_ALL_LUNS | +{ctl_inquiry, CTL_SERIDX_INQ, CTL_CMD_FLAG_OK_ON_NO_LUN | + CTL_CMD_FLAG_OK_ON_BOTH | CTL_CMD_FLAG_ALLOW_ON_RESV | CTL_CMD_FLAG_NO_SENSE | CTL_CMD_FLAG_OK_ON_STOPPED | @@ -1172,7 +1174,8 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* A0 REPORT LUNS */ -{ctl_report_luns, CTL_SERIDX_INQ, CTL_CMD_FLAG_OK_ON_ALL_LUNS | +{ctl_report_luns, CTL_SERIDX_INQ, CTL_CMD_FLAG_OK_ON_NO_LUN | + CTL_CMD_FLAG_OK_ON_BOTH | CTL_CMD_FLAG_ALLOW_ON_RESV | CTL_CMD_FLAG_NO_SENSE | CTL_CMD_FLAG_OK_ON_STOPPED | Modified: head/sys/cam/ctl/ctl_private.h ============================================================================== --- head/sys/cam/ctl/ctl_private.h Sat Sep 19 18:41:24 2015 (r287992) +++ head/sys/cam/ctl/ctl_private.h Sat Sep 19 19:11:59 2015 (r287993) @@ -91,14 +91,14 @@ typedef enum { * WARNING: Keep the bottom nibble here free, we OR in the data direction * flags for each command. * - * Note: "OK_ON_ALL_LUNS" == we don't have to have a lun configured + * Note: "OK_ON_NO_LUN" == we don't have to have a lun configured * "OK_ON_BOTH" == we have to have a lun configured * "SA5" == command has 5-bit service action at byte 1 */ typedef enum { CTL_CMD_FLAG_NONE = 0x0000, CTL_CMD_FLAG_NO_SENSE = 0x0010, - CTL_CMD_FLAG_OK_ON_ALL_LUNS = 0x0020, + CTL_CMD_FLAG_OK_ON_NO_LUN = 0x0020, CTL_CMD_FLAG_ALLOW_ON_RESV = 0x0040, CTL_CMD_FLAG_ALLOW_ON_PR_WRESV = 0x0080, CTL_CMD_FLAG_OK_ON_PROC = 0x0100, @@ -109,7 +109,8 @@ typedef enum { CTL_CMD_FLAG_OK_ON_STANDBY = 0x1000, CTL_CMD_FLAG_OK_ON_UNAVAIL = 0x2000, CTL_CMD_FLAG_ALLOW_ON_PR_RESV = 0x4000, - CTL_CMD_FLAG_SA5 = 0x8000 + CTL_CMD_FLAG_SA5 = 0x8000, + CTL_CMD_FLAG_RUN_HERE = 0x10000 } ctl_cmd_flags; typedef enum { From owner-svn-src-head@freebsd.org Sat Sep 19 19:30:57 2015 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 3F1CF9CF6DA; Sat, 19 Sep 2015 19:30:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 17C671FC8; Sat, 19 Sep 2015 19:30:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8JJUu7l059806; Sat, 19 Sep 2015 19:30:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8JJUuGn059804; Sat, 19 Sep 2015 19:30:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509191930.t8JJUuGn059804@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 19 Sep 2015 19:30:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287994 - head/sys/cam/ctl X-SVN-Group: head 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.20 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, 19 Sep 2015 19:30:57 -0000 Author: mav Date: Sat Sep 19 19:30:55 2015 New Revision: 287994 URL: https://svnweb.freebsd.org/changeset/base/287994 Log: Always execute REPORT LUNS and REQUEST SENSE commands locally. REPORT LUNS command is more related to target rather then specific LUN. This node may be primary for LUNs for some reason unknown to another, and command forwarded to another node won't be able to report them. REQUEST SENSE is related to LUN, but in our implementation it reports only UAs and CAs, that are stored locally rather then on primary node. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_cmd_table.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Sat Sep 19 19:11:59 2015 (r287993) +++ head/sys/cam/ctl/ctl.c Sat Sep 19 19:30:55 2015 (r287994) @@ -11265,7 +11265,8 @@ ctl_scsiio_precheck(struct ctl_softc *so * side so when we are done we can find the copy. */ if ((lun->flags & CTL_LUN_PRIMARY_SC) == 0 && - (lun->flags & CTL_LUN_PEER_SC_PRIMARY) != 0) { + (lun->flags & CTL_LUN_PEER_SC_PRIMARY) != 0 && + (entry->flags & CTL_CMD_FLAG_RUN_HERE) == 0) { union ctl_ha_msg msg_info; int isc_retval; Modified: head/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- head/sys/cam/ctl/ctl_cmd_table.c Sat Sep 19 19:11:59 2015 (r287993) +++ head/sys/cam/ctl/ctl_cmd_table.c Sat Sep 19 19:30:55 2015 (r287994) @@ -554,7 +554,8 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_CMD_FLAG_OK_ON_INOPERABLE | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_CMD_FLAG_OK_ON_UNAVAIL | - CTL_CMD_FLAG_ALLOW_ON_PR_RESV, + CTL_CMD_FLAG_ALLOW_ON_PR_RESV | + CTL_CMD_FLAG_RUN_HERE, CTL_LUN_PAT_NONE, 6, {0x01, 0, 0, 0xff, 0x07}}, /* 04 FORMAT UNIT */ @@ -1174,7 +1175,8 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* A0 REPORT LUNS */ -{ctl_report_luns, CTL_SERIDX_INQ, CTL_CMD_FLAG_OK_ON_NO_LUN | +{ctl_report_luns, CTL_SERIDX_INQ, CTL_FLAG_DATA_IN | + CTL_CMD_FLAG_OK_ON_NO_LUN | CTL_CMD_FLAG_OK_ON_BOTH | CTL_CMD_FLAG_ALLOW_ON_RESV | CTL_CMD_FLAG_NO_SENSE | @@ -1182,8 +1184,8 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_CMD_FLAG_OK_ON_INOPERABLE | CTL_CMD_FLAG_OK_ON_STANDBY | CTL_CMD_FLAG_OK_ON_UNAVAIL | - CTL_FLAG_DATA_IN | - CTL_CMD_FLAG_ALLOW_ON_PR_RESV, + CTL_CMD_FLAG_ALLOW_ON_PR_RESV | + CTL_CMD_FLAG_RUN_HERE, CTL_LUN_PAT_NONE, 12, {0, 0xff, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, From owner-svn-src-head@freebsd.org Sat Sep 19 20:12:54 2015 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 E0DA9A05A3F; Sat, 19 Sep 2015 20:12:54 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 D2D4612F6; Sat, 19 Sep 2015 20:12:54 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8JKCsMO077514; Sat, 19 Sep 2015 20:12:54 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8JKCsWu077513; Sat, 19 Sep 2015 20:12:54 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201509192012.t8JKCsWu077513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 19 Sep 2015 20:12:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287995 - head/usr.sbin/ndp X-SVN-Group: head 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.20 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, 19 Sep 2015 20:12:55 -0000 Author: delphij Date: Sat Sep 19 20:12:53 2015 New Revision: 287995 URL: https://svnweb.freebsd.org/changeset/base/287995 Log: 'sin' is never used after assignment. Looking at the context, it seems that it belongs the commented out section of code so make it part of that section. Reported by: clang static analyzer MFC after: 2 weeks Modified: head/usr.sbin/ndp/ndp.c Modified: head/usr.sbin/ndp/ndp.c ============================================================================== --- head/usr.sbin/ndp/ndp.c Sat Sep 19 19:30:55 2015 (r287994) +++ head/usr.sbin/ndp/ndp.c Sat Sep 19 20:12:53 2015 (r287995) @@ -728,9 +728,9 @@ again:; isrouter ? "R" : "", (rtm->rtm_flags & RTF_ANNOUNCE) ? "p" : ""); } else { +#if 0 /* W and P are mystery even for us */ sin = (struct sockaddr_in6 *) (sdl->sdl_len + (char *)sdl); -#if 0 /* W and P are mystery even for us */ snprintf(flgbuf, sizeof(flgbuf), "%s%s%s%s", isrouter ? "R" : "", !IN6_IS_ADDR_UNSPECIFIED(&sin->sin6_addr) ? "P" : "", From owner-svn-src-head@freebsd.org Sat Sep 19 20:27:10 2015 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 0C4D4A05FB5; Sat, 19 Sep 2015 20:27:10 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 F279B1A68; Sat, 19 Sep 2015 20:27:09 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8JKR9xA081919; Sat, 19 Sep 2015 20:27:09 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8JKR9ZY081918; Sat, 19 Sep 2015 20:27:09 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201509192027.t8JKR9ZY081918@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 19 Sep 2015 20:27:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287996 - head/lib/libc/net X-SVN-Group: head 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.20 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, 19 Sep 2015 20:27:10 -0000 Author: jilles Date: Sat Sep 19 20:27:09 2015 New Revision: 287996 URL: https://svnweb.freebsd.org/changeset/base/287996 Log: libc: Consistently call _ioctl() internally, not ioctl(). Modified: head/lib/libc/net/sockatmark.c Modified: head/lib/libc/net/sockatmark.c ============================================================================== --- head/lib/libc/net/sockatmark.c Sat Sep 19 20:12:53 2015 (r287995) +++ head/lib/libc/net/sockatmark.c Sat Sep 19 20:27:09 2015 (r287996) @@ -24,13 +24,15 @@ * * $FreeBSD$ */ +#include "namespace.h" #include +#include "un-namespace.h" int sockatmark(int s) { int atmark; - if (ioctl(s, SIOCATMARK, &atmark) == -1) + if (_ioctl(s, SIOCATMARK, &atmark) == -1) return -1; return atmark; } From owner-svn-src-head@freebsd.org Sat Sep 19 22:56:40 2015 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 739A49CF34B; Sat, 19 Sep 2015 22:56:40 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.allbsd.org", Issuer "RapidSSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8D48B131C; Sat, 19 Sep 2015 22:56:39 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from alph.d.allbsd.org (alph.d.allbsd.org [IPv6:2001:2f0:104:e010:862b:2bff:febc:8956] (may be forged)) (authenticated bits=56) by mail.allbsd.org (8.14.9/8.14.9) with ESMTP id t8JMuNoZ018400 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 20 Sep 2015 07:56:28 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.15.2/8.14.9) with ESMTPA id t8JMuMNE034094; Sun, 20 Sep 2015 07:56:23 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Sat, 19 Sep 2015 14:25:41 +0900 (JST) Message-Id: <20150919.142541.1272999895942073049.hrs@allbsd.org> To: bdrewery@FreeBSD.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r287983 - head/gnu/usr.bin/binutils/ld From: Hiroki Sato In-Reply-To: <201509190353.t8J3rbRe067548@repo.freebsd.org> References: <201509190353.t8J3rbRe067548@repo.freebsd.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Sat_Sep_19_14_25_41_2015_722)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.98.6 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (mail.allbsd.org [IPv6:2001:2f0:104:e001::32]); Sun, 20 Sep 2015 07:56:34 +0900 (JST) X-Spam-Status: No, score=-97.2 required=13.0 tests=CONTENT_TYPE_PRESENT, DATE_IN_PAST_12_24,RCVD_IN_AHBL,RCVD_IN_AHBL_PROXY,RCVD_IN_AHBL_SPAM, RDNS_NONE,USER_IN_WHITELIST autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on gatekeeper.allbsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 19 Sep 2015 22:56:40 -0000 ----Security_Multipart(Sat_Sep_19_14_25_41_2015_722)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Bryan Drewery wrote in <201509190353.t8J3rbRe067548@repo.freebsd.org>: bd> Author: bdrewery bd> Date: Sat Sep 19 03:53:37 2015 bd> New Revision: 287983 bd> URL: https://svnweb.freebsd.org/changeset/base/287983 bd> bd> Log: bd> Replace afterinstall: hack with FILES mechanism. bd> bd> Sponsored by: EMC / Isilon Storage Division bd> bd> Modified: bd> head/gnu/usr.bin/binutils/ld/Makefile bd> bd> Modified: head/gnu/usr.bin/binutils/ld/Makefile bd> ============================================================================== bd> --- head/gnu/usr.bin/binutils/ld/Makefile Sat Sep 19 03:51:19 2015 (r287982) bd> +++ head/gnu/usr.bin/binutils/ld/Makefile Sat Sep 19 03:53:37 2015 (r287983) bd> @@ -45,6 +45,12 @@ LDADD= ${DPADD} bd> CLEANDIRS+= ldscripts bd> CLEANFILES+= ldemul-list.h stringify.sed bd> bd> +FILES= ${LDSCRIPTS:S|^|ldscripts/|} bd> +FILESOWN= ${LIBOWN} bd> +FILESGRP= ${LIBGRP} bd> +FILESMODE= ${LIBMODE} bd> +FILESDIR= ${SCRIPTDIR} bd> + I think LIB{OWN,GRP,MODE} for ldscripts can also be removed because they are not library and the default values for FILES (SHARE{OWN,GRP,MODE}) look reasonable. -- Hiroki ----Security_Multipart(Sat_Sep_19_14_25_41_2015_722)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEABECAAYFAlX88dYACgkQTyzT2CeTzy1NLwCfUUWEFx3oulOgc+YdFFhd81AA 21oAoJMH8tWImyIhdy9nm9nC+e1XdFVr =kdfG -----END PGP SIGNATURE----- ----Security_Multipart(Sat_Sep_19_14_25_41_2015_722)---- From owner-svn-src-head@freebsd.org Sat Sep 19 23:27:23 2015 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 88232A0526A; Sat, 19 Sep 2015 23:27:23 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 7936E12D5; Sat, 19 Sep 2015 23:27:23 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8JNRNGY055718; Sat, 19 Sep 2015 23:27:23 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8JNRN8Y055717; Sat, 19 Sep 2015 23:27:23 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201509192327.t8JNRN8Y055717@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Sat, 19 Sep 2015 23:27:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287997 - head/usr.sbin/inetd X-SVN-Group: head 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.20 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, 19 Sep 2015 23:27:23 -0000 Author: hrs Date: Sat Sep 19 23:27:22 2015 New Revision: 287997 URL: https://svnweb.freebsd.org/changeset/base/287997 Log: - Fix a crash on a rpc entry when an IPv6 address is explicitly specified in -a flag. - Fix a bug that sockaddr_in was used where sockaddr_in6 should have been used. This was not actually harmful because offsetof(struct sockaddr_in, sin_port) is equal to offsetof(struct sockaddr_in6, sin6_port). MFC after: 1 day Modified: head/usr.sbin/inetd/inetd.c Modified: head/usr.sbin/inetd/inetd.c ============================================================================== --- head/usr.sbin/inetd/inetd.c Sat Sep 19 20:27:09 2015 (r287996) +++ head/usr.sbin/inetd/inetd.c Sat Sep 19 23:27:22 2015 (r287997) @@ -1752,8 +1752,6 @@ more: memmove(sep->se_proto, sep->se_proto + 4, strlen(sep->se_proto) + 1 - 4); sep->se_rpc = 1; - memcpy(&sep->se_ctrladdr4, bind_sa4, - sizeof(sep->se_ctrladdr4)); sep->se_rpc_prog = sep->se_rpc_lowvers = sep->se_rpc_highvers = 0; if ((versp = strrchr(sep->se_service, '/'))) { @@ -2130,8 +2128,8 @@ check_loop(const struct sockaddr *sa, co continue; #ifdef INET6 case AF_INET6: - if (((const struct sockaddr_in *)sa)->sin_port == - se2->se_ctrladdr4.sin_port) + if (((const struct sockaddr_in6 *)sa)->sin6_port == + se2->se_ctrladdr6.sin6_port) goto isloop; continue; #endif From owner-svn-src-head@freebsd.org Sat Sep 19 23:48:07 2015 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 940B3A05C1F; Sat, 19 Sep 2015 23:48:07 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 793171C67; Sat, 19 Sep 2015 23:48:07 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8JNm7dw064050; Sat, 19 Sep 2015 23:48:07 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8JNm7NP064049; Sat, 19 Sep 2015 23:48:07 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201509192348.t8JNm7NP064049@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Sat, 19 Sep 2015 23:48:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287998 - head/usr.sbin/inetd X-SVN-Group: head 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.20 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, 19 Sep 2015 23:48:07 -0000 Author: hrs Date: Sat Sep 19 23:48:06 2015 New Revision: 287998 URL: https://svnweb.freebsd.org/changeset/base/287998 Log: - Remove unused union p_un. - Use NI_MAXHOST-long buffer for getnameinfo(). Although INET6_ADDRSTRLEN was designed to hold the longest IPv6 address in IPv4-mapped address format a long time ago, getnameinfo() can return scope identifier in addition to it. MFC after: 1 day Modified: head/usr.sbin/inetd/inetd.c Modified: head/usr.sbin/inetd/inetd.c ============================================================================== --- head/usr.sbin/inetd/inetd.c Sat Sep 19 23:27:22 2015 (r287997) +++ head/usr.sbin/inetd/inetd.c Sat Sep 19 23:48:06 2015 (r287998) @@ -327,16 +327,7 @@ main(int argc, char **argv) struct request_info req; int denied; char *service = NULL; - union { - struct sockaddr peer_un; - struct sockaddr_in peer_un4; - struct sockaddr_in6 peer_un6; - struct sockaddr_storage peer_max; - } p_un; -#define peer p_un.peer_un -#define peer4 p_un.peer_un4 -#define peer6 p_un.peer_un6 -#define peermax p_un.peer_max + struct sockaddr_storage peer; int i; struct addrinfo hints, *res; const char *servname; @@ -656,24 +647,24 @@ main(int argc, char **argv) } else ctrl = sep->se_fd; if (dolog && !ISWRAP(sep)) { - char pname[INET6_ADDRSTRLEN] = "unknown"; + char pname[NI_MAXHOST] = "unknown"; socklen_t sl; - sl = sizeof peermax; + sl = sizeof(peer); if (getpeername(ctrl, (struct sockaddr *) - &peermax, &sl)) { - sl = sizeof peermax; + &peer, &sl)) { + sl = sizeof(peer); if (recvfrom(ctrl, buf, sizeof(buf), MSG_PEEK, - (struct sockaddr *)&peermax, + (struct sockaddr *)&peer, &sl) >= 0) { - getnameinfo((struct sockaddr *)&peermax, - peer.sa_len, + getnameinfo((struct sockaddr *)&peer, + peer.ss_len, pname, sizeof(pname), NULL, 0, NI_NUMERICHOST); } } else { - getnameinfo((struct sockaddr *)&peermax, - peer.sa_len, + getnameinfo((struct sockaddr *)&peer, + peer.ss_len, pname, sizeof(pname), NULL, 0, NI_NUMERICHOST); } @@ -2098,7 +2089,7 @@ inetd_setproctitle(const char *a, int s) { socklen_t size; struct sockaddr_storage ss; - char buf[80], pbuf[INET6_ADDRSTRLEN]; + char buf[80], pbuf[NI_MAXHOST]; size = sizeof(ss); if (getpeername(s, (struct sockaddr *)&ss, &size) == 0) { @@ -2114,7 +2105,7 @@ int check_loop(const struct sockaddr *sa, const struct servtab *sep) { struct servtab *se2; - char pname[INET6_ADDRSTRLEN]; + char pname[NI_MAXHOST]; for (se2 = servtab; se2; se2 = se2->se_next) { if (!se2->se_bi || se2->se_socktype != SOCK_DGRAM) @@ -2328,7 +2319,7 @@ cpmip(const struct servtab *sep, int ctr } } if ((cnt * 60) / (CHTSIZE * CHTGRAN) > sep->se_maxcpm) { - char pname[INET6_ADDRSTRLEN]; + char pname[NI_MAXHOST]; getnameinfo((struct sockaddr *)&rss, ((struct sockaddr *)&rss)->sa_len,