svn commit: r292013 - head/lib/libc/stdio
Author: ngie Date: Wed Dec 9 09:14:57 2015 New Revision: 292013 URL: https://svnweb.freebsd.org/changeset/base/292013 Log: Use stdint.h instead of inttypes.h as the latter pollutes namespace more MFC after: 3 days X-MFC with: r292004 Submitted by: bde Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/stdio/open_memstream.c head/lib/libc/stdio/open_wmemstream.c Modified: head/lib/libc/stdio/open_memstream.c == --- head/lib/libc/stdio/open_memstream.cWed Dec 9 08:53:41 2015 (r292012) +++ head/lib/libc/stdio/open_memstream.cWed Dec 9 09:14:57 2015 (r292013) @@ -31,10 +31,10 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include #include +#include #ifdef DEBUG -#include +#include #endif -#include #include #include #include Modified: head/lib/libc/stdio/open_wmemstream.c == --- head/lib/libc/stdio/open_wmemstream.c Wed Dec 9 08:53:41 2015 (r292012) +++ head/lib/libc/stdio/open_wmemstream.c Wed Dec 9 09:14:57 2015 (r292013) @@ -31,10 +31,10 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include #include +#include #ifdef DEBUG -#include +#include #endif -#include #include #include #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"
Re: svn commit: r292004 - head/lib/libc/stdio
> On Dec 8, 2015, at 23:23, Bruce Evanswrote: > >> On Tue, 8 Dec 2015, Garrett Cooper wrote: >> >> Author: ngie >> ... >> >> Log: >> Fix compilation when -DDEBUG is defined by adding inttypes.h #include >> for intmax_t > > Wrong include. intmax_t is declared in . declares > much more and is usually only needed for functions like strtoimax(). > also declares PRI* and SCN*, but those are only needed in > the garbage. Whups... You're right >.<.. ___ 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: r292013 - head/lib/libc/stdio
On Wed, 9 Dec 2015, Garrett Cooper wrote: Log: ... Use stdint.h instead of inttypes.h as the latter pollutes namespace more ... Modified: head/lib/libc/stdio/open_memstream.c == --- head/lib/libc/stdio/open_memstream.cWed Dec 9 08:53:41 2015 (r292012) +++ head/lib/libc/stdio/open_memstream.cWed Dec 9 09:14:57 2015 (r292013) @@ -31,10 +31,10 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include #include +#include #ifdef DEBUG -#include +#include #endif -#include #include #include #include Thanks. It wou;d be noice to fix some other cases of excessive includes. There aren't many for newer headers like stdint.h and inttypes.h. Bruce ___ 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: r292014 - head/sys/dev/usb/wlan
Author: avos Date: Wed Dec 9 09:29:38 2015 New Revision: 292014 URL: https://svnweb.freebsd.org/changeset/base/292014 Log: urtwn: add WME support Tested with: - RTL8188CUS, HOSTAP mode. - RTL8188EU, STA mode. Reviewed by: kevlo Approved by: adrian (mentor) Differential Revision:https://reviews.freebsd.org/D4020 Modified: head/sys/dev/usb/wlan/if_urtwn.c head/sys/dev/usb/wlan/if_urtwnreg.h head/sys/dev/usb/wlan/if_urtwnvar.h Modified: head/sys/dev/usb/wlan/if_urtwn.c == --- head/sys/dev/usb/wlan/if_urtwn.cWed Dec 9 09:14:57 2015 (r292013) +++ head/sys/dev/usb/wlan/if_urtwn.cWed Dec 9 09:29:38 2015 (r292014) @@ -291,6 +291,7 @@ static void urtwn_set_gain(struct urtwn static voidurtwn_scan_start(struct ieee80211com *); static voidurtwn_scan_end(struct ieee80211com *); static voidurtwn_set_channel(struct ieee80211com *); +static int urtwn_wme_update(struct ieee80211com *); static voidurtwn_set_promisc(struct urtwn_softc *); static voidurtwn_update_promisc(struct ieee80211com *); static voidurtwn_update_mcast(struct ieee80211com *); @@ -376,6 +377,16 @@ static const struct usb_config urtwn_con }, }; +static const struct wme_to_queue { + uint16_t reg; + uint8_t qid; +} wme2queue[WME_NUM_AC] = { + { R92C_EDCA_BE_PARAM, URTWN_BULK_TX_BE}, + { R92C_EDCA_BK_PARAM, URTWN_BULK_TX_BK}, + { R92C_EDCA_VI_PARAM, URTWN_BULK_TX_VI}, + { R92C_EDCA_VO_PARAM, URTWN_BULK_TX_VO} +}; + static int urtwn_match(device_t self) { @@ -473,6 +484,7 @@ urtwn_attach(device_t self) | IEEE80211_C_SHSLOT/* short slot time supported */ | IEEE80211_C_BGSCAN/* capable of bg scanning */ | IEEE80211_C_WPA /* 802.11i */ + | IEEE80211_C_WME /* 802.11e */ ; bands = 0; @@ -489,6 +501,7 @@ urtwn_attach(device_t self) ic->ic_parent = urtwn_parent; ic->ic_vap_create = urtwn_vap_create; ic->ic_vap_delete = urtwn_vap_delete; + ic->ic_wme.wme_update = urtwn_wme_update; ic->ic_update_promisc = urtwn_update_promisc; ic->ic_update_mcast = urtwn_update_mcast; @@ -2158,8 +2171,8 @@ urtwn_tx_data(struct urtwn_softc *sc, st struct ieee80211com *ic = >sc_ic; struct ieee80211vap *vap = ni->ni_vap; struct r92c_tx_desc *txd; - uint8_t macid, raid, ridx, subtype, type, qsel; - int ismcast; + uint8_t macid, raid, ridx, subtype, type, tid, qsel; + int hasqos, ismcast; URTWN_ASSERT_LOCKED(sc); @@ -2169,8 +2182,16 @@ urtwn_tx_data(struct urtwn_softc *sc, st wh = mtod(m, struct ieee80211_frame *); type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK; + hasqos = IEEE80211_QOS_HAS_SEQ(wh); ismcast = IEEE80211_IS_MULTICAST(wh->i_addr1); + /* Select TX ring for this frame. */ + if (hasqos) { + tid = ((const struct ieee80211_qosframe *)wh)->i_qos[0]; + tid &= IEEE80211_QOS_TID; + } else + tid = 0; + if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { k = ieee80211_crypto_encap(ni, m); if (k == NULL) { @@ -2199,7 +2220,7 @@ urtwn_tx_data(struct urtwn_softc *sc, st macid = URTWN_MACID_BSS; if (type == IEEE80211_FC0_TYPE_DATA) { - qsel = R92C_TXDW1_QSEL_BE; + qsel = tid % URTWN_MAX_TID; if (!(m->m_flags & M_EAPOL)) { if (ic->ic_curmode != IEEE80211_MODE_11B) { @@ -2255,7 +2276,7 @@ urtwn_tx_data(struct urtwn_softc *sc, st (m->m_flags & M_EAPOL)) txd->txdw4 |= htole32(R92C_TXDW4_DRVRATE); - if (!IEEE80211_QOS_HAS_SEQ(wh)) { + if (!hasqos) { /* Use HW sequence numbering for non-QoS frames. */ if (sc->chip & URTWN_CHIP_88E) txd->txdseq = htole16(R88E_TXDSEQ_HWSEQ_EN); @@ -2292,12 +2313,6 @@ urtwn_tx_start(struct urtwn_softc *sc, s struct r92c_tx_desc *txd; uint16_t ac, sum; int i, xferlen; - struct usb_xfer *urtwn_pipes[WME_NUM_AC] = { - sc->sc_xfer[URTWN_BULK_TX_BE], - sc->sc_xfer[URTWN_BULK_TX_BK], - sc->sc_xfer[URTWN_BULK_TX_VI], - sc->sc_xfer[URTWN_BULK_TX_VO] - }; URTWN_ASSERT_LOCKED(sc); @@ -2309,7 +2324,7 @@ urtwn_tx_start(struct urtwn_softc *sc, s xfer = sc->sc_xfer[URTWN_BULK_TX_VO]; break; default: - xfer = urtwn_pipes[ac]; + xfer = sc->sc_xfer[wme2queue[ac].qid];
svn commit: r292012 - head/sys/netinet/cc
Author: hiren Date: Wed Dec 9 08:53:41 2015 New Revision: 292012 URL: https://svnweb.freebsd.org/changeset/base/292012 Log: Add an option to use rfc6675 based pipe/inflight bytes calculation in newreno. MFC after:3 weeks Sponsored by: Limelight Networks Modified: head/sys/netinet/cc/cc_newreno.c Modified: head/sys/netinet/cc/cc_newreno.c == --- head/sys/netinet/cc/cc_newreno.cWed Dec 9 07:56:40 2015 (r292011) +++ head/sys/netinet/cc/cc_newreno.cWed Dec 9 08:53:41 2015 (r292012) @@ -214,6 +214,9 @@ newreno_cong_signal(struct cc_var *ccv, static void newreno_post_recovery(struct cc_var *ccv) { + int pipe; + pipe = 0; + if (IN_FASTRECOVERY(CCV(ccv, t_flags))) { /* * Fast recovery will conclude after returning from this @@ -224,10 +227,13 @@ newreno_post_recovery(struct cc_var *ccv * * XXXLAS: Find a way to do this without needing curack */ - if (SEQ_GT(ccv->curack + CCV(ccv, snd_ssthresh), - CCV(ccv, snd_max))) - CCV(ccv, snd_cwnd) = CCV(ccv, snd_max) - - ccv->curack + CCV(ccv, t_maxseg); + if (V_tcp_do_rfc6675_pipe) + pipe = tcp_compute_pipe(ccv->ccvc.tcp); + else + pipe = CCV(ccv, snd_max) - ccv->curack; + + if (pipe < CCV(ccv, snd_ssthresh)) + CCV(ccv, snd_cwnd) = pipe + CCV(ccv, t_maxseg); else CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh); } ___ 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: r292015 - in head/sys: netinet netinet6
Author: melifaro Date: Wed Dec 9 11:14:27 2015 New Revision: 292015 URL: https://svnweb.freebsd.org/changeset/base/292015 Log: Make in_arpinput(), inp_lookup_mcast_ifp(), icmp_reflect(), ip_dooptions(), icmp6_redirect_input(), in6_lltable_rtcheck(), in6p_lookup_mcast_ifp() and in6_selecthlim() use new routing api. Eliminate now-unused ip_rtaddr(). Fix lookup key fib6_lookup_nh_basic() which was lost diring merge. Make fib6_lookup_nh_basic() and fib6_lookup_nh_extended() always return IPv6 destination address with embedded scope. Currently rw_gateway has it scope embedded, do the same for non-gatewayed destinations. Sponsored by: Yandex LLC Modified: head/sys/netinet/if_ether.c head/sys/netinet/in_mcast.c head/sys/netinet/ip_icmp.c head/sys/netinet/ip_input.c head/sys/netinet/ip_options.c head/sys/netinet/ip_var.h head/sys/netinet6/icmp6.c head/sys/netinet6/in6.c head/sys/netinet6/in6_fib.c head/sys/netinet6/in6_mcast.c head/sys/netinet6/in6_src.c Modified: head/sys/netinet/if_ether.c == --- head/sys/netinet/if_ether.c Wed Dec 9 09:29:38 2015(r292014) +++ head/sys/netinet/if_ether.c Wed Dec 9 11:14:27 2015(r292015) @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -671,7 +672,6 @@ in_arpinput(struct mbuf *m) struct arphdr *ah; struct ifnet *ifp = m->m_pkthdr.rcvif; struct llentry *la = NULL, *la_tmp; - struct rtentry *rt; struct ifaddr *ifa; struct in_ifaddr *ia; struct sockaddr sa; @@ -682,6 +682,8 @@ in_arpinput(struct mbuf *m) int carped; struct sockaddr_in sin; struct sockaddr *dst; + struct nhop4_basic nh4; + sin.sin_len = sizeof(struct sockaddr_in); sin.sin_family = AF_INET; sin.sin_addr.s_addr = 0; @@ -921,10 +923,8 @@ reply: if (!V_arp_proxyall) goto drop; - sin.sin_addr = itaddr; /* XXX MRT use table 0 for arp reply */ - rt = in_rtalloc1((struct sockaddr *), 0, 0UL, 0); - if (!rt) + if (fib4_lookup_nh_basic(0, itaddr, 0, 0, ) != 0) goto drop; /* @@ -932,11 +932,8 @@ reply: * as this one came out of, or we'll get into a fight * over who claims what Ether address. */ - if (!rt->rt_ifp || rt->rt_ifp == ifp) { - RTFREE_LOCKED(rt); + if (nh4.nh_ifp == ifp) goto drop; - } - RTFREE_LOCKED(rt); (void)memcpy(ar_tha(ah), ar_sha(ah), ah->ar_hln); (void)memcpy(ar_sha(ah), enaddr, ah->ar_hln); @@ -947,21 +944,16 @@ reply: * avoids ARP chaos if an interface is connected to the * wrong network. */ - sin.sin_addr = isaddr; /* XXX MRT use table 0 for arp checks */ - rt = in_rtalloc1((struct sockaddr *), 0, 0UL, 0); - if (!rt) + if (fib4_lookup_nh_basic(0, isaddr, 0, 0, ) != 0) goto drop; - if (rt->rt_ifp != ifp) { + if (nh4.nh_ifp != ifp) { ARP_LOG(LOG_INFO, "proxy: ignoring request" - " from %s via %s, expecting %s\n", - inet_ntoa(isaddr), ifp->if_xname, - rt->rt_ifp->if_xname); - RTFREE_LOCKED(rt); + " from %s via %s\n", + inet_ntoa(isaddr), ifp->if_xname); goto drop; } - RTFREE_LOCKED(rt); #ifdef DEBUG_PROXY printf("arp: proxying for %s\n", inet_ntoa(itaddr)); Modified: head/sys/netinet/in_mcast.c == --- head/sys/netinet/in_mcast.c Wed Dec 9 09:29:38 2015(r292014) +++ head/sys/netinet/in_mcast.c Wed Dec 9 11:14:27 2015(r292015) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -1883,6 +1884,8 @@ inp_lookup_mcast_ifp(const struct inpcb { struct rm_priotracker in_ifa_tracker; struct ifnet *ifp; + struct nhop4_basic nh4; + uint32_t fibnum; KASSERT(gsin->sin_family == AF_INET, ("%s: not AF_INET", __func__));
Re: svn commit: r291994 - head/include
Hi, > On Wed, 9 Dec 2015 18:19:16 +1100 (EST) > Bruce Evanssaid: brde> resolv.h already had massinve namespace pollution and style bugs in brde> its includes. One more include of a header that is relatively clean brde> since it is tiny and was designed for minimising namespace pollution brde> makes little difference. I understood. Thank you for your detailed explanation. However, I realized that r289315 changed the size of struct __res_state. It broke binary backward compatibility. I think we still need to revert its change in struct __res_state and move them into struct __res_state_ext. Sincerely, -- Hajimu UMEMOTO u...@mahoroba.org u...@freebsd.org http://www.mahoroba.org/~ume/ ___ 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: r292019 - head/usr.sbin/iostat
Author: asomers Date: Wed Dec 9 18:07:26 2015 New Revision: 292019 URL: https://svnweb.freebsd.org/changeset/base/292019 Log: When iostat(8) receives SIGINT while running with "-w" or "-c", it will now print statistics one more time before exiting. Also, it now implements the wait using setitimer instead of sleep, so the waits will be more consistent when the system is heavily loaded. MFC after:4 weeks Sponsored by: Spectra Logic Corp Differential Revision:https://reviews.freebsd.org/D4473 Modified: head/usr.sbin/iostat/iostat.c Modified: head/usr.sbin/iostat/iostat.c == --- head/usr.sbin/iostat/iostat.c Wed Dec 9 13:45:51 2015 (r292018) +++ head/usr.sbin/iostat/iostat.c Wed Dec 9 18:07:26 2015 (r292019) @@ -110,6 +110,7 @@ #include #include #include +#include #include #include #include @@ -135,6 +136,8 @@ struct device_selection *dev_select; int maxshowdevs; volatile sig_atomic_t headercount; volatile sig_atomic_t wresized;/* Tty resized, when non-zero. */ +volatile sig_atomic_t alarm_rang; +volatile sig_atomic_t return_requested; unsigned short wrows; /* Current number of tty rows. */ int dflag = 0, Iflag = 0, Cflag = 0, Tflag = 0, oflag = 0, Kflag = 0; int xflag = 0, zflag = 0; @@ -143,6 +146,8 @@ int xflag = 0, zflag = 0; static void usage(void); static void needhdr(int signo); static void needresize(int signo); +static void needreturn(int signo); +static void alarm_clock(int signo); static void doresize(void); static void phdr(void); static void devstats(int perf_select, long double etime, int havelast); @@ -172,6 +177,7 @@ main(int argc, char **argv) int count = 0, waittime = 0; char *memf = NULL, *nlistf = NULL; struct devstat_match *matches; + struct itimerval alarmspec; int num_matches = 0; char errbuf[_POSIX2_LINE_MAX]; kvm_t *kd = NULL; @@ -442,10 +448,28 @@ main(int argc, char **argv) wrows = IOSTAT_DEFAULT_ROWS; } + /* +* Register a SIGINT handler so that we can print out final statistics +* when we get that signal +*/ + (void)signal(SIGINT, needreturn); + + /* +* Register a SIGALRM handler to implement sleeps if the user uses the +* -c or -w options +*/ + (void)signal(SIGALRM, alarm_clock); + alarmspec.it_interval.tv_sec = waittime / 1000; + alarmspec.it_interval.tv_usec = 1000 * (waittime % 1000); + alarmspec.it_value.tv_sec = waittime / 1000; + alarmspec.it_value.tv_usec = 1000 * (waittime % 1000); + setitimer(ITIMER_REAL, , NULL); + for (headercount = 1;;) { struct devinfo *tmp_dinfo; long tmp; long double etime; + sigset_t sigmask, oldsigmask; if (Tflag > 0) { if ((readvar(kd, "kern.tty_nin", X_TTY_NIN, _nin, @@ -599,10 +623,23 @@ main(int argc, char **argv) } fflush(stdout); - if (count >= 0 && --count <= 0) + if ((count >= 0 && --count <= 0) || return_requested) break; - usleep(waittime * 1000); + /* +* Use sigsuspend to safely sleep until either signal is +* received +*/ + alarm_rang = 0; + sigemptyset(); + sigaddset(, SIGINT); + sigaddset(, SIGALRM); + sigprocmask(SIG_BLOCK, , ); + while (! (alarm_rang || return_requested) ) { + sigsuspend(); + } + sigprocmask(SIG_UNBLOCK, , NULL); + havelast = 1; } @@ -633,6 +670,24 @@ needresize(int signo) } /* + * Record the alarm so the main loop can break its sleep + */ +void +alarm_clock(int signo) +{ + alarm_rang = 1; +} + +/* + * Request that the main loop exit soon + */ +void +needreturn(int signo) +{ + return_requested = 1; +} + +/* * Update the global `wrows' count of terminal rows. */ void ___ 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: r291994 - head/include
On 12/09/2015 10:43, Hajimu UMEMOTO wrote: > Hi, > >> On Wed, 9 Dec 2015 18:19:16 +1100 (EST) >> Bruce Evanssaid: > > brde> resolv.h already had massinve namespace pollution and style bugs in > brde> its includes. One more include of a header that is relatively clean > brde> since it is tiny and was designed for minimising namespace pollution > brde> makes little difference. > > I understood. Thank you for your detailed explanation. > However, I realized that r289315 changed the size of struct > __res_state. It broke binary backward compatibility. I think we > still need to revert its change in struct __res_state and move them > into struct __res_state_ext. Thank you both for your input. I agree with moving the fields. https://reviews.freebsd.org/D4472 Eric ___ 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: r292021 - head/lib/libopenbsd
Author: rodrigc Date: Wed Dec 9 19:19:36 2015 New Revision: 292021 URL: https://svnweb.freebsd.org/changeset/base/292021 Log: Merge from OpenBSD: revision 1.11 date: 2015/11/27 01:57:59; author: mmcc; state: Exp; lines: +2 -3 Remove three NULL-checks before free(). ok millert@ Modified: head/lib/libopenbsd/imsg.c Modified: head/lib/libopenbsd/imsg.c == --- head/lib/libopenbsd/imsg.c Wed Dec 9 18:55:25 2015(r292020) +++ head/lib/libopenbsd/imsg.c Wed Dec 9 19:19:36 2015(r292021) @@ -1,4 +1,4 @@ -/* $OpenBSD: imsg.c,v 1.10 2015/07/19 07:18:59 nicm Exp $ */ +/* $OpenBSD: imsg.c,v 1.11 2015/11/27 01:57:59 mmcc Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer@@ -120,8 +120,7 @@ again: } fail: - if (ifd) - free(ifd); + free(ifd); return (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: r292022 - head/lib/libopenbsd
Author: rodrigc Date: Wed Dec 9 19:21:00 2015 New Revision: 292022 URL: https://svnweb.freebsd.org/changeset/base/292022 Log: Merge from OpenBSD: revision 1.12 date: 2015/12/05 13:06:52; author: claudio; state: Exp; lines: +4 -6 Do not loop on EAGAIN in imsg_read(). Better to return the error to the caller and let him do another poll loop. This fixes spinning relayd processes seen on busy TLS relays. OK benno@ henning@ Modified: head/lib/libopenbsd/imsg.c Modified: head/lib/libopenbsd/imsg.c == --- head/lib/libopenbsd/imsg.c Wed Dec 9 19:19:36 2015(r292021) +++ head/lib/libopenbsd/imsg.c Wed Dec 9 19:21:00 2015(r292022) @@ -1,4 +1,4 @@ -/* $OpenBSD: imsg.c,v 1.11 2015/11/27 01:57:59 mmcc Exp $ */ +/* $OpenBSD: imsg.c,v 1.12 2015/12/05 13:06:52 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer@@ -82,11 +82,9 @@ again: } if ((n = recvmsg(ibuf->fd, , 0)) == -1) { - if (errno == EMSGSIZE) - goto fail; - if (errno != EINTR && errno != EAGAIN) - goto fail; - goto again; + if (errno == EINTR) + goto again; + goto fail; } ibuf->r.wpos += 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: r292023 - head/lib/libopenbsd
Author: rodrigc Date: Wed Dec 9 19:22:20 2015 New Revision: 292023 URL: https://svnweb.freebsd.org/changeset/base/292023 Log: Merge from OpenBSD: revision 1.13 date: 2015/12/09 11:54:12; author: tb; state: Exp; lines: +2 -2 Add a cast to silence a compiler warning by clang on FreeBSD. From Craig Rodrigues. ok tedu@ Modified: head/lib/libopenbsd/imsg.c Modified: head/lib/libopenbsd/imsg.c == --- head/lib/libopenbsd/imsg.c Wed Dec 9 19:21:00 2015(r292022) +++ head/lib/libopenbsd/imsg.c Wed Dec 9 19:22:20 2015(r292023) @@ -1,4 +1,4 @@ -/* $OpenBSD: imsg.c,v 1.12 2015/12/05 13:06:52 claudio Exp $ */ +/* $OpenBSD: imsg.c,v 1.13 2015/12/09 11:54:12 tb Exp $*/ /* * Copyright (c) 2003, 2004 Henning Brauer@@ -74,7 +74,7 @@ imsg_read(struct imsgbuf *ibuf) again: if (getdtablecount() + imsg_fd_overhead + - (CMSG_SPACE(sizeof(int))-CMSG_SPACE(0))/sizeof(int) + (int)((CMSG_SPACE(sizeof(int))-CMSG_SPACE(0))/sizeof(int)) >= getdtablesize()) { errno = EAGAIN; free(ifd); ___ 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: r292024 - head/lib/libopenbsd
Author: rodrigc Date: Wed Dec 9 19:25:45 2015 New Revision: 292024 URL: https://svnweb.freebsd.org/changeset/base/292024 Log: Remove NO_WERROR, after fix from r292023. Modified: head/lib/libopenbsd/Makefile Modified: head/lib/libopenbsd/Makefile == --- head/lib/libopenbsd/MakefileWed Dec 9 19:22:20 2015 (r292023) +++ head/lib/libopenbsd/MakefileWed Dec 9 19:25:45 2015 (r292024) @@ -11,5 +11,4 @@ CFLAGS+= -I${.CURDIR} WARNS= 3 -NO_WERROR= .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: r292020 - head/sbin/devd
Author: asomers Date: Wed Dec 9 18:55:25 2015 New Revision: 292020 URL: https://svnweb.freebsd.org/changeset/base/292020 Log: Increase devd's client socket buffer size to 256KB. This is not as large as it looks, because we'll hit the sockbuf's mbuf limit long before hitting its data limit. A 256KB data limit allows creating a ZFS pool on about 450 drives without overflowing the client socket buffers. MFC after:4 weeks Sponsored by: Spectra Logic Corp Differential Revision:https://reviews.freebsd.org/D4476 Modified: head/sbin/devd/devd.cc Modified: head/sbin/devd/devd.cc == --- head/sbin/devd/devd.cc Wed Dec 9 18:07:26 2015(r292019) +++ head/sbin/devd/devd.cc Wed Dec 9 18:55:25 2015(r292020) @@ -108,15 +108,26 @@ __FBSDID("$FreeBSD$"); /* * Since the client socket is nonblocking, we must increase its send buffer to * handle brief event storms. On FreeBSD, AF_UNIX sockets don't have a receive - * buffer, so the client can't increate the buffersize by itself. + * buffer, so the client can't increase the buffersize by itself. * * For example, when creating a ZFS pool, devd emits one 165 character - * resource.fs.zfs.statechange message for each vdev in the pool. A 64k - * buffer has enough space for almost 400 drives, which would be very large but - * not impossibly large pool. A 128k buffer has enough space for 794 drives, - * which is more than can fit in a rack with modern technology. + * resource.fs.zfs.statechange message for each vdev in the pool. The kernel + * allocates a 4608B mbuf for each message. Modern technology places a limit of + * roughly 450 drives/rack, and it's unlikely that a zpool will ever be larger + * than that. + * + * 450 drives * 165 bytes / drive = 74250B of data in the sockbuf + * 450 drives * 4608B / drive = 2073600B of mbufs in the sockbuf + * + * We can't directly set the sockbuf's mbuf limit, but we can do it indirectly. + * The kernel sets it to the minimum of a hard-coded maximum value and sbcc * + * kern.ipc.sockbuf_waste_factor, where sbcc is the socket buffer size set by + * the user. The default value of kern.ipc.sockbuf_waste_factor is 8. If we + * set the bufsize to 256k and use the kern.ipc.sockbuf_waste_factor, then the + * kernel will set the mbuf limit to 2MB, which is just large enough for 450 + * drives. It also happens to be the same as the hardcoded maximum value. */ -#define CLIENT_BUFSIZE 131072 +#define CLIENT_BUFSIZE 262144 using namespace std; ___ 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: r292028 - head/usr.sbin/pmcstudy
Author: rrs Date: Wed Dec 9 21:50:06 2015 New Revision: 292028 URL: https://svnweb.freebsd.org/changeset/base/292028 Log: White space changes. Modified: head/usr.sbin/pmcstudy/pmcstudy.c Modified: head/usr.sbin/pmcstudy/pmcstudy.c == --- head/usr.sbin/pmcstudy/pmcstudy.c Wed Dec 9 21:49:31 2015 (r292027) +++ head/usr.sbin/pmcstudy/pmcstudy.c Wed Dec 9 21:50:06 2015 (r292028) @@ -45,20 +45,20 @@ static int verbose = 0; extern char **environ; extern struct expression *master_exp; -struct expression *master_exp=NULL; +struct expression *master_exp = NULL; #define PMC_INITIAL_ALLOC 512 extern char **valid_pmcs; char **valid_pmcs = NULL; extern int valid_pmc_cnt; -int valid_pmc_cnt=0; +int valid_pmc_cnt = 0; extern int pmc_allocated_cnt; -int pmc_allocated_cnt=0; +int pmc_allocated_cnt = 0; /* * The following two varients on popen and pclose with * the cavet that they get you the PID so that you - * can supply it to pclose so it can send a SIGTERM + * can supply it to pclose so it can send a SIGTERM * to the process. */ static FILE * @@ -75,7 +75,7 @@ my_popen(const char *command, const char if ((strcmp(dir, "r") != 0) && (strcmp(dir, "w") != 0)) { errno = EINVAL; - return(NULL); + return (NULL); } if (pipe(pdesin) < 0) return (NULL); @@ -94,14 +94,14 @@ my_popen(const char *command, const char argv[3] = NULL; switch (pid = fork()) { - case -1:/* Error. */ + case -1:/* Error. */ (void)close(pdesin[0]); (void)close(pdesin[1]); (void)close(pdesout[0]); (void)close(pdesout[1]); return (NULL); /* NOTREACHED */ - case 0: /* Child. */ + case 0: /* Child. */ /* Close out un-used sides */ (void)close(pdesin[1]); (void)close(pdesout[0]); @@ -129,8 +129,8 @@ my_popen(const char *command, const char (void)close(pdesin[0]); (void)close(pdesout[0]); (void)close(pdesout[1]); - return(io_out); - } else { + return (io_out); + } else { /* Prepare the input stream */ io_in = fdopen(pdesout[0], "r"); (void)close(pdesout[1]); @@ -146,7 +146,7 @@ my_popen(const char *command, const char * if already `pclosed', or waitpid returns an error. */ static void -my_pclose(FILE *io, pid_t the_pid) +my_pclose(FILE * io, pid_t the_pid) { int pstat; pid_t pid; @@ -164,33 +164,33 @@ my_pclose(FILE *io, pid_t the_pid) struct counters { struct counters *next_cpu; - char counter_name[MAX_NLEN];/* Name of counter */ - int cpu;/* CPU we are on */ - int pos;/* Index we are filling to. */ + char counter_name[MAX_NLEN];/* Name of counter */ + int cpu;/* CPU we are on */ + int pos;/* Index we are filling to. */ uint64_t vals[MAX_COUNTER_SLOTS]; /* Last 64 entries */ - uint64_t sum; /* Summary of entries */ + uint64_t sum; /* Summary of entries */ }; extern struct counters *glob_cpu[MAX_CPU]; struct counters *glob_cpu[MAX_CPU]; extern struct counters *cnts; -struct counters *cnts=NULL; +struct counters *cnts = NULL; extern int ncnts; -int ncnts=0; +int ncnts = 0; -extern int (*expression)(struct counters *, int); -int (*expression)(struct counters *, int); +extern int (*expression) (struct counters *, int); +int (*expression) (struct counters *, int); -static const char *threshold=NULL; +static const char *threshold = NULL; static const char *command; struct cpu_entry { const char *name; const char *thresh; const char *command; - int (*func)(struct counters *, int); + int (*func) (struct counters *, int); }; @@ -198,7 +198,7 @@ struct cpu_type { char cputype[32]; int number; struct cpu_entry *ents; - void (*explain)(const char *name); + void (*explain) (const char *name); }; extern struct cpu_type the_cpu; struct cpu_type the_cpu; @@ -207,6 +207,7 @@ static void explain_name_sb(const char *name) { const char *mythresh; + if (strcmp(name, "allocstall1") == 0) { printf("Examine PARTIAL_RAT_STALLS.SLOW_LEA_WINDOW / CPU_CLK_UNHALTED.THREAD_P\n"); mythresh = "thresh > .05"; @@ -278,7 +279,7 @@ explain_name_sb(const char *name) } else { printf("Unknown name:%s\n", name); mythresh = "unknown entry"; -} + }
svn commit: r292031 - in head: share/man/man4 sys/dev/ioat
Author: cem Date: Wed Dec 9 22:45:51 2015 New Revision: 292031 URL: https://svnweb.freebsd.org/changeset/base/292031 Log: ioat(4): Add ioat_copy_8k_aligned KPI The hardware supports descriptors with two non-contiguous pages. This allows issuing one descriptor for an 8k copy from/to non-contiguous but otherwise page-aligned memory. Sponsored by: EMC / Isilon Storage Division Modified: head/share/man/man4/ioat.4 head/sys/dev/ioat/ioat.c head/sys/dev/ioat/ioat.h head/sys/dev/ioat/ioat_internal.h Modified: head/share/man/man4/ioat.4 == --- head/share/man/man4/ioat.4 Wed Dec 9 22:09:33 2015(r292030) +++ head/share/man/man4/ioat.4 Wed Dec 9 22:45:51 2015(r292031) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 31, 2015 +.Dd December 9, 2015 .Dt IOAT 4 .Os .Sh NAME @@ -78,6 +78,17 @@ In .Fa "uint32_t flags" .Fc .Ft struct bus_dmadesc * +.Fo ioat_copy_8k_aligned +.Fa "bus_dmaengine_t dmaengine" +.Fa "bus_addr_t dst1" +.Fa "bus_addr_t dst2" +.Fa "bus_addr_t src1" +.Fa "bus_addr_t src2" +.Fa "bus_dmaengine_callback_t callback_fn" +.Fa "void *callback_arg" +.Fa "uint32_t flags" +.Fc +.Ft struct bus_dmadesc * .Fo ioat_blockfill .Fa "bus_dmaengine_t dmaengine" .Fa "bus_addr_t dst" @@ -150,7 +161,7 @@ Then, they will submit one or more opera .Fn ioat_copy , or .Fn ioat_null . -After queueing one or more individual DMA operations, they will +After queuing one or more individual DMA operations, they will .Fn ioat_release the .Ar bus_dmaengine_t Modified: head/sys/dev/ioat/ioat.c == --- head/sys/dev/ioat/ioat.cWed Dec 9 22:09:33 2015(r292030) +++ head/sys/dev/ioat/ioat.cWed Dec 9 22:45:51 2015(r292031) @@ -833,6 +833,51 @@ ioat_copy(bus_dmaengine_t dmaengine, bus } struct bus_dmadesc * +ioat_copy_8k_aligned(bus_dmaengine_t dmaengine, bus_addr_t dst1, +bus_addr_t dst2, bus_addr_t src1, bus_addr_t src2, +bus_dmaengine_callback_t callback_fn, void *callback_arg, uint32_t flags) +{ + struct ioat_dma_hw_descriptor *hw_desc; + struct ioat_descriptor *desc; + struct ioat_softc *ioat; + + CTR0(KTR_IOAT, __func__); + ioat = to_ioat_softc(dmaengine); + + if (((src1 | src2 | dst1 | dst2) & (0xull << 48)) != 0) { + ioat_log_message(0, "%s: High 16 bits of src/dst invalid\n", + __func__); + return (NULL); + } + if (((src1 | src2 | dst1 | dst2) & PAGE_MASK) != 0) { + ioat_log_message(0, "%s: Addresses must be page-aligned\n", + __func__); + return (NULL); + } + + desc = ioat_op_generic(ioat, IOAT_OP_COPY, 2 * PAGE_SIZE, src1, dst1, + callback_fn, callback_arg, flags); + if (desc == NULL) + return (NULL); + + hw_desc = desc->u.dma; + if (src2 != src1 + PAGE_SIZE) { + hw_desc->u.control.src_page_break = 1; + hw_desc->next_src_addr = src2; + } + if (dst2 != dst1 + PAGE_SIZE) { + hw_desc->u.control.dest_page_break = 1; + hw_desc->next_dest_addr = dst2; + } + + if (g_ioat_debug_level >= 3) + dump_descriptor(hw_desc); + + ioat_submit_single(ioat); + return (>bus_dmadesc); +} + +struct bus_dmadesc * ioat_blockfill(bus_dmaengine_t dmaengine, bus_addr_t dst, uint64_t fillpattern, bus_size_t len, bus_dmaengine_callback_t callback_fn, void *callback_arg, uint32_t flags) Modified: head/sys/dev/ioat/ioat.h == --- head/sys/dev/ioat/ioat.hWed Dec 9 22:09:33 2015(r292030) +++ head/sys/dev/ioat/ioat.hWed Dec 9 22:45:51 2015(r292031) @@ -84,6 +84,19 @@ struct bus_dmadesc *ioat_copy(bus_dmaeng void *callback_arg, uint32_t flags); /* + * Issue a copy data operation, with constraints: + * - src1, src2, dst1, dst2 are all page-aligned addresses + * - The quantity to copy is exactly 2 pages; + * - src1 -> dst1, src2 -> dst2 + * + * Why use this instead of normal _copy()? You can copy two non-contiguous + * pages (src, dst, or both) with one descriptor. + */ +struct bus_dmadesc *ioat_copy_8k_aligned(bus_dmaengine_t dmaengine, +bus_addr_t dst1, bus_addr_t dst2, bus_addr_t src1, bus_addr_t src2, +bus_dmaengine_callback_t callback_fn, void *callback_arg, uint32_t flags); + +/* * Issues a null operation. This issues the operation to the hardware, but the * hardware doesn't do anything with it. */ Modified: head/sys/dev/ioat/ioat_internal.h == --- head/sys/dev/ioat/ioat_internal.h Wed Dec 9 22:09:33 2015 (r292030) +++ head/sys/dev/ioat/ioat_internal.h Wed Dec 9 22:45:51 2015
svn commit: r292032 - head/sys/dev/ioat
Author: cem Date: Wed Dec 9 22:46:00 2015 New Revision: 292032 URL: https://svnweb.freebsd.org/changeset/base/292032 Log: ioat(4): Add Broadwell-EP PCI IDs Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ioat/ioat.c Modified: head/sys/dev/ioat/ioat.c == --- head/sys/dev/ioat/ioat.cWed Dec 9 22:45:51 2015(r292031) +++ head/sys/dev/ioat/ioat.cWed Dec 9 22:46:00 2015(r292032) @@ -219,6 +219,17 @@ static struct _pcsid { 0x6f528086, "BDXDE IOAT Ch2" }, { 0x6f538086, "BDXDE IOAT Ch3" }, + { 0x6f208086, "BDX IOAT Ch0" }, + { 0x6f218086, "BDX IOAT Ch1" }, + { 0x6f228086, "BDX IOAT Ch2" }, + { 0x6f238086, "BDX IOAT Ch3" }, + { 0x6f248086, "BDX IOAT Ch4" }, + { 0x6f258086, "BDX IOAT Ch5" }, + { 0x6f268086, "BDX IOAT Ch6" }, + { 0x6f278086, "BDX IOAT Ch7" }, + { 0x6f2e8086, "BDX IOAT Ch0 (RAID)" }, + { 0x6f2f8086, "BDX IOAT Ch1 (RAID)" }, + { 0x, 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"
svn commit: r292033 - head/sys/dev/hwpmc
Author: rrs Date: Wed Dec 9 22:46:40 2015 New Revision: 292033 URL: https://svnweb.freebsd.org/changeset/base/292033 Log: Fix the tunable in logging so that if its pre-11 we have the proper line so the tunable is present. Sponsored by: Netflix Inc. Modified: head/sys/dev/hwpmc/hwpmc_logging.c Modified: head/sys/dev/hwpmc/hwpmc_logging.c == --- head/sys/dev/hwpmc/hwpmc_logging.c Wed Dec 9 22:46:00 2015 (r292032) +++ head/sys/dev/hwpmc/hwpmc_logging.c Wed Dec 9 22:46:40 2015 (r292033) @@ -70,6 +70,9 @@ SYSCTL_DECL(_kern_hwpmc); */ static int pmclog_buffer_size = PMC_LOG_BUFFER_SIZE; +#if (__FreeBSD_version < 110) +TUNABLE_INT(PMC_SYSCTL_NAME_PREFIX "logbuffersize", _buffer_size); +#endif SYSCTL_INT(_kern_hwpmc, OID_AUTO, logbuffersize, CTLFLAG_RDTUN, _buffer_size, 0, "size of log buffers in kilobytes"); @@ -78,6 +81,9 @@ SYSCTL_INT(_kern_hwpmc, OID_AUTO, logbuf */ static int pmc_nlogbuffers = PMC_NLOGBUFFERS; +#if (__FreeBSD_version < 110) +TUNABLE_INT(PMC_SYSCTL_NAME_PREFIX "nbuffers", _nlogbuffers); +#endif SYSCTL_INT(_kern_hwpmc, OID_AUTO, nbuffers, CTLFLAG_RDTUN, _nlogbuffers, 0, "number of global log buffers"); ___ 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: r292027 - head/usr.sbin/pmcstudy
Author: rrs Date: Wed Dec 9 21:49:31 2015 New Revision: 292027 URL: https://svnweb.freebsd.org/changeset/base/292027 Log: Proper support of Broadwell tool by the pmc_study based on the Intel Itune guide for 5th generation processors. There is at least one formula missing in that guide, which I extrapolated and put a ? by in the help. Sponsored by: Netflix Inc Modified: head/usr.sbin/pmcstudy/pmcstudy.c Modified: head/usr.sbin/pmcstudy/pmcstudy.c == --- head/usr.sbin/pmcstudy/pmcstudy.c Wed Dec 9 21:38:26 2015 (r292026) +++ head/usr.sbin/pmcstudy/pmcstudy.c Wed Dec 9 21:49:31 2015 (r292027) @@ -443,7 +443,6 @@ explain_name_has(const char *name) printf("If the value printed is %s we may have the ability to improve performance\n", mythresh); } - static struct counters * find_counter(struct counters *base, const char *name) { @@ -590,6 +589,47 @@ br_mispredictib(struct counters *cpu, in } static int +br_mispredict_broad(struct counters *cpu, int pos) +{ + struct counters *brctr; + struct counters *unhalt; + struct counters *clear; + struct counters *uops; + struct counters *uops_ret; + struct counters *recv; + int ret; + double br, cl, uo, uo_r, re, con, un, res; + + con = 4.0; + + unhalt = find_counter(cpu, "CPU_CLK_UNHALTED.THREAD_P"); +brctr = find_counter(cpu, "BR_MISP_RETIRED.ALL_BRANCHES"); + clear = find_counter(cpu, "MACHINE_CLEARS.CYCLES"); + uops = find_counter(cpu, "UOPS_ISSUED.ANY"); + uops_ret = find_counter(cpu, "UOPS_RETIRED.RETIRE_SLOTS"); + recv = find_counter(cpu, "INT_MISC.RECOVERY_CYCLES"); + + if (pos != -1) { + un = unhalt->vals[pos] * 1.0; + br = brctr->vals[pos] * 1.0; + cl = clear->vals[pos] * 1.0; + uo = uops->vals[pos] * 1.0; + uo_r = uops_ret->vals[pos] * 1.0; + re = recv->vals[pos] * 1.0; + } else { + un = unhalt->sum * 1.0; + br = brctr->sum * 1.0; + cl = clear->sum * 1.0; + uo = uops->sum * 1.0; + uo_r = uops_ret->sum * 1.0; + re = recv->sum * 1.0; + } + res = br / (br + cl) * (uo - uo_r + con * re) / (un * con); + ret = printf("%1.3f", res); + return(ret); +} + +static int splitloadib(struct counters *cpu, int pos) { int ret; @@ -717,6 +757,35 @@ contested_has(struct counters *cpu, int return(ret); } +static int +contestedbroad(struct counters *cpu, int pos) +{ +/* 6 - (MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM * 84) / CPU_CLK_UNHALTED.THREAD_P (thresh >.05) */ + int ret; + struct counters *mem; + struct counters *mem2; + struct counters *unhalt; + double con, un, memd, memtoo, res; + + con = 84.0; + unhalt = find_counter(cpu, "CPU_CLK_UNHALTED.THREAD_P"); + mem = find_counter(cpu, "MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM"); + mem2 = find_counter(cpu,"MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS"); + + if (pos != -1) { + memd = mem->vals[pos] * 1.0; + memtoo = mem2->vals[pos] * 1.0; + un = unhalt->vals[pos] * 1.0; + } else { + memd = mem->sum * 1.0; + memtoo = mem2->sum * 1.0; + un = unhalt->sum * 1.0; + } + res = ((memd * con) + memtoo)/un; + ret = printf("%1.3f", res); + return(ret); +} + static int blockstoreforward(struct counters *cpu, int pos) @@ -898,6 +967,33 @@ cache2has(struct counters *cpu, int pos) } static int +cache2broad(struct counters *cpu, int pos) +{ +/* +* (29 * MEM_LOAD_UOPS_RETIRED.LLC_HIT / CPU_CLK_UNHALTED.THREAD_P (thresh >.2) +*/ + int ret; + struct counters *mem; + struct counters *unhalt; + double con, un, me, res; + + con = 36.0; + unhalt = find_counter(cpu, "CPU_CLK_UNHALTED.THREAD_P"); + mem = find_counter(cpu, "MEM_LOAD_UOPS_RETIRED.L3_HIT"); + if (pos != -1) { + me = mem->vals[pos] * 1.0; + un = unhalt->vals[pos] * 1.0; + } else { + me = mem->sum * 1.0; + un = unhalt->sum * 1.0; + } + res = (con * me)/un; + ret = printf("%1.3f", res); + return(ret); +} + + +static int cache1(struct counters *cpu, int pos) { /* 9 - (MEM_LOAD_UOPS_MISC_RETIRED.LLC_MISS * 180) / CPU_CLK_UNHALTED.THREAD_P (thresh >= .2) */ @@ -947,6 +1043,31 @@ cache1ib(struct counters *cpu, int pos) static int +cache1broad(struct counters *cpu, int pos) +{ + /* 9 - (MEM_LOAD_UOPS_L3_MISS_RETIRED.LCOAL_DRAM * 180) / CPU_CLK_UNHALTED.THREAD_P (thresh >= .2) */ + int ret; + struct counters *mem; + struct counters *unhalt; + double con, un,
svn commit: r292029 - head/usr.sbin/pmcstudy
Author: rrs Date: Wed Dec 9 21:54:33 2015 New Revision: 292029 URL: https://svnweb.freebsd.org/changeset/base/292029 Log: Update the manual page to include Broadwell. Modified: head/usr.sbin/pmcstudy/pmcstudy.8 Modified: head/usr.sbin/pmcstudy/pmcstudy.8 == --- head/usr.sbin/pmcstudy/pmcstudy.8 Wed Dec 9 21:50:06 2015 (r292028) +++ head/usr.sbin/pmcstudy/pmcstudy.8 Wed Dec 9 21:54:33 2015 (r292029) @@ -59,8 +59,8 @@ PMCs and then run various formulas on th These formulas can be found in Intel documentation "Using Intel Vtune amplifier xe on NNN Generation Intel Core Processors". The NNN is either -2nd, 3rd or 4th generation i.e., Sandy Bridge, Ivy Bridge and Haswell. -Currently the program only works on these three Intel processor types. +2nd, 3rd, 4th or 5th generation i.e., Sandy Bridge, Ivy Bridge, Haswell and Broadwell. +Currently the program only works on these four Intel processor types. .Sh OPTIONS The following options are available: .Bl -tag -width indent ___ 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: r292030 - head/sys/netinet6
Author: melifaro Date: Wed Dec 9 22:09:33 2015 New Revision: 292030 URL: https://svnweb.freebsd.org/changeset/base/292030 Log: Use correct lookup key for gif route lookups. This fixes r291993 change. Modified: head/sys/netinet6/in6_gif.c Modified: head/sys/netinet6/in6_gif.c == --- head/sys/netinet6/in6_gif.c Wed Dec 9 21:54:33 2015(r292029) +++ head/sys/netinet6/in6_gif.c Wed Dec 9 22:09:33 2015(r292030) @@ -205,10 +205,10 @@ in6_gif_encapcheck(const struct mbuf *m, /* ingress filters on outer source */ if ((GIF2IFP(sc)->if_flags & IFF_LINK2) == 0) { struct nhop6_basic nh6; - struct in6_addr *dst; /* XXX empty scope id */ - if (fib6_lookup_nh_basic(sc->gif_fibnum, dst, 0, 0, 0, )!=0) + if (fib6_lookup_nh_basic(sc->gif_fibnum, >ip6_src, 0, 0, 0, + ) != 0) return (0); if (nh6.nh_ifp != m->m_pkthdr.rcvif) ___ 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: r292038 - head/share/man/man9
Author: jhb Date: Thu Dec 10 00:16:02 2015 New Revision: 292038 URL: https://svnweb.freebsd.org/changeset/base/292038 Log: Fix a copy and paste bug when this page was first written by copying from BUS_BIND_INTR.9. MFC after:1 week Modified: head/share/man/man9/BUS_DESCRIBE_INTR.9 Modified: head/share/man/man9/BUS_DESCRIBE_INTR.9 == --- head/share/man/man9/BUS_DESCRIBE_INTR.9 Thu Dec 10 00:07:11 2015 (r292037) +++ head/share/man/man9/BUS_DESCRIBE_INTR.9 Thu Dec 10 00:16:02 2015 (r292038) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 14, 2009 +.Dd December 9, 2015 .Dt BUS_DESCRIBE_INTR 9 .Os .Sh NAME @@ -38,7 +38,7 @@ .In sys/param.h .In sys/bus.h .Ft int -.Fo BUS_BIND_INTR +.Fo BUS_DESCRIBE_INTR .Fa "device_t dev" "device_t child" "struct resource *irq" "void *cookie" .Fa "const char *descr" .Fc ___ 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: r292042 - head/share/man/man4
Author: mav Date: Thu Dec 10 01:41:05 2015 New Revision: 292042 URL: https://svnweb.freebsd.org/changeset/base/292042 Log: Update list of card names. Modified: head/share/man/man4/isp.4 Modified: head/share/man/man4/isp.4 == --- head/share/man/man4/isp.4 Thu Dec 10 01:17:30 2015(r292041) +++ head/share/man/man4/isp.4 Thu Dec 10 01:41:05 2015(r292042) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2015 +.Dd December 9, 2015 .Dt ISP 4 .Os .Sh NAME @@ -107,10 +107,12 @@ Optical 2Gb Fibre Channel PCIe cards. Dell branded version of the QLogic 2312. .It Qlogic 2422 Optical 4Gb Fibre Channel PCI cards. -.It Qlogic 2432 +.It Qlogic 246x (aka 2432) Optical 4Gb Fibre Channel PCIe cards. -.It Qlogic 2532 +.It Qlogic 256x (aka 2532) Optical 8Gb Fibre Channel PCIe cards. +.It Qlogic 267x/836x (aka 2031/8031) +Optical 16Gb FC/FCoE PCIe cards. .El .Sh CONFIGURATION OPTIONS Target mode support for Fibre Channel adapters may be enabled with the @@ -127,12 +129,6 @@ They are: .It Va hint.isp.0.fwload_disable A hint value to disable loading of firmware .Xr ispfw 4 . -.It Va hint.isp.0.prefer_memmap -A hint value to use PCI memory space instead of I/O space -access for. -.It Va hint.isp.0.prefer_iomap -A hint value to use PCI I/O space instead of Memory space -access for. .It Va hint.isp.0.ignore_nvram A hint value to ignore board NVRAM settings for. Otherwise use NVRAM settings. ___ 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: r292043 - head/usr.sbin/pmcstudy
Author: rrs Date: Thu Dec 10 01:52:29 2015 New Revision: 292043 URL: https://svnweb.freebsd.org/changeset/base/292043 Log: Fix several typos and bugs within pmcstudy. Also highlight the one SB test that is failing (and is likely a problem in the actual PMC defintions). Add to this also the -A option to run all canned tests. Sponsored by: Netflix Inc. Modified: head/usr.sbin/pmcstudy/pmcstudy.8 head/usr.sbin/pmcstudy/pmcstudy.c Modified: head/usr.sbin/pmcstudy/pmcstudy.8 == --- head/usr.sbin/pmcstudy/pmcstudy.8 Thu Dec 10 01:41:05 2015 (r292042) +++ head/usr.sbin/pmcstudy/pmcstudy.8 Thu Dec 10 01:52:29 2015 (r292043) @@ -32,7 +32,7 @@ .Nd Perform various studies on a system's overall PMCs. .Sh SYNOPSIS .Nm -.Oo Fl i Ar inputfile | Fl T | Fl v | Fl m Ar max | Fl e exp | Fl Ar E | Fl h | fl H Oc +.Oo Fl i Ar inputfile | Fl A | Fl T | Fl v | Fl m Ar max | Fl e exp | Fl Ar E | Fl h | fl H Oc .Nm .Fl i Ar inputfile .Nm @@ -128,6 +128,8 @@ test like "UOPS_RETIRED.RETIRE_SLOTS / (4 * CPU_CLK_UNHALTED.THREAD_P)". .It Fl L This option will list all known PMCs and their abbreviation (%NNN). +.It Fl A +Run all canned tests. .El .Sh SEE ALSO .Xr pmc 3 , Modified: head/usr.sbin/pmcstudy/pmcstudy.c == --- head/usr.sbin/pmcstudy/pmcstudy.c Thu Dec 10 01:41:05 2015 (r292042) +++ head/usr.sbin/pmcstudy/pmcstudy.c Thu Dec 10 01:52:29 2015 (r292043) @@ -38,6 +38,9 @@ #include "eval_expr.h" __FBSDID("$FreeBSD$"); +static int max_pmc_counters = 1; +static int run_all = 0; + #define MAX_COUNTER_SLOTS 1024 #define MAX_NLEN 64 #define MAX_CPU 64 @@ -45,20 +48,20 @@ static int verbose = 0; extern char **environ; extern struct expression *master_exp; -struct expression *master_exp = NULL; +struct expression *master_exp=NULL; #define PMC_INITIAL_ALLOC 512 extern char **valid_pmcs; char **valid_pmcs = NULL; extern int valid_pmc_cnt; -int valid_pmc_cnt = 0; +int valid_pmc_cnt=0; extern int pmc_allocated_cnt; -int pmc_allocated_cnt = 0; +int pmc_allocated_cnt=0; /* * The following two varients on popen and pclose with * the cavet that they get you the PID so that you - * can supply it to pclose so it can send a SIGTERM + * can supply it to pclose so it can send a SIGTERM * to the process. */ static FILE * @@ -75,7 +78,7 @@ my_popen(const char *command, const char if ((strcmp(dir, "r") != 0) && (strcmp(dir, "w") != 0)) { errno = EINVAL; - return (NULL); + return(NULL); } if (pipe(pdesin) < 0) return (NULL); @@ -94,14 +97,14 @@ my_popen(const char *command, const char argv[3] = NULL; switch (pid = fork()) { - case -1:/* Error. */ + case -1:/* Error. */ (void)close(pdesin[0]); (void)close(pdesin[1]); (void)close(pdesout[0]); (void)close(pdesout[1]); return (NULL); /* NOTREACHED */ - case 0: /* Child. */ + case 0: /* Child. */ /* Close out un-used sides */ (void)close(pdesin[1]); (void)close(pdesout[0]); @@ -129,8 +132,8 @@ my_popen(const char *command, const char (void)close(pdesin[0]); (void)close(pdesout[0]); (void)close(pdesout[1]); - return (io_out); - } else { + return(io_out); + } else { /* Prepare the input stream */ io_in = fdopen(pdesout[0], "r"); (void)close(pdesout[1]); @@ -146,7 +149,7 @@ my_popen(const char *command, const char * if already `pclosed', or waitpid returns an error. */ static void -my_pclose(FILE * io, pid_t the_pid) +my_pclose(FILE *io, pid_t the_pid) { int pstat; pid_t pid; @@ -164,41 +167,41 @@ my_pclose(FILE * io, pid_t the_pid) struct counters { struct counters *next_cpu; - char counter_name[MAX_NLEN];/* Name of counter */ - int cpu;/* CPU we are on */ - int pos;/* Index we are filling to. */ + char counter_name[MAX_NLEN];/* Name of counter */ + int cpu;/* CPU we are on */ + int pos;/* Index we are filling to. */ uint64_t vals[MAX_COUNTER_SLOTS]; /* Last 64 entries */ - uint64_t sum; /* Summary of entries */ + uint64_t sum; /* Summary of entries */ }; extern struct counters *glob_cpu[MAX_CPU]; struct counters *glob_cpu[MAX_CPU]; extern struct counters *cnts; -struct counters *cnts = NULL; +struct counters *cnts=NULL;
svn commit: r292034 - head/sys/dev/isp
Author: mav Date: Wed Dec 9 22:52:37 2015 New Revision: 292034 URL: https://svnweb.freebsd.org/changeset/base/292034 Log: Add PCI ID for 16G QLogic chips in FCoE mode. I haven't tested FCoE really yet, but the driver attaches fine. Modified: head/sys/dev/isp/isp_pci.c Modified: head/sys/dev/isp/isp_pci.c == --- head/sys/dev/isp/isp_pci.c Wed Dec 9 22:46:40 2015(r292033) +++ head/sys/dev/isp/isp_pci.c Wed Dec 9 22:52:37 2015(r292034) @@ -294,6 +294,10 @@ static struct ispmdvec mdvec_2600 = { #definePCI_PRODUCT_QLOGIC_ISP2031 0x2031 #endif +#ifndefPCI_PRODUCT_QLOGIC_ISP8031 +#definePCI_PRODUCT_QLOGIC_ISP8031 0x8031 +#endif + #definePCI_QLOGIC_ISP5432 \ ((PCI_PRODUCT_QLOGIC_ISP5432 << 16) | PCI_VENDOR_QLOGIC) @@ -348,6 +352,9 @@ static struct ispmdvec mdvec_2600 = { #definePCI_QLOGIC_ISP2031 \ ((PCI_PRODUCT_QLOGIC_ISP2031 << 16) | PCI_VENDOR_QLOGIC) +#definePCI_QLOGIC_ISP8031 \ + ((PCI_PRODUCT_QLOGIC_ISP8031 << 16) | PCI_VENDOR_QLOGIC) + /* * Odd case for some AMI raid cards... We need to *not* attach to this. */ @@ -458,6 +465,9 @@ isp_pci_probe(device_t dev) case PCI_QLOGIC_ISP2031: device_set_desc(dev, "Qlogic ISP 2031 PCI FC-AL Adapter"); break; + case PCI_QLOGIC_ISP8031: + device_set_desc(dev, "Qlogic ISP 8031 PCI FCoE Adapter"); + break; default: return (ENXIO); } @@ -800,6 +810,7 @@ isp_pci_attach(device_t dev) pcs->pci_poff[MBOX_BLOCK >> _BLK_REG_SHFT] = PCI_MBOX_REGS2400_OFF; break; case PCI_QLOGIC_ISP2031: + case PCI_QLOGIC_ISP8031: did = 0x2600; isp->isp_nchan += isp_nvports; isp->isp_mdvec = _2600; ___ 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: r292035 - head
Author: rrs Date: Wed Dec 9 23:02:20 2015 New Revision: 292035 URL: https://svnweb.freebsd.org/changeset/base/292035 Log: Add a couple of spots I tend to look at and Michael for SCTP as well :-) Modified: head/MAINTAINERS Modified: head/MAINTAINERS == --- head/MAINTAINERSWed Dec 9 22:52:37 2015(r292034) +++ head/MAINTAINERSWed Dec 9 23:02:20 2015(r292035) @@ -70,6 +70,9 @@ sys/dev/ixgbe erj Pre-commit phabricator sys/dev/ixlerj Pre-commit phabricator review requested. sys/netinet/ip_carp.c glebius Pre-commit review recommended. sys/netpfil/pf kp,glebius Pre-commit review recommended. +sctp rrs,tuexen Pre-commit review requested (changes need to be backported to github). +pmcstudy(8)rrs Pre-commit review requested. +callout_*(9) rrs Pre-commit review requested -- becareful its tricksy code :o. usr.sbin/pkg pkg@Please coordinate behavior or flag changes with pkg team. lprgad Pre-commit review requested, particularly for lpd/recvjob.c and lpd/printjob.c. ___ 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: r292036 - head/share/mk
Author: bdrewery Date: Thu Dec 10 00:07:05 2015 New Revision: 292036 URL: https://svnweb.freebsd.org/changeset/base/292036 Log: Sort the LIB list. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.libnames.mk head/share/mk/src.libnames.mk Modified: head/share/mk/bsd.libnames.mk == --- head/share/mk/bsd.libnames.mk Wed Dec 9 23:02:20 2015 (r292035) +++ head/share/mk/bsd.libnames.mk Thu Dec 10 00:07:05 2015 (r292036) @@ -27,22 +27,22 @@ LIBBSDXML?= ${DESTDIR}${LIBDIR}/libbsdxm LIBBSM?= ${DESTDIR}${LIBDIR}/libbsm.a LIBBSNMP?= ${DESTDIR}${LIBDIR}/libbsnmp.a LIBBZ2?= ${DESTDIR}${LIBDIR}/libbz2.a -LIBCXXRT?= ${DESTDIR}${LIBDIR}/libcxxrt.a -LIBCPLUSPLUS?= ${DESTDIR}${LIBDIR}/libc++.a LIBC?= ${DESTDIR}${LIBDIR}/libc.a -LIBC_PIC?= ${DESTDIR}${LIBDIR}/libc_pic.a LIBCALENDAR?= ${DESTDIR}${LIBDIR}/libcalendar.a LIBCAM?= ${DESTDIR}${LIBDIR}/libcam.a LIBCAPSICUM?= ${DESTDIR}${LIBDIR}/libcapsicum.a LIBCASPER?=${DESTDIR}${LIBDIR}/libcasper.a -LIBCOM_ERR?= ${DESTDIR}${LIBDIR}/libcom_err.a LIBCOMPAT?=${DESTDIR}${LIBDIR}/libcompat.a LIBCOMPILER_RT?=${DESTDIR}${LIBDIR}/libcompiler_rt.a +LIBCOM_ERR?= ${DESTDIR}${LIBDIR}/libcom_err.a +LIBCPLUSPLUS?= ${DESTDIR}${LIBDIR}/libc++.a LIBCRYPT?= ${DESTDIR}${LIBDIR}/libcrypt.a LIBCRYPTO?=${DESTDIR}${LIBDIR}/libcrypto.a LIBCTF?= ${DESTDIR}${LIBDIR}/libctf.a LIBCURSES?=${DESTDIR}${LIBDIR}/libcurses.a LIBCUSE?= ${DESTDIR}${LIBDIR}/libcuse.a +LIBCXXRT?= ${DESTDIR}${LIBDIR}/libcxxrt.a +LIBC_PIC?= ${DESTDIR}${LIBDIR}/libc_pic.a LIBDEVCTL?=${DESTDIR}${LIBDIR}/libdevctl.a LIBDEVINFO?= ${DESTDIR}${LIBDIR}/libdevinfo.a LIBDEVSTAT?= ${DESTDIR}${LIBDIR}/libdevstat.a @@ -59,9 +59,9 @@ LIBFIGPAR?= ${DESTDIR}${LIBDIR}/libfigpa LIBFL?="don't use LIBFL, use LIBL" LIBFORM?= ${DESTDIR}${LIBDIR}/libform.a LIBG2C?= ${DESTDIR}${LIBDIR}/libg2c.a -LIBGPIO?= ${DESTDIR}${LIBDIR}/libgpio.a LIBGEOM?= ${DESTDIR}${LIBDIR}/libgeom.a LIBGNUREGEX?= ${DESTDIR}${LIBDIR}/libgnuregex.a +LIBGPIO?= ${DESTDIR}${LIBDIR}/libgpio.a LIBGSSAPI?=${DESTDIR}${LIBDIR}/libgssapi.a LIBGSSAPI_KRB5?= ${DESTDIR}${LIBDIR}/libgssapi_krb5.a LIBHDB?= ${DESTDIR}${LIBDIR}/libhdb.a @@ -109,8 +109,8 @@ LIBPROCSTAT?= ${DESTDIR}${LIBDIR}/libpro LIBPTHREAD?= ${DESTDIR}${LIBDIR}/libpthread.a LIBRADIUS?=${DESTDIR}${LIBDIR}/libradius.a LIBROKEN?= ${DESTDIR}${LIBDIR}/libroken.a -LIBRPCSVC?=${DESTDIR}${LIBDIR}/librpcsvc.a LIBRPCSEC_GSS?=${DESTDIR}${LIBDIR}/librpcsec_gss.a +LIBRPCSVC?=${DESTDIR}${LIBDIR}/librpcsvc.a LIBRT?=${DESTDIR}${LIBDIR}/librt.a LIBRTLD_DB?= ${DESTDIR}${LIBDIR}/librtld_db.a LIBSBUF?= ${DESTDIR}${LIBDIR}/libsbuf.a @@ -128,18 +128,18 @@ LIBTERMLIB?= "don't use LIBTERMLIB, use LIBTINFO?= "don't use LIBTINFO, use LIBNCURSES" LIBUFS?= ${DESTDIR}${LIBDIR}/libufs.a LIBUGIDFW?=${DESTDIR}${LIBDIR}/libugidfw.a +LIBULOG?= ${DESTDIR}${LIBDIR}/libulog.a LIBUMEM?= ${DESTDIR}${LIBDIR}/libumem.a -LIBUSBHID?=${DESTDIR}${LIBDIR}/libusbhid.a LIBUSB?= ${DESTDIR}${LIBDIR}/libusb.a -LIBULOG?= ${DESTDIR}${LIBDIR}/libulog.a +LIBUSBHID?=${DESTDIR}${LIBDIR}/libusbhid.a LIBUTIL?= ${DESTDIR}${LIBDIR}/libutil.a LIBUUTIL?= ${DESTDIR}${LIBDIR}/libuutil.a LIBVGL?= ${DESTDIR}${LIBDIR}/libvgl.a LIBVMMAPI?=${DESTDIR}${LIBDIR}/libvmmapi.a LIBWIND?= ${DESTDIR}${LIBDIR}/libwind.a LIBWRAP?= ${DESTDIR}${LIBDIR}/libwrap.a -LIBXPG4?= ${DESTDIR}${LIBDIR}/libxpg4.a LIBXO?=${DESTDIR}${LIBDIR}/libxo.a +LIBXPG4?= ${DESTDIR}${LIBDIR}/libxpg4.a LIBY?= ${DESTDIR}${LIBDIR}/liby.a LIBYPCLNT?=${DESTDIR}${LIBDIR}/libypclnt.a LIBZ?= ${DESTDIR}${LIBDIR}/libz.a Modified: head/share/mk/src.libnames.mk == --- head/share/mk/src.libnames.mk Wed Dec 9 23:02:20 2015 (r292035) +++ head/share/mk/src.libnames.mk Thu Dec 10 00:07:05 2015 (r292036) @@ -453,8 +453,6 @@ LIBMENUDIR= ${OBJTOP}/lib/ncurses/menu LIBMENULIBWDIR=${OBJTOP}/lib/ncurses/menuw LIBNCURSESDIR= ${OBJTOP}/lib/ncurses/ncurses LIBNCURSESWDIR=${OBJTOP}/lib/ncurses/ncursesw -LIBTERMCAPDIR= ${LIBNCURSESDIR} -LIBTERMCAPWDIR=${LIBNCURSESWDIR} LIBPANELDIR= ${OBJTOP}/lib/ncurses/panel LIBPANELWDIR= ${OBJTOP}/lib/ncurses/panelw LIBCRYPTODIR= ${OBJTOP}/secure/lib/libcrypto @@ -464,6 +462,9 @@ LIBTEKENDIR=${OBJTOP}/sys/teken/libteke LIBEGACYDIR= ${OBJTOP}/tools/build LIBLNDIR= ${OBJTOP}/usr.bin/lex/lib +LIBTERMCAPDIR= ${LIBNCURSESDIR} +LIBTERMCAPWDIR=${LIBNCURSESWDIR} + # Default other library directories to lib/libNAME. .for lib in ${_LIBRARIES} LIB${lib:tu}DIR?=
Re: svn commit: r292003 - head/sys/netinet
I've been wating for this issue is solved. I will try to test this implementation. thanks. On Tue, Dec 08, 2015 at 09:21:48PM +, Hiren Panchasara wrote: > Author: hiren > Date: Tue Dec 8 21:21:48 2015 > New Revision: 292003 > URL: https://svnweb.freebsd.org/changeset/base/292003 > > Log: > One of the ways to detect loss is to count duplicate acks coming back from > the > other end till it reaches predetermined threshold which is 3 for us right > now. > Once that happens, we trigger fast-retransmit to do loss recovery. > > Main problem with the current implementation is that we don't honor SACK > information well to detect whether an incoming ack is a dupack or not. > RFC6675 > has latest recommendations for that. According to it, dupack is a segment > that > arrives carrying a SACK block that identifies previously unknown information > between snd_una and snd_max even if it carries new data, changes the > advertised > window, or moves the cumulative acknowledgment point. > > With the prevalence of Selective ACK (SACK) these days, improper handling > can > lead to delayed loss recovery. > > With the fix, new behavior looks like following: > > 0) th_ack < snd_una --> ignore > Old acks are ignored. > 1) th_ack == snd_una, !sack_changed --> ignore > Acks with SACK enabled but without any new SACK info in them are ignored. > 2) th_ack == snd_una, window == old_window --> increment > Increment on a good dupack. > 3) th_ack == snd_una, window != old_window, sack_changed --> increment > When SACK enabled, it's okay to have advertized window changed if the ack > has > new SACK info. > 4) th_ack > snd_una --> reset to 0 > Reset to 0 when left edge moves. > 5) th_ack > snd_una, sack_changed --> increment > Increment if left edge moves but there is new SACK info. > > Here, sack_changed is the indicator that incoming ack has previously unknown > SACK info in it. > > Note: This fix is not fully compliant to RFC6675. That may require a few > changes to current implementation in order to keep per-sackhole dupack > counter > and change to the way we mark/handle sack holes. > > PR: 203663 > Reviewed by:jtl > MFC after: 3 weeks > Sponsored by: Limelight Networks > Differential Revision: https://reviews.freebsd.org/D4225 > > Modified: > head/sys/netinet/tcp_input.c > head/sys/netinet/tcp_sack.c > head/sys/netinet/tcp_var.h > > Modified: head/sys/netinet/tcp_input.c > == > --- head/sys/netinet/tcp_input.c Tue Dec 8 20:20:40 2015 > (r292002) > +++ head/sys/netinet/tcp_input.c Tue Dec 8 21:21:48 2015 > (r292003) > @@ -1481,7 +1481,7 @@ tcp_do_segment(struct mbuf *m, struct tc > struct tcpcb *tp, int drop_hdrlen, int tlen, uint8_t iptos, > int ti_locked) > { > - int thflags, acked, ourfinisacked, needoutput = 0; > + int thflags, acked, ourfinisacked, needoutput = 0, sack_changed; > int rstreason, todrop, win; > u_long tiwin; > char *s; > @@ -1501,6 +1501,7 @@ tcp_do_segment(struct mbuf *m, struct tc > thflags = th->th_flags; > inc = >t_inpcb->inp_inc; > tp->sackhint.last_sack_ack = 0; > + sack_changed = 0; > > /* >* If this is either a state-changing packet or current state isn't > @@ -2424,7 +2425,7 @@ tcp_do_segment(struct mbuf *m, struct tc > if ((tp->t_flags & TF_SACK_PERMIT) && > ((to.to_flags & TOF_SACK) || >!TAILQ_EMPTY(>snd_holes))) > - tcp_sack_doack(tp, , th->th_ack); > + sack_changed = tcp_sack_doack(tp, , th->th_ack); > else > /* >* Reset the value so that previous (valid) value > @@ -2436,7 +2437,9 @@ tcp_do_segment(struct mbuf *m, struct tc > hhook_run_tcp_est_in(tp, th, ); > > if (SEQ_LEQ(th->th_ack, tp->snd_una)) { > - if (tlen == 0 && tiwin == tp->snd_wnd) { > + if (tlen == 0 && > + (tiwin == tp->snd_wnd || > + (tp->t_flags & TF_SACK_PERMIT))) { > /* >* If this is the first time we've seen a >* FIN from the remote, this is not a > @@ -2478,8 +2481,20 @@ tcp_do_segment(struct mbuf *m, struct tc >* When using TCP ECN, notify the peer that >* we reduced the cwnd. >*/ > - if (!tcp_timer_active(tp, TT_REXMT) || > - th->th_ack != tp->snd_una) > + /* > + * Following 2 kinds of acks should not affect > +
svn commit: r292041 - head/sys/dev/isp
Author: mav Date: Thu Dec 10 01:17:30 2015 New Revision: 292041 URL: https://svnweb.freebsd.org/changeset/base/292041 Log: Guess NVRAM address for 16Gbps Qlogic cards. I have feeling this approach is wrong, but it works for me so far and it is better then nothing. Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c == --- head/sys/dev/isp/isp.c Thu Dec 10 01:16:48 2015(r292040) +++ head/sys/dev/isp/isp.c Thu Dec 10 01:17:30 2015(r292041) @@ -7920,7 +7920,9 @@ isp_rd_2400_nvram(ispsoftc_t *isp, uint3 uint32_t base = 0x7ffe; uint32_t tmp = 0; - if (IS_25XX(isp)) { + if (IS_26XX(isp)) { + base = 0x7fe7c000; /* XXX: Observation, may be wrong. */ + } else if (IS_25XX(isp)) { base = 0x7ff0 | 0x48000; } ISP_WRITE(isp, BIU2400_FLASH_ADDR, base | addr); ___ 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: r292039 - head/usr.bin/clang/lldb
Author: bdrewery Date: Thu Dec 10 01:16:22 2015 New Revision: 292039 URL: https://svnweb.freebsd.org/changeset/base/292039 Log: Use LIBADD for pthread. Sponsored by: EMC / Isilon Storage Division Modified: head/usr.bin/clang/lldb/Makefile Modified: head/usr.bin/clang/lldb/Makefile == --- head/usr.bin/clang/lldb/MakefileThu Dec 10 00:16:02 2015 (r292038) +++ head/usr.bin/clang/lldb/MakefileThu Dec 10 01:16:22 2015 (r292039) @@ -161,6 +161,6 @@ LIBDEPS=\ llvmcore \ llvmsupport -.include "../clang.prog.mk" +LIBADD+= pthread -LDADD+=-lpthread +.include "../clang.prog.mk" ___ 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: r292045 - head/sbin/sysctl
Author: araujo Date: Thu Dec 10 02:11:42 2015 New Revision: 292045 URL: https://svnweb.freebsd.org/changeset/base/292045 Log: Add -t option to display field types. PR: bin/203918 Submitted by: otaReviewed by: cem Approved by: bapt (mentor) Differential Revision:https://reviews.freebsd.org/D4451 Modified: head/sbin/sysctl/sysctl.8 head/sbin/sysctl/sysctl.c Modified: head/sbin/sysctl/sysctl.8 == --- head/sbin/sysctl/sysctl.8 Thu Dec 10 02:05:35 2015(r292044) +++ head/sbin/sysctl/sysctl.8 Thu Dec 10 02:11:42 2015(r292045) @@ -28,7 +28,7 @@ .\"From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd February 12, 2015 +.Dd December 10, 2015 .Dt SYSCTL 8 .Os .Sh NAME @@ -36,13 +36,13 @@ .Nd get or set kernel state .Sh SYNOPSIS .Nm -.Op Fl bdehiNnoRTqx +.Op Fl bdehiNnoRTtqx .Op Fl B Ar bufsize .Op Fl f Ar filename .Ar name Ns Op = Ns Ar value .Ar ... .Nm -.Op Fl bdehNnoRTqx +.Op Fl bdehNnoRTtqx .Op Fl B Ar bufsize .Fl a .Sh DESCRIPTION @@ -140,6 +140,8 @@ Suppress some warnings generated by to standard error. .It Fl T Display only variables that are settable via loader (CTLFLAG_TUN). +.It Fl t +Print the type of the variable. .It Fl W Display only writable variables that are not statistical. Useful for determining the set of runtime tunable sysctls. Modified: head/sbin/sysctl/sysctl.c == --- head/sbin/sysctl/sysctl.c Thu Dec 10 02:05:35 2015(r292044) +++ head/sbin/sysctl/sysctl.c Thu Dec 10 02:11:42 2015(r292045) @@ -72,7 +72,7 @@ static const char rcsid[] = static const char *conffile; static int aflag, bflag, Bflag, dflag, eflag, hflag, iflag; -static int Nflag, nflag, oflag, qflag, Tflag, Wflag, xflag; +static int Nflag, nflag, oflag, qflag, tflag, Tflag, Wflag, xflag; static int oidfmt(int *, int, char *, u_int *); static int parsefile(const char *); @@ -120,6 +120,9 @@ static const char *ctl_typename[CTLTYPE+ [CTLTYPE_S16] = "int16_t", [CTLTYPE_S32] = "int32_t", [CTLTYPE_S64] = "int64_t", + [CTLTYPE_NODE] = "node", + [CTLTYPE_STRING] = "string", + [CTLTYPE_OPAQUE] = "opaque", }; static void @@ -127,8 +130,8 @@ usage(void) { (void)fprintf(stderr, "%s\n%s\n", - "usage: sysctl [-bdehiNnoqTWx] [ -B ] [-f filename] name[=value] ...", - " sysctl [-bdehNnoqTWx] [ -B ] -a"); + "usage: sysctl [-bdehiNnoqTtWx] [ -B ] [-f filename] name[=value] ...", + " sysctl [-bdehNnoqTtWx] [ -B ] -a"); exit(1); } @@ -142,7 +145,7 @@ main(int argc, char **argv) setbuf(stdout,0); setbuf(stderr,0); - while ((ch = getopt(argc, argv, "AabB:def:hiNnoqTwWxX")) != -1) { + while ((ch = getopt(argc, argv, "AabB:def:hiNnoqtTwWxX")) != -1) { switch (ch) { case 'A': /* compatibility */ @@ -184,6 +187,9 @@ main(int argc, char **argv) case 'q': qflag = 1; break; + case 't': + tflag = 1; + break; case 'T': Tflag = 1; break; @@ -856,7 +862,7 @@ show_var(int *oid, int nlen) { u_char buf[BUFSIZ], *val, *oval, *p; char name[BUFSIZ], fmt[BUFSIZ]; - const char *sep, *sep1; + const char *sep, *sep1, *prntype; int qoid[CTL_MAXNAME+2]; uintmax_t umv; intmax_t mv; @@ -902,12 +908,23 @@ show_var(int *oid, int nlen) else sep = ": "; - if (dflag) {/* just print description */ + ctltype = (kind & CTLTYPE); + if (tflag || dflag) { + if (!nflag) + printf("%s%s", name, sep); + if (ctl_typename[ctltype] != NULL) + prntype = ctl_typename[ctltype]; + else + prntype = "unknown"; + if (tflag && dflag) + printf("%s%s", prntype, sep); + else if (tflag) { + printf("%s", prntype); + return (0); + } qoid[1] = 5; j = sizeof(buf); i = sysctl(qoid, nlen + 2, buf, , 0, 0); - if (!nflag) - printf("%s%s", name, sep); printf("%s", buf); return (0); } @@ -925,7 +942,6 @@ show_var(int *oid, int nlen) warnx("malloc failed"); return (1); } - ctltype = (kind & CTLTYPE); len = j; i = sysctl(oid, nlen, val, , 0, 0); if (i != 0 || (len == 0 && ctltype != CTLTYPE_STRING)) {
svn commit: r292044 - in head: sys/dev/ioat tools/tools/ioat
Author: cem Date: Thu Dec 10 02:05:35 2015 New Revision: 292044 URL: https://svnweb.freebsd.org/changeset/base/292044 Log: ioat(4): Add ioatcontrol(8) testing for copy_8k Add -E ("Eight k") and -m ("Memcpy") modes to the ioatcontrol(8) tool. Prompted by: rpokala Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ioat/ioat_test.c head/sys/dev/ioat/ioat_test.h head/tools/tools/ioat/ioatcontrol.8 head/tools/tools/ioat/ioatcontrol.c Modified: head/sys/dev/ioat/ioat_test.c == --- head/sys/dev/ioat/ioat_test.c Thu Dec 10 01:52:29 2015 (r292043) +++ head/sys/dev/ioat/ioat_test.c Thu Dec 10 02:05:35 2015 (r292044) @@ -84,11 +84,17 @@ static inline void _ioat_test_log(int ve static void ioat_test_transaction_destroy(struct test_transaction *tx) { + struct ioat_test *test; int i; + test = tx->test; + for (i = 0; i < IOAT_MAX_BUFS; i++) { if (tx->buf[i] != NULL) { - contigfree(tx->buf[i], tx->length, M_IOAT_TEST); + if (test->testkind == IOAT_TEST_DMA_8K) + free(tx->buf[i], M_IOAT_TEST); + else + contigfree(tx->buf[i], tx->length, M_IOAT_TEST); tx->buf[i] = NULL; } } @@ -97,8 +103,8 @@ ioat_test_transaction_destroy(struct tes } static struct -test_transaction *ioat_test_transaction_create(unsigned num_buffers, -uint32_t buffer_size) +test_transaction *ioat_test_transaction_create(struct ioat_test *test, +unsigned num_buffers) { struct test_transaction *tx; unsigned i; @@ -107,11 +113,16 @@ test_transaction *ioat_test_transaction_ if (tx == NULL) return (NULL); - tx->length = buffer_size; + tx->length = test->buffer_size; for (i = 0; i < num_buffers; i++) { - tx->buf[i] = contigmalloc(buffer_size, M_IOAT_TEST, M_NOWAIT, - 0, BUS_SPACE_MAXADDR, PAGE_SIZE, 0); + if (test->testkind == IOAT_TEST_DMA_8K) + tx->buf[i] = malloc(test->buffer_size, M_IOAT_TEST, + M_NOWAIT); + else + tx->buf[i] = contigmalloc(test->buffer_size, + M_IOAT_TEST, M_NOWAIT, 0, BUS_SPACE_MAXADDR, + PAGE_SIZE, 0); if (tx->buf[i] == NULL) { ioat_test_transaction_destroy(tx); @@ -197,8 +208,7 @@ ioat_test_prealloc_memory(struct ioat_te struct test_transaction *tx; for (i = 0; i < test->transactions; i++) { - tx = ioat_test_transaction_create(test->chain_depth * 2, - test->buffer_size); + tx = ioat_test_transaction_create(test, test->chain_depth * 2); if (tx == NULL) { ioat_test_log(0, "tx == NULL - memory exhausted\n"); test->status[IOAT_TEST_NO_MEMORY]++; @@ -258,8 +268,16 @@ ioat_test_submit_1_tx(struct ioat_test * TAILQ_INSERT_HEAD(>pend_q, tx, entry); IT_UNLOCK(); - ioat_acquire(dma); + if (test->testkind != IOAT_TEST_MEMCPY) + ioat_acquire(dma); for (i = 0; i < tx->depth; i++) { + if (test->testkind == IOAT_TEST_MEMCPY) { + memcpy(tx->buf[2 * i + 1], tx->buf[2 * i], tx->length); + if (i == tx->depth - 1) + ioat_dma_test_callback(tx, 0); + continue; + } + src = vtophys((vm_offset_t)tx->buf[2*i]); dest = vtophys((vm_offset_t)tx->buf[2*i+1]); @@ -286,10 +304,20 @@ ioat_test_submit_1_tx(struct ioat_test * fillpattern = *(uint64_t *)tx->buf[2*i]; desc = ioat_blockfill(dma, dest, fillpattern, tx->length, cb, tx, flags); + } else if (test->testkind == IOAT_TEST_DMA_8K) { + bus_addr_t src2, dst2; + + src2 = vtophys((vm_offset_t)tx->buf[2*i] + PAGE_SIZE); + dst2 = vtophys((vm_offset_t)tx->buf[2*i+1] + PAGE_SIZE); + + desc = ioat_copy_8k_aligned(dma, dest, dst2, src, src2, + cb, tx, flags); } if (desc == NULL) break; } + if (test->testkind == IOAT_TEST_MEMCPY) + return; ioat_release(dma); /* @@ -317,6 +345,13 @@ ioat_dma_test(void *arg) test = arg; memset(__DEVOLATILE(void *, test->status), 0, sizeof(test->status)); + if (test->testkind == IOAT_TEST_DMA_8K && + test->buffer_size != 2 * PAGE_SIZE) { + ioat_test_log(0,
svn commit: r292037 - in head: contrib/ofed/usr.bin/ibaddr contrib/ofed/usr.bin/ibnetdiscover contrib/ofed/usr.bin/ibping contrib/ofed/usr.bin/ibportstate contrib/ofed/usr.bin/ibroute contrib/ofed/...
Author: bdrewery Date: Thu Dec 10 00:07:11 2015 New Revision: 292037 URL: https://svnweb.freebsd.org/changeset/base/292037 Log: Convert contrib/ofed libraries to LIBADD. Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/ofed/usr.bin/ibaddr/Makefile head/contrib/ofed/usr.bin/ibnetdiscover/Makefile head/contrib/ofed/usr.bin/ibping/Makefile head/contrib/ofed/usr.bin/ibportstate/Makefile head/contrib/ofed/usr.bin/ibroute/Makefile head/contrib/ofed/usr.bin/ibsendtrap/Makefile head/contrib/ofed/usr.bin/ibstat/Makefile head/contrib/ofed/usr.bin/ibsysstat/Makefile head/contrib/ofed/usr.bin/ibtracert/Makefile head/contrib/ofed/usr.bin/opensm/Makefile head/contrib/ofed/usr.bin/osmtest/Makefile head/contrib/ofed/usr.bin/perfquery/Makefile head/contrib/ofed/usr.bin/saquery/Makefile head/contrib/ofed/usr.bin/sminfo/Makefile head/contrib/ofed/usr.bin/smpdump/Makefile head/contrib/ofed/usr.bin/smpquery/Makefile head/contrib/ofed/usr.bin/vendstat/Makefile head/share/mk/bsd.libnames.mk head/share/mk/src.libnames.mk Modified: head/contrib/ofed/usr.bin/ibaddr/Makefile == --- head/contrib/ofed/usr.bin/ibaddr/Makefile Thu Dec 10 00:07:05 2015 (r292036) +++ head/contrib/ofed/usr.bin/ibaddr/Makefile Thu Dec 10 00:07:11 2015 (r292037) @@ -5,7 +5,7 @@ PROG= ibaddr SRCS= ibaddr.c ibdiag_common.c -LDADD= -libumad -libcommon -libmad +LIBADD= ibumad ibcommon ibmad CFLAGS+= -I${DIAGPATH}/include MAN= ibaddr.8 Modified: head/contrib/ofed/usr.bin/ibnetdiscover/Makefile == --- head/contrib/ofed/usr.bin/ibnetdiscover/MakefileThu Dec 10 00:07:05 2015(r292036) +++ head/contrib/ofed/usr.bin/ibnetdiscover/MakefileThu Dec 10 00:07:11 2015(r292037) @@ -5,8 +5,8 @@ PROG= ibnetdiscover SRCS= ibnetdiscover.c grouping.c ibdiag_common.c -LDADD= -libumad -libcommon -libmad -losmcomp -CFLAGS+= -pthread -I${DIAGPATH}/include +LIBADD= ibumad ibcommon ibmad osmcomp pthread +CFLAGS+= -I${DIAGPATH}/include MAN= ibnetdiscover.8 WARNS?= 1 Modified: head/contrib/ofed/usr.bin/ibping/Makefile == --- head/contrib/ofed/usr.bin/ibping/Makefile Thu Dec 10 00:07:05 2015 (r292036) +++ head/contrib/ofed/usr.bin/ibping/Makefile Thu Dec 10 00:07:11 2015 (r292037) @@ -5,7 +5,7 @@ PROG= ibping SRCS= ibping.c ibdiag_common.c -LDADD= -libumad -libcommon -libmad +LIBADD= ibumad ibcommon ibmad CFLAGS+= -I${DIAGPATH}/include MAN= ibping.8 Modified: head/contrib/ofed/usr.bin/ibportstate/Makefile == --- head/contrib/ofed/usr.bin/ibportstate/Makefile Thu Dec 10 00:07:05 2015(r292036) +++ head/contrib/ofed/usr.bin/ibportstate/Makefile Thu Dec 10 00:07:11 2015(r292037) @@ -5,7 +5,7 @@ PROG= ibportstate SRCS= ibportstate.c ibdiag_common.c -LDADD= -libumad -libcommon -libmad +LIBADD= ibumad ibcommon ibmad CFLAGS+= -I${DIAGPATH}/include MAN= ibportstate.8 Modified: head/contrib/ofed/usr.bin/ibroute/Makefile == --- head/contrib/ofed/usr.bin/ibroute/Makefile Thu Dec 10 00:07:05 2015 (r292036) +++ head/contrib/ofed/usr.bin/ibroute/Makefile Thu Dec 10 00:07:11 2015 (r292037) @@ -5,8 +5,8 @@ PROG= ibroute SRCS= ibroute.c ibdiag_common.c -LDADD= -libumad -libcommon -libmad -losmcomp -CFLAGS+= -pthread -I${DIAGPATH}/include +LIBADD= ibumad ibcommon ibmad osmcomp pthread +CFLAGS+= -I${DIAGPATH}/include MAN= ibroute.8 WARNS?= 1 Modified: head/contrib/ofed/usr.bin/ibsendtrap/Makefile == --- head/contrib/ofed/usr.bin/ibsendtrap/Makefile Thu Dec 10 00:07:05 2015(r292036) +++ head/contrib/ofed/usr.bin/ibsendtrap/Makefile Thu Dec 10 00:07:11 2015(r292037) @@ -5,7 +5,7 @@ PROG= ibsendtrap SRCS= ibsendtrap.c ibdiag_common.c -LDADD= -libumad -libcommon -libmad +LIBADD= ibumad ibcommon ibmad CFLAGS+= -I${DIAGPATH}/include MAN= Modified: head/contrib/ofed/usr.bin/ibstat/Makefile == --- head/contrib/ofed/usr.bin/ibstat/Makefile Thu Dec 10 00:07:05 2015 (r292036) +++ head/contrib/ofed/usr.bin/ibstat/Makefile Thu Dec 10 00:07:11 2015 (r292037) @@ -5,7 +5,7 @@ PROG= ibstat SRCS= ibstat.c -LDADD= -libumad -libcommon +LIBADD= ibumad ibcommon CFLAGS+= -I${DIAGPATH}/include MAN= ibstat.8 Modified: head/contrib/ofed/usr.bin/ibsysstat/Makefile == ---
Re: svn commit: r292045 - head/sbin/sysctl
Nice Marcelo, I always thought it was odd there was no way to easily get this info :) On 10/12/2015 02:11, Marcelo Araujo wrote: Author: araujo Date: Thu Dec 10 02:11:42 2015 New Revision: 292045 URL: https://svnweb.freebsd.org/changeset/base/292045 Log: Add -t option to display field types. PR: bin/203918 Submitted by:otaReviewed by: cem Approved by: bapt (mentor) Differential Revision: https://reviews.freebsd.org/D4451 Modified: head/sbin/sysctl/sysctl.8 head/sbin/sysctl/sysctl.c Modified: head/sbin/sysctl/sysctl.8 == --- head/sbin/sysctl/sysctl.8 Thu Dec 10 02:05:35 2015(r292044) +++ head/sbin/sysctl/sysctl.8 Thu Dec 10 02:11:42 2015(r292045) @@ -28,7 +28,7 @@ .\" From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd February 12, 2015 +.Dd December 10, 2015 .Dt SYSCTL 8 .Os .Sh NAME @@ -36,13 +36,13 @@ .Nd get or set kernel state .Sh SYNOPSIS .Nm -.Op Fl bdehiNnoRTqx +.Op Fl bdehiNnoRTtqx .Op Fl B Ar bufsize .Op Fl f Ar filename .Ar name Ns Op = Ns Ar value .Ar ... .Nm -.Op Fl bdehNnoRTqx +.Op Fl bdehNnoRTtqx .Op Fl B Ar bufsize .Fl a .Sh DESCRIPTION @@ -140,6 +140,8 @@ Suppress some warnings generated by to standard error. .It Fl T Display only variables that are settable via loader (CTLFLAG_TUN). +.It Fl t +Print the type of the variable. .It Fl W Display only writable variables that are not statistical. Useful for determining the set of runtime tunable sysctls. Modified: head/sbin/sysctl/sysctl.c == --- head/sbin/sysctl/sysctl.c Thu Dec 10 02:05:35 2015(r292044) +++ head/sbin/sysctl/sysctl.c Thu Dec 10 02:11:42 2015(r292045) @@ -72,7 +72,7 @@ static const char rcsid[] = static const char *conffile; static int aflag, bflag, Bflag, dflag, eflag, hflag, iflag; -static int Nflag, nflag, oflag, qflag, Tflag, Wflag, xflag; +static int Nflag, nflag, oflag, qflag, tflag, Tflag, Wflag, xflag; static int oidfmt(int *, int, char *, u_int *); static intparsefile(const char *); @@ -120,6 +120,9 @@ static const char *ctl_typename[CTLTYPE+ [CTLTYPE_S16] = "int16_t", [CTLTYPE_S32] = "int32_t", [CTLTYPE_S64] = "int64_t", + [CTLTYPE_NODE] = "node", + [CTLTYPE_STRING] = "string", + [CTLTYPE_OPAQUE] = "opaque", }; static void @@ -127,8 +130,8 @@ usage(void) { (void)fprintf(stderr, "%s\n%s\n", - "usage: sysctl [-bdehiNnoqTWx] [ -B ] [-f filename] name[=value] ...", - " sysctl [-bdehNnoqTWx] [ -B ] -a"); + "usage: sysctl [-bdehiNnoqTtWx] [ -B ] [-f filename] name[=value] ...", + " sysctl [-bdehNnoqTtWx] [ -B ] -a"); exit(1); } @@ -142,7 +145,7 @@ main(int argc, char **argv) setbuf(stdout,0); setbuf(stderr,0); - while ((ch = getopt(argc, argv, "AabB:def:hiNnoqTwWxX")) != -1) { + while ((ch = getopt(argc, argv, "AabB:def:hiNnoqtTwWxX")) != -1) { switch (ch) { case 'A': /* compatibility */ @@ -184,6 +187,9 @@ main(int argc, char **argv) case 'q': qflag = 1; break; + case 't': + tflag = 1; + break; case 'T': Tflag = 1; break; @@ -856,7 +862,7 @@ show_var(int *oid, int nlen) { u_char buf[BUFSIZ], *val, *oval, *p; char name[BUFSIZ], fmt[BUFSIZ]; - const char *sep, *sep1; + const char *sep, *sep1, *prntype; int qoid[CTL_MAXNAME+2]; uintmax_t umv; intmax_t mv; @@ -902,12 +908,23 @@ show_var(int *oid, int nlen) else sep = ": "; - if (dflag) { /* just print description */ + ctltype = (kind & CTLTYPE); + if (tflag || dflag) { + if (!nflag) + printf("%s%s", name, sep); + if (ctl_typename[ctltype] != NULL) + prntype = ctl_typename[ctltype]; + else + prntype = "unknown"; + if (tflag && dflag) + printf("%s%s", prntype, sep); + else if (tflag) { + printf("%s", prntype); + return (0); + } qoid[1] = 5; j = sizeof(buf); i = sysctl(qoid, nlen + 2, buf, , 0, 0); - if (!nflag) - printf("%s%s", name, sep); printf("%s", buf); return (0); } @@ -925,7 +942,6 @@ show_var(int *oid, int nlen) warnx("malloc failed"); return (1); } -
svn commit: r292047 - head/lib/libc/rpc
Author: stas Date: Thu Dec 10 05:17:04 2015 New Revision: 292047 URL: https://svnweb.freebsd.org/changeset/base/292047 Log: RPC: populate local address for rendezvous transporter. When accepting a connection on underlying tcp socket rpc vc transporter fails to populate local address. This change rectifies this problem by modifying rendezvous_request() to fill out the xptr structure member with appropriate information. Submitted by: Alex BurlygaMFC after:2 weeks Differential Revision: https://reviews.freebsd.org/D4206 Modified: head/lib/libc/rpc/svc_vc.c Modified: head/lib/libc/rpc/svc_vc.c == --- head/lib/libc/rpc/svc_vc.c Thu Dec 10 03:20:10 2015(r292046) +++ head/lib/libc/rpc/svc_vc.c Thu Dec 10 05:17:04 2015(r292047) @@ -281,8 +281,8 @@ rendezvous_request(SVCXPRT *xprt, struct int sock, flags; struct cf_rendezvous *r; struct cf_conn *cd; - struct sockaddr_storage addr; - socklen_t len; + struct sockaddr_storage addr, sslocal; + socklen_t len, slen; struct __rpc_sockinfo si; SVCXPRT *newxprt; fd_set cleanfds; @@ -347,6 +347,20 @@ again: __xdrrec_setnonblock(>xdrs, cd->maxrec); } else cd->nonblock = FALSE; + slen = sizeof(struct sockaddr_storage); + if(_getsockname(sock, (struct sockaddr *)(void *), ) < 0) { + warnx("svc_vc_create: could not retrieve local addr"); + newxprt->xp_ltaddr.maxlen = newxprt->xp_ltaddr.len = 0; + } else { + newxprt->xp_ltaddr.maxlen = newxprt->xp_ltaddr.len = sslocal.ss_len; + newxprt->xp_ltaddr.buf = mem_alloc((size_t)sslocal.ss_len); + if (newxprt->xp_ltaddr.buf == NULL) { + warnx("svc_vc_create: no mem for local addr"); + newxprt->xp_ltaddr.maxlen = newxprt->xp_ltaddr.len = 0; + } else { + memcpy(newxprt->xp_ltaddr.buf, , (size_t)sslocal.ss_len); + } + } gettimeofday(>last_recv_time, 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"
svn commit: r292051 - head/sys/dev/sfxge/common
Author: arybchik Date: Thu Dec 10 07:16:21 2015 New Revision: 292051 URL: https://svnweb.freebsd.org/changeset/base/292051 Log: sfxge: [6/6] support for MCDI proxy authorization in common code Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D4454 Modified: head/sys/dev/sfxge/common/efx.h head/sys/dev/sfxge/common/efx_mcdi.c head/sys/dev/sfxge/common/efx_mcdi.h head/sys/dev/sfxge/common/hunt_ev.c Modified: head/sys/dev/sfxge/common/efx.h == --- head/sys/dev/sfxge/common/efx.h Thu Dec 10 07:15:09 2015 (r292050) +++ head/sys/dev/sfxge/common/efx.h Thu Dec 10 07:16:21 2015 (r292051) @@ -218,6 +218,9 @@ typedef struct efx_mcdi_transport_s { void(*emt_logger)(void *, efx_log_msg_t, void *, size_t, void *, size_t); #endif /* EFSYS_OPT_MCDI_LOGGING */ +#if EFSYS_OPT_MCDI_PROXY_AUTH + void(*emt_ev_proxy_response)(void *, uint32_t, efx_rc_t); +#endif /* EFSYS_OPT_MCDI_PROXY_AUTH */ } efx_mcdi_transport_t; extern __checkReturn efx_rc_t Modified: head/sys/dev/sfxge/common/efx_mcdi.c == --- head/sys/dev/sfxge/common/efx_mcdi.cThu Dec 10 07:15:09 2015 (r292050) +++ head/sys/dev/sfxge/common/efx_mcdi.cThu Dec 10 07:16:21 2015 (r292051) @@ -302,6 +302,21 @@ efx_mcdi_read_response_header( emrp->emr_err_code = err_code; emrp->emr_err_arg = err_arg; +#if EFSYS_OPT_MCDI_PROXY_AUTH + if ((err_code == MC_CMD_ERR_PROXY_PENDING) && + (err_len == sizeof (err))) { + /* +* The MCDI request would normally fail with EPERM, but +* firmware has forwarded it to an authorization agent +* attached to a privileged PF. +* +* Save the authorization request handle. The client +* must wait for a PROXY_RESPONSE event, or timeout. +*/ + emrp->emr_proxy_handle = err_arg; + } +#endif /* EFSYS_OPT_MCDI_PROXY_AUTH */ + #if EFSYS_OPT_MCDI_LOGGING if (emtp->emt_logger != NULL) { emtp->emt_logger(emtp->emt_context, @@ -322,6 +337,9 @@ efx_mcdi_read_response_header( emrp->emr_rc = 0; emrp->emr_out_length_used = data_len; +#if EFSYS_OPT_MCDI_PROXY_AUTH + emrp->emr_proxy_handle = 0; +#endif /* EFSYS_OPT_MCDI_PROXY_AUTH */ return; fail3: @@ -463,6 +481,9 @@ efx_mcdi_request_errcode( case MC_CMD_ERR_MAC_EXIST: return (EEXIST); + case MC_CMD_ERR_PROXY_PENDING: + return (EAGAIN); + default: EFSYS_PROBE1(mc_pcol_error, int, err); return (EIO); @@ -584,11 +605,70 @@ efx_mcdi_ev_cpl( emrp->emr_rc = 0; } } - emcop->emco_request_copyout(enp, emrp); + if (errcode == 0) { + emcop->emco_request_copyout(enp, emrp); + } emtp->emt_ev_cpl(emtp->emt_context); } +#if EFSYS_OPT_MCDI_PROXY_AUTH + + __checkReturn efx_rc_t +efx_mcdi_get_proxy_handle( + __inefx_nic_t *enp, + __inefx_mcdi_req_t *emrp, + __out uint32_t *handlep) +{ + efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip); + efx_rc_t rc; + + /* +* Return proxy handle from MCDI request that returned with error +* MC_MCD_ERR_PROXY_PENDING. This handle is used to wait for a matching +* PROXY_RESPONSE event. +*/ + if ((emrp == NULL) || (handlep == NULL)) { + rc = EINVAL; + goto fail1; + } + if ((emrp->emr_rc != 0) && + (emrp->emr_err_code == MC_CMD_ERR_PROXY_PENDING)) { + *handlep = emrp->emr_proxy_handle; + rc = 0; + } else { + *handlep = 0; + rc = ENOENT; + } + return (rc); + +fail1: + EFSYS_PROBE1(fail1, efx_rc_t, rc); + return (rc); +} + + void +efx_mcdi_ev_proxy_response( + __inefx_nic_t *enp, + __inunsigned int handle, + __inunsigned int status) +{ + const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp; + efx_rc_t rc; + + /* +* Handle results of an authorization request for a privileged MCDI +* command. If authorization was granted then we must re-issue the +* original MCDI request. If authorization failed or timed out, +* then the original MCDI request should be completed with the +*
svn commit: r292052 - head/sys/dev/sfxge/common
Author: arybchik Date: Thu Dec 10 07:17:46 2015 New Revision: 292052 URL: https://svnweb.freebsd.org/changeset/base/292052 Log: sfxge: simplify privilege checks with macro Submitted by: Richard Houldsworth Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D4455 Modified: head/sys/dev/sfxge/common/efx_mcdi.h head/sys/dev/sfxge/common/hunt_mcdi.c Modified: head/sys/dev/sfxge/common/efx_mcdi.h == --- head/sys/dev/sfxge/common/efx_mcdi.hThu Dec 10 07:16:21 2015 (r292051) +++ head/sys/dev/sfxge/common/efx_mcdi.hThu Dec 10 07:17:46 2015 (r292052) @@ -386,6 +386,11 @@ efx_mcdi_get_loopback_modes( #defineMCDI_CMD_DWORD_FIELD(_edp, _field) \ EFX_DWORD_FIELD(*_edp, MC_CMD_ ## _field) +#define EFX_MCDI_HAVE_PRIVILEGE(mask, priv) \ + (((mask) & \ + (MC_CMD_PRIVILEGE_MASK_IN_GRP_ ## priv)) == \ + (MC_CMD_PRIVILEGE_MASK_IN_GRP_ ## priv)) + #ifdef __cplusplus } #endif Modified: head/sys/dev/sfxge/common/hunt_mcdi.c == --- head/sys/dev/sfxge/common/hunt_mcdi.c Thu Dec 10 07:16:21 2015 (r292051) +++ head/sys/dev/sfxge/common/hunt_mcdi.c Thu Dec 10 07:17:46 2015 (r292052) @@ -412,9 +412,8 @@ hunt_mcdi_fw_update_supported( * Admin privilege must be used prior to introduction of * specific flag. */ - *supportedp = (encp->enc_privilege_mask & - MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN) - == MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN; + *supportedp = + EFX_MCDI_HAVE_PRIVILEGE(encp->enc_privilege_mask, ADMIN); return (0); } @@ -436,12 +435,9 @@ hunt_mcdi_macaddr_change_supported( * introduction of change mac spoofing privilege (at v4.7) */ *supportedp = - ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_CHANGE_MAC) == - MC_CMD_PRIVILEGE_MASK_IN_GRP_CHANGE_MAC) || - ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING) == - MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING) || - ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN) == - MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN); + EFX_MCDI_HAVE_PRIVILEGE(privilege_mask, CHANGE_MAC) || + EFX_MCDI_HAVE_PRIVILEGE(privilege_mask, MAC_SPOOFING) || + EFX_MCDI_HAVE_PRIVILEGE(privilege_mask, ADMIN); return (0); } @@ -463,12 +459,9 @@ hunt_mcdi_mac_spoofing_supported( * introduction of mac spoofing TX privilege (at v4.7) */ *supportedp = - ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING_TX) == - MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING_TX) || - ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING) == - MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING) || - ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN) == - MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN); + EFX_MCDI_HAVE_PRIVILEGE(privilege_mask, MAC_SPOOFING_TX) || + EFX_MCDI_HAVE_PRIVILEGE(privilege_mask, MAC_SPOOFING) || + EFX_MCDI_HAVE_PRIVILEGE(privilege_mask, ADMIN); return (0); } @@ -490,10 +483,8 @@ hunt_mcdi_link_control_supported( * specific flag. */ *supportedp = - ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_LINK) == - MC_CMD_PRIVILEGE_MASK_IN_GRP_LINK) || - ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN) == - MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN); + EFX_MCDI_HAVE_PRIVILEGE(privilege_mask, LINK) || + EFX_MCDI_HAVE_PRIVILEGE(privilege_mask, ADMIN); 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: r292046 - head/sys/netinet
Author: hiren Date: Thu Dec 10 03:20:10 2015 New Revision: 292046 URL: https://svnweb.freebsd.org/changeset/base/292046 Log: r290122 added 4 bytes and removed 8 in struct sackhint. Add a pad entry of 4 bytes to restore the size. Spotted by: rrs Reviewed by: rrs X-MFC with: r290122 Sponsored by: Limelight Networks Modified: head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_var.h == --- head/sys/netinet/tcp_var.h Thu Dec 10 02:11:42 2015(r292045) +++ head/sys/netinet/tcp_var.h Thu Dec 10 03:20:10 2015(r292046) @@ -78,6 +78,7 @@ struct sackhint { * Total sacked bytes reported by the * receiver via sack option */ + uint32_t_pad1[1]; /* TBD */ uint64_t_pad[1];/* TBD */ }; ___ 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: r292048 - head/sbin/geom/class/multipath
Author: ngie Date: Thu Dec 10 07:04:36 2015 New Revision: 292048 URL: https://svnweb.freebsd.org/changeset/base/292048 Log: Don't leak rsector/sector in mp_label(..) Use calloc instead of malloc + memset(.., 0, ..) when allocating sector Differential Revision: https://reviews.freebsd.org/D4450 MFC after: 1 week Reported by: cppcheck Reviewed by: mav Sponsored by: EMC / Isilon Storage Division Modified: head/sbin/geom/class/multipath/geom_multipath.c Modified: head/sbin/geom/class/multipath/geom_multipath.c == --- head/sbin/geom/class/multipath/geom_multipath.c Thu Dec 10 05:17:04 2015(r292047) +++ head/sbin/geom/class/multipath/geom_multipath.c Thu Dec 10 07:04:36 2015(r292048) @@ -221,17 +221,15 @@ mp_label(struct gctl_req *req) /* * Allocate a sector to write as metadata. */ - sector = malloc(secsize); + sector = calloc(1, secsize); if (sector == NULL) { gctl_error(req, "unable to allocate metadata buffer"); return; } - memset(sector, 0, secsize); rsector = malloc(secsize); if (rsector == NULL) { - free(sector); gctl_error(req, "unable to allocate metadata buffer"); - return; + goto done; } /* @@ -246,7 +244,7 @@ mp_label(struct gctl_req *req) error = g_metadata_store(name, sector, secsize); if (error != 0) { gctl_error(req, "cannot store metadata on %s: %s.", name, strerror(error)); - return; + goto done; } /* @@ -274,6 +272,9 @@ mp_label(struct gctl_req *req) name2, name); } } +done: + free(rsector); + free(sector); } ___ 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: r292050 - head/sys/dev/sfxge/common
Author: arybchik Date: Thu Dec 10 07:15:09 2015 New Revision: 292050 URL: https://svnweb.freebsd.org/changeset/base/292050 Log: sfxge: [5/6] rework event completion error handling Required for MCDI proxy authorization support. Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D4453 Modified: head/sys/dev/sfxge/common/efx_mcdi.c Modified: head/sys/dev/sfxge/common/efx_mcdi.c == --- head/sys/dev/sfxge/common/efx_mcdi.cThu Dec 10 07:11:46 2015 (r292049) +++ head/sys/dev/sfxge/common/efx_mcdi.cThu Dec 10 07:15:09 2015 (r292050) @@ -543,6 +543,7 @@ efx_mcdi_ev_cpl( efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip); const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp; efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop; + efx_nic_cfg_t *encp = >en_nic_cfg; efx_mcdi_req_t *emrp; int state; @@ -567,20 +568,21 @@ efx_mcdi_ev_cpl( emip->emi_pending_req = NULL; EFSYS_UNLOCK(enp->en_eslp, state); - /* -* Fill out the remaining hdr fields, and copyout the payload -* if the user supplied an output buffer. -*/ - if (errcode != 0) { - if (!emrp->emr_quiet) { - EFSYS_PROBE2(mcdi_err, int, emrp->emr_cmd, - int, errcode); - } - emrp->emr_out_length_used = 0; - emrp->emr_rc = efx_mcdi_request_errcode(errcode); + if (encp->enc_mcdi_max_payload_length > MCDI_CTL_SDU_LEN_MAX_V1) { + /* MCDIv2 response details do not fit into an event. */ + efx_mcdi_read_response_header(enp, emrp); } else { - emrp->emr_out_length_used = outlen; - emrp->emr_rc = 0; + if (errcode != 0) { + if (!emrp->emr_quiet) { + EFSYS_PROBE2(mcdi_err, int, emrp->emr_cmd, + int, errcode); + } + emrp->emr_out_length_used = 0; + emrp->emr_rc = efx_mcdi_request_errcode(errcode); + } else { + emrp->emr_out_length_used = outlen; + emrp->emr_rc = 0; + } } emcop->emco_request_copyout(enp, emrp); ___ 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: r291994 - head/include
On Thu, 10 Dec 2015, Hajimu UMEMOTO wrote: On Wed, 9 Dec 2015 18:19:16 +1100 (EST) Bruce Evanssaid: brde> resolv.h already had massinve namespace pollution and style bugs in brde> its includes. One more include of a header that is relatively clean brde> since it is tiny and was designed for minimising namespace pollution brde> makes little difference. I understood. Thank you for your detailed explanation. However, I realized that r289315 changed the size of struct __res_state. It broke binary backward compatibility. I think we still need to revert its change in struct __res_state and move them into struct __res_state_ext. I see. Most of the pollution in resolv.h dates from 1993, so is hard to fix now. It was not in 4.4BSD. In 4.4BSD, was a prerequisite, and undocumented APIs like fp_query() that used FILE were named with leading underscores. The ABI changes in __res_state are mostly newer than than 1993. Bruce ___ 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: r292055 - head/sys/dev/sfxge/common
Author: arybchik Date: Thu Dec 10 07:42:56 2015 New Revision: 292055 URL: https://svnweb.freebsd.org/changeset/base/292055 Log: sfxge: consolidate privilege check functions To reduce code duplication in common code, consolidate similar privilege check functions. Submitted by: Richard Houldsworth Reviewed by:gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D4480 Modified: head/sys/dev/sfxge/common/efx_impl.h head/sys/dev/sfxge/common/efx_mcdi.c head/sys/dev/sfxge/common/efx_mcdi.h head/sys/dev/sfxge/common/hunt_impl.h head/sys/dev/sfxge/common/hunt_mcdi.c head/sys/dev/sfxge/common/siena_impl.h head/sys/dev/sfxge/common/siena_mcdi.c Modified: head/sys/dev/sfxge/common/efx_impl.h == --- head/sys/dev/sfxge/common/efx_impl.hThu Dec 10 07:38:56 2015 (r292054) +++ head/sys/dev/sfxge/common/efx_impl.hThu Dec 10 07:42:56 2015 (r292055) @@ -460,10 +460,7 @@ typedef struct efx_mcdi_ops_s { void(*emco_request_copyout)(efx_nic_t *, efx_mcdi_req_t *); efx_rc_t(*emco_poll_reboot)(efx_nic_t *); void(*emco_fini)(efx_nic_t *); - efx_rc_t(*emco_fw_update_supported)(efx_nic_t *, boolean_t *); - efx_rc_t(*emco_macaddr_change_supported)(efx_nic_t *, boolean_t *); - efx_rc_t(*emco_link_control_supported)(efx_nic_t *, boolean_t *); - efx_rc_t(*emco_mac_spoofing_supported)(efx_nic_t *, boolean_t *); + efx_rc_t(*emco_feature_supported)(efx_nic_t *, efx_mcdi_feature_id_t, boolean_t *); void(*emco_read_response)(efx_nic_t *, void *, size_t, size_t); } efx_mcdi_ops_t; Modified: head/sys/dev/sfxge/common/efx_mcdi.c == --- head/sys/dev/sfxge/common/efx_mcdi.cThu Dec 10 07:38:56 2015 (r292054) +++ head/sys/dev/sfxge/common/efx_mcdi.cThu Dec 10 07:42:56 2015 (r292055) @@ -50,12 +50,7 @@ static efx_mcdi_ops_t__efx_mcdi_siena_o siena_mcdi_request_copyout, /* emco_request_copyout */ siena_mcdi_poll_reboot, /* emco_poll_reboot */ siena_mcdi_fini,/* emco_fini */ - siena_mcdi_fw_update_supported, /* emco_fw_update_supported */ - siena_mcdi_macaddr_change_supported, - /* emco_macaddr_change_supported */ - siena_mcdi_link_control_supported, - /* emco_link_control_supported */ - NULL, /* emco_mac_spoofing_supported */ + siena_mcdi_feature_supported, /* emco_feature_supported */ siena_mcdi_read_response, /* emco_read_response */ }; @@ -70,13 +65,7 @@ static efx_mcdi_ops_t__efx_mcdi_hunt_op hunt_mcdi_request_copyout, /* emco_request_copyout */ hunt_mcdi_poll_reboot, /* emco_poll_reboot */ hunt_mcdi_fini, /* emco_fini */ - hunt_mcdi_fw_update_supported, /* emco_fw_update_supported */ - hunt_mcdi_macaddr_change_supported, - /* emco_macaddr_change_supported */ - hunt_mcdi_link_control_supported, - /* emco_link_control_supported */ - hunt_mcdi_mac_spoofing_supported, - /* emco_mac_spoofing_supported */ + hunt_mcdi_feature_supported,/* emco_feature_supported */ hunt_mcdi_read_response,/* emco_read_response */ }; @@ -1316,7 +1305,6 @@ fail1: return (rc); } - __checkReturn efx_rc_t efx_mcdi_firmware_update_supported( __inefx_nic_t *enp, @@ -1325,9 +1313,9 @@ efx_mcdi_firmware_update_supported( efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop; efx_rc_t rc; - if (emcop != NULL && emcop->emco_fw_update_supported != NULL) { - if ((rc = emcop->emco_fw_update_supported(enp, supportedp)) - != 0) + if (emcop != NULL) { + if ((rc = emcop->emco_feature_supported(enp, + EFX_MCDI_FEATURE_FW_UPDATE, supportedp)) != 0) goto fail1; } else { /* Earlier devices always supported updates */ @@ -1350,9 +1338,9 @@ efx_mcdi_macaddr_change_supported( efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop; efx_rc_t rc; - if (emcop != NULL && emcop->emco_macaddr_change_supported != NULL) { - if ((rc = emcop->emco_macaddr_change_supported(enp, supportedp)) - != 0) + if (emcop != NULL) { + if ((rc = emcop->emco_feature_supported(enp, + EFX_MCDI_FEATURE_MACADDR_CHANGE,
svn commit: r292056 - head/sys/dev/usb/wlan
Author: kevlo Date: Thu Dec 10 07:45:58 2015 New Revision: 292056 URL: https://svnweb.freebsd.org/changeset/base/292056 Log: All 2-endpoints configs have high and normal pariority queues. Modified: head/sys/dev/usb/wlan/if_urtwn.c Modified: head/sys/dev/usb/wlan/if_urtwn.c == --- head/sys/dev/usb/wlan/if_urtwn.cThu Dec 10 07:42:56 2015 (r292055) +++ head/sys/dev/usb/wlan/if_urtwn.cThu Dec 10 07:45:58 2015 (r292056) @@ -2935,13 +2935,11 @@ urtwn_dma_init(struct urtwn_softc *sc) else reg |= R92C_TRXDMA_CTRL_QMAP_LQ; } else if (nqueues == 2) { - /* All 2-endpoints configs have a high priority queue. */ - if (!hashq) - return (EIO); - if (hasnq) - reg |= R92C_TRXDMA_CTRL_QMAP_HQ_NQ; - else - reg |= R92C_TRXDMA_CTRL_QMAP_HQ_LQ; + /* +* All 2-endpoints configs have high and normal +* priority queues. +*/ + reg |= R92C_TRXDMA_CTRL_QMAP_HQ_NQ; } else reg |= R92C_TRXDMA_CTRL_QMAP_3EP; usb_err = urtwn_write_2(sc, R92C_TRXDMA_CTRL, reg); ___ 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: r292053 - head/sys/dev/sfxge/common
Author: arybchik Date: Thu Dec 10 07:35:38 2015 New Revision: 292053 URL: https://svnweb.freebsd.org/changeset/base/292053 Log: sfxge: cleanup: fix header Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Modified: head/sys/dev/sfxge/common/efx_mcdi.h Modified: head/sys/dev/sfxge/common/efx_mcdi.h == --- head/sys/dev/sfxge/common/efx_mcdi.hThu Dec 10 07:17:46 2015 (r292052) +++ head/sys/dev/sfxge/common/efx_mcdi.hThu Dec 10 07:35:38 2015 (r292053) @@ -101,7 +101,7 @@ efx_mcdi_ev_cpl( __inint errcode); #if EFSYS_OPT_MCDI_PROXY_AUTH - __checkReturn efx_rc_t +extern __checkReturn efx_rc_t efx_mcdi_get_proxy_handle( __inefx_nic_t *enp, __inefx_mcdi_req_t *emrp, ___ 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"