Re: svn commit: r287726 - in head/sys: conf sparc64/pci
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 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r287835 - in head/sys: kern sys
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(_sx); - sysctl_xlock(); + sysctl_wlock(); for (oidp = start; oidp < stop; oidp++) sysctl_register_oid(*oidp); - sysctl_xunlock(); + sysctl_wunlock(); sx_xlock(_sx); } @@ -313,10 +313,10 @@ linker_file_unregister_sysctls(linker_fi return; sx_xunlock(_sx); - sysctl_xlock(); + sysctl_wlock(); for (oidp = start; oidp < stop; oidp++) sysctl_unregister_oid(*oidp); - sysctl_xunlock(); + sysctl_wunlock(); sx_xlock(_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; -#defineSYSCTL_XLOCK() sx_xlock() -#defineSYSCTL_XUNLOCK()sx_xunlock() -#defineSYSCTL_SLOCK() sx_slock() -#defineSYSCTL_SUNLOCK()sx_sunlock() -#defineSYSCTL_XLOCKED()sx_xlocked() -#defineSYSCTL_ASSERT_LOCKED() sx_assert(, SA_LOCKED) -#defineSYSCTL_ASSERT_XLOCKED() sx_assert(, SA_XLOCKED) -#defineSYSCTL_ASSERT_SLOCKED() sx_assert(, SA_SLOCKED) -#defineSYSCTL_INIT() sx_init(, "sysctl lock") +#defineSYSCTL_WLOCK() rm_wlock() +#defineSYSCTL_WUNLOCK()rm_wunlock() +#defineSYSCTL_RLOCK(tracker) rm_rlock(, (tracker)) +#defineSYSCTL_RUNLOCK(tracker) rm_runlock(, (tracker)) +#defineSYSCTL_WLOCKED()rm_wowned() +#defineSYSCTL_ASSERT_LOCKED() rm_assert(, RA_LOCKED) +#defineSYSCTL_ASSERT_WLOCKED() rm_assert(, RA_WLOCKED) +#defineSYSCTL_ASSERT_RLOCKED() rm_assert(, RA_RLOCKED) +#defineSYSCTL_INIT() rm_init_flags(, "sysctl lock", \ + RM_SLEEPABLE) #defineSYSCTL_SLEEP(ch, wmesg, timo) \ - sx_sleep(ch, , 0, wmesg, timo) + rm_sleep(ch, , 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(); +
svn commit: r287836 - head/sys/conf
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 optionalacpi dev/fdt/fdt_arm64.coptionalfdt dev/hwpmc/hwpmc_arm64.coptionalhwpmc dev/hwpmc/hwpmc_arm64_md.c optionalhwpmc +dev/kbd/kbd.c optionalatkbd | sc | ukbd | vt dev/mmc/host/dwmmc.c optionaldwmmc dev/mmc/host/dwmmc_hisi.c optionaldwmmc soc_hisi_hi6220 dev/ofw/ofw_cpu.c optionalfdt ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r287841 - head/sys/x86/acpica
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); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r287844 - head/include
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 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r287848 - head/include
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 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r287837 - head/sys/ofed/drivers/infiniband/core
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(_agent_priv->timed_work); + cancel_delayed_work_sync(_agent_priv->timed_work); spin_lock_irqsave(_priv->reg_lock, flags); remove_mad_reg_req(mad_agent_priv); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r287841 - head/sys/x86/acpica
On Tue, Sep 15, 2015 at 7:02 PM, Bryan Drewerywrote: > 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=286994=287841; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r287841 - head/sys/x86/acpica
On 9/15/2015 6:44 PM, Adrian Chadd wrote: > + !strcmp(hw_vendor, "ASUSTeK Computer Inc.") && Style bug! -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r287842 - head/sbin/ifconfig
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)) < 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)) < 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)) < 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)) < 0) - warn("ioctl (set descr)"); + err(1, "ioctl SIOCSIFDESCR (set descr)"); free(newdescr); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r287841 - head/sys/x86/acpica
Hi, This is definitely mini-project space - we should just have a table and a lookup function to check for the quirk. -adrian ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r287843 - head/usr.sbin/bsdinstall/scripts
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" ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r287833 - head/sys/kern
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_lock_sx); - else + THREAD_NO_SLEEPING(); + } else mtx_lock(>rm_lock_mtx); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r287813 - in head/sys: net netinet netinet6
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.cTue Sep 15 06:22:50 2015(r287812) +++ head/sys/net/if_llatbl.cTue 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); +
svn commit: r287828 - in head/sys/dev/usb: . serial
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 PorterApproved 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/usbdevsTue Sep 15 18:01:59 2015(r287827) +++ head/sys/dev/usb/usbdevsTue 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 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r287827 - in head: sbin/geom/class/nop sys/geom/nop
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, >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;
Re: svn commit: r271946 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront kern net netinet ofed/drivers/net/mlx4 sys
On 15 September 2015 at 11:34, Hans Petter Selaskywrote: > 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 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r271946 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront kern net netinet ofed/drivers/net/mlx4 sys
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 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r271946 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront kern net netinet ofed/drivers/net/mlx4 sys
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 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r287816 - head/sys/cam/ctl
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(_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_lock); + if (io->io_hdr.flags & CTL_FLAG_FAILOVER) { + if (lun) + mtx_unlock(>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_lock); } else { /* ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r271946 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront kern net netinet ofed/drivers/net/mlx4 sys
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. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r287815 - head/sys/netinet
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, _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, _maxpps, 0, + "Maximum number of remotely triggered ARP messages that can be " + "logged per second"); + +#defineARP_LOG(pri, ...) do { \ + if (ppsratecheck(_lastlog, _curpps, arp_maxpps))\ + log((pri), "arp: " __VA_ARGS__);\ +} while (0) + static voidarp_init(void); static voidarpintr(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, _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, _multicast, 0, "accept multicast addresses"); -SYSCTL_INT(_net_link_ether_inet, OID_AUTO, max_log_per_second, - CTLFLAG_RW, _maxpps, 0, - "Maximum number of remotely triggered ARP messages that can be " - "logged per second"); - -#defineARP_LOG(pri, ...) do { \ - if (ppsratecheck(_lastlog, _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
svn commit: r287825 - head/sys/dev/usb/controller
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; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r287820 - head/usr.sbin/i2c
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 MazurekObtained 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, ); 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, ); - 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, ); + 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, ); 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, ); + 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, ); + free(buf); + if (error == -1) { + err_msg = "ioctl: error when write offset"; + goto err1; + } + } + cmd.slave = i2c_opt.addr; error = ioctl(fd, I2CRPTSTART, ); 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, ); - 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, ); +
svn commit: r287821 - head/share/man/man4
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 { -charhook[NG_HOOKSIZ];/* hook associated with event session */ +charhook[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 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r287819 - head/sys/cam/scsi
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.cTue Sep 15 10:42:53 2015 (r287818) +++ head/sys/cam/scsi/scsi_all.cTue 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") }, /*MV */ { SST(0x04, 0x12, SS_RDEF, /* XXX TBD */ Modified: head/sys/cam/scsi/scsi_all.h == --- head/sys/cam/scsi/scsi_all.hTue Sep 15 10:42:53 2015 (r287818) +++ head/sys/cam/scsi/scsi_all.hTue Sep 15 10:57:16 2015 (r287819) @@ -103,6 +103,9 @@ typedef enum { /* The retyable, error action, with table specified error code */ #defineSS_RET SS_RETRY|SSQ_DECREMENT_COUNT|SSQ_PRINT_SENSE +/* Wait for transient error status to change */ +#defineSS_WAIT SS_TUR|SSQ_MANY|SSQ_DECREMENT_COUNT|SSQ_PRINT_SENSE + /* Fatal error action, with table specified error code */ #defineSS_FATALSS_FAIL|SSQ_PRINT_SENSE ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r271946 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront kern net netinet ofed/drivers/net/mlx4 sys
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 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r271946 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront kern net netinet ofed/drivers/net/mlx4 sys
On 15 September 2015 at 04:16, Hans Petter Selaskywrote: > 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 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r287826 - head/sys/netinet6
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 * - * X - * 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 |=
svn commit: r287829 - head/sys/arm64/conf
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 optionsUSB_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 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r287830 - head/sys/netinet
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 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r287831 - in head/sys: kern sys
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.cTue Sep 15 20:04:30 2015(r287830) +++ head/sys/kern/vfs_subr.cTue 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 postvop_reclaim_post vop_reclaim { IN struct vnode *vp; Modified: head/sys/sys/vnode.h == --- head/sys/sys/vnode.hTue Sep 15 20:04:30 2015(r287830) +++ head/sys/sys/vnode.hTue Sep 15 20:22:30 2015(r287831) @@ -781,6 +781,7 @@ voidvop_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); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r287832 - head/sys/netinet
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 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r287824 - head
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 PetrikApproved 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} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r287818 - head/sys/cam/ctl
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(>scsiio.sense_data, >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); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r287822 - head/share/man/man9
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 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r287823 - head/usr.sbin/ctld
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(>l_options); TAILQ_INSERT_TAIL(>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, ) != 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; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to