Re: svn commit: r292275 - in head/sys: net netinet netinet6
> On 16 Dec 2015, at 00:08, Adrian Chadd wrote: > > oops, file a bug at github.com/freebsd/freebsd-wifi-build and I'll fix it > asap. > No worries, it happens: https://github.com/freebsd/freebsd-wifi-build/issues/68 This fixed the problem for me: diff --git a/build/bin/build_mfsroot b/build/bin/build_mfsroot index 2c1f0f4..733f1fb 100755 --- a/build/bin/build_mfsroot +++ b/build/bin/build_mfsroot @@ -267,6 +267,7 @@ ${INSTALL_DEF_FILE} ${X_BASEDIR}/files/pf.conf ${X_STAGING_FSROOT}/c/etc/ # networking ${INSTALL_DEF_BIN} ${X_DESTDIR}/sbin/ifconfig ${X_STAGING_FSROOT}/sbin/ +${INSTALL_DEF_LIB} ${X_DESTDIR}/lib/lib80211.so.1 ${X_STAGING_FSROOT}/lib ${INSTALL_DEF_BIN} ${X_DESTDIR}/sbin/route ${X_STAGING_FSROOT}/sbin/ ${INSTALL_DEF_BIN} ${X_DESTDIR}/sbin/ping ${X_STAGING_FSROOT}/sbin/ ${INSTALL_DEF_BIN} ${X_DESTDIR}/sbin/ping6 ${X_STAGING_FSROOT}/sbin/ Steven, With this patch and the hack in my previous e-mail my TPLink boots correctly and works as expected. Regards, Kristof ___ 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: r292275 - in head/sys: net netinet netinet6
15.12.2015, 19:02, "Steven Hartland" : > Author: smh > Date: Tue Dec 15 16:02:11 2015 > New Revision: 292275 > URL: https://svnweb.freebsd.org/changeset/base/292275 > > Log: > Fix lagg failover due to missing notifications > > When using lagg failover mode neither Gratuitous ARP (IPv4) or Unsolicited > Neighbour Advertisements (IPv6) are sent to notify other nodes that the > address may have moved. > > This results is slow failover, dropped packets and network outages for the > lagg interface when the primary link goes down. > > We now use the new if_link_state_change_cond with the force param set to > allow lagg to force through link state changes and hence fire a > ifnet_link_event which are now monitored by rip and nd6. > > Upon receiving these events each protocol trigger the relevant > notifications: > * inet4 => Gratuitous ARP > * inet6 => Unsolicited Neighbour Announce Steven, I believe that having DELAY() called inside callout routine is incorrect - you are delaying other consumers for arbitrary amount of time. If you really want to do it that way you should create separate taskqueue for that. Also, destroying interface while doing these DELAYs would very likely crash the system :"#define IN6_MAX_ANYCAST_DELAY_TIME_MS 100" is misguiding There are some style(9) issues like lack of empty line between nd6_init() and nd6_ifnet_link_event() ... > > This also fixes the carp IPv6 NA's that stopped working after r251584 which > added the ipv6_route__llma route. > > The new behavour can be controlled using the sysctls: > * net.link.ether.inet.arp_on_link > * net.inet6.icmp6.nd6_on_link > > Also removed unused param from lagg_port_state and added descriptions for > the > sysctls while here. > > PR: 156226 > MFC after: 1 month > Sponsored by: Multiplay > Differential Revision: https://reviews.freebsd.org/D4111 > > Modified: > head/sys/net/if.c > head/sys/net/if_lagg.c > head/sys/net/if_lagg.h > head/sys/net/if_var.h > head/sys/netinet/if_ether.c > head/sys/netinet/if_ether.h > head/sys/netinet/in_var.h > head/sys/netinet/ip_carp.c > head/sys/netinet6/in6.c > head/sys/netinet6/in6_var.h > head/sys/netinet6/nd6.c > head/sys/netinet6/nd6.h > head/sys/netinet6/nd6_nbr.c > > Modified: head/sys/net/if.c > == > --- head/sys/net/if.c Tue Dec 15 15:48:03 2015 (r292274) > +++ head/sys/net/if.c Tue Dec 15 16:02:11 2015 (r292275) > @@ -126,7 +126,7 @@ SX_SYSINIT(ifdescr_sx, &ifdescr_sx, "ifn > > void (*bridge_linkstate_p)(struct ifnet *ifp); > void (*ng_ether_link_state_p)(struct ifnet *ifp, int state); > -void (*lagg_linkstate_p)(struct ifnet *ifp, int state); > +void (*lagg_linkstate_p)(struct ifnet *ifp); > /* These are external hooks for CARP. */ > void (*carp_linkstate_p)(struct ifnet *ifp); > void (*carp_demote_adj_p)(int, char *); > @@ -1984,6 +1984,8 @@ if_unroute(struct ifnet *ifp, int flag, > > if (ifp->if_carp) > (*carp_linkstate_p)(ifp); > + if (ifp->if_lagg) > + (*lagg_linkstate_p)(ifp); > rt_ifmsg(ifp); > } > > @@ -2005,6 +2007,8 @@ if_route(struct ifnet *ifp, int flag, in > pfctlinput(PRC_IFUP, ifa->ifa_addr); > if (ifp->if_carp) > (*carp_linkstate_p)(ifp); > + if (ifp->if_lagg) > + (*lagg_linkstate_p)(ifp); > rt_ifmsg(ifp); > #ifdef INET6 > in6_if_up(ifp); > @@ -2019,17 +2023,27 @@ int (*vlan_tag_p)(struct ifnet *, uint16 > int (*vlan_setcookie_p)(struct ifnet *, void *); > void *(*vlan_cookie_p)(struct ifnet *); > > +void > +if_link_state_change(struct ifnet *ifp, int link_state) > +{ > + > + return if_link_state_change_cond(ifp, link_state, 0); > +} > + > /* > * Handle a change in the interface link state. To avoid LORs > * between driver lock and upper layer locks, as well as possible > * recursions, we post event to taskqueue, and all job > * is done in static do_link_state_change(). > + * > + * If the current link state matches link_state and force isn't > + * specified no action is taken. > */ > void > -if_link_state_change(struct ifnet *ifp, int link_state) > +if_link_state_change_cond(struct ifnet *ifp, int link_state, int force) > { > - /* Return if state hasn't changed. */ > - if (ifp->if_link_state == link_state) > + > + if (ifp->if_link_state == link_state && !force) > return; > > ifp->if_link_state = link_state; > @@ -2057,7 +2071,7 @@ do_link_state_change(void *arg, int pend > if (ifp->if_bridge) > (*bridge_linkstate_p)(ifp); > if (ifp->if_lagg) > - (*lagg_linkstate_p)(ifp, link_state); > + (*lagg_linkstate_p)(ifp); > > if (IS_DEFAULT_VNET(curvnet)) > devctl_notify("IFNET", ifp->if_xname, > > Modified: head/sys/net/if_lagg.c > == > --- head/sys/net/i
Re: svn commit: r292299 - head/sys/kern
On Wed, Dec 16, 2015 at 12:13:16AM +, Adrian Chadd wrote: > Author: adrian > Date: Wed Dec 16 00:13:16 2015 > New Revision: 292299 > URL: https://svnweb.freebsd.org/changeset/base/292299 > > Log: > Don't call wakeup if we're just returning reserved space; just > return the reservation and wait for more space to appear. Issue which is supposedly fixed by the commit is not due to the possibly excessive wakeups. bufspace_release() and bufspace_wakeup() clear the needsbuffer variable, while the code flow in getnewbuf() calls bufspace_wait() to wait for the condition, which prevented the buffer allocation from succeeding, to pass. > > Submitted by: jeff > Reviewed by:kib > > Modified: > head/sys/kern/vfs_bio.c > > Modified: head/sys/kern/vfs_bio.c > == > --- head/sys/kern/vfs_bio.c Wed Dec 16 00:09:57 2015(r292298) > +++ head/sys/kern/vfs_bio.c Wed Dec 16 00:13:16 2015(r292299) > @@ -2909,7 +2909,7 @@ getnewbuf(struct vnode *vp, int slpflag, > } while(buf_scan(false) == 0); > > if (reserved) > - bufspace_release(maxsize); > + atomic_subtract_long(&bufspace, maxsize); > if (bp != NULL) { > bp->b_flags |= B_INVAL; > brelse(bp); ___ 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: r292334 - head/sys/arm/arm
Author: skra Date: Wed Dec 16 10:55:19 2015 New Revision: 292334 URL: https://svnweb.freebsd.org/changeset/base/292334 Log: Adopt assert from amd64 in pmap_remove_pages(). Suggested by: kib Approved by: kib (mentor) Modified: head/sys/arm/arm/pmap-v6-new.c Modified: head/sys/arm/arm/pmap-v6-new.c == --- head/sys/arm/arm/pmap-v6-new.c Wed Dec 16 10:14:16 2015 (r292333) +++ head/sys/arm/arm/pmap-v6-new.c Wed Dec 16 10:55:19 2015 (r292334) @@ -4153,10 +4153,25 @@ pmap_remove_pages(pmap_t pmap) uint32_t inuse, bitmask; boolean_t allfree; - if (pmap != vmspace_pmap(curthread->td_proc->p_vmspace)) { - printf("warning: %s called with non-current pmap\n", __func__); - return; + /* +* Assert that the given pmap is only active on the current +* CPU. Unfortunately, we cannot block another CPU from +* activating the pmap while this function is executing. +*/ + KASSERT(pmap == vmspace_pmap(curthread->td_proc->p_vmspace), + ("%s: non-current pmap %p", __func__, pmap)); +#if defined(SMP) && defined(INVARIANTS) + { + cpuset_t other_cpus; + + sched_pin(); + other_cpus = pmap->pm_active; + CPU_CLR(PCPU_GET(cpuid), &other_cpus); + sched_unpin(); + KASSERT(CPU_EMPTY(&other_cpus), + ("%s: pmap %p active on other cpus", __func__, pmap)); } +#endif SLIST_INIT(&free); rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); ___ 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: r292333 - in head: sys/net sys/netinet6 usr.sbin/ndp
Author: melifaro Date: Wed Dec 16 10:14:16 2015 New Revision: 292333 URL: https://svnweb.freebsd.org/changeset/base/292333 Log: Provide additional lle data in IPv6 lltable dump used by ndp(8). Before the change, things like lle state were queried via SIOCGNBRINFO_IN6 by ndp(8) for _each_ lle entry in dump. This ioctl was added in 1999, probably to avoid touching rtsock code. This change maps SIOCGNBRINFO_IN6 data to standard rtsock dump the following way: expire (already) maps to rtm_rmx.rmx_expire isrouter -> rtm_flags & RTF_GATEWAY asked -> rtm_rmx.rmx_pksent state -> rtm_rmx.rmx_state (maps to rmx_weight via define) Reviewed by: ae Modified: head/sys/net/route.h head/sys/netinet6/in6.c head/sys/netinet6/nd6.c head/usr.sbin/ndp/ndp.c Modified: head/sys/net/route.h == --- head/sys/net/route.hWed Dec 16 09:20:45 2015(r292332) +++ head/sys/net/route.hWed Dec 16 10:14:16 2015(r292333) @@ -83,6 +83,9 @@ struct rt_metrics { #defineRTM_RTTUNIT 100 /* units for rtt, rttvar, as units per sec */ #defineRTTTOPRHZ(r)((r) / (RTM_RTTUNIT / PR_SLOWHZ)) +/* lle state is exported in rmx_state rt_metrics field */ +#definermx_state rmx_weight + #defineRT_DEFAULT_FIB 0 /* Explicitly mark fib=0 restricted cases */ #defineRT_ALL_FIBS -1 /* Announce event for every fib */ #ifdef _KERNEL Modified: head/sys/netinet6/in6.c == --- head/sys/netinet6/in6.c Wed Dec 16 09:20:45 2015(r292332) +++ head/sys/netinet6/in6.c Wed Dec 16 10:14:16 2015(r292333) @@ -2359,13 +2359,20 @@ in6_lltable_dump_entry(struct lltable *l sdl->sdl_index = ifp->if_index; sdl->sdl_type = ifp->if_type; bcopy(&lle->ll_addr, LLADDR(sdl), ifp->if_addrlen); - ndpc.rtm.rtm_rmx.rmx_expire = lle->la_expire + - lle->lle_remtime / hz; + if (lle->la_expire != 0) + ndpc.rtm.rtm_rmx.rmx_expire = lle->la_expire + + lle->lle_remtime / hz + + time_second - time_uptime; ndpc.rtm.rtm_flags |= (RTF_HOST | RTF_LLDATA); if (lle->la_flags & LLE_STATIC) ndpc.rtm.rtm_flags |= RTF_STATIC; if (lle->la_flags & LLE_IFADDR) ndpc.rtm.rtm_flags |= RTF_PINNED; + if (lle->ln_router != 0) + ndpc.rtm.rtm_flags |= RTF_GATEWAY; + ndpc.rtm.rtm_rmx.rmx_pksent = lle->la_asked; + /* Store state in rmx_weight value */ + ndpc.rtm.rtm_rmx.rmx_state = lle->ln_state; ndpc.rtm.rtm_index = ifp->if_index; error = SYSCTL_OUT(wr, &ndpc, sizeof(ndpc)); Modified: head/sys/netinet6/nd6.c == --- head/sys/netinet6/nd6.c Wed Dec 16 09:20:45 2015(r292332) +++ head/sys/netinet6/nd6.c Wed Dec 16 10:14:16 2015(r292333) @@ -1748,7 +1748,7 @@ nd6_ioctl(u_long cmd, caddr_t data, stru if (ln->la_expire == 0) nbi->expire = 0; else - nbi->expire = ln->la_expire + + nbi->expire = ln->la_expire + ln->lle_remtime / hz + (time_second - time_uptime); LLE_RUNLOCK(ln); break; Modified: head/usr.sbin/ndp/ndp.c == --- head/usr.sbin/ndp/ndp.c Wed Dec 16 09:20:45 2015(r292332) +++ head/usr.sbin/ndp/ndp.c Wed Dec 16 10:14:16 2015(r292333) @@ -563,8 +563,8 @@ dump(struct sockaddr_in6 *addr, int cfla struct sockaddr_in6 *sin; struct sockaddr_dl *sdl; extern int h_errno; - struct in6_nbrinfo *nbi; struct timeval now; + u_long expire; int addrwidth; int llwidth; int ifwidth; @@ -676,52 +676,46 @@ again:; llwidth, llwidth, ether_str(sdl), ifwidth, ifwidth, ifname); /* Print neighbor discovery specific information */ - nbi = getnbrinfo(&sin->sin6_addr, sdl->sdl_index, 1); - if (nbi) { - if (nbi->expire > now.tv_sec) { - printf(" %-9.9s", - sec2str(nbi->expire - now.tv_sec)); - } else if (nbi->expire == 0) - printf(" %-9.9s", "permanent"); -
Re: svn commit: r292275 - in head/sys: net netinet netinet6
On 15/12/2015 22:58, Kristof Provost wrote: On 15 Dec 2015, at 23:15, Kristof Provost wrote: Based on the arp_announce() in the backtrace this commit looks like a possible cause. I see this in arp_announce(): KP: arp_announce() ifp->if_addr = 0 So that explains why we panic in 'lladdr = IF_LLADDR(ifp);’. I’ve done a very quick hack: diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 2214542..9b25356 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -1246,9 +1246,15 @@ arp_announce(struct ifnet *ifp) } IF_ADDR_RUNLOCK(ifp); - lladdr = IF_LLADDR(ifp); - for (i = 0; i < cnt; i++) { - arp_announce_addr(ifp, head + i, lladdr); + printf("KP: %s() ifp = %p\n", __FUNCTION__, ifp); + printf("KP: %s() ifp->if_addr = %p\n", __FUNCTION__, ifp->if_addr); + + if (ifp->if_addr) { + printf("KP: %s() ifp->if_addr->ifa_addr = %p\n", __FUNCTION__, ifp->if_addr->ifa_addr); + lladdr = IF_LLADDR(ifp); + for (i = 0; i < cnt; i++) { + arp_announce_addr(ifp, head + i, lladdr); + } } free(head, M_TEMP); } With this patch the device boots. I haven’t been able to verify if everything works because of a different issue ("Shared object "lib80211.so.1" not found, required by “ifconfig””, no doubt just a small problem with the freebsd-wifi-build scripts). Regards, Kristof Thanks for all the info Kristof appreciated. It seems really odd that you're getting a link up event for an interface that doesn't have a LLA, so I'm wondering if this is the result of an issue elsewhere which this change brings to light, its as though if_attach hasn't been called. Looking at your trace the device seems to be an arswitch. If it never allocates a LLA to each port then maybe the more correct fix would be to ensure it IFF_NOARP in if_flags? I've attached a patch which should fix if you could test that would be great, but I'd still like to understand if there is something wrong elsewhere before I do. Regards Steve Index: sys/netinet/if_ether.c === --- sys/netinet/if_ether.c (revision 292275) +++ sys/netinet/if_ether.c (working copy) @@ -1209,7 +1209,8 @@ arp_announce(struct ifnet *ifp) struct ifaddr *ifa; struct in_addr *addr, *head; - if (!(ifp->if_flags & IFF_UP) || (ifp->if_flags & IFF_NOARP)) + if (!(ifp->if_flags & IFF_UP) || (ifp->if_flags & IFF_NOARP) || + ifp->if_addr == NULL) return; entries = 8; @@ -1246,9 +1247,11 @@ arp_announce(struct ifnet *ifp) } IF_ADDR_RUNLOCK(ifp); - lladdr = IF_LLADDR(ifp); - for (i = 0; i < cnt; i++) { - arp_announce_addr(ifp, head + i, lladdr); + if (cnt > 0) { + lladdr = IF_LLADDR(ifp); + for (i = 0; i < cnt; i++) { + arp_announce_addr(ifp, head + i, lladdr); + } } free(head, M_TEMP); } ___ 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: r292331 - head/sys/net
Author: melifaro Date: Wed Dec 16 09:18:20 2015 New Revision: 292331 URL: https://svnweb.freebsd.org/changeset/base/292331 Log: Convert if_stf(4) to new routing api. Modified: head/sys/net/if_stf.c Modified: head/sys/net/if_stf.c == --- head/sys/net/if_stf.c Wed Dec 16 09:17:07 2015(r292330) +++ head/sys/net/if_stf.c Wed Dec 16 09:18:20 2015(r292331) @@ -101,6 +101,7 @@ #include #include +#include #include #include #include @@ -557,26 +558,13 @@ stf_checkaddr4(struct stf_softc *sc, str * perform ingress filter */ if (sc && (STF2IFP(sc)->if_flags & IFF_LINK2) == 0 && inifp) { - struct sockaddr_in sin; - struct rtentry *rt; + struct nhop4_basic nh4; - bzero(&sin, sizeof(sin)); - sin.sin_family = AF_INET; - sin.sin_len = sizeof(struct sockaddr_in); - sin.sin_addr = *in; - rt = rtalloc1_fib((struct sockaddr *)&sin, 0, - 0UL, sc->sc_fibnum); - if (!rt || rt->rt_ifp != inifp) { -#if 0 - log(LOG_WARNING, "%s: packet from 0x%x dropped " - "due to ingress filter\n", if_name(STF2IFP(sc)), - (u_int32_t)ntohl(sin.sin_addr.s_addr)); -#endif - if (rt) - RTFREE_LOCKED(rt); - return -1; - } - RTFREE_LOCKED(rt); + if (fib4_lookup_nh_basic(sc->sc_fibnum, *in, 0, 0, &nh4) != 0) + return (-1); + + if (nh4.nh_ifp != inifp) + return (-1); } return 0; ___ 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: r292328 - in head: lib/msun/tests tools/regression/lib/msun
Author: ngie Date: Wed Dec 16 09:11:11 2015 New Revision: 292328 URL: https://svnweb.freebsd.org/changeset/base/292328 Log: Integrate a number of testcases from tools/regression/lib/msun into the FreeBSD test suite There's no functional change with these testcases; they're purposely being left in TAP format for the time being Other testcases which crash on amd64/i386 as-is have not been integrated yet (they need to be retested on a later version of CURRENT, as I haven't used i386 in some time) MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division Added: head/lib/msun/tests/cexp_test.c - copied unchanged from r292327, head/tools/regression/lib/msun/test-cexp.c head/lib/msun/tests/conj_test.c - copied unchanged from r292327, head/tools/regression/lib/msun/test-conj.c head/lib/msun/tests/csqrt_test.c - copied unchanged from r292327, head/tools/regression/lib/msun/test-csqrt.c head/lib/msun/tests/fenv_test.c - copied unchanged from r292327, head/tools/regression/lib/msun/test-fenv.c head/lib/msun/tests/fmaxmin_test.c - copied unchanged from r292327, head/tools/regression/lib/msun/test-fmaxmin.c head/lib/msun/tests/ilogb_test.c - copied unchanged from r292327, head/tools/regression/lib/msun/test-ilogb.c head/lib/msun/tests/invctrig_test.c - copied unchanged from r292327, head/tools/regression/lib/msun/test-invctrig.c head/lib/msun/tests/logarithm_test.c - copied unchanged from r292327, head/tools/regression/lib/msun/test-logarithm.c head/lib/msun/tests/lrint_test.c - copied unchanged from r292327, head/tools/regression/lib/msun/test-lrint.c head/lib/msun/tests/nan_test.c - copied unchanged from r292327, head/tools/regression/lib/msun/test-nan.c head/lib/msun/tests/nearbyint_test.c - copied unchanged from r292327, head/tools/regression/lib/msun/test-nearbyint.c head/lib/msun/tests/next_test.c - copied unchanged from r292327, head/tools/regression/lib/msun/test-next.c head/lib/msun/tests/rem_test.c - copied unchanged from r292327, head/tools/regression/lib/msun/test-rem.c head/lib/msun/tests/trig_test.c - copied unchanged from r292327, head/tools/regression/lib/msun/test-trig.c Deleted: head/tools/regression/lib/msun/test-cexp.c head/tools/regression/lib/msun/test-cexp.t head/tools/regression/lib/msun/test-conj.c head/tools/regression/lib/msun/test-conj.t head/tools/regression/lib/msun/test-csqrt.c head/tools/regression/lib/msun/test-csqrt.t head/tools/regression/lib/msun/test-fenv.c head/tools/regression/lib/msun/test-fenv.t head/tools/regression/lib/msun/test-fmaxmin.c head/tools/regression/lib/msun/test-fmaxmin.t head/tools/regression/lib/msun/test-ilogb.c head/tools/regression/lib/msun/test-ilogb.t head/tools/regression/lib/msun/test-invctrig.c head/tools/regression/lib/msun/test-logarithm.c head/tools/regression/lib/msun/test-logarithm.t head/tools/regression/lib/msun/test-lrint.c head/tools/regression/lib/msun/test-lrint.t head/tools/regression/lib/msun/test-nan.c head/tools/regression/lib/msun/test-nan.t head/tools/regression/lib/msun/test-nearbyint.c head/tools/regression/lib/msun/test-nearbyint.t head/tools/regression/lib/msun/test-next.c head/tools/regression/lib/msun/test-next.t head/tools/regression/lib/msun/test-rem.c head/tools/regression/lib/msun/test-rem.t head/tools/regression/lib/msun/test-trig.c head/tools/regression/lib/msun/test-trig.t Modified: head/lib/msun/tests/Makefile head/tools/regression/lib/msun/Makefile Modified: head/lib/msun/tests/Makefile == --- head/lib/msun/tests/MakefileWed Dec 16 08:53:24 2015 (r292327) +++ head/lib/msun/tests/MakefileWed Dec 16 09:11:11 2015 (r292328) @@ -36,11 +36,34 @@ NETBSD_ATF_TESTS_C+=sqrt_test NETBSD_ATF_TESTS_C+= tan_test NETBSD_ATF_TESTS_C+= tanh_test +TAP_TESTS_C+= cexp_test +TAP_TESTS_C+= conj_test +TAP_TESTS_C+= csqrt_test +TAP_TESTS_C+= fenv_test +TAP_TESTS_C+= fmaxmin_test +TAP_TESTS_C+= ilogb_test +TAP_TESTS_C+= invctrig_test +TAP_TESTS_C+= logarithm_test +TAP_TESTS_C+= lrint_test +TAP_TESTS_C+= nan_test +TAP_TESTS_C+= nearbyint_test +TAP_TESTS_C+= next_test +TAP_TESTS_C+= rem_test +TAP_TESTS_C+= trig_test + +.for t in ${TAP_TESTS_C} +CFLAGS.$t+=-O0 +CFLAGS.$t+=-I${SRCTOP}/tools/regression/lib/msun +.endfor + CSTD= c99 -LIBADD+= m #COPTS+= -Wfloat-equal +IGNORE_PRAGMA= + +LIBADD+= m + # Copied from lib/msun/Makefile .if ${MACHINE_CPUARCH} == "i386" ARCH_SUBDIR= i387 Copied: head/lib/msun/tests/cexp_test.c (from r292327, head/tools/regression/lib/msun/test-cexp.c) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/tests/cexp_test.c Wed Dec 16 09:11:
svn commit: r292329 - head/sys/netinet
Author: melifaro Date: Wed Dec 16 09:16:06 2015 New Revision: 292329 URL: https://svnweb.freebsd.org/changeset/base/292329 Log: Fix ARP reply handling changed in r286955. If source of ARP request didn't pass the routing check (e.g. not in directly connected network), be polite and still answer the request instead of dropping frame. Reported by: quadro at irc@rusnet Modified: head/sys/netinet/if_ether.c Modified: head/sys/netinet/if_ether.c == --- head/sys/netinet/if_ether.c Wed Dec 16 09:11:11 2015(r292328) +++ head/sys/netinet/if_ether.c Wed Dec 16 09:16:06 2015(r292329) @@ -855,12 +855,20 @@ match: arp_check_update_lle(ah, isaddr, ifp, bridged, la); else if (itaddr.s_addr == myaddr.s_addr) { /* -* Reply to our address, but no lle exists yet. -* do we really have to create an entry? +* Request/reply to our address, but no lle exists yet. +* Try to create new llentry. */ la = lltable_alloc_entry(LLTABLE(ifp), 0, dst); - if (la == NULL) - goto drop; + if (la == NULL) { + + /* +* lle creation may fail if source address belongs +* to non-directly connected subnet. However, we +* will try to answer the request instead of dropping +* frame. +*/ + goto reply; + } lltable_set_entry_addr(ifp, la, ar_sha(ah)); IF_AFDATA_WLOCK(ifp); ___ 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: r292324 - head/lib/libc/tests
Author: ngie Date: Wed Dec 16 08:25:12 2015 New Revision: 292324 URL: https://svnweb.freebsd.org/changeset/base/292324 Log: Iterate down lib/libc/tests/nss... MFC after: 1 week X-MFC with: r292323 Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/tests/Makefile Modified: head/lib/libc/tests/Makefile == --- head/lib/libc/tests/MakefileWed Dec 16 08:09:03 2015 (r292323) +++ head/lib/libc/tests/MakefileWed Dec 16 08:25:12 2015 (r292324) @@ -10,6 +10,7 @@ TESTS_SUBDIRS+= gen TESTS_SUBDIRS+=hash TESTS_SUBDIRS+=inet TESTS_SUBDIRS+=net +TESTS_SUBDIRS+=nss TESTS_SUBDIRS+=regex TESTS_SUBDIRS+=resolv TESTS_SUBDIRS+=rpc ___ 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: r292332 - head/lib/libfetch
Author: des Date: Wed Dec 16 09:20:45 2015 New Revision: 292332 URL: https://svnweb.freebsd.org/changeset/base/292332 Log: As a followup to r292330, standardize on size_t and add a few comments. Modified: head/lib/libfetch/http.c Modified: head/lib/libfetch/http.c == --- head/lib/libfetch/http.cWed Dec 16 09:18:20 2015(r292331) +++ head/lib/libfetch/http.cWed Dec 16 09:20:45 2015(r292332) @@ -130,8 +130,8 @@ struct httpio int chunked; /* chunked mode */ char*buf; /* chunk buffer */ size_t bufsize; /* size of chunk buffer */ - ssize_t buflen;/* amount of data currently in buffer */ - int bufpos;/* current read offset in buffer */ + size_t buflen;/* amount of data currently in buffer */ + size_t bufpos;/* current read offset in buffer */ int eof; /* end-of-file flag */ int error; /* error flag */ size_t chunksize; /* remaining size of current chunk */ @@ -215,6 +215,7 @@ http_fillbuf(struct httpio *io, size_t l if (io->eof) return (0); + /* not chunked: just fetch the requested amount */ if (io->chunked == 0) { if (http_growbuf(io, len) == -1) return (-1); @@ -227,6 +228,7 @@ http_fillbuf(struct httpio *io, size_t l return (io->buflen); } + /* chunked, but we ran out: get the next chunk header */ if (io->chunksize == 0) { switch (http_new_chunk(io)) { case -1: @@ -238,6 +240,7 @@ http_fillbuf(struct httpio *io, size_t l } } + /* fetch the requested amount, but no more than the current chunk */ if (len > io->chunksize) len = io->chunksize; if (http_growbuf(io, len) == -1) ___ 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: r292326 - in head/sys: kern sys
Author: kib Date: Wed Dec 16 08:48:37 2015 New Revision: 292326 URL: https://svnweb.freebsd.org/changeset/base/292326 Log: Optimize vop_stdadvise(POSIX_FADV_DONTNEED). Instead of looking up a buffer for each block number in the range with gbincore(), look up the next instantiated buffer with the logical block number which is greater or equal to the next lblkno. This significantly speeds up the iteration for sparce-populated range. Move the iteration into new helper bnoreuselist(), which is structured similarly to flushbuflist(). Reported and tested by: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/vfs_default.c head/sys/kern/vfs_subr.c head/sys/sys/vnode.h Modified: head/sys/kern/vfs_default.c == --- head/sys/kern/vfs_default.c Wed Dec 16 08:39:51 2015(r292325) +++ head/sys/kern/vfs_default.c Wed Dec 16 08:48:37 2015(r292326) @@ -1034,10 +1034,9 @@ vop_stdallocate(struct vop_allocate_args int vop_stdadvise(struct vop_advise_args *ap) { - struct buf *bp; - struct buflists *bl; struct vnode *vp; - daddr_t bn, startn, endn; + struct bufobj *bo; + daddr_t startn, endn; off_t start, end; int bsize, error; @@ -1074,36 +1073,21 @@ vop_stdadvise(struct vop_advise_args *ap VM_OBJECT_WUNLOCK(vp->v_object); } - BO_RLOCK(&vp->v_bufobj); + bo = &vp->v_bufobj; + BO_RLOCK(bo); bsize = vp->v_bufobj.bo_bsize; startn = ap->a_start / bsize; - endn = -1; - bl = &vp->v_bufobj.bo_clean.bv_hd; - if (!TAILQ_EMPTY(bl)) - endn = TAILQ_LAST(bl, buflists)->b_lblkno; - bl = &vp->v_bufobj.bo_dirty.bv_hd; - if (!TAILQ_EMPTY(bl) && - endn < TAILQ_LAST(bl, buflists)->b_lblkno) - endn = TAILQ_LAST(bl, buflists)->b_lblkno; - if (ap->a_end != OFF_MAX && endn != -1) - endn = ap->a_end / bsize; - BO_RUNLOCK(&vp->v_bufobj); - /* -* In the VMIO case, use the B_NOREUSE flag to hint that the -* pages backing each buffer in the range are unlikely to be -* reused. Dirty buffers will have the hint applied once -* they've been written. -*/ - for (bn = startn; bn <= endn; bn++) { - bp = getblk(vp, bn, bsize, 0, 0, GB_NOCREAT | - GB_UNMAPPED); - if (bp == NULL) + endn = ap->a_end / bsize; + for (;;) { + error = bnoreuselist(&bo->bo_clean, bo, startn, endn); + if (error == EAGAIN) continue; - bp->b_flags |= B_RELBUF; - if (vp->v_object != NULL) - bp->b_flags |= B_NOREUSE; - brelse(bp); + error = bnoreuselist(&bo->bo_dirty, bo, startn, endn); + if (error == EAGAIN) + continue; + break; } + BO_RUNLOCK(bo); VOP_UNLOCK(vp, 0); break; default: Modified: head/sys/kern/vfs_subr.c == --- head/sys/kern/vfs_subr.cWed Dec 16 08:39:51 2015(r292325) +++ head/sys/kern/vfs_subr.cWed Dec 16 08:48:37 2015(r292326) @@ -1660,6 +1660,45 @@ flushbuflist(struct bufv *bufv, int flag return (retval); } +int +bnoreuselist(struct bufv *bufv, struct bufobj *bo, daddr_t startn, daddr_t endn) +{ + struct buf *bp; + int error; + daddr_t lblkno; + + ASSERT_BO_LOCKED(bo); + + for (lblkno = startn;; lblkno++) { + bp = BUF_PCTRIE_LOOKUP_GE(&bufv->bv_root, lblkno); + if (bp == NULL || bp->b_lblkno >= endn) + break; + error = BUF_TIMELOCK(bp, LK_EXCLUSIVE | LK_SLEEPFAIL | + LK_INTERLOCK, BO_LOCKPTR(bo), "brlsfl", 0, 0); + if (error != 0) { + BO_RLOCK(bo); + return (error != ENOLCK ? error : EAGAIN); + } + KASSERT(bp->b_bufobj == bo, + ("bp %p wrong b_bufobj %p should be %p", + bp, bp->b_bufobj, bo)); + if ((bp->b_flags & B_MANAGED) == 0) + bremfree(bp); + bp->b_flags |= B_RELBUF; + /* +* In the VMIO case, use the B_NOREUSE flag to hint that the +* pages backing each buffer in the range are unlikely t
svn commit: r292330 - head/lib/libfetch
Author: des Date: Wed Dec 16 09:17:07 2015 New Revision: 292330 URL: https://svnweb.freebsd.org/changeset/base/292330 Log: Reset bufpos to 0 immediately after refilling the buffer. Otherwise, we risk leaving the connection in an indeterminate state if the server fails to send a chunk delimiter. Depending on the application and on the sizes of the preceding chunks, the result can be anything from missing data to a segfault. With this patch, it will be reported as a protocol error. PR: 204771 MFC after:1 week Modified: head/lib/libfetch/http.c Modified: head/lib/libfetch/http.c == --- head/lib/libfetch/http.cWed Dec 16 09:16:06 2015(r292329) +++ head/lib/libfetch/http.cWed Dec 16 09:17:07 2015(r292330) @@ -246,8 +246,9 @@ http_fillbuf(struct httpio *io, size_t l io->error = errno; return (-1); } + io->bufpos = 0; io->buflen = nbytes; - io->chunksize -= io->buflen; + io->chunksize -= nbytes; if (io->chunksize == 0) { if (fetch_read(io->conn, &ch, 1) != 1 || ch != '\r' || @@ -255,8 +256,6 @@ http_fillbuf(struct httpio *io, size_t l return (-1); } - io->bufpos = 0; - return (io->buflen); } ___ 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: r292325 - head/sys/kern
Author: kib Date: Wed Dec 16 08:39:51 2015 New Revision: 292325 URL: https://svnweb.freebsd.org/changeset/base/292325 Log: Simplify the loop step in the flushbuflist() and make it independed on the type stability of the buffers memory. Instead of memoizing pointer to the next buffer and validating it, remember the next logical block number in the bo list and re-lookup. Reviewed by: markj Tested by:pho Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c == --- head/sys/kern/vfs_subr.cWed Dec 16 08:25:12 2015(r292324) +++ head/sys/kern/vfs_subr.cWed Dec 16 08:39:51 2015(r292325) @@ -1652,10 +1652,9 @@ flushbuflist(struct bufv *bufv, int flag bp->b_flags &= ~B_ASYNC; brelse(bp); BO_LOCK(bo); - if (nbp != NULL && - (nbp->b_bufobj != bo || -nbp->b_lblkno != lblkno || -(nbp->b_xflags & (BX_VNDIRTY | BX_VNCLEAN)) != xflags)) + nbp = gbincore(bo, lblkno); + if (nbp == NULL || (nbp->b_xflags & (BX_VNDIRTY | BX_VNCLEAN)) + != xflags) break; /* nbp invalid */ } return (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: r292327 - head/tools/regression/lib/msun
Author: ngie Date: Wed Dec 16 08:53:24 2015 New Revision: 292327 URL: https://svnweb.freebsd.org/changeset/base/292327 Log: Use fabsl instead of fabs to mute -Wabsolute-value warnings from clang because `nums[]` is an array of long doubles MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/lib/msun/test-invctrig.c Modified: head/tools/regression/lib/msun/test-invctrig.c == --- head/tools/regression/lib/msun/test-invctrig.c Wed Dec 16 08:48:37 2015(r292326) +++ head/tools/regression/lib/msun/test-invctrig.c Wed Dec 16 08:53:24 2015(r292327) @@ -281,21 +281,21 @@ test_axes(void) for (i = 0; i < sizeof(nums) / sizeof(nums[0]); i++) { /* Real axis */ z = CMPLXL(nums[i], 0.0); - if (fabs(nums[i]) <= 1) { + if (fabsl(nums[i]) <= 1) { testall_tol(cacosh, z, CMPLXL(0.0, acos(nums[i])), 1); testall_tol(cacos, z, CMPLXL(acosl(nums[i]), -0.0), 1); testall_tol(casin, z, CMPLXL(asinl(nums[i]), 0.0), 1); testall_tol(catanh, z, CMPLXL(atanh(nums[i]), 0.0), 1); } else { testall_tol(cacosh, z, - CMPLXL(acosh(fabs(nums[i])), + CMPLXL(acosh(fabsl(nums[i])), (nums[i] < 0) ? pi : 0), 1); testall_tol(cacos, z, CMPLXL((nums[i] < 0) ? pi : 0, - -acosh(fabs(nums[i]))), 1); + -acosh(fabsl(nums[i]))), 1); testall_tol(casin, z, CMPLXL(copysign(pi / 2, nums[i]), - acosh(fabs(nums[i]))), 1); + acosh(fabsl(nums[i]))), 1); testall_tol(catanh, z, CMPLXL(atanh(1 / nums[i]), pi / 2), 1); } ___ 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: r292318 - head/lib/libc/tests/resolv
Author: ngie Date: Wed Dec 16 05:19:07 2015 New Revision: 292318 URL: https://svnweb.freebsd.org/changeset/base/292318 Log: Add Makefile accidentally missed in r292317 MFC after: 1 week X-MFC with: r292317 Sponsored by: EMC / Isilon Storage Division Added: head/lib/libc/tests/resolv/Makefile (contents, props changed) Added: head/lib/libc/tests/resolv/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/tests/resolv/Makefile Wed Dec 16 05:19:07 2015 (r292318) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/lib/libc/resolv +BINDIR=${TESTSDIR} + +FILES+=mach + +ATF_TESTS_C+= resolv_test +#TEST_METADATA.resolv_test=timeout="1800" + +# Note: this test relies on being dynamically linked. You will get a +# spurious PASS for a statically linked test. +LIBADD.resolv_test+= pthread + +.include ___ 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: r292323 - in head: etc/mtree lib/libc/tests/nss tools/regression/lib/libc/nss
Author: ngie Date: Wed Dec 16 08:09:03 2015 New Revision: 292323 URL: https://svnweb.freebsd.org/changeset/base/292323 Log: Integrate tools/regression/lib/libc/nss into the FreeBSD test suite as lib/libc/tests/nss - Convert the testcases to ATF - Do some style(9) cleanups: -- Sort headers -- Apply indentation fixes -- Remove superfluous parentheses - Explicitly print out debug printfs for use with `kyua {debug,report}`; for items that were overly noisy, they've been put behind #ifdef DEBUG conditionals - Fix some format strings MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Added: head/lib/libc/tests/nss/ head/lib/libc/tests/nss/Makefile - copied, changed from r292322, head/tools/regression/lib/libc/nss/Makefile head/lib/libc/tests/nss/getaddrinfo_test.c - copied, changed from r292322, head/tools/regression/lib/libc/nss/test-getaddr.c head/lib/libc/tests/nss/getgr_test.c - copied, changed from r292322, head/tools/regression/lib/libc/nss/test-getgr.c head/lib/libc/tests/nss/gethostby_test.c - copied, changed from r292322, head/tools/regression/lib/libc/nss/test-gethostby.c head/lib/libc/tests/nss/getproto_test.c - copied, changed from r292322, head/tools/regression/lib/libc/nss/test-getproto.c head/lib/libc/tests/nss/getpw_test.c - copied, changed from r292322, head/tools/regression/lib/libc/nss/test-getpw.c head/lib/libc/tests/nss/getrpc_test.c - copied, changed from r292322, head/tools/regression/lib/libc/nss/test-getrpc.c head/lib/libc/tests/nss/getserv_test.c - copied, changed from r292322, head/tools/regression/lib/libc/nss/test-getserv.c head/lib/libc/tests/nss/getusershell_test.c - copied, changed from r292322, head/tools/regression/lib/libc/nss/test-getusershell.c head/lib/libc/tests/nss/testutil.h - copied, changed from r292322, head/tools/regression/lib/libc/nss/testutil.h Deleted: head/tools/regression/lib/libc/nss/ Modified: head/etc/mtree/BSD.tests.dist Modified: head/etc/mtree/BSD.tests.dist == --- head/etc/mtree/BSD.tests.dist Wed Dec 16 08:02:21 2015 (r292322) +++ head/etc/mtree/BSD.tests.dist Wed Dec 16 08:09:03 2015 (r292323) @@ -271,6 +271,8 @@ .. .. .. +nss +.. regex data .. Copied and modified: head/lib/libc/tests/nss/Makefile (from r292322, head/tools/regression/lib/libc/nss/Makefile) == --- head/tools/regression/lib/libc/nss/Makefile Wed Dec 16 08:02:21 2015 (r292322, copy source) +++ head/lib/libc/tests/nss/MakefileWed Dec 16 08:09:03 2015 (r292323) @@ -1,12 +1,22 @@ # $FreeBSD$ -TESTS= test-getaddr test-getgr test-gethostby test-getpw test-getproto\ - test-getrpc test-getserv test-getusershell -CFLAGS+= -g -Wall - -.PHONY: tests -tests: ${TESTS} - -.PHONY: clean -clean: - -rm -f ${TESTS} +TESTSDIR= ${TESTSBASE}/lib/libc/nss +BINDIR=${TESTSDIR} + +.PATH: ${.CURDIR:H}/resolv + +FILES+=mach + +CFLAGS+= -I${SRCTOP}/tests + +ATF_TESTS_C+= getaddrinfo_test +ATF_TESTS_C+= getgr_test +ATF_TESTS_C+= gethostby_test +TEST_METADATA.gethostby_test= timeout="1200" +ATF_TESTS_C+= getpw_test +ATF_TESTS_C+= getproto_test +ATF_TESTS_C+= getrpc_test +ATF_TESTS_C+= getserv_test +ATF_TESTS_C+= getusershell_test + +.include Copied and modified: head/lib/libc/tests/nss/getaddrinfo_test.c (from r292322, head/tools/regression/lib/libc/nss/test-getaddr.c) == --- head/tools/regression/lib/libc/nss/test-getaddr.c Wed Dec 16 08:02:21 2015(r292322, copy source) +++ head/lib/libc/tests/nss/getaddrinfo_test.c Wed Dec 16 08:09:03 2015 (r292323) @@ -28,11 +28,10 @@ #include __FBSDID("$FreeBSD$"); -#include -#include #include +#include +#include #include -#include #include #include #include @@ -41,6 +40,10 @@ __FBSDID("$FreeBSD$"); #include #include #include + +#include + +#include "freebsd_test_suite/macros.h" #include "testutil.h" enum test_methods { @@ -48,7 +51,6 @@ enum test_methods { TEST_BUILD_SNAPSHOT }; -static int debug = 0; static struct addrinfo hints; static enum test_methods method = TEST_GETADDRINFO; @@ -59,7 +61,6 @@ DECLARE_2PASS_TEST(addrinfo) static void clone_addrinfo(struct addrinfo *, struct addrinfo const *); static int compare_addrinfo(struct addrinfo *, struct addrinfo *, void *); static void dump_addrinfo(struct addrinfo *); -static void free_addrinfo(struct addrinfo *); static void sdump_addrinfo(struct addrinfo *, char *, size_t); @@ -70,23 +71,23 @@ IMPLEMENT_2PASS_TEST(addrinfo) static void clone_addrinfo(struct add
svn commit: r292316 - in head/tools/regression/lib/libc: nss resolv
Author: ngie Date: Wed Dec 16 04:59:30 2015 New Revision: 292316 URL: https://svnweb.freebsd.org/changeset/base/292316 Log: Remove hosts that don't resolve properly with the nss and resolv tests MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/lib/libc/nss/mach head/tools/regression/lib/libc/resolv/mach Modified: head/tools/regression/lib/libc/nss/mach == --- head/tools/regression/lib/libc/nss/mach Wed Dec 16 04:38:58 2015 (r292315) +++ head/tools/regression/lib/libc/nss/mach Wed Dec 16 04:59:30 2015 (r292316) @@ -1,32 +1,17 @@ # $FreeBSD$ localhost -above.warped.net anoncvs.cirr.com -anoncvs.isc.netbsd.org -anoncvs.leo.org -anoncvs.netbsd.lt -anoncvs.netbsd.ro anoncvs.netbsd.se antioche.antioche.eu.org -boulder.tele.dk centaurus.4web.cz chur.math.ntnu.no console.netbsd.org -cvs.fi.netbsd.org -cvs.mikrolahti.fi cvs.netbsd.org -cvsup-netbsd.leo.org cvsup.netbsd.se -cvsup.pasta.cs.uit.no -ftp.bitcon.no ftp.chg.ru -ftp.duth.gr ftp.estpak.ee ftp.fsn.hu ftp.funet.fi -ftp.grondar.za -ftp.leo.org -ftp.netbsd.lt ftp.netbsd.org ftp.nluug.nl ftp.plig.org @@ -34,60 +19,28 @@ ftp.uni-erlangen.de ftp.xgate.co.kr gd.tuwien.ac.at gort.ludd.luth.se -grappa.unix-ag.uni-kl.de -info.wins.uva.nl irc.warped.net knug.youn.co.kr -lala.iri.co.jp mail.jp.netbsd.org -mail.kr.netbsd.org mail.netbsd.org melanoma.cs.rmit.edu.au mirror.aarnet.edu.au -mirror.netbsd.com.br -mirror03.inet.tele.dk moon.vub.ac.be -nbwww.sergei.cc net.bsd.cz netbsd.3miasto.net netbsd.4ka.mipt.ru -netbsd.apk.od.ua netbsd.csie.nctu.edu.tw netbsd.enderunix.org netbsd.ftp.fu-berlin.de -netbsd.netlead.com.au -netbsd.nsysu.edu.tw netbsd.pair.com -netbsd.stevens-tech.edu -netbsd.triada.bg -netbsd.unix.net.nz -netbsd.unixtech.be -netbsd.vejas.lt -netbsd.wagener-consulting.lu -netbsd.zarco.org netbsdiso.interoute.net.uk -netbsdwww.bitcon.no -netbsdwww.cordef.com.pl netbsdwww.cs.rmit.edu.au netbsdwww.interoute.net.uk -news.gw.com ns.netbsd.org -pigu.iri.co.jp -pluto.cdpa.nsysu.edu.tw -projects.slowass.net -server6.pasta.cs.uit.no skeleton.phys.spbu.ru -snoopy.allbsd.org -spike.allbsd.org -sundry.netbsd.org -tanya.sergei.cc -web-a.fi.gw.com -web-a.us.gw.com -web.netbsd.mirror.arhea.net www.en.netbsd.de www.netbsd.cl www.netbsd.nl www.netbsd.org www.netbsd.ro -zathras.netbsd.org zeppo.rediris.es Modified: head/tools/regression/lib/libc/resolv/mach == --- head/tools/regression/lib/libc/resolv/mach Wed Dec 16 04:38:58 2015 (r292315) +++ head/tools/regression/lib/libc/resolv/mach Wed Dec 16 04:59:30 2015 (r292316) @@ -1,32 +1,17 @@ # $FreeBSD$ localhost -above.warped.net anoncvs.cirr.com -anoncvs.isc.netbsd.org -anoncvs.leo.org -anoncvs.netbsd.lt -anoncvs.netbsd.ro anoncvs.netbsd.se antioche.antioche.eu.org -boulder.tele.dk centaurus.4web.cz chur.math.ntnu.no console.netbsd.org -cvs.fi.netbsd.org -cvs.mikrolahti.fi cvs.netbsd.org -cvsup-netbsd.leo.org cvsup.netbsd.se -cvsup.pasta.cs.uit.no -ftp.bitcon.no ftp.chg.ru -ftp.duth.gr ftp.estpak.ee ftp.fsn.hu ftp.funet.fi -ftp.grondar.za -ftp.leo.org -ftp.netbsd.lt ftp.netbsd.org ftp.nluug.nl ftp.plig.org @@ -34,60 +19,28 @@ ftp.uni-erlangen.de ftp.xgate.co.kr gd.tuwien.ac.at gort.ludd.luth.se -grappa.unix-ag.uni-kl.de -info.wins.uva.nl irc.warped.net knug.youn.co.kr -lala.iri.co.jp mail.jp.netbsd.org -mail.kr.netbsd.org mail.netbsd.org melanoma.cs.rmit.edu.au mirror.aarnet.edu.au -mirror.netbsd.com.br -mirror03.inet.tele.dk moon.vub.ac.be -nbwww.sergei.cc net.bsd.cz netbsd.3miasto.net netbsd.4ka.mipt.ru -netbsd.apk.od.ua netbsd.csie.nctu.edu.tw netbsd.enderunix.org netbsd.ftp.fu-berlin.de -netbsd.netlead.com.au -netbsd.nsysu.edu.tw netbsd.pair.com -netbsd.stevens-tech.edu -netbsd.triada.bg -netbsd.unix.net.nz -netbsd.unixtech.be -netbsd.vejas.lt -netbsd.wagener-consulting.lu -netbsd.zarco.org netbsdiso.interoute.net.uk -netbsdwww.bitcon.no -netbsdwww.cordef.com.pl netbsdwww.cs.rmit.edu.au netbsdwww.interoute.net.uk -news.gw.com ns.netbsd.org -pigu.iri.co.jp -pluto.cdpa.nsysu.edu.tw -projects.slowass.net -server6.pasta.cs.uit.no skeleton.phys.spbu.ru -snoopy.allbsd.org -spike.allbsd.org -sundry.netbsd.org -tanya.sergei.cc -web-a.fi.gw.com -web-a.us.gw.com -web.netbsd.mirror.arhea.net www.en.netbsd.de www.netbsd.cl www.netbsd.nl www.netbsd.org www.netbsd.ro -zathras.netbsd.org zeppo.rediris.es ___ 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: r292319 - head/tests/freebsd_test_suite
Author: ngie Date: Wed Dec 16 05:44:53 2015 New Revision: 292319 URL: https://svnweb.freebsd.org/changeset/base/292319 Log: Add ATF_REQUIRE_FEATURE and PLAIN_REQUIRE_FEATURE macros for testing for kernel features via the feature_present(3) libcall The semantics are similar to the other macros in the header (skip testcase with ATF macro; exit with appropriate exit code with the PLAIN macro) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tests/freebsd_test_suite/macros.h Modified: head/tests/freebsd_test_suite/macros.h == --- head/tests/freebsd_test_suite/macros.h Wed Dec 16 05:19:07 2015 (r292318) +++ head/tests/freebsd_test_suite/macros.h Wed Dec 16 05:44:53 2015 (r292319) @@ -38,6 +38,13 @@ #include +#defineATF_REQUIRE_FEATURE(_feature_name) do { \ + if (feature_present(_feature_name) == 0) { \ + atf_tc_skip("kernel feature (%s) not present", \ + _feature_name); \ + } \ +} while(0) + #defineATF_REQUIRE_KERNEL_MODULE(_mod_name) do { \ if (modfind(_mod_name) == -1) { \ atf_tc_skip("module %s could not be resolved: %s", \ @@ -45,6 +52,14 @@ } \ } while(0) +#definePLAIN_REQUIRE_FEATURE(_feature_name, _exit_code) do { \ + if (feature_present(_feature_name) == 0) { \ + printf("kernel feature (%s) not present\n", \ + _feature_name); \ + _exit(_exit_code); \ + } \ +} while(0) + #definePLAIN_REQUIRE_KERNEL_MODULE(_mod_name, _exit_code) do { \ if (modfind(_mod_name) == -1) { \ printf("module %s could not be resolved: %s\n", \ ___ 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: r292317 - in head: etc/mtree lib/libc/tests lib/libc/tests/resolv tools/regression/lib/libc/resolv
Author: ngie Date: Wed Dec 16 05:11:57 2015 New Revision: 292317 URL: https://svnweb.freebsd.org/changeset/base/292317 Log: Integrate tools/regression/lib/libc/resolv into the FreeBSD test suite as lib/libc/tests/resolv Convert the testcases to ATF MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Added: head/lib/libc/tests/resolv/ head/lib/libc/tests/resolv/mach - copied unchanged from r292316, head/tools/regression/lib/libc/resolv/mach head/lib/libc/tests/resolv/resolv_test.c - copied, changed from r292316, head/tools/regression/lib/libc/resolv/resolv.c Deleted: head/tools/regression/lib/libc/resolv/ Modified: head/etc/mtree/BSD.tests.dist head/lib/libc/tests/Makefile Modified: head/etc/mtree/BSD.tests.dist == --- head/etc/mtree/BSD.tests.dist Wed Dec 16 04:59:30 2015 (r292316) +++ head/etc/mtree/BSD.tests.dist Wed Dec 16 05:11:57 2015 (r292317) @@ -275,6 +275,8 @@ data .. .. +resolv +.. rpc .. ssp Modified: head/lib/libc/tests/Makefile == --- head/lib/libc/tests/MakefileWed Dec 16 04:59:30 2015 (r292316) +++ head/lib/libc/tests/MakefileWed Dec 16 05:11:57 2015 (r292317) @@ -11,6 +11,7 @@ TESTS_SUBDIRS+= hash TESTS_SUBDIRS+=inet TESTS_SUBDIRS+=net TESTS_SUBDIRS+=regex +TESTS_SUBDIRS+=resolv TESTS_SUBDIRS+=rpc TESTS_SUBDIRS+=stdio TESTS_SUBDIRS+=stdlib Copied: head/lib/libc/tests/resolv/mach (from r292316, head/tools/regression/lib/libc/resolv/mach) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/tests/resolv/mach Wed Dec 16 05:11:57 2015 (r292317, copy of r292316, head/tools/regression/lib/libc/resolv/mach) @@ -0,0 +1,46 @@ +# $FreeBSD$ +localhost +anoncvs.cirr.com +anoncvs.netbsd.se +antioche.antioche.eu.org +centaurus.4web.cz +chur.math.ntnu.no +console.netbsd.org +cvs.netbsd.org +cvsup.netbsd.se +ftp.chg.ru +ftp.estpak.ee +ftp.fsn.hu +ftp.funet.fi +ftp.netbsd.org +ftp.nluug.nl +ftp.plig.org +ftp.uni-erlangen.de +ftp.xgate.co.kr +gd.tuwien.ac.at +gort.ludd.luth.se +irc.warped.net +knug.youn.co.kr +mail.jp.netbsd.org +mail.netbsd.org +melanoma.cs.rmit.edu.au +mirror.aarnet.edu.au +moon.vub.ac.be +net.bsd.cz +netbsd.3miasto.net +netbsd.4ka.mipt.ru +netbsd.csie.nctu.edu.tw +netbsd.enderunix.org +netbsd.ftp.fu-berlin.de +netbsd.pair.com +netbsdiso.interoute.net.uk +netbsdwww.cs.rmit.edu.au +netbsdwww.interoute.net.uk +ns.netbsd.org +skeleton.phys.spbu.ru +www.en.netbsd.de +www.netbsd.cl +www.netbsd.nl +www.netbsd.org +www.netbsd.ro +zeppo.rediris.es Copied and modified: head/lib/libc/tests/resolv/resolv_test.c (from r292316, head/tools/regression/lib/libc/resolv/resolv.c) == --- head/tools/regression/lib/libc/resolv/resolv.c Wed Dec 16 04:59:30 2015(r292316, copy source) +++ head/lib/libc/tests/resolv/resolv_test.cWed Dec 16 05:11:57 2015 (r292317) @@ -39,10 +39,11 @@ __RCSID("$NetBSD: resolv.c,v 1.6 2004/05 #include #include #include -#include #include #include +#include + #define NTHREADS 10 #define NHOSTS 100 #define WS " \t\n\r" @@ -54,13 +55,10 @@ enum method { }; static StringList *hosts = NULL; -static int debug = 0; static enum method method = METHOD_GETADDRINFO; -static int reverse = 0; static int *ask = NULL; static int *got = NULL; -static void usage(void) __attribute__((__noreturn__)); static void load(const char *); static void resolvone(int); static void *resolvloop(void *); @@ -69,15 +67,6 @@ static void run(int *); static pthread_mutex_t stats = PTHREAD_MUTEX_INITIALIZER; static void -usage(void) -{ - (void)fprintf(stderr, - "Usage: %s [-AdHIr] [-h ] [-n ] ...\n", - getprogname()); - exit(1); -} - -static void load(const char *fname) { FILE *fp; @@ -85,7 +74,7 @@ load(const char *fname) char *line; if ((fp = fopen(fname, "r")) == NULL) - err(1, "Cannot open `%s'", fname); + ATF_REQUIRE(fp != NULL); while ((line = fgetln(fp, &len)) != NULL) { char c = line[len]; char *ptr; @@ -114,21 +103,17 @@ resolv_getaddrinfo(pthread_t self, char hints.ai_flags = AI_PASSIVE; hints.ai_socktype = SOCK_STREAM; error = getaddrinfo(host, portstr, &hints, &res); - if (debug) { - len = snprintf(buf, sizeof(buf), "%p: host %s %s\n", - self, host, error ? "not found" : "ok"); - (void)write(ST
Re: svn commit: r292309 - in head/sys: modules modules/tcp modules/tcp/fastpath netinet netinet/tcp_stacks
On 16 December 2015 at 00:56, Randall Stewart wrote: > Author: rrs > Date: Wed Dec 16 00:56:45 2015 > New Revision: 292309 > URL: https://svnweb.freebsd.org/changeset/base/292309 > > Log: > First cut of the modularization of our TCP stack. Still > to do is to clean up the timer handling using the async-drain. > Other optimizations may be coming to go with this. Whats here > will allow differnet tcp implementations (one included). > Reviewed by: jtl, hiren, transports > Sponsored by: Netflix Inc. > Differential Revision:D4055 This broke at least powerpc builds: /scratch/tmp/emaste/freebsd/sys/modules/tcp/fastpath/../../../netinet/tcp_stacks/fastpath.c:148: warning: redundant redeclaration of 'tcp_dooptions' [-Wredundant-decls] /scratch/tmp/emaste/freebsd/sys/netinet/tcp_var.h:736: warning: previous declaration of 'tcp_dooptions' was here /scratch/tmp/emaste/freebsd/sys/modules/tcp/fastpath/../../../netinet/tcp_stacks/fastpath.c:150: warning: redundant redeclaration of 'tcp_dropwithreset' [-Wredundant-decls] /scratch/tmp/emaste/freebsd/sys/netinet/tcp_var.h:738: warning: previous declaration of 'tcp_dropwithreset' was here /scratch/tmp/emaste/freebsd/sys/modules/tcp/fastpath/../../../netinet/tcp_stacks/fastpath.c:152: warning: redundant redeclaration of 'tcp_pulloutofband' [-Wredundant-decls] /scratch/tmp/emaste/freebsd/sys/netinet/tcp_var.h:740: warning: previous declaration of 'tcp_pulloutofband' was here /scratch/tmp/emaste/freebsd/sys/modules/tcp/fastpath/../../../netinet/tcp_stacks/fastpath.c:153: warning: redundant redeclaration of 'tcp_xmit_timer' [-Wredundant-decls] /scratch/tmp/emaste/freebsd/sys/netinet/tcp_var.h:741: warning: previous declaration of 'tcp_xmit_timer' was here ... ___ 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: r292275 - in head/sys: net netinet netinet6
On 16/12/2015 09:02, Alexander V. Chernikov wrote: 15.12.2015, 19:02, "Steven Hartland" : Author: smh Date: Tue Dec 15 16:02:11 2015 New Revision: 292275 URL: https://svnweb.freebsd.org/changeset/base/292275 Log: Fix lagg failover due to missing notifications When using lagg failover mode neither Gratuitous ARP (IPv4) or Unsolicited Neighbour Advertisements (IPv6) are sent to notify other nodes that the address may have moved. This results is slow failover, dropped packets and network outages for the lagg interface when the primary link goes down. We now use the new if_link_state_change_cond with the force param set to allow lagg to force through link state changes and hence fire a ifnet_link_event which are now monitored by rip and nd6. Upon receiving these events each protocol trigger the relevant notifications: * inet4 => Gratuitous ARP * inet6 => Unsolicited Neighbour Announce Steven, I believe that having DELAY() called inside callout routine is incorrect - you are delaying other consumers for arbitrary amount of time. If you really want to do it that way you should create separate taskqueue for that. Also, destroying interface while doing these DELAYs would very likely crash the system :"#define IN6_MAX_ANYCAST_DELAY_TIME_MS 100" is misguiding There are some style(9) issues like lack of empty line between nd6_init() and nd6_ifnet_link_event() ... Thanks Alexander, do you think an acceptable workaround for the time being is to remove the DELAY, until I get some time to work on a taskqueue? Also do you have any input on the questions I raised about Kristof's panic due to NULL ifp->if_addr arp_announce? ___ 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: r292309 - in head/sys: modules modules/tcp modules/tcp/fastpath netinet netinet/tcp_stacks
Ahh I think I see this is a difference between our friend clang and gcc.. since I bet ppc uses gcc not clang :-o I will have something for you in a sec.. sorry about that Ed R This is the difference between On Dec 16, 2015, at 6:00 AM, Ed Maste wrote: > On 16 December 2015 at 00:56, Randall Stewart wrote: >> Author: rrs >> Date: Wed Dec 16 00:56:45 2015 >> New Revision: 292309 >> URL: https://svnweb.freebsd.org/changeset/base/292309 >> >> Log: >> First cut of the modularization of our TCP stack. Still >> to do is to clean up the timer handling using the async-drain. >> Other optimizations may be coming to go with this. Whats here >> will allow differnet tcp implementations (one included). >> Reviewed by: jtl, hiren, transports >> Sponsored by: Netflix Inc. >> Differential Revision:D4055 > > This broke at least powerpc builds: > > /scratch/tmp/emaste/freebsd/sys/modules/tcp/fastpath/../../../netinet/tcp_stacks/fastpath.c:148: > warning: redundant redeclaration of 'tcp_dooptions' > [-Wredundant-decls] > /scratch/tmp/emaste/freebsd/sys/netinet/tcp_var.h:736: warning: > previous declaration of 'tcp_dooptions' was here > /scratch/tmp/emaste/freebsd/sys/modules/tcp/fastpath/../../../netinet/tcp_stacks/fastpath.c:150: > warning: redundant redeclaration of 'tcp_dropwithreset' > [-Wredundant-decls] > /scratch/tmp/emaste/freebsd/sys/netinet/tcp_var.h:738: warning: > previous declaration of 'tcp_dropwithreset' was here > /scratch/tmp/emaste/freebsd/sys/modules/tcp/fastpath/../../../netinet/tcp_stacks/fastpath.c:152: > warning: redundant redeclaration of 'tcp_pulloutofband' > [-Wredundant-decls] > /scratch/tmp/emaste/freebsd/sys/netinet/tcp_var.h:740: warning: > previous declaration of 'tcp_pulloutofband' was here > /scratch/tmp/emaste/freebsd/sys/modules/tcp/fastpath/../../../netinet/tcp_stacks/fastpath.c:153: > warning: redundant redeclaration of 'tcp_xmit_timer' > [-Wredundant-decls] > /scratch/tmp/emaste/freebsd/sys/netinet/tcp_var.h:741: warning: > previous declaration of 'tcp_xmit_timer' was here > ... Randall Stewart r...@netflix.com 803-317-4952 ___ 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: r292336 - head/sys/netinet/tcp_stacks
Author: rrs Date: Wed Dec 16 15:16:44 2015 New Revision: 292336 URL: https://svnweb.freebsd.org/changeset/base/292336 Log: Remove redundant extern's that make the ppc compile fail. Thanks Ed Maste for the heads up. Modified: head/sys/netinet/tcp_stacks/fastpath.c Modified: head/sys/netinet/tcp_stacks/fastpath.c == --- head/sys/netinet/tcp_stacks/fastpath.c Wed Dec 16 14:22:00 2015 (r292335) +++ head/sys/netinet/tcp_stacks/fastpath.c Wed Dec 16 15:16:44 2015 (r292336) @@ -142,31 +142,6 @@ VNET_DECLARE(int, tcp_insecure_rst); VNET_DECLARE(int, tcp_insecure_syn); #defineV_tcp_insecure_syn VNET(tcp_insecure_syn) - - - -extern voidtcp_dooptions(struct tcpopt *, u_char *, int, int); -extern voidtcp_dropwithreset(struct mbuf *, struct tcphdr *, -struct tcpcb *, int, int); -extern voidtcp_pulloutofband(struct socket *, -struct tcphdr *, struct mbuf *, int); -extern voidtcp_xmit_timer(struct tcpcb *, int); -extern voidtcp_newreno_partial_ack(struct tcpcb *, struct tcphdr *); -extern voidtcp_mss(struct tcpcb *tp, int offer); -extern voidcc_ack_received(struct tcpcb *tp, struct tcphdr *th, - uint16_t type); -extern void cc_conn_init(struct tcpcb *tp); -extern void cc_post_recovery(struct tcpcb *tp, struct tcphdr *th); -extern void cc_cong_signal(struct tcpcb *tp, struct tcphdr *th, uint32_t type); -extern void hhook_run_tcp_est_in(struct tcpcb *tp, -struct tcphdr *th, struct tcpopt *to); - -extern void kmod_tcpstat_inc(int statnum); -#ifdef TCP_SIGNATURE -extern int tcp_signature_verify_input(struct mbuf *m, int off0, int tlen, int optlen, -struct tcpopt *to, struct tcphdr *th, u_int tcpbflag); -#endif - static void tcp_do_segment_fastslow(struct mbuf *, struct tcphdr *, struct socket *, struct tcpcb *, int, int, uint8_t, int); ___ 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: r292309 - in head/sys: modules modules/tcp modules/tcp/fastpath netinet netinet/tcp_stacks
r292336 should take care of that let me know if it does not.. I am getting on a plane to head back from CA. to S.C. shortly but I will be online for a couple more hours :-) R On Dec 16, 2015, at 6:00 AM, Ed Maste wrote: > On 16 December 2015 at 00:56, Randall Stewart wrote: >> Author: rrs >> Date: Wed Dec 16 00:56:45 2015 >> New Revision: 292309 >> URL: https://svnweb.freebsd.org/changeset/base/292309 >> >> Log: >> First cut of the modularization of our TCP stack. Still >> to do is to clean up the timer handling using the async-drain. >> Other optimizations may be coming to go with this. Whats here >> will allow differnet tcp implementations (one included). >> Reviewed by: jtl, hiren, transports >> Sponsored by: Netflix Inc. >> Differential Revision:D4055 > > This broke at least powerpc builds: > > /scratch/tmp/emaste/freebsd/sys/modules/tcp/fastpath/../../../netinet/tcp_stacks/fastpath.c:148: > warning: redundant redeclaration of 'tcp_dooptions' > [-Wredundant-decls] > /scratch/tmp/emaste/freebsd/sys/netinet/tcp_var.h:736: warning: > previous declaration of 'tcp_dooptions' was here > /scratch/tmp/emaste/freebsd/sys/modules/tcp/fastpath/../../../netinet/tcp_stacks/fastpath.c:150: > warning: redundant redeclaration of 'tcp_dropwithreset' > [-Wredundant-decls] > /scratch/tmp/emaste/freebsd/sys/netinet/tcp_var.h:738: warning: > previous declaration of 'tcp_dropwithreset' was here > /scratch/tmp/emaste/freebsd/sys/modules/tcp/fastpath/../../../netinet/tcp_stacks/fastpath.c:152: > warning: redundant redeclaration of 'tcp_pulloutofband' > [-Wredundant-decls] > /scratch/tmp/emaste/freebsd/sys/netinet/tcp_var.h:740: warning: > previous declaration of 'tcp_pulloutofband' was here > /scratch/tmp/emaste/freebsd/sys/modules/tcp/fastpath/../../../netinet/tcp_stacks/fastpath.c:153: > warning: redundant redeclaration of 'tcp_xmit_timer' > [-Wredundant-decls] > /scratch/tmp/emaste/freebsd/sys/netinet/tcp_var.h:741: warning: > previous declaration of 'tcp_xmit_timer' was here > ... Randall Stewart r...@netflix.com 803-317-4952 ___ 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: r292337 - head/usr.sbin
Author: ian Date: Wed Dec 16 15:26:31 2015 New Revision: 292337 URL: https://svnweb.freebsd.org/changeset/base/292337 Log: Build mount_smbfs for arm. Also sort the subdirs. Modified: head/usr.sbin/Makefile.arm Modified: head/usr.sbin/Makefile.arm == --- head/usr.sbin/Makefile.arm Wed Dec 16 15:16:44 2015(r292336) +++ head/usr.sbin/Makefile.arm Wed Dec 16 15:26:31 2015(r292337) @@ -1,4 +1,5 @@ # $FreeBSD$ -SUBDIR+= ofwdump SUBDIR+= kgmon +SUBDIR+= mount_smbfs +SUBDIR+= ofwdump ___ 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: r292309 - in head/sys: modules modules/tcp modules/tcp/fastpath netinet netinet/tcp_stacks
On Dec 16, 2015, at 10:08 AM, Randall Stewart wrote: > Ahh I think I see this is a difference between our friend > clang and gcc.. since I bet ppc uses gcc not clang :-o This sort of thing seems to happen often enough that it would be nice if there was an option to automatically build two kernels, one with each compiler. Is there already such an option? Jonathan ___ 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: r292309 - in head/sys: modules modules/tcp modules/tcp/fastpath netinet netinet/tcp_stacks
On Wednesday, December 16, 2015 10:58:47 AM Jonathan T. Looney wrote: > On Dec 16, 2015, at 10:08 AM, Randall Stewart wrote: > > Ahh I think I see this is a difference between our friend > > clang and gcc.. since I bet ppc uses gcc not clang :-o > > This sort of thing seems to happen often enough that it would be nice if > there was an option to automatically build two kernels, one with each > compiler. Is there already such an option? make tinderbox effectively does that, but at a bit more expense. amd64 doesn't build GCC 4.2 by default, so the simplest way is to build a kernel for a non-clang platform, e.g.: make TARGET=sparc64 kernel-toolchain make TARGET=sparc64 buildkernel (Note you only need to do the kernel-toolchain step once or after toolchain changes like compiler upgrades.) -- 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"
Re: svn commit: r292309 - in head/sys: modules modules/tcp modules/tcp/fastpath netinet netinet/tcp_stacks
On Wednesday, December 16, 2015 12:56:45 AM Randall Stewart wrote: > Author: rrs > Date: Wed Dec 16 00:56:45 2015 > New Revision: 292309 > URL: https://svnweb.freebsd.org/changeset/base/292309 > > Log: > First cut of the modularization of our TCP stack. Still > to do is to clean up the timer handling using the async-drain. > Other optimizations may be coming to go with this. Whats here > will allow differnet tcp implementations (one included). > Reviewed by:jtl, hiren, transports > Sponsored by: Netflix Inc. > Differential Revision: D4055 Have you considered treating TOE as a separate stack? We already have a bit of a split to handle TOE specially. It might be nice if it was able to plug in via this. That might also help flesh out the abstraction a bit by giving another use case. Also, note that the Differential Revision tag should be the full URL to the review (in which case it auto-closes it for you). -- 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: r292338 - in head/sys/boot/efi/loader: . arch/amd64 arch/arm arch/arm64
Author: emaste Date: Wed Dec 16 16:19:18 2015 New Revision: 292338 URL: https://svnweb.freebsd.org/changeset/base/292338 Log: UEFI: combine GetMemoryMap and ExitBootServices and retry on error The EFI memory map may change before or during the first ExitBootServices call. In that case ExitBootServices returns an error, and GetMemoryMap and ExitBootServices must be retried. Glue together calls to GetMemoryMap(), ExitBootServices() and storage of (now up-to-date) MODINFOMD_EFI_MAP metadata within a single function. That new function - bi_add_efi_data_and_exit() - uses space previously allocated in bi_load_efi_data() to store the memory map (it will fail if that space is too short). It handles re-calling GetMemoryMap() once to update the map key if necessary. Finally, if ExitBootServices() is successful, it stores the memory map and its header as MODINFOMD_EFI_MAP metadata. ExitBootServices() calls are now done earlier, from within arch- independent bi_load() code. PR: 202455 Submitted by: Ganael LAPLANCHE Reviewed by: kib MFC after:2 weeks Relnotes: Yes Differential Revision:https://reviews.freebsd.org/D4296 Modified: head/sys/boot/efi/loader/arch/amd64/elf64_freebsd.c head/sys/boot/efi/loader/arch/arm/exec.c head/sys/boot/efi/loader/arch/arm64/exec.c head/sys/boot/efi/loader/bootinfo.c head/sys/boot/efi/loader/loader_efi.h Modified: head/sys/boot/efi/loader/arch/amd64/elf64_freebsd.c == --- head/sys/boot/efi/loader/arch/amd64/elf64_freebsd.c Wed Dec 16 15:26:31 2015(r292337) +++ head/sys/boot/efi/loader/arch/amd64/elf64_freebsd.c Wed Dec 16 16:19:18 2015(r292338) @@ -174,13 +174,6 @@ elf64_exec(struct preloaded_file *fp) if (err != 0) return(err); - status = BS->ExitBootServices(IH, efi_mapkey); - if (EFI_ERROR(status)) { - printf("%s: ExitBootServices() returned 0x%lx\n", __func__, - (long)status); - return (EINVAL); - } - dev_cleanup(); trampoline(trampstack, efi_copy_finish, kernend, modulep, PT4, Modified: head/sys/boot/efi/loader/arch/arm/exec.c == --- head/sys/boot/efi/loader/arch/arm/exec.cWed Dec 16 15:26:31 2015 (r292337) +++ head/sys/boot/efi/loader/arch/arm/exec.cWed Dec 16 16:19:18 2015 (r292338) @@ -82,13 +82,6 @@ __elfN(arm_exec)(struct preloaded_file * printf("modulep: %#x\n", modulep); printf("relocation_offset %llx\n", __elfN(relocation_offset)); - status = BS->ExitBootServices(IH, efi_mapkey); - if (EFI_ERROR(status)) { - printf("%s: ExitBootServices() returned 0x%lx\n", __func__, - (long)status); - return (EINVAL); - } - dev_cleanup(); (*entry)((void *)modulep); Modified: head/sys/boot/efi/loader/arch/arm64/exec.c == --- head/sys/boot/efi/loader/arch/arm64/exec.c Wed Dec 16 15:26:31 2015 (r292337) +++ head/sys/boot/efi/loader/arch/arm64/exec.c Wed Dec 16 16:19:18 2015 (r292338) @@ -118,13 +118,6 @@ elf64_exec(struct preloaded_file *fp) if (err != 0) return (err); - status = BS->ExitBootServices(IH, efi_mapkey); -if (EFI_ERROR(status)) { - printf("%s: ExitBootServices() returned 0x%lx\n", __func__, - (long)status); - return (EINVAL); - } - /* Clean D-cache under kernel area and invalidate whole I-cache */ clean_addr = efi_translate(fp->f_addr); clean_size = efi_translate(kernendp) - clean_addr; Modified: head/sys/boot/efi/loader/bootinfo.c == --- head/sys/boot/efi/loader/bootinfo.c Wed Dec 16 15:26:31 2015 (r292337) +++ head/sys/boot/efi/loader/bootinfo.c Wed Dec 16 16:19:18 2015 (r292338) @@ -55,8 +55,6 @@ __FBSDID("$FreeBSD$"); #include #endif -UINTN efi_mapkey; - static const char howto_switches[] = "aCdrgDmphsv"; static int howto_masks[] = { RB_ASKNAME, RB_CDROM, RB_KDB, RB_DFLTROOT, RB_GDB, RB_MULTIPLE, @@ -234,12 +232,50 @@ bi_copymodules(vm_offset_t addr) } static int +bi_add_efi_data_and_exit(struct preloaded_file *kfp, +struct efi_map_header *efihdr, size_t efisz, EFI_MEMORY_DESCRIPTOR *mm, +UINTN sz) +{ + UINTN efi_mapkey; + UINTN mmsz; + UINT32 mmver; + EFI_STATUS status; + UINTN retry; + + /* +* It is possible that the first call to ExitBootServices may change +* the map key. Fetch a new map key and retry ExitBootServices in that +* case. +*/ + for (retry = 2; retry > 0; retry--) { +
svn commit: r292344 - in head: . lib/libstand sys/boot/i386/libi386 sys/boot/i386/loader
Author: bapt Date: Wed Dec 16 17:13:09 2015 New Revision: 292344 URL: https://svnweb.freebsd.org/changeset/base/292344 Log: pxeboot: make the tftp loader use the option root-path directive pxeboot in tftp loader mode (when built with LOADER_TFTP_SUPPORT) now prefix all the path to open with the path obtained via the option 'root-path' directive. This allows to be able to use the traditional content /boot out of box. Meaning it now works pretty much like all other loaders. It simplifies hosting hosting multiple version of FreeBSD on a tftp server. As a consequence, pxeboot does not look anymore for a pxeboot.4th (which was never provided) Note: that pxeboot in tftp loader mode is not built by default. Reviewed by: rpokala Relnotes: yes Sponsored by: Gandi.net Differential Revision:https://reviews.freebsd.org/D4590 Modified: head/UPDATING head/lib/libstand/tftp.c head/sys/boot/i386/libi386/libi386.h head/sys/boot/i386/libi386/pxe.c head/sys/boot/i386/loader/main.c Modified: head/UPDATING == --- head/UPDATING Wed Dec 16 16:48:59 2015(r292343) +++ head/UPDATING Wed Dec 16 17:13:09 2015(r292344) @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20151216: + The tftp loader (pxeboot) now uses the option root-path directive. As a + consequence it no longer looks for a pxeboot.4th file on the tftp + server. Instead it uses the regular /boot infrastructure as with the + other loaders. + 20151211: The code to start recording plug and play data into the modules has been committed. While the old tools will properly build a new kernel, Modified: head/lib/libstand/tftp.c == --- head/lib/libstand/tftp.cWed Dec 16 16:48:59 2015(r292343) +++ head/lib/libstand/tftp.cWed Dec 16 17:13:09 2015(r292344) @@ -399,6 +399,8 @@ tftp_open(const char *path, struct open_ struct tftp_handle *tftpfile; struct iodesc *io; int res; + size_t pathsize; + const char *extraslash; if (strcmp(f->f_dev->dv_name, "net") != 0) { #ifdef __i386__ @@ -424,10 +426,22 @@ tftp_open(const char *path, struct open_ io->destip = servip; tftpfile->off = 0; - tftpfile->path = strdup(path); + pathsize = (strlen(rootpath) + 1 + strlen(path) + 1) * sizeof(char); + tftpfile->path = malloc(pathsize); if (tftpfile->path == NULL) { - free(tftpfile); - return(ENOMEM); + free(tftpfile); + return(ENOMEM); + } + if (rootpath[strlen(rootpath) - 1] == '/' || path[0] == '/') + extraslash = ""; + else + extraslash = "/"; + res = snprintf(tftpfile->path, pathsize, "%s%s%s", + rootpath, extraslash, path); + if (res < 0 || res > pathsize) { + free(tftpfile->path); + free(tftpfile); + return(ENOMEM); } res = tftp_makereq(tftpfile); Modified: head/sys/boot/i386/libi386/libi386.h == --- head/sys/boot/i386/libi386/libi386.hWed Dec 16 16:48:59 2015 (r292343) +++ head/sys/boot/i386/libi386/libi386.hWed Dec 16 17:13:09 2015 (r292344) @@ -123,5 +123,4 @@ int bi_load32(char *args, int *howtop, i intbi_load64(char *args, vm_offset_t addr, vm_offset_t *modulep, vm_offset_t *kernend, int add_smap); -char *pxe_default_rc(void); void pxe_enable(void *pxeinfo); Modified: head/sys/boot/i386/libi386/pxe.c == --- head/sys/boot/i386/libi386/pxe.cWed Dec 16 16:48:59 2015 (r292343) +++ head/sys/boot/i386/libi386/pxe.cWed Dec 16 17:13:09 2015 (r292344) @@ -288,8 +288,10 @@ pxe_open(struct open_file *f, ...) bootp(pxe_sock, BOOTP_PXE); if (rootip.s_addr == 0) rootip.s_addr = bootplayer.sip; +#ifdef LOADER_NFS_SUPPORT if (!rootpath[0]) strcpy(rootpath, PXENFSROOTPATH); +#endif for (i = 0; rootpath[i] != '\0' && i < FNAME_SIZE; i++) if (rootpath[i] == ':') @@ -317,6 +319,7 @@ pxe_open(struct open_file *f, ...) setenv("boot.nfsroot.path", rootpath, 1); #else setenv("boot.netif.server", inet_ntoa(rootip),
Re: svn commit: r292275 - in head/sys: net netinet netinet6
hi, yeah, switchports at the moment are pure L2 interfaces, they don't have addressing. This may eventually change if etherswitch grows slave switch port support. But I didn't think it was creating ifnet interfaces, only miibusses and mii's for link status. -a On 16 December 2015 at 04:09, Steven Hartland wrote: > On 15/12/2015 22:58, Kristof Provost wrote: >>> >>> On 15 Dec 2015, at 23:15, Kristof Provost wrote: >>> Based on the arp_announce() in the backtrace this commit looks like a >>> possible cause. >> >> I see this in arp_announce(): >> KP: arp_announce() ifp->if_addr = 0 >> >> So that explains why we panic in 'lladdr = IF_LLADDR(ifp);’. >> >> I’ve done a very quick hack: >> diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c >> index 2214542..9b25356 100644 >> --- a/sys/netinet/if_ether.c >> +++ b/sys/netinet/if_ether.c >> @@ -1246,9 +1246,15 @@ arp_announce(struct ifnet *ifp) >> } >> IF_ADDR_RUNLOCK(ifp); >> >> - lladdr = IF_LLADDR(ifp); >> - for (i = 0; i < cnt; i++) { >> - arp_announce_addr(ifp, head + i, lladdr); >> + printf("KP: %s() ifp = %p\n", __FUNCTION__, ifp); >> + printf("KP: %s() ifp->if_addr = %p\n", __FUNCTION__, >> ifp->if_addr); >> + >> + if (ifp->if_addr) { >> + printf("KP: %s() ifp->if_addr->ifa_addr = %p\n", >> __FUNCTION__, ifp->if_addr->ifa_addr); >> + lladdr = IF_LLADDR(ifp); >> + for (i = 0; i < cnt; i++) { >> + arp_announce_addr(ifp, head + i, lladdr); >> + } >> } >> free(head, M_TEMP); >> } >> >> With this patch the device boots. I haven’t been able to verify if >> everything works because of a different issue ("Shared object >> "lib80211.so.1" not found, required by “ifconfig””, no doubt just a small >> problem with the freebsd-wifi-build scripts). >> >> Regards, >> Kristof > > Thanks for all the info Kristof appreciated. > > It seems really odd that you're getting a link up event for an interface > that doesn't have a LLA, so I'm wondering if this is the result of an issue > elsewhere which this change brings to light, its as though if_attach hasn't > been called. > > Looking at your trace the device seems to be an arswitch. If it never > allocates a LLA to each port then maybe the more correct fix would be to > ensure it IFF_NOARP in if_flags? > > I've attached a patch which should fix if you could test that would be > great, but I'd still like to understand if there is something wrong > elsewhere before I do. > > Regards > Steve > > ___ 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: r292275 - in head/sys: net netinet netinet6
right, it's: arswitch.c: err = mii_attach(sc->sc_dev, &sc->miibus[phy], sc->ifp[phy], arswitch.c: device_get_nameunit(sc->miibus[phy]), -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"
Re: svn commit: r292309 - in head/sys: modules modules/tcp modules/tcp/fastpath netinet netinet/tcp_stacks
> On Dec 16, 2015, at 08:15, John Baldwin wrote: > >> On Wednesday, December 16, 2015 10:58:47 AM Jonathan T. Looney wrote: >>> On Dec 16, 2015, at 10:08 AM, Randall Stewart wrote: >>> Ahh I think I see this is a difference between our friend >>> clang and gcc.. since I bet ppc uses gcc not clang :-o >> >> This sort of thing seems to happen often enough that it would be nice if >> there was an option to automatically build two kernels, one with each >> compiler. Is there already such an option? > > make tinderbox effectively does that, but at a bit more expense. amd64 > doesn't build GCC 4.2 by default, so the simplest way is to build a kernel > for a non-clang platform, e.g.: > > make TARGET=sparc64 kernel-toolchain > make TARGET=sparc64 buildkernel > > (Note you only need to do the kernel-toolchain step once or after toolchain > changes like compiler upgrades.) I run make tinderbox on ref10-amd64/ref11-amd64 periodically because (unfortunately) Jenkins has been largely unreachable via the web interface for the past few weeks. It's good to use those hosts if you want to do a final compile test run. Cheers! ___ 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: r292299 - head/sys/kern
On 16 December 2015 at 00:01, Konstantin Belousov wrote: > On Wed, Dec 16, 2015 at 12:13:16AM +, Adrian Chadd wrote: >> Author: adrian >> Date: Wed Dec 16 00:13:16 2015 >> New Revision: 292299 >> URL: https://svnweb.freebsd.org/changeset/base/292299 >> >> Log: >> Don't call wakeup if we're just returning reserved space; just >> return the reservation and wait for more space to appear. > Issue which is supposedly fixed by the commit is not due to the possibly > excessive wakeups. bufspace_release() and bufspace_wakeup() clear > the needsbuffer variable, while the code flow in getnewbuf() calls > bufspace_wait() to wait for the condition, which prevented the buffer > allocation from succeeding, to pass. Right. There's still some more work to do there to chase issues down so I can remove that sched_yield() workaround I added. > >> >> Submitted by: jeff >> Reviewed by:kib >> >> Modified: >> head/sys/kern/vfs_bio.c >> >> Modified: head/sys/kern/vfs_bio.c >> == >> --- head/sys/kern/vfs_bio.c Wed Dec 16 00:09:57 2015(r292298) >> +++ head/sys/kern/vfs_bio.c Wed Dec 16 00:13:16 2015(r292299) >> @@ -2909,7 +2909,7 @@ getnewbuf(struct vnode *vp, int slpflag, >> } while(buf_scan(false) == 0); >> >> if (reserved) >> - bufspace_release(maxsize); >> + atomic_subtract_long(&bufspace, maxsize); >> if (bp != NULL) { >> bp->b_flags |= B_INVAL; >> brelse(bp); > ___ 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: r292345 - head/sys/boot/i386/libi386
Author: bapt Date: Wed Dec 16 17:45:03 2015 New Revision: 292345 URL: https://svnweb.freebsd.org/changeset/base/292345 Log: Use human readable representation of ip for the pxeboot.ip kenv While here use colon as a separator for pxeboot.hwaddr kenv Sponsored by: Gandi.net Modified: head/sys/boot/i386/libi386/pxe.c Modified: head/sys/boot/i386/libi386/pxe.c == --- head/sys/boot/i386/libi386/pxe.cWed Dec 16 17:13:09 2015 (r292344) +++ head/sys/boot/i386/libi386/pxe.cWed Dec 16 17:45:03 2015 (r292345) @@ -323,10 +323,9 @@ pxe_open(struct open_file *f, ...) #endif setenv("dhcp.host-name", hostname, 1); - sprintf(temp, "%08X", ntohl(myip.s_addr)); - setenv("pxeboot.ip", temp, 1); + setenv("pxeboot.ip", inet_ntoa(myip), 1); if (bootplayer.Hardware == ETHER_TYPE) { - sprintf(temp, "%6D", bootplayer.CAddr, "-"); + sprintf(temp, "%6D", bootplayer.CAddr, ":"); setenv("pxeboot.hwaddr", temp, 1); } } ___ 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: r292350 - head/share/mk
Author: emaste Date: Wed Dec 16 19:23:10 2015 New Revision: 292350 URL: https://svnweb.freebsd.org/changeset/base/292350 Log: Enable LLDB by default on amd64 and arm64 LLDB is usable for userland core file and live debugging on amd64, and for userland core file debugging on arm64. In general it works at least as well on FreeBSD as our in-tree gdb version, so enable it by default to allow for broader use and testing. An LLDB tutorial is available at http://lldb.llvm.org/tutorial.html, and a table mapping GDB commands to LLDB commands can be found at http://lldb.llvm.org/lldb-gdb.html . LLDB also has some level of support for FreeBSD on arm, mips, i386, and powerpc, but is not yet ready to have them enabled by default. Reviewed by: gnn Relnotes: Yes Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk == --- head/share/mk/src.opts.mk Wed Dec 16 19:14:37 2015(r292349) +++ head/share/mk/src.opts.mk Wed Dec 16 19:23:10 2015(r292350) @@ -180,7 +180,6 @@ __DEFAULT_NO_OPTIONS = \ DTRACE_TESTS \ EISA \ HESIOD \ -LLDB \ NAND \ OFED \ OPENLDAP \ @@ -240,6 +239,11 @@ BROKEN_OPTIONS+=PROFILE # "sorry, unimpl BROKEN_OPTIONS+=TESTS # "undefined reference to `_Unwind_Resume'" BROKEN_OPTIONS+=CXX # "libcxxrt.so: undefined reference to `_Unwind_Resume_or_Rethrow'" .endif +.if ${__T} == "aarch64" || ${__T} == "amd64" +__DEFAULT_YES_OPTIONS+=LLDB +.else +__DEFAULT_NO_OPTIONS+=LLDB +.endif # LLVM lacks support for FreeBSD 64-bit atomic operations for ARMv4/ARMv5 .if ${__T} == "arm" || ${__T} == "armeb" BROKEN_OPTIONS+=LLDB ___ 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: r292309 - in head/sys: modules modules/tcp modules/tcp/fastpath netinet netinet/tcp_stacks
On Wed, Dec 16, 2015 at 07:06:31AM -0800, John Baldwin wrote: > On Wednesday, December 16, 2015 12:56:45 AM Randall Stewart wrote: > > Author: rrs > > Date: Wed Dec 16 00:56:45 2015 > > New Revision: 292309 > > URL: https://svnweb.freebsd.org/changeset/base/292309 > > > > Log: > > First cut of the modularization of our TCP stack. Still > > to do is to clean up the timer handling using the async-drain. > > Other optimizations may be coming to go with this. Whats here > > will allow differnet tcp implementations (one included). > > Reviewed by: jtl, hiren, transports > > Sponsored by: Netflix Inc. > > Differential Revision:D4055 > > Have you considered treating TOE as a separate stack? We already > have a bit of a split to handle TOE specially. It might be nice if > it was able to plug in via this. That might also help flesh out the > abstraction a bit by giving another use case. That's an interesting thought. The TOE code should be a great test for any KPI that aims to allow multiple TCP stacks to coexist (TOEs are nothing but alternate TCP stacks running in the hardware). The only oddball thing about TOE is that the offload vs don't offload decision is made on the fly (based on the route lookup) and not when the socket is created. Regards, Navdeep > > Also, note that the Differential Revision tag should be the full > URL to the review (in which case it auto-closes it for you). > > -- > 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: r292355 - head/tools/build/mk
Author: emaste Date: Wed Dec 16 19:48:03 2015 New Revision: 292355 URL: https://svnweb.freebsd.org/changeset/base/292355 Log: Remove lldb(1) files if WITHOUT_LLDB is set Sponsored by: The FreeBSD Foundation Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc == --- head/tools/build/mk/OptionalObsoleteFiles.inc Wed Dec 16 19:34:58 2015(r292354) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Wed Dec 16 19:48:03 2015(r292355) @@ -4254,6 +4254,11 @@ OLD_DIRS+=usr/include/c++/v1 # to be filled in #.endif +.if ${MK_LLDB} == no +OLD_FILES+=usr/bin/lldb +OLD_FILES+=usr/share/man/man1/lldb.1.gz +.endif + .if ${MK_LOCALES} == no OLD_FILES+=usr/share/locale/af_ZA.ISO8859-1/LC_COLLATE OLD_FILES+=usr/share/locale/af_ZA.ISO8859-1/LC_CTYPE ___ 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: r292275 - in head/sys: net netinet netinet6
> On 16 Dec 2015, at 13:09, Steven Hartland wrote: > > I've attached a patch which should fix if you could test that would be great, > but I'd still like to understand if there is something wrong elsewhere before > I do. The board boots & works with this patch. Thanks, Kristof ___ 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: r292360 - head/bin/sh
Author: jilles Date: Wed Dec 16 20:33:47 2015 New Revision: 292360 URL: https://svnweb.freebsd.org/changeset/base/292360 Log: sh: Fix use-after-free when attempting to modify a read-only variable. Reported by: bapt MFC after:1 week Modified: head/bin/sh/var.c Modified: head/bin/sh/var.c == --- head/bin/sh/var.c Wed Dec 16 20:17:57 2015(r292359) +++ head/bin/sh/var.c Wed Dec 16 20:33:47 2015(r292360) @@ -330,7 +330,7 @@ setvareq(char *s, int flags) if (vp->flags & VREADONLY) { if ((flags & (VTEXTFIXED|VSTACK)) == 0) ckfree(s); - error("%.*s: is read only", vp->name_len, s); + error("%.*s: is read only", vp->name_len, vp->text); } if (flags & VNOSET) { if ((flags & (VTEXTFIXED|VSTACK)) == 0) ___ 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: r292366 - head/sys/dev/usb/serial
Author: ian Date: Wed Dec 16 20:54:28 2015 New Revision: 292366 URL: https://svnweb.freebsd.org/changeset/base/292366 Log: Flag the first port on a Sheevaplug ftdi serial device as jtag. Modified: head/sys/dev/usb/serial/uftdi.c Modified: head/sys/dev/usb/serial/uftdi.c == --- head/sys/dev/usb/serial/uftdi.c Wed Dec 16 20:52:00 2015 (r292365) +++ head/sys/dev/usb/serial/uftdi.c Wed Dec 16 20:54:28 2015 (r292366) @@ -563,7 +563,7 @@ static const STRUCT_USB_HOST_ID uftdi_de UFTDI_DEV(KOBIL, CONV_B1, 0), UFTDI_DEV(KOBIL, CONV_KAAN, 0), UFTDI_DEV(LARSENBRUSGAARD, ALTITRACK, 0), - UFTDI_DEV(MARVELL, SHEEVAPLUG, 0), + UFTDI_DEV(MARVELL, SHEEVAPLUG, UFTDI_JTAG_IFACE(0)), UFTDI_DEV(MATRIXORBITAL, FTDI_RANGE_0100, 0), UFTDI_DEV(MATRIXORBITAL, FTDI_RANGE_0101, 0), UFTDI_DEV(MATRIXORBITAL, FTDI_RANGE_0102, 0), ___ 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: r292373 - in head: share/man/man9 sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/dev/drm2/i915 sys/dev/drm2/ttm sys/dev/md sys/fs/fuse sys/fs/nfsclient sys/fs/smbfs sys/fs/tmpfs sys...
Author: glebius Date: Wed Dec 16 21:30:45 2015 New Revision: 292373 URL: https://svnweb.freebsd.org/changeset/base/292373 Log: A change to KPI of vm_pager_get_pages() and underlying VOP_GETPAGES(). o With new KPI consumers can request contiguous ranges of pages, and unlike before, all pages will be kept busied on return, like it was done before with the 'reqpage' only. Now the reqpage goes away. With new interface it is easier to implement code protected from race conditions. Such arrayed requests for now should be preceeded by a call to vm_pager_haspage() to make sure that request is possible. This could be improved later, making vm_pager_haspage() obsolete. Strenghtening the promises on the business of the array of pages allows us to remove such hacks as swp_pager_free_nrpage() and vm_pager_free_nonreq(). o New KPI accepts two integer pointers that may optionally point at values for read ahead and read behind, that a pager may do, if it can. These pages are completely owned by pager, and not controlled by the caller. This shifts the UFS-specific readahead logic from vm_fault.c, which should be file system agnostic, into vnode_pager.c. It also removes one VOP_BMAP() request per hard fault. Discussed with: kib, alc, jeff, scottl Sponsored by: Nginx, Inc. Sponsored by: Netflix Modified: head/share/man/man9/VOP_GETPAGES.9 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/dev/drm2/i915/i915_gem.c head/sys/dev/drm2/ttm/ttm_tt.c head/sys/dev/md/md.c head/sys/fs/fuse/fuse_vnops.c head/sys/fs/nfsclient/nfs_clbio.c head/sys/fs/smbfs/smbfs_io.c head/sys/fs/tmpfs/tmpfs_subr.c head/sys/kern/kern_exec.c head/sys/kern/uipc_shm.c head/sys/kern/uipc_syscalls.c head/sys/kern/vfs_default.c head/sys/kern/vnode_if.src head/sys/sys/buf.h head/sys/vm/default_pager.c head/sys/vm/device_pager.c head/sys/vm/phys_pager.c head/sys/vm/sg_pager.c head/sys/vm/swap_pager.c head/sys/vm/vm_fault.c head/sys/vm/vm_glue.c head/sys/vm/vm_object.c head/sys/vm/vm_object.h head/sys/vm/vm_page.c head/sys/vm/vm_pager.c head/sys/vm/vm_pager.h head/sys/vm/vnode_pager.c head/sys/vm/vnode_pager.h Modified: head/share/man/man9/VOP_GETPAGES.9 == --- head/share/man/man9/VOP_GETPAGES.9 Wed Dec 16 21:15:12 2015 (r292372) +++ head/share/man/man9/VOP_GETPAGES.9 Wed Dec 16 21:30:45 2015 (r292373) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 12, 2014 +.Dd December 16, 2015 .Dt VOP_GETPAGES 9 .Os .Sh NAME @@ -41,7 +41,7 @@ .In sys/vnode.h .In vm/vm.h .Ft int -.Fn VOP_GETPAGES "struct vnode *vp" "vm_page_t *ma" "int count" "int reqpage" +.Fn VOP_GETPAGES "struct vnode *vp" "vm_page_t *ma" "int count" "int *rbehind" "int *rahead" .Ft int .Fn VOP_PUTPAGES "struct vnode *vp" "vm_page_t *ma" "int count" "int sync" "int *rtvals" .Sh DESCRIPTION @@ -63,7 +63,7 @@ locks are held. Both methods return in the same state on both success and error returns. .Pp The arguments are: -.Bl -tag -width reqpage +.Bl -tag -width rbehind .It Fa vp The file to access. .It Fa ma @@ -78,9 +78,16 @@ if the write should be synchronous. An array of VM system result codes indicating the status of each page written by .Fn VOP_PUTPAGES . -.It Fa reqpage -The index in the page array of the requested page; i.e., the one page which -the implementation of this method must handle. +.It Fa rbehind +Optional pointer to integer specifying number of pages to be read behind, if +possible. +If the filesystem supports that feature, number of actually read pages is +reported back, otherwise zero is returned. +.It Fa rahead +Optional pointer to integer specifying number of pages to be read ahead, if +possible. +If the filesystem supports that feature, number of actually read pages is +reported back, otherwise zero is returned. .El .Pp The status of the Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Dec 16 21:15:12 2015(r292372) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Dec 16 21:30:45 2015(r292373) @@ -5762,12 +5762,13 @@ ioflags(int ioflags) } static int -zfs_getpages(struct vnode *vp, vm_page_t *m, int count, int reqpage) +zfs_getpages(struct vnode *vp, vm_page_t *m, int count, int *rbehind, +int *rahead) { znode_t *zp = VTOZ(vp); zfsvfs_t *zfsvfs = zp->z_zfsvfs; objset_t *os = zp->z_zfsvfs->z_os; - vm_page_t mfirst, mlast, mreq; + vm_page_t mlast; vm_object_t object; caddr_t va; struct sf_buf *sf; @@ -5776,82 +5777,46 @@ zfs_getpages(struct vnode *vp, vm_page_t vm_pindex_t reqstart, reqen
svn commit: r292379 - in head/sys: netinet netinet6
Author: smh Date: Wed Dec 16 22:26:28 2015 New Revision: 292379 URL: https://svnweb.freebsd.org/changeset/base/292379 Log: Fix issues introduced by r292275 * Fix panic for etherswitches which don't have a LLADDR. * Disabled DELAY in unsolicited NDA, which needs further work. * Fixed missing DELAY in carp_send_na. * style(9) fix. Reported by: kp & melifaro X-MFC-With: r292275 MFC after:1 month Sponsored by: Multiplay Modified: head/sys/netinet/if_ether.c head/sys/netinet/ip_carp.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6_nbr.c Modified: head/sys/netinet/if_ether.c == --- head/sys/netinet/if_ether.c Wed Dec 16 22:01:26 2015(r292378) +++ head/sys/netinet/if_ether.c Wed Dec 16 22:26:28 2015(r292379) @@ -1217,7 +1217,8 @@ arp_announce(struct ifnet *ifp) struct ifaddr *ifa; struct in_addr *addr, *head; - if (!(ifp->if_flags & IFF_UP) || (ifp->if_flags & IFF_NOARP)) + if (!(ifp->if_flags & IFF_UP) || (ifp->if_flags & IFF_NOARP) || + ifp->if_addr == NULL) return; entries = 8; @@ -1254,9 +1255,11 @@ arp_announce(struct ifnet *ifp) } IF_ADDR_RUNLOCK(ifp); - lladdr = IF_LLADDR(ifp); - for (i = 0; i < cnt; i++) { - arp_announce_addr(ifp, head + i, lladdr); + if (cnt > 0) { + lladdr = IF_LLADDR(ifp); + for (i = 0; i < cnt; i++) { + arp_announce_addr(ifp, head + i, lladdr); + } } free(head, M_TEMP); } Modified: head/sys/netinet/ip_carp.c == --- head/sys/netinet/ip_carp.c Wed Dec 16 22:01:26 2015(r292378) +++ head/sys/netinet/ip_carp.c Wed Dec 16 22:26:28 2015(r292379) @@ -1045,7 +1045,7 @@ carp_send_na(struct carp_softc *sc) nd6_na_output_unsolicited_addr(sc->sc_carpdev, IFA_IN6(ifa), IFA_ND6_NA_BASE_FLAGS(sc->sc_carpdev, ifa)); - nd6_na_unsolicited_addr_delay(ifa); + DELAY(nd6_na_unsolicited_addr_delay(ifa)); } } Modified: head/sys/netinet6/nd6.c == --- head/sys/netinet6/nd6.c Wed Dec 16 22:01:26 2015(r292378) +++ head/sys/netinet6/nd6.c Wed Dec 16 22:26:28 2015(r292379) @@ -209,6 +209,7 @@ nd6_ifnet_link_event(void *arg __unused, if (linkstate == LINK_STATE_UP && V_nd6_on_link) nd6_na_output_unsolicited(ifp); } + void nd6_init(void) { Modified: head/sys/netinet6/nd6_nbr.c == --- head/sys/netinet6/nd6_nbr.c Wed Dec 16 22:01:26 2015(r292378) +++ head/sys/netinet6/nd6_nbr.c Wed Dec 16 22:26:28 2015(r292379) @@ -1646,7 +1646,8 @@ nd6_na_output_unsolicited(struct ifnet * i++; if (i == cnt) break; - DELAY(ann1->delay); + /* XXX DELAY needs to be done in taskqueue to avoid stalling. */ + //DELAY(ann1->delay); } free(head, M_TEMP); } ___ 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: r292373 - in head: share/man/man9 sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/dev/drm2/i915 sys/dev/drm2/ttm sys/dev/md sys/fs/fuse sys/fs/nfsclient sys/fs/smbfs sys/fs/tmpfs sy
On Wed, 16 Dec 2015 21:30:45 + (UTC) Gleb Smirnoff wrote: > Author: glebius > Date: Wed Dec 16 21:30:45 2015 > New Revision: 292373 > URL: https://svnweb.freebsd.org/changeset/base/292373 > > Log: > A change to KPI of vm_pager_get_pages() and underlying > VOP_GETPAGES(). > o With new KPI consumers can request contiguous ranges of pages, and > unlike before, all pages will be kept busied on return, like it > was done before with the 'reqpage' only. Now the reqpage goes away. > With new interface it is easier to implement code protected from race > conditions. > > Such arrayed requests for now should be preceeded by a call to > vm_pager_haspage() to make sure that request is possible. This > could be improved later, making vm_pager_haspage() obsolete. > > Strenghtening the promises on the business of the array of pages > allows us to remove such hacks as swp_pager_free_nrpage() and > vm_pager_free_nonreq(). > > o New KPI accepts two integer pointers that may optionally point at > values for read ahead and read behind, that a pager may do, if it > can. These pages are completely owned by pager, and not controlled > by the caller. > > This shifts the UFS-specific readahead logic from vm_fault.c, > which should be file system agnostic, into vnode_pager.c. It also > removes one VOP_BMAP() request per hard fault. > > Discussed with: kib, alc, jeff, scottl > Sponsored by: Nginx, Inc. > Sponsored by: Netflix > Hello. I have panic: Dec 17 00:50:26 nonamehost kernel: ugen2.3: <6047B0021601A0114AGXA> at usbus2 Dec 17 00:50:26 nonamehost kernel: ugen2.4: at usbus2 Dec 17 00:50:26 nonamehost kernel: Dec 17 00:50:26 nonamehost kernel: Dec 17 00:50:26 nonamehost kernel: Fatal trap 12: page fault while in kernel mode Dec 17 00:50:26 nonamehost kernel: cpuid = 1; apic id = 01 Dec 17 00:50:26 nonamehost kernel: fault virtual address= 0x18 Dec 17 00:50:26 nonamehost kernel: fault code = supervisor write data, page not present Dec 17 00:50:26 nonamehost kernel: instruction pointer = 0x20:0x80a83c5f Dec 17 00:50:26 nonamehost kernel: stack pointer= 0x28:0xfe016ff683a0 Dec 17 00:50:26 nonamehost kernel: frame pointer= 0x28:0xfe016ff683b0 Dec 17 00:50:26 nonamehost kernel: code segment = base 0x0, limit 0xf, type 0x1b Dec 17 00:50:26 nonamehost kernel: = DPL 0, pres 1, long 1, def32 0, gran 1 Dec 17 00:50:26 nonamehost kernel: processor eflags = interrupt enabled, resume, IOPL = 0 Dec 17 00:50:26 nonamehost kernel: current process = 1 (kernel) Dec 17 00:50:26 nonamehost kernel: trap number = 12 Dec 17 00:50:26 nonamehost kernel: panic: page fault Dec 17 00:50:26 nonamehost kernel: cpuid = 1 Dec 17 00:50:26 nonamehost kernel: KDB: stack backtrace: Dec 17 00:50:26 nonamehost kernel: #0 0x80aca4a7 at kdb_backtrace+0x67 Dec 17 00:50:26 nonamehost kernel: #1 0x80a86692 at vpanic+0x182 Dec 17 00:50:26 nonamehost kernel: #2 0x80a86503 at panic+0x43 Dec 17 00:50:26 nonamehost kernel: #3 0x80f59051 at trap_fatal+0x351 Dec 17 00:50:26 nonamehost kernel: #4 0x80f59244 at trap_pfault+0x1e4 Dec 17 00:50:26 nonamehost kernel: #5 0x80f589fe at trap+0x46e Dec 17 00:50:26 nonamehost kernel: #6 0x80f3ced7 at calltrap+0x8 Dec 17 00:50:26 nonamehost kernel: #7 0x82277716 at zfs_freebsd_getpages+0x96 Dec 17 00:50:26 nonamehost kernel: #8 0x810a0256 at VOP_GETPAGES_APV+0xa6 Dec 17 00:50:26 nonamehost kernel: #9 0x80df26f0 at vnode_pager_getpages+0xc0 Dec 17 00:50:26 nonamehost kernel: #10 0x80debbcf at vm_pager_get_pages+0x1f Dec 17 00:50:26 nonamehost kernel: #11 0x80a3cb6f at exec_map_first_page+0x1bf Dec 17 00:50:26 nonamehost kernel: #12 0x80a3b5ac at kern_execve+0x41c Dec 17 00:50:26 nonamehost kernel: #13 0x80a3ae0c at sys_execve+0x4c Dec 17 00:50:26 nonamehost kernel: #14 0x80a1c52d at start_init+0x27d Dec 17 00:50:26 nonamehost kernel: #15 0x80a4576c at fork_exit+0x9c Dec 17 00:50:26 nonamehost kernel: #16 0x80f3d40e at fork_trampoline+0xe Dec 17 00:50:26 nonamehost kernel: Uptime: 6s Sorry, but the system is not left (does not save) the dump file just clipping from /var/log/messages ___ 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: r292373 - in head: share/man/man9 sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/dev/drm2/i915 sys/dev/drm2/ttm sys/dev/md sys/fs/fuse sys/fs/nfsclient sys/fs/smbfs sys/fs/tmpfs sy
Ivan, can you please show? kgdb> list *zfs_freebsd_getpages+0x96 -- Totus tuus, Glebius. ___ 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: r292373 - in head: share/man/man9 sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/dev/drm2/i915 sys/dev/drm2/ttm sys/dev/md sys/fs/fuse sys/fs/nfsclient sys/fs/smbfs sys/fs/tmpfs sy
Ivan, can you please test this patch? -- Totus tuus, Glebius. Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c === --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c (revision 292382) +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c (working copy) @@ -5775,7 +5775,7 @@ zfs_getpages(struct vnode *vp, vm_page_t *m, int c off_t startoff, endoff; int i, error; vm_pindex_t reqstart, reqend; - int pcount, lsize, reqsize, size; + int lsize, reqsize, size; if (rbehind) *rbehind = 0; @@ -5785,10 +5785,8 @@ zfs_getpages(struct vnode *vp, vm_page_t *m, int c ZFS_ENTER(zfsvfs); ZFS_VERIFY_ZP(zp); - pcount = OFF_TO_IDX(round_page(count)); - zfs_vmobject_wlock(object); - if (m[pcount - 1]->valid != 0 && --pcount == 0) { + if (m[count - 1]->valid != 0 && --count == 0) { zfs_vmobject_wunlock(object); ZFS_EXIT(zfsvfs); return (zfs_vm_pagerret_ok); @@ -5795,7 +5793,7 @@ zfs_getpages(struct vnode *vp, vm_page_t *m, int c } object = m[0]->object; - mlast = m[pcount - 1]; + mlast = m[count - 1]; if (IDX_TO_OFF(mlast->pindex) >= object->un_pager.vnp.vnp_size) { @@ -5814,9 +5812,9 @@ zfs_getpages(struct vnode *vp, vm_page_t *m, int c zfs_vmobject_wunlock(object); error = 0; - for (i = 0; i < pcount; i++) { + for (i = 0; i < count; i++) { size = PAGE_SIZE; - if (i == pcount - 1) + if (i == count - 1) size = lsize; va = zfs_map_page(m[i], &sf); error = dmu_read(os, zp->z_id, IDX_TO_OFF(m[i]->pindex), @@ -5829,7 +5827,7 @@ zfs_getpages(struct vnode *vp, vm_page_t *m, int c } zfs_vmobject_wlock(object); - for (i = 0; i < pcount; i++) + for (i = 0; i < count; i++) m[i]->valid = VM_PAGE_BITS_ALL; zfs_vmobject_wunlock(object); ___ 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: r292383 - head/sys/vm
Author: cem Date: Wed Dec 16 23:23:12 2015 New Revision: 292383 URL: https://svnweb.freebsd.org/changeset/base/292383 Log: vm_page.h: page busy macro fixups Minor changes to: - delete extraneous trailing semicolons from macro definitions, and - correct spelling of "busying" in panic messages Submitted by: Ryan Libby Reviewed by: alc, kib Sponsored by: EMC / Isilon Storage Division Differential Revision:https://reviews.freebsd.org/D4577 Modified: head/sys/vm/vm_page.h Modified: head/sys/vm/vm_page.h == --- head/sys/vm/vm_page.h Wed Dec 16 22:59:32 2015(r292382) +++ head/sys/vm/vm_page.h Wed Dec 16 23:23:12 2015(r292383) @@ -514,37 +514,38 @@ void vm_page_lock_assert_KBI(vm_page_t m #definevm_page_assert_sbusied(m) \ KASSERT(vm_page_sbusied(m), \ ("vm_page_assert_sbusied: page %p not shared busy @ %s:%d", \ - (void *)m, __FILE__, __LINE__)); + (m), __FILE__, __LINE__)) #definevm_page_assert_unbusied(m) \ KASSERT(!vm_page_busied(m), \ ("vm_page_assert_unbusied: page %p busy @ %s:%d", \ - (void *)m, __FILE__, __LINE__)); + (m), __FILE__, __LINE__)) #definevm_page_assert_xbusied(m) \ KASSERT(vm_page_xbusied(m), \ ("vm_page_assert_xbusied: page %p not exclusive busy @ %s:%d", \ - (void *)m, __FILE__, __LINE__)); + (m), __FILE__, __LINE__)) #definevm_page_busied(m) \ ((m)->busy_lock != VPB_UNBUSIED) #definevm_page_sbusy(m) do { \ if (!vm_page_trysbusy(m)) \ - panic("%s: page %p failed shared busing", __func__, m); \ + panic("%s: page %p failed shared busying", __func__,\ + (m)); \ } while (0) #definevm_page_tryxbusy(m) \ - (atomic_cmpset_acq_int(&m->busy_lock, VPB_UNBUSIED, \ + (atomic_cmpset_acq_int(&(m)->busy_lock, VPB_UNBUSIED, \ VPB_SINGLE_EXCLUSIVER)) #definevm_page_xbusied(m) \ - ((m->busy_lock & VPB_SINGLE_EXCLUSIVER) != 0) + (((m)->busy_lock & VPB_SINGLE_EXCLUSIVER) != 0) #definevm_page_xbusy(m) do { \ if (!vm_page_tryxbusy(m)) \ - panic("%s: page %p failed exclusive busing", __func__, \ - m); \ + panic("%s: page %p failed exclusive busying", __func__, \ + (m)); \ } while (0) #definevm_page_xunbusy(m) do { \ ___ 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: r292373 - in head: share/man/man9 sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/dev/drm2/i915 sys/dev/drm2/ttm sys/dev/md sys/fs/fuse sys/fs/nfsclient sys/fs/smbfs sys/fs/tmpfs sy
On Thu, 17 Dec 2015 02:06:33 +0300 Gleb Smirnoff wrote: > Ivan, > > can you please test this patch? > > Not helps. Dec 17 01:28:46 nonamehost kernel: Fatal trap 12: page fault while in kernel mode Dec 17 01:28:46 nonamehost kernel: cpuid = 1; apic id = 01 Dec 17 01:28:46 nonamehost kernel: fault virtual address= 0x18 Dec 17 01:28:46 nonamehost kernel: fault code = supervisor write data, page not present Dec 17 01:28:46 nonamehost kernel: instruction pointer = 0x20:0x80a83c5f Dec 17 01:28:46 nonamehost kernel: stack pointer= 0x28:0xfe016ff683a0 Dec 17 01:28:46 nonamehost kernel: frame pointer= 0x28:0xfe016ff683b0 Dec 17 01:28:46 nonamehost kernel: code segment = base 0x0, limit 0xf, type 0x1b Dec 17 01:28:46 nonamehost kernel: = DPL 0, pres 1, long 1, def32 0, gran 1 Dec 17 01:28:46 nonamehost kernel: processor eflags = interrupt enabled, resume, IOPL = 0 Dec 17 01:28:46 nonamehost kernel: current process = 1 (kernel) Dec 17 01:28:46 nonamehost kernel: trap number = 12 Dec 17 01:28:46 nonamehost kernel: panic: page fault Dec 17 01:28:46 nonamehost kernel: cpuid = 1 Dec 17 01:28:46 nonamehost kernel: KDB: stack backtrace: Dec 17 01:28:46 nonamehost kernel: #0 0x80aca4a7 at kdb_backtrace+0x67 Dec 17 01:28:46 nonamehost kernel: #1 0x80a86692 at vpanic+0x182 Dec 17 01:28:46 nonamehost kernel: #2 0x80a86503 at panic+0x43 Dec 17 01:28:46 nonamehost kernel: #3 0x80f59051 at trap_fatal+0x351 Dec 17 01:28:46 nonamehost kernel: #4 0x80f59244 at trap_pfault+0x1e4 Dec 17 01:28:46 nonamehost kernel: #5 0x80f589fe at trap+0x46e Dec 17 01:28:46 nonamehost kernel: #6 0x80f3ced7 at calltrap+0x8 Dec 17 01:28:46 nonamehost kernel: #7 0x8227770b at zfs_freebsd_getpages+0x8b Dec 17 01:28:46 nonamehost kernel: #8 0x810a0256 at VOP_GETPAGES_APV+0xa6 Dec 17 01:28:46 nonamehost kernel: #9 0x80df26f0 at vnode_pager_getpages+0xc0 Dec 17 01:28:46 nonamehost kernel: #10 0x80debbcf at vm_pager_get_pages+0x1f Dec 17 01:28:46 nonamehost kernel: #11 0x80a3cb6f at exec_map_first_page+0x1bf Dec 17 01:28:46 nonamehost kernel: #12 0x80a3b5ac at kern_execve+0x41c Dec 17 01:28:46 nonamehost kernel: #13 0x80a3ae0c at sys_execve+0x4c Dec 17 01:28:46 nonamehost kernel: #14 0x80a1c52d at start_init+0x27d Dec 17 01:28:46 nonamehost kernel: #15 0x80a4576c at fork_exit+0x9c Dec 17 01:28:46 nonamehost kernel: #16 0x80f3d40e at fork_trampoline+0xe Dec 17 01:28:46 nonamehost kernel: Uptime: 6s ___ 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: r292373 - in head: share/man/man9 sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/dev/drm2/i915 sys/dev/drm2/ttm sys/dev/md sys/fs/fuse sys/fs/nfsclient sys/fs/smbfs sys/fs/tmpfs sy
On Thu, 17 Dec 2015 02:06:33 +0300 Gleb Smirnoff wrote: > Ivan, > > can you please test this patch? > > About ZFS: I have not default options vfs.zfs.prefetch_disable=1 vfs.zfs.arc_max="2G" vfs.zfs.vdev.cache.max=65536 vfs.zfs.vdev.cache.size="16M" Perhaps it has something to clarify the situation. ___ 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: r292384 - in head/sys: cam/ctl compat/linux kern netinet security/mac
Author: markj Date: Wed Dec 16 23:39:27 2015 New Revision: 292384 URL: https://svnweb.freebsd.org/changeset/base/292384 Log: Fix style issues around existing SDT probes. - Use SDT_PROBE() instead of SDT_PROBE(). This has no functional effect at the moment, but will be needed for some future changes. - Don't hardcode the module component of the probe identifier. This is set automatically by the SDT framework. MFC after:1 week Modified: head/sys/cam/ctl/ctl_backend_block.c head/sys/compat/linux/linux_dtrace.h head/sys/kern/kern_exec.c head/sys/kern/kern_exit.c head/sys/kern/kern_fork.c head/sys/kern/kern_proc.c head/sys/kern/kern_racct.c head/sys/kern/kern_sig.c head/sys/kern/kern_timeout.c head/sys/kern/vfs_cache.c head/sys/netinet/in_kdtrace.c head/sys/netinet/in_kdtrace.h head/sys/netinet/sctp_cc_functions.c head/sys/security/mac/mac_framework.c head/sys/security/mac/mac_internal.h Modified: head/sys/cam/ctl/ctl_backend_block.c == --- head/sys/cam/ctl/ctl_backend_block.cWed Dec 16 23:23:12 2015 (r292383) +++ head/sys/cam/ctl/ctl_backend_block.cWed Dec 16 23:39:27 2015 (r292384) @@ -610,10 +610,10 @@ ctl_be_block_flush_file(struct ctl_be_bl ctl_complete_beio(beio); } -SDT_PROBE_DEFINE1(cbb, kernel, read, file_start, "uint64_t"); -SDT_PROBE_DEFINE1(cbb, kernel, write, file_start, "uint64_t"); -SDT_PROBE_DEFINE1(cbb, kernel, read, file_done,"uint64_t"); -SDT_PROBE_DEFINE1(cbb, kernel, write, file_done, "uint64_t"); +SDT_PROBE_DEFINE1(cbb, , read, file_start, "uint64_t"); +SDT_PROBE_DEFINE1(cbb, , write, file_start, "uint64_t"); +SDT_PROBE_DEFINE1(cbb, , read, file_done,"uint64_t"); +SDT_PROBE_DEFINE1(cbb, , write, file_done, "uint64_t"); static void ctl_be_block_dispatch_file(struct ctl_be_block_lun *be_lun, @@ -638,10 +638,10 @@ ctl_be_block_dispatch_file(struct ctl_be bzero(&xuio, sizeof(xuio)); if (beio->bio_cmd == BIO_READ) { - SDT_PROBE(cbb, kernel, read, file_start, 0, 0, 0, 0, 0); + SDT_PROBE0(cbb, , read, file_start); xuio.uio_rw = UIO_READ; } else { - SDT_PROBE(cbb, kernel, write, file_start, 0, 0, 0, 0, 0); + SDT_PROBE0(cbb, , write, file_start); xuio.uio_rw = UIO_WRITE; } xuio.uio_offset = beio->io_offset; @@ -684,7 +684,7 @@ ctl_be_block_dispatch_file(struct ctl_be error = VOP_READ(be_lun->vn, &xuio, flags, file_data->cred); VOP_UNLOCK(be_lun->vn, 0); - SDT_PROBE(cbb, kernel, read, file_done, 0, 0, 0, 0, 0); + SDT_PROBE0(cbb, , read, file_done); if (error == 0 && xuio.uio_resid > 0) { /* * If we red less then requested (EOF), then @@ -733,7 +733,7 @@ ctl_be_block_dispatch_file(struct ctl_be VOP_UNLOCK(be_lun->vn, 0); vn_finished_write(mountpoint); - SDT_PROBE(cbb, kernel, write, file_done, 0, 0, 0, 0, 0); + SDT_PROBE0(cbb, , write, file_done); } mtx_lock(&be_lun->io_lock); @@ -869,10 +869,10 @@ ctl_be_block_dispatch_zvol(struct ctl_be bzero(&xuio, sizeof(xuio)); if (beio->bio_cmd == BIO_READ) { - SDT_PROBE(cbb, kernel, read, file_start, 0, 0, 0, 0, 0); + SDT_PROBE0(cbb, , read, file_start); xuio.uio_rw = UIO_READ; } else { - SDT_PROBE(cbb, kernel, write, file_start, 0, 0, 0, 0, 0); + SDT_PROBE0(cbb, , write, file_start); xuio.uio_rw = UIO_WRITE; } xuio.uio_offset = beio->io_offset; @@ -903,9 +903,9 @@ ctl_be_block_dispatch_zvol(struct ctl_be error = ENXIO; if (beio->bio_cmd == BIO_READ) - SDT_PROBE(cbb, kernel, read, file_done, 0, 0, 0, 0, 0); + SDT_PROBE0(cbb, , read, file_done); else - SDT_PROBE(cbb, kernel, write, file_done, 0, 0, 0, 0, 0); + SDT_PROBE0(cbb, , write, file_done); mtx_lock(&be_lun->io_lock); devstat_end_transaction(beio->lun->disk_stats, beio->io_len, @@ -1501,10 +1501,10 @@ ctl_be_block_cw_dispatch(struct ctl_be_b } } -SDT_PROBE_DEFINE1(cbb, kernel, read, start, "uint64_t"); -SDT_PROBE_DEFINE1(cbb, kernel, write, start, "uint64_t"); -SDT_PROBE_DEFINE1(cbb, kernel, read, alloc_done, "uint64_t"); -SDT_PROBE_DEFINE1(cbb, kernel, write, alloc_done, "uint64_t"); +SDT_PROBE_DEFINE1(cbb, , read, start, "uint64_t"); +SDT_PROBE_DEFINE1(cbb, , write, start, "uint64_t"); +SDT_PROBE_DEFINE1(cbb, , read, alloc_done, "uint64_t"); +SDT_PROBE_DEFINE1(cbb, , write, alloc_done, "uint64_t"); static void ctl_be_block_next(struct ctl_be_block_io *beio) @@ -1549,9 +1549,9 @@ ctl_be_block_dispatch(struct ctl_be_bloc lbalen = ARGS(io
svn commit: r292385 - head/sys/cddl/dev/systrace
Author: markj Date: Wed Dec 16 23:46:27 2015 New Revision: 292385 URL: https://svnweb.freebsd.org/changeset/base/292385 Log: Remove the unused systrace device file and fix style bugs. MFC after:1 week Modified: head/sys/cddl/dev/systrace/systrace.c Modified: head/sys/cddl/dev/systrace/systrace.c == --- head/sys/cddl/dev/systrace/systrace.c Wed Dec 16 23:39:27 2015 (r292384) +++ head/sys/cddl/dev/systrace/systrace.c Wed Dec 16 23:46:27 2015 (r292385) @@ -19,9 +19,6 @@ * CDDL HEADER END * * Portions Copyright 2006-2008 John Birrell j...@freebsd.org - * - * $FreeBSD$ - * */ /* @@ -30,6 +27,8 @@ */ #include +__FBSDID("$FreeBSD$"); + #include #include #include @@ -50,8 +49,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -134,26 +133,17 @@ extern const char *freebsd32_syscallname #error 1 << SYSTRACE_SHIFT must exceed number of system calls #endif -static d_open_tsystrace_open; -static int systrace_unload(void); -static voidsystrace_getargdesc(void *, dtrace_id_t, void *, dtrace_argdesc_t *); +static voidsystrace_load(void *); +static voidsystrace_unload(void *); + +static voidsystrace_getargdesc(void *, dtrace_id_t, void *, + dtrace_argdesc_t *); static voidsystrace_provide(void *, dtrace_probedesc_t *); static voidsystrace_destroy(void *, dtrace_id_t, void *); static voidsystrace_enable(void *, dtrace_id_t, void *); static voidsystrace_disable(void *, dtrace_id_t, void *); -static voidsystrace_load(void *); - -static struct cdevsw systrace_cdevsw = { - .d_version = D_VERSION, - .d_open = systrace_open, -#ifndef NATIVE_ABI - .d_name = "systrace_" MODNAME, -#else - .d_name = "systrace", -#endif -}; -static union { +static union { const char **p_constnames; char**pp_syscallnames; } uglyhack = { SYSCALLNAMES }; @@ -179,7 +169,6 @@ static dtrace_pops_t systrace_pops = { systrace_destroy }; -static struct cdev *systrace_cdev; static dtrace_provider_id_tsystrace_id; typedef void (*systrace_dtrace_probe_t)(dtrace_id_t, uintptr_t, uintptr_t, @@ -194,29 +183,31 @@ typedef void (*systrace_dtrace_probe_t)( * compat syscall from something like Linux. */ static void -systrace_probe(u_int32_t id, int sysnum, struct sysent *sysent, void *params, +systrace_probe(uint32_t id, int sysnum, struct sysent *sysent, void *params, int ret) { + uint64_t uargs[8]; systrace_dtrace_probe_t probe; - int n_args = 0; - u_int64_t uargs[8]; + int n_args = 0; memset(uargs, 0, sizeof(uargs)); + /* * Check if this syscall has an argument conversion function * registered. */ - if (params && sysent->sy_systrace_args_func != NULL) { + if (params != NULL && sysent->sy_systrace_args_func != NULL) { /* * Convert the syscall parameters using the registered * function. */ - (*sysent->sy_systrace_args_func)(sysnum, params, uargs, &n_args); - } else if (params) { + (*sysent->sy_systrace_args_func)(sysnum, params, uargs, + &n_args); + } else if (params != NULL) { /* * Use the built-in system call argument conversion * function to translate the syscall structure fields -* into the array of 64-bit values that DTrace +* into the array of 64-bit values that DTrace * expects. */ systrace_args(sysnum, params, uargs, &n_args); @@ -237,21 +228,20 @@ systrace_probe(u_int32_t id, int sysnum, #endif static void -systrace_getargdesc(void *arg, dtrace_id_t id, void *parg, dtrace_argdesc_t *desc) +systrace_getargdesc(void *arg, dtrace_id_t id, void *parg, +dtrace_argdesc_t *desc) { int sysnum = SYSTRACE_SYSNUM((uintptr_t)parg); if (SYSTRACE_ISENTRY((uintptr_t)parg)) - systrace_entry_setargdesc(sysnum, desc->dtargd_ndx, + systrace_entry_setargdesc(sysnum, desc->dtargd_ndx, desc->dtargd_native, sizeof(desc->dtargd_native)); else - systrace_return_setargdesc(sysnum, desc->dtargd_ndx, + systrace_return_setargdesc(sysnum, desc->dtargd_ndx, desc->dtargd_native, sizeof(desc->dtargd_native)); if (desc->dtargd_native[0] == '\0') desc->dtargd_ndx = DTRACE_ARGNONE; - - return; } static void @@ -267,11 +257,13 @@ systrace_provide(void *arg, dtrace_probe uglyhack.pp_syscallnames[i], "entry") != 0) continue
svn commit: r292386 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/fuse fs/nfsclient fs/smbfs
Author: glebius Date: Wed Dec 16 23:48:50 2015 New Revision: 292386 URL: https://svnweb.freebsd.org/changeset/base/292386 Log: Fix breakage caused by r292373 in ZFS/FUSE/NFS/SMBFS. With the new VOP_GETPAGES() KPI the "count" argument counts pages already, and doesn't need to be translated from bytes to pages. While here make it consistent that *rbehind and *rahead are updated only if we doesn't return error. Pointy hat to:glebius Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/fs/fuse/fuse_vnops.c head/sys/fs/nfsclient/nfs_clbio.c head/sys/fs/smbfs/smbfs_io.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Dec 16 23:46:27 2015(r292385) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Dec 16 23:48:50 2015(r292386) @@ -5775,27 +5775,21 @@ zfs_getpages(struct vnode *vp, vm_page_t off_t startoff, endoff; int i, error; vm_pindex_t reqstart, reqend; - int pcount, lsize, reqsize, size; + int lsize, reqsize, size; - if (rbehind) - *rbehind = 0; - if (rahead) - *rahead = 0; + object = m[0]->object; + error = 0; ZFS_ENTER(zfsvfs); ZFS_VERIFY_ZP(zp); - pcount = OFF_TO_IDX(round_page(count)); - zfs_vmobject_wlock(object); - if (m[pcount - 1]->valid != 0 && --pcount == 0) { + if (m[count - 1]->valid != 0 && --count == 0) { zfs_vmobject_wunlock(object); - ZFS_EXIT(zfsvfs); - return (zfs_vm_pagerret_ok); + goto out; } - object = m[0]->object; - mlast = m[pcount - 1]; + mlast = m[count - 1]; if (IDX_TO_OFF(mlast->pindex) >= object->un_pager.vnp.vnp_size) { @@ -5813,10 +5807,9 @@ zfs_getpages(struct vnode *vp, vm_page_t IDX_TO_OFF(mlast->pindex); zfs_vmobject_wunlock(object); - error = 0; - for (i = 0; i < pcount; i++) { + for (i = 0; i < count; i++) { size = PAGE_SIZE; - if (i == pcount - 1) + if (i == count - 1) size = lsize; va = zfs_map_page(m[i], &sf); error = dmu_read(os, zp->z_id, IDX_TO_OFF(m[i]->pindex), @@ -5829,14 +5822,21 @@ zfs_getpages(struct vnode *vp, vm_page_t } zfs_vmobject_wlock(object); - for (i = 0; i < pcount; i++) + for (i = 0; i < count; i++) m[i]->valid = VM_PAGE_BITS_ALL; zfs_vmobject_wunlock(object); out: ZFS_ACCESSTIME_STAMP(zfsvfs, zp); ZFS_EXIT(zfsvfs); - return (error ? zfs_vm_pagerret_error : zfs_vm_pagerret_ok); + if (error == 0) { + if (rbehind) + *rbehind = 0; + if (rahead) + *rahead = 0; + return (zfs_vm_pagerret_ok); + } else + return (zfs_vm_pagerret_error); } static int Modified: head/sys/fs/fuse/fuse_vnops.c == --- head/sys/fs/fuse/fuse_vnops.c Wed Dec 16 23:46:27 2015 (r292385) +++ head/sys/fs/fuse/fuse_vnops.c Wed Dec 16 23:48:50 2015 (r292386) @@ -1752,17 +1752,12 @@ fuse_vnop_getpages(struct vop_getpages_a td = curthread; /* XXX */ cred = curthread->td_ucred; /* XXX */ pages = ap->a_m; - count = ap->a_count; - if (ap->a_rbehind) - *ap->a_rbehind = 0; - if (ap->a_rahead) - *ap->a_rahead = 0; + npages = ap->a_count; if (!fsess_opt_mmap(vnode_mount(vp))) { FS_DEBUG("called on non-cacheable vnode??\n"); return (VM_PAGER_ERROR); } - npages = btoc(count); /* * If the last page is partially valid, just return it and allow @@ -1773,13 +1768,8 @@ fuse_vnop_getpages(struct vop_getpages_a * but still somewhat disconnected from the kernel? */ VM_OBJECT_WLOCK(vp->v_object); - if (pages[npages - 1]->valid != 0) { - if (--npages == 0) { - VM_OBJECT_WUNLOCK(vp->v_object); - return (VM_PAGER_OK); - } - count = npages << PAGE_SHIFT; -} + if (pages[npages - 1]->valid != 0 && --npages == 0) + goto out; VM_OBJECT_WUNLOCK(vp->v_object); /* @@ -1793,6 +1783,7 @@ fuse_vnop_getpages(struct vop_getpages_a PCPU_INC(cnt.v_vnodein); PCPU_ADD(cnt.v_vnodepgsin, npages); + count = npages << PAGE_SHIFT; iov.iov_base = (caddr_t)kva; iov.iov_len = count; uio.uio_io
Re: svn commit: r292373 - in head: share/man/man9 sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/dev/drm2/i915 sys/dev/drm2/ttm sys/dev/md sys/fs/fuse sys/fs/nfsclient sys/fs/smbfs sys/fs/tmpfs sy
Ivan, can you please test r292386? -- Totus tuus, Glebius. ___ 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: r292388 - in head/sys: cddl/dev/dtrace cddl/dev/systrace kern sys
Author: markj Date: Thu Dec 17 00:00:27 2015 New Revision: 292388 URL: https://svnweb.freebsd.org/changeset/base/292388 Log: Support an arbitrary number of arguments to DTrace syscall probes. Rather than pushing all eight possible arguments into dtrace_probe()'s stack frame, make the syscall_args struct for the current syscall available via the current thread. Using a custom getargval method for the systrace provider, this allows any syscall argument to be fetched, even in kernels that have modified the maximum number of system call arguments. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/cddl/dev/dtrace/dtrace_cddl.h head/sys/cddl/dev/systrace/systrace.c head/sys/kern/subr_syscall.c head/sys/sys/sysent.h Modified: head/sys/cddl/dev/dtrace/dtrace_cddl.h == --- head/sys/cddl/dev/dtrace/dtrace_cddl.h Wed Dec 16 23:53:16 2015 (r292387) +++ head/sys/cddl/dev/dtrace/dtrace_cddl.h Thu Dec 17 00:00:27 2015 (r292388) @@ -83,8 +83,8 @@ typedef struct kdtrace_thread { uintptr_t td_dtrace_regv; #endif u_int64_t td_hrtime; /* Last time on cpu. */ - int td_errno; /* Syscall return value. */ void*td_dtrace_sscr; /* Saved scratch space location. */ + void*td_systrace_args; /* syscall probe arguments. */ } kdtrace_thread_t; /* @@ -110,6 +110,7 @@ typedef struct kdtrace_thread { #definet_dtrace_astpc td_dtrace->td_dtrace_astpc #definet_dtrace_regv td_dtrace->td_dtrace_regv #definet_dtrace_sscr td_dtrace->td_dtrace_sscr +#definet_dtrace_systrace_args td_dtrace->td_systrace_args #definep_dtrace_helpersp_dtrace->p_dtrace_helpers #definep_dtrace_count p_dtrace->p_dtrace_count #definep_dtrace_probes p_dtrace->p_dtrace_probes Modified: head/sys/cddl/dev/systrace/systrace.c == --- head/sys/cddl/dev/systrace/systrace.c Wed Dec 16 23:53:16 2015 (r292387) +++ head/sys/cddl/dev/systrace/systrace.c Thu Dec 17 00:00:27 2015 (r292388) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -53,9 +54,10 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include +#include + +#include #ifdef LINUX_SYSTRACE #if defined(__amd64__) @@ -138,6 +140,7 @@ static void systrace_unload(void *); static voidsystrace_getargdesc(void *, dtrace_id_t, void *, dtrace_argdesc_t *); +static uint64_tsystrace_getargval(void *, dtrace_id_t, void *, int, int); static voidsystrace_provide(void *, dtrace_probedesc_t *); static voidsystrace_destroy(void *, dtrace_id_t, void *); static voidsystrace_enable(void *, dtrace_id_t, void *); @@ -164,16 +167,13 @@ static dtrace_pops_t systrace_pops = { NULL, NULL, systrace_getargdesc, - NULL, + systrace_getargval, NULL, systrace_destroy }; static dtrace_provider_id_tsystrace_id; -typedef void (*systrace_dtrace_probe_t)(dtrace_id_t, uintptr_t, uintptr_t, -uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t); - #ifdef NATIVE_ABI /* * Probe callback function. @@ -183,48 +183,48 @@ typedef void (*systrace_dtrace_probe_t)( * compat syscall from something like Linux. */ static void -systrace_probe(uint32_t id, int sysnum, struct sysent *sysent, void *params, -int ret) +systrace_probe(struct syscall_args *sa, enum systrace_probe_t type, int retval) { - uint64_t uargs[8]; - systrace_dtrace_probe_t probe; - int n_args = 0; + uint64_t uargs[nitems(sa->args)]; + dtrace_id_t id; + int n_args, sysnum; + sysnum = sa->code; memset(uargs, 0, sizeof(uargs)); - /* -* Check if this syscall has an argument conversion function -* registered. -*/ - if (params != NULL && sysent->sy_systrace_args_func != NULL) { - /* -* Convert the syscall parameters using the registered -* function. -*/ - (*sysent->sy_systrace_args_func)(sysnum, params, uargs, - &n_args); - } else if (params != NULL) { + if (type == SYSTRACE_ENTRY) { + id = sa->callp->sy_entry; + + if (sa->callp->sy_systrace_args_func != NULL) + /* +* Convert the syscall parameters using the registered +* function. +*/ + (*sa->callp->sy_systrace_args_func)(sysnum, sa->args, + uargs, &n_args); + else + /* +* Use the
svn commit: r292389 - head/sys/conf
Author: markj Date: Thu Dec 17 00:02:53 2015 New Revision: 292389 URL: https://svnweb.freebsd.org/changeset/base/292389 Log: Consistently use ${AWK} instead of hard-coding the program name. MFC after:3 days Modified: head/sys/conf/kmod.mk Modified: head/sys/conf/kmod.mk == --- head/sys/conf/kmod.mk Thu Dec 17 00:00:27 2015(r292388) +++ head/sys/conf/kmod.mk Thu Dec 17 00:02:53 2015(r292389) @@ -225,7 +225,7 @@ ${FULLPROG}: ${OBJS} .else grep -v '^#' < ${EXPORT_SYMS} > export_syms .endif - awk -f ${SYSDIR}/conf/kmod_syms.awk ${.TARGET} \ + ${AWK} -f ${SYSDIR}/conf/kmod_syms.awk ${.TARGET} \ export_syms | xargs -J% ${OBJCOPY} % ${.TARGET} .endif .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"
Re: svn commit: r292379 - in head/sys: netinet netinet6
Steven, I'm sorry that wasn't able to review D4111 in time, but I have very strong concerns against r292275. And r292379 doesn't improve situation. I am asking you to back out both patches, and then we can get together back to the problem. The 156226 bug was sitting for 2 years in the bugzilla for a reason. It is a not "low hanging fruit" like koobs@ says. I'm sorry if I sound unforgiving, but you got a very bad commit record in this area. You committed r290403 to ip_carp.c which "added MTU support to carp interfaces", and that was after 4 YEARS of carp(4) being not an interface. So, I assume you doesn't have a good understanding of the current state of the stack, direction it is developed and things that can be done and can not (including DELAY() in callout(9). Note, that the MAINTAINERS file still lists me for ip_carp.c, and you didn't wait for my review. yet another reason to ask for backout. I understand that you got a product at work that needs to have problem fixed. I'm glad that you got a patch that works it around. But that doesn't mean the patch should immeditely be dumped in head with a threat of soon MFC. -- Totus tuus, Glebius. ___ 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: r292373 - in head: share/man/man9 sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/dev/drm2/i915 sys/dev/drm2/ttm sys/dev/md sys/fs/fuse sys/fs/nfsclient sys/fs/smbfs sys/fs/tmpfs sy
On Thu, 17 Dec 2015 02:49:18 +0300 Gleb Smirnoff wrote: > Ivan, > > can you please test r292386? > It works. The panic was gone. Thank you for your work. ___ 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: r292394 - head/usr.bin/netstat
Author: gnn Date: Thu Dec 17 02:02:09 2015 New Revision: 292394 URL: https://svnweb.freebsd.org/changeset/base/292394 Log: Switch the IPsec related statistics to using the built in sysctl variable set rather than reading from kernel memory. This also makes the -z (zero) flag work correctly MFC after:1 week Sponsored by: Rubicon Communications, LLC (Netgate) Differential Revision:https://reviews.freebsd.org/D4591 Modified: head/usr.bin/netstat/ipsec.c head/usr.bin/netstat/main.c Modified: head/usr.bin/netstat/ipsec.c == --- head/usr.bin/netstat/ipsec.cThu Dec 17 01:33:45 2015 (r292393) +++ head/usr.bin/netstat/ipsec.cThu Dec 17 02:02:09 2015 (r292394) @@ -216,10 +216,17 @@ ipsec_stats(u_long off, const char *name { struct ipsecstat ipsecstat; - if (off == 0) - return; + if (strcmp(name, "ipsec6") == 0) { + if (fetch_stats("net.inet6.ipsec6.ipsecstats", off,&ipsecstat, + sizeof(ipsecstat), kread_counters) != 0) + return; + } else { + if (fetch_stats("net.inet.ipsec.ipsecstats", off, &ipsecstat, + sizeof(ipsecstat), kread_counters) != 0) + return; + } + xo_emit("{T:/%s}:\n", name); - kread_counters(off, (char *)&ipsecstat, sizeof(ipsecstat)); print_ipsecstats(&ipsecstat); } @@ -318,10 +325,11 @@ ah_stats(u_long off, const char *name, i { struct ahstat ahstat; - if (off == 0) + if (fetch_stats("net.inet.ah.stats", off, &ahstat, + sizeof(ahstat), kread_counters) != 0) return; + xo_emit("{T:/%s}:\n", name); - kread_counters(off, (char *)&ahstat, sizeof(ahstat)); print_ahstats(&ahstat); } @@ -377,10 +385,11 @@ esp_stats(u_long off, const char *name, { struct espstat espstat; - if (off == 0) + if (fetch_stats("net.inet.esp.stats", off, &espstat, + sizeof(espstat), kread_counters) != 0) return; + xo_emit("{T:/%s}:\n", name); - kread_counters(off, (char *)&espstat, sizeof(espstat)); print_espstats(&espstat); } @@ -434,10 +443,11 @@ ipcomp_stats(u_long off, const char *nam { struct ipcompstat ipcompstat; - if (off == 0) + if (fetch_stats("net.inet.ipcomp.stats", off, &ipcompstat, + sizeof(ipcompstat), kread_counters) != 0) return; + xo_emit("{T:/%s}:\n", name); - kread_counters(off, (char *)&ipcompstat, sizeof(ipcompstat)); print_ipcompstats(&ipcompstat); } Modified: head/usr.bin/netstat/main.c == --- head/usr.bin/netstat/main.c Thu Dec 17 01:33:45 2015(r292393) +++ head/usr.bin/netstat/main.c Thu Dec 17 02:02:09 2015(r292394) @@ -108,13 +108,13 @@ static struct protox { igmp_stats, NULL, "igmp", 1, IPPROTO_IGMP }, #ifdef IPSEC { -1, N_IPSEC4STAT, 1, NULL, /* keep as compat */ - ipsec_stats, NULL, "ipsec", 0, 0}, + ipsec_stats, NULL, "ipsec", 1, 0}, { -1, N_AHSTAT, 1, NULL, - ah_stats, NULL, "ah", 0, 0}, + ah_stats, NULL, "ah", 1, 0}, { -1, N_ESPSTAT, 1, NULL, - esp_stats,NULL, "esp", 0, 0}, + esp_stats,NULL, "esp", 1, 0}, { -1, N_IPCOMPSTAT, 1, NULL, - ipcomp_stats, NULL, "ipcomp", 0,0}, + ipcomp_stats, NULL, "ipcomp", 1,0}, #endif { N_RIPCBINFO, N_PIMSTAT, 1, protopr, pim_stats,NULL, "pim", 1, IPPROTO_PIM }, @@ -146,7 +146,7 @@ static struct protox ip6protox[] = { #endif #ifdef IPSEC { -1, N_IPSEC6STAT, 1, NULL, - ipsec_stats, NULL, "ipsec6", 0,0 }, + ipsec_stats, NULL, "ipsec6", 1,0 }, #endif #ifdef notyet { -1, N_PIM6STAT, 1, NULL, ___ 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: r292379 - in head/sys: netinet netinet6
On 17/12/2015 11:38 AM, Gleb Smirnoff wrote: > I'm sorry that wasn't able to review D4111 in time, but I have > very strong concerns against r292275. And r292379 doesn't > improve situation. I am asking you to back out both patches, > and then we can get together back to the problem. The 156226 > bug was sitting for 2 years in the bugzilla for a reason. It > is a not "low hanging fruit" like koobs@ says. To clarify my comment on the review, I intended to refer to the *value*, and concrete *definition* of the desired feature (ie the problem space), not the triviality of any solution or implementation. I do my best not to presume where I don't have knowledge :) ./koobs ___ 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"