Re: svn commit: r273024 - head/contrib/netbsd-tests/lib/libc/time
On 13.10.2014 6:44, Garrett Cooper wrote: > Author: ngie > Date: Mon Oct 13 02:44:35 2014 > New Revision: 273024 > URL: https://svnweb.freebsd.org/changeset/base/273024 > > Log: > Only test the return value in mktime_negyear > > Testing for the errno is an optional requirement according to POSIX, and > FreeBSD doesn't document that errno would be set on failure with mktime According to Base Specs, Issue 7, at least EOVERFLOW we don't support is not optional. -- http://ache.vniz.net/ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r273024 - head/contrib/netbsd-tests/lib/libc/time
On 13.10.2014 11:38, Andrey Chernov wrote: > On 13.10.2014 6:44, Garrett Cooper wrote: >> Author: ngie >> Date: Mon Oct 13 02:44:35 2014 >> New Revision: 273024 >> URL: https://svnweb.freebsd.org/changeset/base/273024 >> >> Log: >> Only test the return value in mktime_negyear >> >> Testing for the errno is an optional requirement according to POSIX, and >> FreeBSD doesn't document that errno would be set on failure with mktime > > According to Base Specs, Issue 7, at least EOVERFLOW we don't support is > not optional. > Exact quote (I see absolutely no optionality of this): RETURN VALUE ... If the time since the Epoch cannot be represented, the function shall return the value (time_t)−1 and set errno to indicate the error. ERRORS The mktime() function shall fail if: [EOVERFLOW] The result cannot be represented. -- http://ache.vniz.net/ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r272244 - head/sys/net
Gleb, looks like there is something to do for userland apps to let them replace their old counter code. An example would be devel/libgtop that is failing to build now (I'm on r273006 of base/head and r370733 on ports/head): /bin/sh ../../libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/freebsd -I../../include -I/usr/local/include/glib-2.0 -I/usr/local/include -I/usr/local/include -I/usr/local/include -DHAVE_NET_IF_VAR_H -D_WANT_IFADDR -Winline -Wall -std=gnu89 -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith-Wcast-align -Wsign-compare -O2 -pipe -fno-strict-aliasing -MT netload.lo -MD -MP -MF .deps/netload.Tpo -c -o netload.lo netload.c libtool: compile: cc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/freebsd -I../../include -I/usr/local/include/glib-2.0 -I/usr/local/include -I/usr/local/include -I/usr/local/include -DHAVE_NET_IF_VAR_H -D_WANT_IFADDR -Winline -Wall -std=gnu89 -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -O2 -pipe -fno-strict-aliasing -MT netload.lo -MD -MP -MF .deps/netload.Tpo -c netload.c -fPIC -DPIC -o .libs/netload.o netload.c:182:41: error: no member named 'if_ipackets' in 'struct ifnet' buf->packets_in = ifnet.if_ipackets; ~ ^ netload.c:183:42: error: no member named 'if_opackets' in 'struct ifnet' buf->packets_out = ifnet.if_opackets; ~ ^ netload.c:186:39: error: no member named 'if_ibytes' in 'struct ifnet' buf->bytes_in = ifnet.if_ibytes; ~ ^ netload.c:187:40: error: no member named 'if_obytes' in 'struct ifnet' buf->bytes_out = ifnet.if_obytes; ~ ^ netload.c:190:40: error: no member named 'if_ierrors' in 'struct ifnet' buf->errors_in = ifnet.if_ierrors; ~ ^ netload.c:191:41: error: no member named 'if_oerrors' in 'struct ifnet' buf->errors_out = ifnet.if_oerrors; ~ ^ netload.c:194:41: error: no member named 'if_collisions' in 'struct ifnet' buf->collisions = ifnet.if_collisions; ~ ^ netload.c:211:58: warning: cast from 'struct sockaddr *' to 'struct sockaddr_dl *' increases required alignment from 1 to 2 [-Wcast-align] struct sockaddr_dl *dl = (struct sockaddr_dl *) sa; ^ netload.c:217:39: warning: cast from 'struct sockaddr *' to 'struct sockaddr_in *' increases required alignment from 1 to 4 [-Wcast-align] sin = (struct sockaddr_in *)sa; ^~~~ netload.c:225:61: warning: cast from 'struct sockaddr *' to 'struct sockaddr_in6 *' increases required alignment from 1 to 4 [-Wcast-align] struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) sa; ^~ 3 warnings and 7 errors generated. Makefile:435: recipe for target 'netload.lo' failed gmake[4]: *** [netload.lo] Error 1 gmake[4]: Leaving directory '/work/ports.svn/devel/libgtop/work/libgtop-2.28.4/sysdeps/freebsd' Makefile:336: recipe for target 'all-recursive' failed gmake[3]: *** [all-recursive] Error 1 gmake[3]: Leaving directory '/work/ports.svn/devel/libgtop/work/libgtop-2.28.4/sysdeps' Makefile:471: recipe for target 'all-recursive' failed gmake[2]: *** [all-recursive] Error 1 gmake[2]: Leaving directory '/work/ports.svn/devel/libgtop/work/libgtop-2.28.4' Makefile:354: recipe for target 'all' failed gmake[1]: *** [all] Error 2 gmake[1]: Leaving directory '/work/ports.svn/devel/libgtop/work/libgtop-2.28.4' *** Error code 1 Stop. make: stopped in /work/ports.svn/devel/libgtop Or, any hints on getting it fixed? -- Markiyan. 2014-09-28 12:16 GMT+03:00 Gleb Smirnoff : > On Sun, Sep 28, 2014 at 08:57:08AM +, Gleb Smirnoff wrote: > T> Author: glebius > T> Date: Sun Sep 28 08:57:07 2014 > T> New Revision: 272244 > T> URL: http://svnweb.freebsd.org/changeset/base/272244 > T> > T> Log: > T> Finally, convert counters in struct ifnet to counter(9). > T> > T> Sponsored by: Netflix > T> Sponsored by: Nginx, Inc. > > Now the network stack is 99% free of old style ++ on a global > variable, that trashes cache line and is racy. > > The last remnant is queue drop counter in buf_ring(9), which > would be probably addressed when interface queuing is generalized. > > -- > Totus tuus, Glebius. > ___ > svn-src-...@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org" __
svn commit: r273029 - head/sys/cam/ctl
Author: mav Date: Mon Oct 13 11:00:58 2014 New Revision: 273029 URL: https://svnweb.freebsd.org/changeset/base/273029 Log: Report physical block size for file-backed LUNs, using vattr.va_blocksize. MFC after:1 week Modified: head/sys/cam/ctl/ctl_backend_block.c Modified: head/sys/cam/ctl/ctl_backend_block.c == --- head/sys/cam/ctl/ctl_backend_block.cMon Oct 13 06:51:40 2014 (r273028) +++ head/sys/cam/ctl/ctl_backend_block.cMon Oct 13 11:00:58 2014 (r273029) @@ -1542,6 +1542,7 @@ ctl_be_block_open_file(struct ctl_be_blo struct ctl_be_block_filedata *file_data; struct ctl_lun_create_params *params; struct vattr vattr; + off_t pss; int error; error = 0; @@ -1590,21 +1591,21 @@ ctl_be_block_open_file(struct ctl_be_blo be_lun->flags |= CTL_BE_BLOCK_LUN_MULTI_THREAD; /* -* XXX KDM vattr.va_blocksize may be larger than 512 bytes here. -* With ZFS, it is 131072 bytes. Block sizes that large don't work -* with disklabel and UFS on FreeBSD at least. Large block sizes -* may not work with other OSes as well. So just export a sector -* size of 512 bytes, which should work with any OS or -* application. Since our backing is a file, any block size will -* work fine for the backing store. +* For files we can use any logical block size. Prefer 512 bytes +* for compatibility reasons. If file's vattr.va_blocksize +* (preferred I/O block size) is bigger and multiple to chosen +* logical block size -- report it as physical block size. */ -#if 0 - be_lun->blocksize= vattr.va_blocksize; -#endif if (params->blocksize_bytes != 0) be_lun->blocksize = params->blocksize_bytes; else be_lun->blocksize = 512; + pss = vattr.va_blocksize / be_lun->blocksize; + if ((pss > 0) && (pss * be_lun->blocksize == vattr.va_blocksize) && + ((pss & (pss - 1)) == 0)) { + be_lun->pblockexp = fls(pss) - 1; + be_lun->pblockoff = 0; + } /* * Sanity check. The media size has to be at least one ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r273032 - head/sbin/ipfw
Author: melifaro Date: Mon Oct 13 11:26:17 2014 New Revision: 273032 URL: https://svnweb.freebsd.org/changeset/base/273032 Log: * Fix zeroing individual entries via ipfw(8). * Report error and return non-zero exit code if zeroing non-matched entries Found by: Oleg Ginzburg Modified: head/sbin/ipfw/ipfw2.c Modified: head/sbin/ipfw/ipfw2.c == --- head/sbin/ipfw/ipfw2.c Mon Oct 13 11:16:44 2014(r273031) +++ head/sbin/ipfw/ipfw2.c Mon Oct 13 11:26:17 2014(r273032) @@ -2111,13 +2111,19 @@ static int do_range_cmd(int cmd, ipfw_range_tlv *rt) { ipfw_range_header rh; + size_t sz; memset(&rh, 0, sizeof(rh)); memcpy(&rh.range, rt, sizeof(*rt)); rh.range.head.length = sizeof(*rt); rh.range.head.type = IPFW_TLV_RANGE; + sz = sizeof(rh); - return (do_set3(cmd, &rh.opheader, sizeof(rh))); + if (do_get3(cmd, &rh.opheader, &sz) != 0) + return (-1); + /* Save number of matched objects */ + rt->new_set = rh.range.new_set; + return (0); } /* @@ -4792,6 +4798,9 @@ ipfw_zero(int ac, char *av[], int optnam warn("rule %u: setsockopt(IP_FW_X%s)", arg, name); failed = EX_UNAVAILABLE; + } else if (rt.new_set == 0) { + printf("Entry %d not found\n", arg); + failed = EX_UNAVAILABLE; } else if (!co.do_quiet) printf("Entry %d %s.\n", arg, optname == IP_FW_XZERO ? @@ -4799,6 +4808,7 @@ ipfw_zero(int ac, char *av[], int optnam } else { errx(EX_USAGE, "invalid rule number ``%s''", *av); } + av++; ac--; } if (failed != EX_OK) exit(failed); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r272244 - head/sys/net
On Mon, Oct 13, 2014 at 12:05:10PM +0300, Markiyan Kushnir wrote: M> Gleb, looks like there is something to do for userland apps to let M> them replace their old counter code. An example would be devel/libgtop M> that is failing to build now (I'm on r273006 of base/head and r370733 M> on ports/head): I have fixed all ports a week ago. Those that were trivial to test, I committed myself. For others I sent patches to their maintainers. Surprised that libgtop fix is still not committed. -- Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r273033 - head/sbin/ipfw
Author: melifaro Date: Mon Oct 13 12:49:04 2014 New Revision: 273033 URL: https://svnweb.freebsd.org/changeset/base/273033 Log: Show error when deleting non-existing rule number. Found by: Oleg Ginzburg Modified: head/sbin/ipfw/ipfw2.c Modified: head/sbin/ipfw/ipfw2.c == --- head/sbin/ipfw/ipfw2.c Mon Oct 13 11:26:17 2014(r273032) +++ head/sbin/ipfw/ipfw2.c Mon Oct 13 12:49:04 2014(r273033) @@ -3009,7 +3009,6 @@ fill_flags_cmd(ipfw_insn *cmd, enum ipfw void ipfw_delete(char *av[]) { - uint32_t rulenum; int i; int exitval = EX_OK; int do_set = 0; @@ -3059,7 +3058,15 @@ ipfw_delete(char *av[]) if (i != 0) { exitval = EX_UNAVAILABLE; warn("rule %u: setsockopt(IP_FW_XDEL)", - rulenum); + rt.start_rule); + } else if (rt.new_set == 0) { + exitval = EX_UNAVAILABLE; + if (rt.start_rule != rt.end_rule) + warnx("no rules rules in %u-%u range", + rt.start_rule, rt.end_rule); + else + warnx("rule %u not found", + rt.start_rule); } } } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r273034 - head/sys/dev/amdtemp
Author: brueffer Date: Mon Oct 13 13:13:42 2014 New Revision: 273034 URL: https://svnweb.freebsd.org/changeset/base/273034 Log: Add one more AMD Kaveri APU device ID. Submitted by: Remy Nonnenmacher MFC after:1 week Modified: head/sys/dev/amdtemp/amdtemp.c Modified: head/sys/dev/amdtemp/amdtemp.c == --- head/sys/dev/amdtemp/amdtemp.c Mon Oct 13 12:49:04 2014 (r273033) +++ head/sys/dev/amdtemp/amdtemp.c Mon Oct 13 13:13:42 2014 (r273034) @@ -80,6 +80,7 @@ struct amdtemp_softc { #defineDEVICEID_AMD_MISC14 0x1703 #defineDEVICEID_AMD_MISC15 0x1603 #defineDEVICEID_AMD_MISC16 0x1533 +#defineDEVICEID_AMD_MISC17 0x141d static struct amdtemp_product { uint16_tamdtemp_vendorid; @@ -92,6 +93,7 @@ static struct amdtemp_product { { VENDORID_AMD, DEVICEID_AMD_MISC14 }, { VENDORID_AMD, DEVICEID_AMD_MISC15 }, { VENDORID_AMD, DEVICEID_AMD_MISC16 }, + { VENDORID_AMD, DEVICEID_AMD_MISC17 }, { 0, 0 } }; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r273035 - in head/sys: netinet netpfil/ipfw
Author: melifaro Date: Mon Oct 13 13:49:28 2014 New Revision: 273035 URL: https://svnweb.freebsd.org/changeset/base/273035 Log: Fix matching default rule on clear/show commands. Found by: Oleg Ginzburg Modified: head/sys/netinet/ip_fw.h head/sys/netpfil/ipfw/ip_fw_sockopt.c Modified: head/sys/netinet/ip_fw.h == --- head/sys/netinet/ip_fw.hMon Oct 13 13:13:42 2014(r273034) +++ head/sys/netinet/ip_fw.hMon Oct 13 13:49:28 2014(r273035) @@ -886,6 +886,11 @@ typedef struct _ipfw_range_tlv { #defineIPFW_RCFLAG_RANGE 0x01/* rule range is set */ #defineIPFW_RCFLAG_ALL 0x02/* match ALL rules */ #defineIPFW_RCFLAG_SET 0x04/* match rules in given set */ +/* User-settable flags */ +#defineIPFW_RCFLAG_USER(IPFW_RCFLAG_RANGE | IPFW_RCFLAG_ALL | \ + IPFW_RCFLAG_SET) +/* Internally used flags */ +#defineIPFW_RCFLAG_DEFAULT 0x0100 /* Do not skip defaul rule */ typedef struct _ipfw_ta_tinfo { uint32_tflags; /* Format flags */ Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c == --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Mon Oct 13 13:13:42 2014 (r273034) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Mon Oct 13 13:49:28 2014 (r273035) @@ -833,8 +833,9 @@ int ipfw_match_range(struct ip_fw *rule, ipfw_range_tlv *rt) { - /* Don't match default rule regardless of query */ - if (rule->rulenum == IPFW_DEFAULT_RULE) + /* Don't match default rule for modification queries */ + if (rule->rulenum == IPFW_DEFAULT_RULE && + (rt->flags & IPFW_RCFLAG_DEFAULT) == 0) return (0); /* Don't match rules in reserved set for flush requests */ @@ -965,7 +966,7 @@ move_range(struct ip_fw_chain *chain, ip } /* XXX: We have to do swap holding WLOCK */ - for (i = 0; i < chain->n_rules - 1; i++) { + for (i = 0; i < chain->n_rules; i++) { rule = chain->map[i]; if (ipfw_match_range(rule, rt) == 0) continue; @@ -1006,9 +1007,10 @@ clear_range(struct ip_fw_chain *chain, i int i; num = 0; + rt->flags |= IPFW_RCFLAG_DEFAULT; IPFW_UH_WLOCK(chain); /* arbitrate writers */ - for (i = 0; i < chain->n_rules - 1; i++) { + for (i = 0; i < chain->n_rules; i++) { rule = chain->map[i]; if (ipfw_match_range(rule, rt) == 0) continue; @@ -1031,6 +1033,9 @@ check_range_tlv(ipfw_range_tlv *rt) if (rt->set >= IPFW_MAX_SETS || rt->new_set >= IPFW_MAX_SETS) return (1); + if ((rt->flags & IPFW_RCFLAG_USER) != rt->flags) + return (1); + return (0); } @@ -2012,7 +2017,7 @@ dump_config(struct ip_fw_chain *chain, i da.b = ipfw_find_rule(chain, rnum, 0); rnum = hdr->end_rule; rnum = (rnum < IPFW_DEFAULT_RULE) ? rnum+1 : IPFW_DEFAULT_RULE; - da.e = ipfw_find_rule(chain, rnum, 0); + da.e = ipfw_find_rule(chain, rnum, 0) + 1; } if (hdr->flags & IPFW_CFG_GET_STATIC) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r271946 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront kern net netinet ofed/drivers/net/mlx4 sys
Hi Hans, I have questions and feedback regarding this patch that I was hoping to work through with you. Some general points are below and then context specific points are inline with the patch further down. - Is QinQ support affected by this change? - There are some style(9) nits throughout that might be tweaked if parts of this patch end up being reworked e.g. new lines in if_hw_tsomax_common() and if_hw_tsomax_update() On 09/22/14 18:27, Hans Petter Selasky wrote: > Author: hselasky > Date: Mon Sep 22 08:27:27 2014 > New Revision: 271946 > URL: http://svnweb.freebsd.org/changeset/base/271946 > > Log: > Improve transmit sending offload, TSO, algorithm in general. > > The current TSO limitation feature only takes the total number of > bytes in an mbuf chain into account and does not limit by the number > of mbufs in a chain. Some kinds of hardware is limited by two > factors. One is the fragment length and the second is the fragment > count. Both of these limits need to be taken into account when doing > TSO. Else some kinds of hardware might have to drop completely valid > mbuf chains because they cannot loaded into the given hardware's DMA > engine. The new way of doing TSO limitation has been made backwards > compatible as input from other FreeBSD developers and will use > defaults for values not set. > > Reviewed by:adrian, rmacklem > Sponsored by: Mellanox Technologies > MFC after: 1 week > > Modified: > head/sys/dev/oce/oce_if.c > head/sys/dev/oce/oce_if.h > head/sys/dev/vmware/vmxnet3/if_vmx.c > head/sys/dev/vmware/vmxnet3/if_vmxvar.h > head/sys/dev/xen/netfront/netfront.c > head/sys/kern/uipc_sockbuf.c > head/sys/net/if.c > head/sys/net/if_lagg.c > head/sys/net/if_var.h > head/sys/net/if_vlan.c > head/sys/netinet/tcp_input.c > head/sys/netinet/tcp_output.c > head/sys/netinet/tcp_subr.c > head/sys/netinet/tcp_var.h > head/sys/ofed/drivers/net/mlx4/en_netdev.c > head/sys/sys/sockbuf.h > > Modified: head/sys/dev/oce/oce_if.c > == > --- head/sys/dev/oce/oce_if.c Mon Sep 22 07:59:25 2014(r271945) > +++ head/sys/dev/oce/oce_if.c Mon Sep 22 08:27:27 2014(r271946) > @@ -1731,7 +1731,9 @@ oce_attach_ifp(POCE_SOFTC sc) > sc->ifp->if_baudrate = IF_Gbps(10); > > #if __FreeBSD_version >= 100 > - sc->ifp->if_hw_tsomax = OCE_MAX_TSO_SIZE; > + sc->ifp->if_hw_tsomax = 65536 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); > + sc->ifp->if_hw_tsomaxsegcount = OCE_MAX_TX_ELEMENTS; > + sc->ifp->if_hw_tsomaxsegsize = 4096; > #endif > > ether_ifattach(sc->ifp, sc->macaddr.mac_addr); > I don't like the use of the 65536 magic number here and throughout the driver changes. Also, should it be 65536 or IP_MAXPACKET (65535)? > Modified: head/sys/dev/oce/oce_if.h > == > --- head/sys/dev/oce/oce_if.h Mon Sep 22 07:59:25 2014(r271945) > +++ head/sys/dev/oce/oce_if.h Mon Sep 22 08:27:27 2014(r271946) > @@ -152,7 +152,6 @@ extern int mp_ncpus; /* system's > total > #define OCE_MAX_TX_ELEMENTS 29 > #define OCE_MAX_TX_DESC 1024 > #define OCE_MAX_TX_SIZE 65535 > -#define OCE_MAX_TSO_SIZE (65535 - ETHER_HDR_LEN) > #define OCE_MAX_RX_SIZE 4096 > #define OCE_MAX_RQ_POSTS 255 > #define OCE_DEFAULT_PROMISCUOUS 0 > > Modified: head/sys/dev/vmware/vmxnet3/if_vmx.c > == > --- head/sys/dev/vmware/vmxnet3/if_vmx.c Mon Sep 22 07:59:25 2014 > (r271945) > +++ head/sys/dev/vmware/vmxnet3/if_vmx.c Mon Sep 22 08:27:27 2014 > (r271946) > @@ -1722,7 +1722,9 @@ vmxnet3_setup_interface(struct vmxnet3_s > ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; > ifp->if_init = vmxnet3_init; > ifp->if_ioctl = vmxnet3_ioctl; > - ifp->if_hw_tsomax = VMXNET3_TSO_MAXSIZE; > + ifp->if_hw_tsomax = 65536 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); > + ifp->if_hw_tsomaxsegcount = VMXNET3_TX_MAXSEGS; > + ifp->if_hw_tsomaxsegsize = VMXNET3_TX_MAXSEGSIZE; > > #ifdef VMXNET3_LEGACY_TX > ifp->if_start = vmxnet3_start; > > Modified: head/sys/dev/vmware/vmxnet3/if_vmxvar.h > == > --- head/sys/dev/vmware/vmxnet3/if_vmxvar.h Mon Sep 22 07:59:25 2014 > (r271945) > +++ head/sys/dev/vmware/vmxnet3/if_vmxvar.h Mon Sep 22 08:27:27 2014 > (r271946) > @@ -277,8 +277,6 @@ struct vmxnet3_softc { > */ > #define VMXNET3_TX_MAXSEGS 32 > #define VMXNET3_TX_MAXSIZE (VMXNET3_TX_MAXSEGS * MCLBYTES) > -#define VMXNET3_TSO_MAXSIZE \ > -(VMXNET3_TX_MAXSIZE - sizeof(struct ether_vlan_head
svn commit: r273038 - in head/sys/cam: ctl scsi
Author: mav Date: Mon Oct 13 14:48:49 2014 New Revision: 273038 URL: https://svnweb.freebsd.org/changeset/base/273038 Log: Add support for READ DEFECT DATA (10/12) commands. SPC-4 r2 allows to return empty defect list if the list is not supported. We don't reallu support defect data lists, but this suppresses some errors. MFC after:1 week Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_cmd_table.c head/sys/cam/ctl/ctl_private.h head/sys/cam/scsi/scsi_da.h Modified: head/sys/cam/ctl/ctl.c == --- head/sys/cam/ctl/ctl.c Mon Oct 13 14:40:00 2014(r273037) +++ head/sys/cam/ctl/ctl.c Mon Oct 13 14:48:49 2014(r273038) @@ -7389,6 +7389,89 @@ ctl_read_capacity_16(struct ctl_scsiio * } int +ctl_read_defect(struct ctl_scsiio *ctsio) +{ + struct scsi_read_defect_data_10 *ccb10; + struct scsi_read_defect_data_12 *ccb12; + struct scsi_read_defect_data_hdr_10 *data10; + struct scsi_read_defect_data_hdr_12 *data12; + struct ctl_lun *lun; + uint32_t alloc_len, data_len; + uint8_t format; + + CTL_DEBUG_PRINT(("ctl_read_defect\n")); + + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + if (lun->flags & CTL_LUN_PR_RESERVED) { + uint32_t residx; + + /* +* XXX KDM need a lock here. +*/ + residx = ctl_get_resindex(&ctsio->io_hdr.nexus); + if ((lun->res_type == SPR_TYPE_EX_AC + && residx != lun->pr_res_idx) +|| ((lun->res_type == SPR_TYPE_EX_AC_RO + || lun->res_type == SPR_TYPE_EX_AC_AR) + && lun->pr_keys[residx] == 0)) { + ctl_set_reservation_conflict(ctsio); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + } + + if (ctsio->cdb[0] == READ_DEFECT_DATA_10) { + ccb10 = (struct scsi_read_defect_data_10 *)&ctsio->cdb; + format = ccb10->format; + alloc_len = scsi_2btoul(ccb10->alloc_length); + data_len = sizeof(*data10); + } else { + ccb12 = (struct scsi_read_defect_data_12 *)&ctsio->cdb; + format = ccb12->format; + alloc_len = scsi_4btoul(ccb12->alloc_length); + data_len = sizeof(*data12); + } + if (alloc_len == 0) { + ctl_set_success(ctsio); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + + ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); + if (data_len < alloc_len) { + ctsio->residual = alloc_len - data_len; + ctsio->kern_data_len = data_len; + ctsio->kern_total_len = data_len; + } else { + ctsio->residual = 0; + ctsio->kern_data_len = alloc_len; + ctsio->kern_total_len = alloc_len; + } + ctsio->kern_data_resid = 0; + ctsio->kern_rel_offset = 0; + ctsio->kern_sg_entries = 0; + + if (ctsio->cdb[0] == READ_DEFECT_DATA_10) { + data10 = (struct scsi_read_defect_data_hdr_10 *) + ctsio->kern_data_ptr; + data10->format = format; + scsi_ulto2b(0, data10->length); + } else { + data12 = (struct scsi_read_defect_data_hdr_12 *) + ctsio->kern_data_ptr; + data12->format = format; + scsi_ulto2b(0, data12->generation); + scsi_ulto4b(0, data12->length); + } + + ctsio->scsi_status = SCSI_STATUS_OK; + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; + ctsio->be_move_done = ctl_config_move_done; + ctl_datamove((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); +} + +int ctl_report_tagret_port_groups(struct ctl_scsiio *ctsio) { struct scsi_maintenance_in *cdb; Modified: head/sys/cam/ctl/ctl_cmd_table.c == --- head/sys/cam/ctl/ctl_cmd_table.cMon Oct 13 14:40:00 2014 (r273037) +++ head/sys/cam/ctl/ctl_cmd_table.cMon Oct 13 14:48:49 2014 (r273038) @@ -768,7 +768,11 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* 37 READ DEFECT DATA(10) */ -{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, +{ctl_read_defect, CTL_SERIDX_MD_SNS, CTL_CMD_FLAG_OK_ON_SLUN | +CTL_FLAG_DATA_IN | +CTL_CMD_FLAG_ALLOW_ON_PR_RESV, + CTL_LUN_PAT_NONE, + 10, {0, 0x1f, 0, 0, 0, 0, 0xff, 0xff, 0x07}}, /* 38 MEDIUM SCAN */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, @@ -1247,7 +1251,11 @@ const struct ctl_cmd_e
Re: svn commit: r272974 - in head: etc share/man/man8
On Saturday, October 11, 2014 11:49:28 PM Hiroki Sato wrote: > Author: hrs > Date: Sat Oct 11 23:49:27 2014 > New Revision: 272974 > URL: https://svnweb.freebsd.org/changeset/base/272974 > > Log: > Add ${name}_env and ${name}_prepend. ${name}_env is an argument list > which will be passed to env(1). ${name}_prepend is simply prepended to the > command line for $command. Nice! I've needed _env before and resorted to hacks instead. -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r272840 - in head: sbin/ipfw sys/conf sys/modules/ipfw sys/netgraph sys/netinet sys/netpfil/ipfw
On Sunday, October 12, 2014 12:14:51 AM Alexander V. Chernikov wrote: > On 11 Oct 2014, at 20:13, John Baldwin wrote: > > On Thursday, October 09, 2014 07:32:36 PM Alexander V. Chernikov wrote: > >> Author: melifaro > >> Date: Thu Oct 9 19:32:35 2014 > >> New Revision: 272840 > >> URL: https://svnweb.freebsd.org/changeset/base/272840 > >> > >> Log: > >> Merge projects/ipfw to HEAD. > > > > Should it now say 'ipfw3' in dmesg instead of ipfw2? Also, should the > > I’m not sure all these changes are worth renaming ipfw2 to ipfw3 :) A similar change warranted ipfw -> ipfw2 IIRC. :) Note that the module is still called 'ipfw' in dependencies. The '2' in ipfw2 was simply the module version number. > > associated filenames (ipfw2.* and ip_fw2.*) be renamed? (Perhaps back > > to just ipfw.* and ip_fw.* to avoid more rototill in the future?) Another approach would be to just go back to calling it 'ipfw' and drop the 2 entirely. It's kind of like how pkgng is now called pkg(8), or the "new NFS client/server" is now just the "NFS client/server". -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r273009 - in head: etc/devd sys/powerpc/powermac
On Sunday, October 12, 2014 12:26:36 PM Justin Hibbits wrote: > On Sun, 12 Oct 2014 19:12:49 + (UTC) > > Justin Hibbits wrote: > > Author: jhibbits > > Date: Sun Oct 12 19:12:48 2014 > > New Revision: 273009 > > URL: https://svnweb.freebsd.org/changeset/base/273009 > > > > Log: > > Add an AC line monitor so power_profile can work > > > > Summary: > > Add a polling loop (1Hz) to monitor the battery and AC status, to > > > > notify devd like ACPI does for power monitoring. This > > allows /etc/rc.d/power_profile to work on PowerPC laptops > > > > Test Plan: > > Tested on a Titanium PowerBook, configuring economy_cpu_freq and > > performance_cpu_freq, disabling powerd. > > > > Reviewers: #powerpc, nwhitehorn > > > > Reviewed By: nwhitehorn > > > > Subscribers: rpaulo > > > > Differential Revision: https://reviews.freebsd.org/D937 > > MFC After: 3 weeks > Relnotes: Yes > > (Can we add a template to arc to include those fields in arc messages?) I think Baptiste looked at hacking the arcanist template to include our template fields and in general be more like our messages and ran away screaming instead. I've just been using copy and paste to copy the message I type into arc from the web browswer into my normal commit window. -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r272974 - in head: etc share/man/man8
On 10/13/2014 10:03 AM, John Baldwin wrote: > On Saturday, October 11, 2014 11:49:28 PM Hiroki Sato wrote: >> Author: hrs >> Date: Sat Oct 11 23:49:27 2014 >> New Revision: 272974 >> URL: https://svnweb.freebsd.org/changeset/base/272974 >> >> Log: >> Add ${name}_env and ${name}_prepend. ${name}_env is an argument list >> which will be passed to env(1). ${name}_prepend is simply prepended to the >> command line for $command. > > Nice! I've needed _env before and resorted to hacks instead. > I'm planning to commit https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=88913 once I find some free time. It will allow wrapping any rc cmd with an arbitrary script. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r272974 - in head: etc share/man/man8
On 10/13/2014 10:18 AM, Bryan Drewery wrote: > On 10/13/2014 10:03 AM, John Baldwin wrote: >> On Saturday, October 11, 2014 11:49:28 PM Hiroki Sato wrote: >>> Author: hrs >>> Date: Sat Oct 11 23:49:27 2014 >>> New Revision: 272974 >>> URL: https://svnweb.freebsd.org/changeset/base/272974 >>> >>> Log: >>> Add ${name}_env and ${name}_prepend. ${name}_env is an argument list >>> which will be passed to env(1). ${name}_prepend is simply prepended to the >>> command line for $command. >> >> Nice! I've needed _env before and resorted to hacks instead. >> > > I'm planning to commit > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=88913 once I find some > free time. It will allow wrapping any rc cmd with an arbitrary script. > (I didn't really read the entire patch for r272974). I see that this commit invalidates that. I'll close it :) -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r273040 - head/sys/dev/mrsas
Author: kadesai Date: Mon Oct 13 15:33:27 2014 New Revision: 273040 URL: https://svnweb.freebsd.org/changeset/base/273040 Log: Fix for build issue on i386.xen and amd64.xen. This is a duplicate variable reference in mrsas, so now this patch isolate atomic_ variable and relavent function call using prefix mrsas_xx. Issue was introduced in r272737. MFC after:2 weeks Sponsored by: Avago Technology Modified: head/sys/dev/mrsas/mrsas.c head/sys/dev/mrsas/mrsas.h head/sys/dev/mrsas/mrsas_cam.c head/sys/dev/mrsas/mrsas_fp.c Modified: head/sys/dev/mrsas/mrsas.c == --- head/sys/dev/mrsas/mrsas.c Mon Oct 13 14:52:54 2014(r273039) +++ head/sys/dev/mrsas/mrsas.c Mon Oct 13 15:33:27 2014(r273040) @@ -850,7 +850,7 @@ mrsas_attach(device_t dev) TAILQ_INIT(&sc->mrsas_mpt_cmd_list_head); TAILQ_INIT(&sc->mrsas_mfi_cmd_list_head); - atomic_set(&sc->fw_outstanding, 0); + mrsas_atomic_set(&sc->fw_outstanding, 0); sc->io_cmds_highwater = 0; @@ -1392,7 +1392,7 @@ mrsas_isr(void *arg) return; } /* If we are resetting, bail */ - if (test_bit(MRSAS_FUSION_IN_RESET, &sc->reset_flags)) { + if (mrsas_test_bit(MRSAS_FUSION_IN_RESET, &sc->reset_flags)) { printf(" Entered into ISR when OCR is going active. \n"); mrsas_clear_intr(sc); return; @@ -1462,7 +1462,7 @@ mrsas_complete_cmd(struct mrsas_softc *s lbinfo = &sc->load_balance_info[device_id]; if (cmd_mpt->load_balance == MRSAS_LOAD_BALANCE_FLAG) { arm = lbinfo->raid1DevHandle[0] == scsi_io_req->DevHandle ? 0 : 1; - atomic_dec(&lbinfo->scsi_pending_cmds[arm]); + mrsas_atomic_dec(&lbinfo->scsi_pending_cmds[arm]); cmd_mpt->load_balance &= ~MRSAS_LOAD_BALANCE_FLAG; } /* Fall thru and complete IO */ @@ -1471,7 +1471,7 @@ mrsas_complete_cmd(struct mrsas_softc *s mrsas_cmd_done(sc, cmd_mpt); scsi_io_req->RaidContext.status = 0; scsi_io_req->RaidContext.exStatus = 0; - atomic_dec(&sc->fw_outstanding); + mrsas_atomic_dec(&sc->fw_outstanding); break; case MRSAS_MPI2_FUNCTION_PASSTHRU_IO_REQUEST: /* MFI command */ cmd_mfi = sc->mfi_cmd_list[cmd_mpt->sync_cmd_idx]; @@ -2672,7 +2672,7 @@ mrsas_reset_ctrl(struct mrsas_softc *sc) "mrsas: Hardware critical error, returning FAIL.\n"); return FAIL; } - set_bit(MRSAS_FUSION_IN_RESET, &sc->reset_flags); + mrsas_set_bit(MRSAS_FUSION_IN_RESET, &sc->reset_flags); sc->adprecovery = MRSAS_ADPRESET_SM_INFAULT; mrsas_disable_intr(sc); DELAY(1000 * 1000); @@ -2689,7 +2689,7 @@ mrsas_reset_ctrl(struct mrsas_softc *sc) ccb = (union ccb *)(mpt_cmd->ccb_ptr); ccb->ccb_h.status = CAM_SCSI_BUS_RESET; mrsas_cmd_done(sc, mpt_cmd); - atomic_dec(&sc->fw_outstanding); + mrsas_atomic_dec(&sc->fw_outstanding); } } @@ -2787,7 +2787,7 @@ mrsas_reset_ctrl(struct mrsas_softc *sc) mrsas_dprint(sc, MRSAS_OCR, "mrsas_ioc_init() failed!\n"); continue; } - clear_bit(MRSAS_FUSION_IN_RESET, &sc->reset_flags); + mrsas_clear_bit(MRSAS_FUSION_IN_RESET, &sc->reset_flags); mrsas_enable_intr(sc); sc->adprecovery = MRSAS_HBA_OPERATIONAL; @@ -2833,12 +2833,12 @@ mrsas_reset_ctrl(struct mrsas_softc *sc) mrsas_kill_hba(sc); retval = FAIL; } else { - clear_bit(MRSAS_FUSION_IN_RESET, &sc->reset_flags); + mrsas_clear_bit(MRSAS_FUSION_IN_RESET, &sc->reset_flags); mrsas_enable_intr(sc); sc->adprecovery = MRSAS_HBA_OPERATIONAL; } out: - clear_bit(MRSAS_FUSION_IN_RESET, &sc->reset_flags); + mrsas_clear_bit(MRSAS_FUSION_IN_RESET, &sc->reset_flags); mrsas_dprint(sc, MRSAS_OCR, "Reset Exit with %d.\n", retval); return retval; @@ -2890,7 +2890,7 @@ mrsas_wait_for_outstanding(struct mrsas_ retval = 1; goto out; } - outstanding = atomic_read(&sc->fw_outstanding); + outstanding = mrsas_atomic_read(&sc->fw_outstanding); if (!outstanding)
svn commit: r273041 - in head/sys/arm/ti: . omap3
Author: andrew Date: Mon Oct 13 15:35:08 2014 New Revision: 273041 URL: https://svnweb.freebsd.org/changeset/base/273041 Log: Start removing the omap3 support. In base it was only ever a header and a few changes to drivers, no kernel config was added. As the SoCs are quite old and the code is unmaintained start the process of removing support by deleting the header file and code that depends on it along with the macro SOC_OMAP3. Other Ti SoCs shouldn't be affected, other than for us to have less code to maintain. Differential Revision:https://reviews.freebsd.org/D936 Reviewed by: rpaulo, loos Deleted: head/sys/arm/ti/omap3/omap3_reg.h Modified: head/sys/arm/ti/ti_cpuid.c head/sys/arm/ti/ti_cpuid.h head/sys/arm/ti/ti_gpio.c head/sys/arm/ti/ti_i2c.c head/sys/arm/ti/ti_mmchs.c head/sys/arm/ti/ti_sdhci.c Modified: head/sys/arm/ti/ti_cpuid.c == --- head/sys/arm/ti/ti_cpuid.c Mon Oct 13 15:33:27 2014(r273040) +++ head/sys/arm/ti/ti_cpuid.c Mon Oct 13 15:35:08 2014(r273041) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #define OMAP4_STD_FUSE_DIE_ID_00x2200 @@ -198,67 +197,6 @@ omap4_get_revision(void) } } -/** - * omap3_get_revision - determines omap3 revision - * - * Reads the registers to determine the revision of the chip we are currently - * running on. Stores the information in global variables. - * - * WARNING: This function currently only really works for OMAP3530 devices. - * - * - * - */ -static void -omap3_get_revision(void) -{ - uint32_t id_code; - uint32_t revision; - uint32_t hawkeye; - bus_space_handle_t bsh; - - /* The chip revsion is read from the device identification registers and -* the JTAG (?) tap registers, which are located in address 0x4A00_2200 to -* 0x4A00_2218. This is part of the L4_CORE memory range and should have -* been mapped in by the machdep.c code. -* -* CONTROL_IDCODE 0x4830 A204 (this is the only one we need) -* -* -*/ - bus_space_map(fdtbus_bs_tag, OMAP35XX_L4_WAKEUP_HWBASE, 0x1, 0, &bsh); - id_code = bus_space_read_4(fdtbus_bs_tag, bsh, OMAP3_ID_CODE); - bus_space_unmap(fdtbus_bs_tag, bsh, 0x1); - - hawkeye = ((id_code >> 12) & 0x); - revision = ((id_code >> 28) & 0xf); - - switch (hawkeye) { - case 0xB6D6: - chip_revision = OMAP3350_REV_ES1_0; - break; - case 0xB7AE: - if (revision == 1) - chip_revision = OMAP3530_REV_ES2_0; - else if (revision == 2) - chip_revision = OMAP3530_REV_ES2_1; - else if (revision == 3) - chip_revision = OMAP3530_REV_ES3_0; - else if (revision == 4) - chip_revision = OMAP3530_REV_ES3_1; - else if (revision == 7) - chip_revision = OMAP3530_REV_ES3_1_2; - break; - default: - /* Default to the latest revision if we can't determine type */ - chip_revision = OMAP3530_REV_ES3_1_2; - break; - } - printf("Texas Instruments OMAP%04x Processor, Revision ES%u.%u\n", - OMAP_REV_DEVICE(chip_revision), OMAP_REV_MAJOR(chip_revision), - OMAP_REV_MINOR(chip_revision)); -} - static void am335x_get_revision(void) { @@ -313,9 +251,6 @@ static void ti_cpu_ident(void *dummy) { switch(ti_chip()) { - case CHIP_OMAP_3: - omap3_get_revision(); - break; case CHIP_OMAP_4: omap4_get_revision(); break; Modified: head/sys/arm/ti/ti_cpuid.h == --- head/sys/arm/ti/ti_cpuid.h Mon Oct 13 15:33:27 2014(r273040) +++ head/sys/arm/ti/ti_cpuid.h Mon Oct 13 15:35:08 2014(r273041) @@ -67,16 +67,13 @@ #defineAM335X_DEVREV(x)((x) >> 28) -#defineCHIP_OMAP_3 0 -#defineCHIP_OMAP_4 1 -#defineCHIP_AM335X 2 +#defineCHIP_OMAP_4 0 +#defineCHIP_AM335X 1 static __inline int ti_chip(void) { #if defined(SOC_OMAP4) return CHIP_OMAP_4; -#elif defined(SOC_OMAP3) - return CHIP_OMAP_3; #elif defined(SOC_TI_AM335X) return CHIP_AM335X; #else Modified: head/sys/arm/ti/ti_gpio.c == --- head/sys/arm/ti/ti_gpio.c Mon Oct 13 15:33:27 2014(r273040) +++ head/sys/arm/ti/ti_gpio.c Mon Oct 13 15:35:08 2014(r273041) @@ -70,32 +70,7 @@ __FBSDID("$FreeBSD$"); /* Register definitions */ #defineTI_GPIO_REVISION0x #defineT
svn commit: r273045 - head/sys/arm/ti/am335x
Author: andrew Date: Mon Oct 13 16:12:28 2014 New Revision: 273045 URL: https://svnweb.freebsd.org/changeset/base/273045 Log: Sort the files in the am355x directory. Modified: head/sys/arm/ti/am335x/files.am335x Modified: head/sys/arm/ti/am335x/files.am335x == --- head/sys/arm/ti/am335x/files.am335x Mon Oct 13 15:58:03 2014 (r273044) +++ head/sys/arm/ti/am335x/files.am335x Mon Oct 13 16:12:28 2014 (r273045) @@ -1,13 +1,15 @@ #$FreeBSD$ arm/ti/aintc.c standard -arm/ti/am335x/am335x_prcm.cstandard + arm/ti/am335x/am335x_dmtimer.c standard -arm/ti/am335x/am335x_scm_padconf.c standard arm/ti/am335x/am335x_lcd.c optionalsc arm/ti/am335x/am335x_lcd_syscons.c optionalsc +arm/ti/am335x/am335x_prcm.cstandard arm/ti/am335x/am335x_pwm.c standard +arm/ti/am335x/am335x_scm_padconf.c standard arm/ti/am335x/am335x_usbss.c optionalmusb fdt + arm/ti/ti_edma3.c standard arm/ti/ti_sdhci.c optionalsdhci #arm/ti/ti_mmchs.c optionalmmc ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r273046 - head/sys/cam/ctl
Author: mav Date: Mon Oct 13 16:15:32 2014 New Revision: 273046 URL: https://svnweb.freebsd.org/changeset/base/273046 Log: Don't confuse frontend with zero length data moves, just return immediately. MFC after:1 week Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c == --- head/sys/cam/ctl/ctl.c Mon Oct 13 16:12:28 2014(r273045) +++ head/sys/cam/ctl/ctl.c Mon Oct 13 16:15:32 2014(r273046) @@ -10821,15 +10821,9 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio } ctsio->scsi_status = SCSI_STATUS_OK; - if (ctsio->kern_data_len > 0) { - ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; - ctsio->be_move_done = ctl_config_move_done; - ctl_datamove((union ctl_io *)ctsio); - } else { - ctsio->io_hdr.status = CTL_SUCCESS; - ctl_done((union ctl_io *)ctsio); - } - + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; + ctsio->be_move_done = ctl_config_move_done; + ctl_datamove((union ctl_io *)ctsio); return (CTL_RETVAL_COMPLETE); } @@ -12901,6 +12895,12 @@ ctl_datamove(union ctl_io *io) return; } + /* Don't confuse frontend with zero length data move. */ + if (io->scsiio.kern_data_len == 0) { + io->scsiio.be_move_done(io); + return; + } + /* * If we're in XFER mode and this I/O is from the other shelf * controller, we need to send the DMA to the other side to ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r273047 - in head/sys/arm: conf ti/am335x
Author: andrew Date: Mon Oct 13 16:16:32 2014 New Revision: 273047 URL: https://svnweb.freebsd.org/changeset/base/273047 Log: Remove the need for files.beaglebone and std.beaglebone by moving the one option they defined into files.am335x. Deleted: head/sys/arm/ti/am335x/files.beaglebone head/sys/arm/ti/am335x/std.beaglebone Modified: head/sys/arm/conf/BEAGLEBONE head/sys/arm/ti/am335x/files.am335x Modified: head/sys/arm/conf/BEAGLEBONE == --- head/sys/arm/conf/BEAGLEBONEMon Oct 13 16:15:32 2014 (r273046) +++ head/sys/arm/conf/BEAGLEBONEMon Oct 13 16:16:32 2014 (r273047) @@ -22,7 +22,7 @@ ident BEAGLEBONE -include"../ti/am335x/std.beaglebone" +include"../ti/am335x/std.am335x" makeoptionsWITHOUT_MODULES="ahc" Modified: head/sys/arm/ti/am335x/files.am335x == --- head/sys/arm/ti/am335x/files.am335x Mon Oct 13 16:15:32 2014 (r273046) +++ head/sys/arm/ti/am335x/files.am335x Mon Oct 13 16:16:32 2014 (r273047) @@ -5,6 +5,7 @@ arm/ti/aintc.c standard arm/ti/am335x/am335x_dmtimer.c standard arm/ti/am335x/am335x_lcd.c optionalsc arm/ti/am335x/am335x_lcd_syscons.c optionalsc +arm/ti/am335x/am335x_pmic.coptionalam335x_pmic arm/ti/am335x/am335x_prcm.cstandard arm/ti/am335x/am335x_pwm.c standard arm/ti/am335x/am335x_scm_padconf.c standard ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r273048 - head/usr.bin/kdump
Author: jhb Date: Mon Oct 13 16:17:42 2014 New Revision: 273048 URL: https://svnweb.freebsd.org/changeset/base/273048 Log: Fix most of the warnings in kdump(1). Sponsored by: Norse Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c == --- head/usr.bin/kdump/kdump.c Mon Oct 13 16:16:32 2014(r273047) +++ head/usr.bin/kdump/kdump.c Mon Oct 13 16:17:42 2014(r273048) @@ -103,9 +103,9 @@ void ktrgenio(struct ktr_genio *, int); void ktrpsig(struct ktr_psig *); void ktrcsw(struct ktr_csw *); void ktrcsw_old(struct ktr_csw_old *); -void ktruser_malloc(unsigned char *); -void ktruser_rtld(int, unsigned char *); -void ktruser(int, unsigned char *); +void ktruser_malloc(void *); +void ktruser_rtld(int, void *); +void ktruser(int, void *); void ktrcaprights(cap_rights_t *); void ktrsockaddr(struct sockaddr *); void ktrstat(struct stat *); @@ -122,10 +122,13 @@ void ioctlname(unsigned long, int); #defineTIMESTAMP_ELAPSED 0x2 #defineTIMESTAMP_RELATIVE 0x4 -int timestamp, decimal, fancy = 1, suppressdata, tail, threads, maxdata, +extern const char *signames[], *syscallnames[]; +extern int nsyscalls; + +static int timestamp, decimal, fancy = 1, suppressdata, tail, threads, maxdata, resolv = 0, abiflag = 0, syscallno = 0; -const char *tracefile = DEF_TRACEFILE; -struct ktr_header ktr_header; +static const char *tracefile = DEF_TRACEFILE; +static struct ktr_header ktr_header; #define TIME_FORMAT"%b %e %T %Y" #define eqs(s1, s2)(strcmp((s1), (s2)) == 0) @@ -172,7 +175,7 @@ struct proc_info pid_t pid; }; -TAILQ_HEAD(trace_procs, proc_info) trace_procs; +static TAILQ_HEAD(trace_procs, proc_info) trace_procs; #ifdef HAVE_LIBCAPSICUM static cap_channel_t *cappwd, *capgrp; @@ -456,7 +459,7 @@ limitfd(int fd) unsigned long cmd; cap_rights_init(&rights, CAP_FSTAT); - cmd = -1; + cmd = 0; switch (fd) { case STDIN_FILENO: @@ -479,7 +482,7 @@ limitfd(int fd) if (cap_rights_limit(fd, &rights) < 0 && errno != ENOSYS) err(1, "unable to limit rights for descriptor %d", fd); - if (cmd != -1 && cap_ioctls_limit(fd, &cmd, 1) < 0 && errno != ENOSYS) + if (cmd != 0 && cap_ioctls_limit(fd, &cmd, 1) < 0 && errno != ENOSYS) err(1, "unable to limit ioctls for descriptor %d", fd); } @@ -1093,7 +1096,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in print_number(ip, narg, c); putchar(','); flagsname(ip[0]); - printf(",0%o", ip[1]); + printf(",0%o", (unsigned int)ip[1]); ip += 3; narg -= 3; break; @@ -1515,9 +1518,10 @@ struct utrace_rtld { }; void -ktruser_rtld(int len, unsigned char *p) +ktruser_rtld(int len, void *p) { - struct utrace_rtld *ut = (struct utrace_rtld *)p; + struct utrace_rtld *ut = p; + unsigned char *cp; void *parent; int mode; @@ -1582,14 +1586,15 @@ ktruser_rtld(int len, unsigned char *p) ut->name); break; default: - p += 4; + cp = p; + cp += 4; len -= 4; printf("RTLD: %d ", len); while (len--) if (decimal) - printf(" %d", *p++); + printf(" %d", *cp++); else - printf(" %02x", *p++); + printf(" %02x", *cp++); printf("\n"); } } @@ -1601,9 +1606,9 @@ struct utrace_malloc { }; void -ktruser_malloc(unsigned char *p) +ktruser_malloc(void *p) { - struct utrace_malloc *ut = (struct utrace_malloc *)p; + struct utrace_malloc *ut = p; if (ut->p == (void *)(intptr_t)(-1)) printf("malloc_init()\n"); @@ -1616,8 +1621,9 @@ ktruser_malloc(unsigned char *p) } void -ktruser(int len, unsigned char *p) +ktruser(int len, void *p) { + unsigned char *cp; if (len >= 8 && bcmp(p, "RTLD", 4) == 0) { ktruser_rtld(len, p); @@ -1630,11 +1636,12 @@ ktruser(int len, unsigned char *p) } printf("%d ", len); + cp = p; while (len--) if (decimal) - printf(" %d", *p++); + printf(" %d", *cp++); else - printf(" %02x", *p++); + printf(" %02x", *cp++); printf("\n"); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsu
svn commit: r273049 - in head/sys/arm/ti: . am335x omap4
Author: andrew Date: Mon Oct 13 16:20:04 2014 New Revision: 273049 URL: https://svnweb.freebsd.org/changeset/base/273049 Log: Remove ti_mmchs.c, it has been replaced by ti_sdhci.c. Deleted: head/sys/arm/ti/ti_mmchs.c head/sys/arm/ti/ti_mmchs.h Modified: head/sys/arm/ti/am335x/files.am335x head/sys/arm/ti/omap4/files.omap4 Modified: head/sys/arm/ti/am335x/files.am335x == --- head/sys/arm/ti/am335x/files.am335x Mon Oct 13 16:17:42 2014 (r273048) +++ head/sys/arm/ti/am335x/files.am335x Mon Oct 13 16:20:04 2014 (r273049) @@ -13,5 +13,4 @@ arm/ti/am335x/am335x_usbss.c optionalm arm/ti/ti_edma3.c standard arm/ti/ti_sdhci.c optionalsdhci -#arm/ti/ti_mmchs.c optionalmmc arm/ti/cpsw/if_cpsw.c optionalcpsw Modified: head/sys/arm/ti/omap4/files.omap4 == --- head/sys/arm/ti/omap4/files.omap4 Mon Oct 13 16:17:42 2014 (r273048) +++ head/sys/arm/ti/omap4/files.omap4 Mon Oct 13 16:20:04 2014 (r273049) @@ -7,7 +7,6 @@ arm/ti/ti_smc.S standard arm/ti/usb/omap_ehci.c optionalusb ehci arm/ti/ti_sdma.c optionalti_sdma arm/ti/ti_sdhci.c optionalsdhci -#arm/ti/ti_mmchs.c optionalmmc arm/ti/omap4/omap4_l2cache.c optionalpl310 arm/ti/omap4/omap4_prcm_clks.c standard ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r273050 - head/sys/dev/sdhci
Author: imp Date: Mon Oct 13 16:23:51 2014 New Revision: 273050 URL: https://svnweb.freebsd.org/changeset/base/273050 Log: class, subclass and progif were never used, so don't bother setting them. Modified: head/sys/dev/sdhci/sdhci_pci.c Modified: head/sys/dev/sdhci/sdhci_pci.c == --- head/sys/dev/sdhci/sdhci_pci.c Mon Oct 13 16:20:04 2014 (r273049) +++ head/sys/dev/sdhci/sdhci_pci.c Mon Oct 13 16:23:51 2014 (r273050) @@ -260,16 +260,12 @@ sdhci_pci_attach(device_t dev) struct sdhci_pci_softc *sc = device_get_softc(dev); uint32_t model; uint16_t subvendor; - uint8_t class, subclass, progif; int bar, err, rid, slots, i; sc->dev = dev; model = (uint32_t)pci_get_device(dev) << 16; model |= (uint32_t)pci_get_vendor(dev) & 0x; subvendor = pci_get_subvendor(dev); - class = pci_get_class(dev); - subclass = pci_get_subclass(dev); - progif = pci_get_progif(dev); /* Apply chip specific quirks. */ for (i = 0; sdhci_devices[i].model != 0; i++) { if (sdhci_devices[i].model == model && ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r273051 - head/sys/dev/isp
Author: imp Date: Mon Oct 13 16:23:58 2014 New Revision: 273051 URL: https://svnweb.freebsd.org/changeset/base/273051 Log: Use the C99 flexible array construct to denote a variable amount of data rather than the old-school [1] construct. We have required c99 compilers for some time. Modified: head/sys/dev/isp/ispmbox.h Modified: head/sys/dev/isp/ispmbox.h == --- head/sys/dev/isp/ispmbox.h Mon Oct 13 16:23:51 2014(r273050) +++ head/sys/dev/isp/ispmbox.h Mon Oct 13 16:23:58 2014(r273051) @@ -1442,7 +1442,7 @@ typedef struct { uint16_tsnscb_addr[4]; /* response buffer address */ uint16_tsnscb_sblen;/* subcommand buffer length (words) */ uint16_tsnscb_reserved1; - uint16_tsnscb_data[1]; /* variable data */ + uint16_tsnscb_data[]; /* variable data */ } sns_screq_t; /* Subcommand Request Structure */ typedef struct { @@ -1503,7 +1503,7 @@ typedef struct { uint8_t snscb_port_type; uint8_t snscb_port_id[3]; uint8_t snscb_portname[8]; - uint16_tsnscb_data[1]; /* variable data */ + uint16_tsnscb_data[]; /* variable data */ } sns_scrsp_t; /* Subcommand Response Structure */ typedef struct { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r273052 - head/sys/arm/ti
Author: andrew Date: Mon Oct 13 16:33:08 2014 New Revision: 273052 URL: https://svnweb.freebsd.org/changeset/base/273052 Log: Use a switch on ti_chip() to find which SoC we are on. This allow us t only enable support for the SoCs we are built for. Modified: head/sys/arm/ti/ti_sdhci.c Modified: head/sys/arm/ti/ti_sdhci.c == --- head/sys/arm/ti/ti_sdhci.c Mon Oct 13 16:23:58 2014(r273051) +++ head/sys/arm/ti/ti_sdhci.c Mon Oct 13 16:33:08 2014(r273052) @@ -494,13 +494,21 @@ ti_sdhci_attach(device_t dev) * Set the offset from the device's memory start to the MMCHS registers. * Also for OMAP4 disable high speed mode due to erratum ID i626. */ - if (ti_chip() == CHIP_OMAP_4) { + switch (ti_chip()) { +#ifdef SOC_OMAP4 + case CHIP_OMAP_4: sc->mmchs_reg_off = OMAP4_MMCHS_REG_OFFSET; sc->disable_highspeed = true; -} else if (ti_chip() == CHIP_AM335X) + break; +#endif +#ifdef SOC_TI_AM335X + case CHIP_AM335X: sc->mmchs_reg_off = AM335X_MMCHS_REG_OFFSET; - else + break; +#endif + default: panic("Unknown OMAP device\n"); + } /* * The standard SDHCI registers are at a fixed offset (the same on all ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r273053 - in head/usr.bin: kdump truss
Author: jhb Date: Mon Oct 13 16:37:06 2014 New Revision: 273053 URL: https://svnweb.freebsd.org/changeset/base/273053 Log: Decode the arguments passed to _umtx_op(). In particular, decode the opcode. MFC after:1 week Sponsored by: Norse Modified: head/usr.bin/kdump/kdump.c head/usr.bin/kdump/mksubr head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c Modified: head/usr.bin/kdump/kdump.c == --- head/usr.bin/kdump/kdump.c Mon Oct 13 16:33:08 2014(r273052) +++ head/usr.bin/kdump/kdump.c Mon Oct 13 16:37:06 2014(r273053) @@ -57,6 +57,7 @@ extern int errno; #include #include #include +#include #include #include #include @@ -1268,6 +1269,26 @@ ktrsyscall(struct ktr_syscall *ktr, u_in ip++; narg--; break; + case SYS__umtx_op: + print_number(ip, narg, c); + putchar(','); + umtxopname(*ip); + switch (*ip) { + case UMTX_OP_CV_WAIT: + ip++; + narg--; + putchar(','); + umtxcvwaitflags(*ip); + break; + case UMTX_OP_RW_RDLOCK: + ip++; + narg--; + putchar(','); + umtxrwlockflags(*ip); + break; + } + ip++; + narg--; } } while (narg > 0) { Modified: head/usr.bin/kdump/mksubr == --- head/usr.bin/kdump/mksubr Mon Oct 13 16:33:08 2014(r273052) +++ head/usr.bin/kdump/mksubr Mon Oct 13 16:37:06 2014(r273053) @@ -185,6 +185,7 @@ cat <<_EOF_ #include #include #include +#include #include #include #include @@ -489,6 +490,7 @@ auto_if_type "sockipprotoname" " auto_switch_type "sockoptname" "SO_[A-Z]+[[:space:]]+0x[0-9]+" "sys/socket.h" auto_switch_type "socktypename""SOCK_[A-Z]+[[:space:]]+[1-9]+[0-9]*" "sys/socket.h" auto_or_type "thrcreateflagsname" "THR_[A-Z]+[[:space:]]+0x[0-9]+" "sys/thr.h" +auto_switch_type "umtxopname" "UMTX_OP_[[:alnum:]_]+[[:space:]]+[0-9]+""sys/umtx.h" auto_switch_type "vmresultname""KERN_[A-Z]+[[:space:]]+[0-9]+" "vm/vm_param.h" auto_or_type "wait6optname""W[A-Z]+[[:space:]]+[0-9]+" "sys/wait.h" auto_switch_type "whencename" "SEEK_[A-Z]+[[:space:]]+[0-9]+" "sys/unistd.h" @@ -677,6 +679,62 @@ cat <<_EOF_ } } +/* + * AUTO - Special + * + * Just print 0 as 0. + */ +void +umtxcvwaitflags(intmax_t arg) +{ + int or = 0; + if (arg == 0) { + printf("0"); + return; + } + printf("%#jx<", (uintmax_t)arg); +_EOF_ + egrep "^#[[:space:]]*define[[:space:]]+CVWAIT_[A-Z_]+[[:space:]]+0x[0-9]+[[:space:]]*" \ + $include_dir/sys/umtx.h | \ + awk '{ for (i = 1; i <= NF; i++) \ + if ($i ~ /define/) \ + break; \ + ++i; \ + printf "\tif (!((arg > 0) ^ ((%s) > 0)))\n\t\tif_print_or(arg, %s, or);\n", $i, $i }' +cat <<_EOF_ + printf(">"); + if (or == 0) + printf("%jd", arg); +} + + +/* + * AUTO - Special + * + * Just print 0 as 0. + */ +void +umtxrwlockflags(intmax_t arg) +{ + int or = 0; + if (arg == 0) { + printf("0"); + return; + } + printf("%#jx<", (uintmax_t)arg); +_EOF_ + egrep "^#[[:space:]]*define[[:space:]]+URWLOCK_PREFER_READER[[:space:]]+0x[0-9]+[[:space:]]*" \ + $include_dir/sys/umtx.h | \ + awk '{ for (i = 1; i <= NF; i++) \ + if ($i ~ /define/) \ + break; \ + ++i; \ + printf "\tif (!((arg > 0) ^ ((%s) > 0)))\n\t\tif_print_or(arg, %s, or);\n", $i, $i }' +cat <<_EOF_ + printf(">"); + if (or == 0) + printf("%jd", arg); +} _EOF_ egrep '#define[[:space:]]+CAP_[A-Z_]+[[:space:]]+CAPRIGHT\([0-9],[[:space:]]+0x[0-9]{16}ULL\)' \ $include_dir/sys/capsicum.h | \ Modified: head/usr.bin/truss/syscall.h == --- head/usr.bin/truss/syscall.hMon Oct 13 16:33:08 2014
svn commit: r273054 - head/sys/arm/ti/omap3
Author: andrew Date: Mon Oct 13 16:37:34 2014 New Revision: 273054 URL: https://svnweb.freebsd.org/changeset/base/273054 Log: Remove the omap3 directory that should have happened in r273041. Deleted: head/sys/arm/ti/omap3/ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r273055 - in head/sys/arm/ti: . am335x omap4
Author: andrew Date: Mon Oct 13 16:40:40 2014 New Revision: 273055 URL: https://svnweb.freebsd.org/changeset/base/273055 Log: Move the sdhci option to files.ti, it's common to both SoCs. Modified: head/sys/arm/ti/am335x/files.am335x head/sys/arm/ti/files.ti head/sys/arm/ti/omap4/files.omap4 Modified: head/sys/arm/ti/am335x/files.am335x == --- head/sys/arm/ti/am335x/files.am335x Mon Oct 13 16:37:34 2014 (r273054) +++ head/sys/arm/ti/am335x/files.am335x Mon Oct 13 16:40:40 2014 (r273055) @@ -12,5 +12,4 @@ arm/ti/am335x/am335x_scm_padconf.cstand arm/ti/am335x/am335x_usbss.c optionalmusb fdt arm/ti/ti_edma3.c standard -arm/ti/ti_sdhci.c optionalsdhci arm/ti/cpsw/if_cpsw.c optionalcpsw Modified: head/sys/arm/ti/files.ti == --- head/sys/arm/ti/files.tiMon Oct 13 16:37:34 2014(r273054) +++ head/sys/arm/ti/files.tiMon Oct 13 16:40:40 2014(r273055) @@ -22,6 +22,7 @@ arm/ti/ti_pruss.c standard arm/ti/ti_adc.coptionalti_adc arm/ti/ti_gpio.c optionalgpio arm/ti/ti_i2c.coptionalti_i2c +arm/ti/ti_sdhci.c optionalsdhci dev/uart/uart_dev_ti8250.c optionaluart dev/uart/uart_dev_ns8250.c optionaluart Modified: head/sys/arm/ti/omap4/files.omap4 == --- head/sys/arm/ti/omap4/files.omap4 Mon Oct 13 16:37:34 2014 (r273054) +++ head/sys/arm/ti/omap4/files.omap4 Mon Oct 13 16:40:40 2014 (r273055) @@ -6,7 +6,6 @@ arm/ti/ti_smc.S standard arm/ti/usb/omap_ehci.c optionalusb ehci arm/ti/ti_sdma.c optionalti_sdma -arm/ti/ti_sdhci.c optionalsdhci arm/ti/omap4/omap4_l2cache.c optionalpl310 arm/ti/omap4/omap4_prcm_clks.c standard ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r272906 - in head/sys: conf libkern netpfil/pf sys
On Fri, Oct 10, 2014 at 9:26 PM, George V. Neville-Neil wrote: > Author: gnn > Date: Fri Oct 10 19:26:26 2014 > New Revision: 272906 > URL: https://svnweb.freebsd.org/changeset/base/272906 > > Log: > Change the PF hash from Jenkins to Murmur3. In forwarding tests > this showed a conservative 3% incrase in PPS. > > It's not easy to measure 3% of difference ;-) My benchs didn't reach to measure it (about 2000 flows of minimum packet-size, result displayed in packet-per-second): In state-full: x 272685.pf-statefull + 273009.pf-statefull +--+ |xx+ + xx x++ +| ||__A_M___|| | |A_M___| | +--+ N Min MaxMedian AvgStddev x 5 1297273 1332110 1329176 1321089.2 14527.702 + 5 1324108 1351078 1336257 1335044.2 10562.448 No difference proven at 95.0% confidence Neither in stateless: x 272685.pf-stateless + 273009.pf-stateless +--+ |x x + x+x x + + +| | |___M_A| | | |__A_| | +--+ N Min MaxMedian AvgStddev x 5 1311342 1316466 1313645 1313898.6 2378.5845 + 5 1312893 1320772 1316878 1316927.4 3607.1013 No difference proven at 95.0% confidence Regards, Olivier ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r273056 - head/sys/contrib/dev/ath/ath_hal/ar9300
Author: sbruno Date: Mon Oct 13 16:48:01 2014 New Revision: 273056 URL: https://svnweb.freebsd.org/changeset/base/273056 Log: Repair build of tools/ath/athalq and define missing value len. Reviewed by: adrian Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300desc.h Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300desc.h == --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300desc.hMon Oct 13 16:40:40 2014(r273055) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300desc.hMon Oct 13 16:48:01 2014(r273056) @@ -347,6 +347,7 @@ struct ar9300_txc { /* ds_status2 */ #define AR_data_len 0x0fff +#define AR_data_len_S0 #define AR_rx_more 0x1000 #define AR_num_delim 0x003fc000 #define AR_num_delim_S 14 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r273059 - head/lib/libcuse
Author: hselasky Date: Mon Oct 13 19:05:18 2014 New Revision: 273059 URL: https://svnweb.freebsd.org/changeset/base/273059 Log: Fix compiler locking diagnostic warnings. PR: 194289 Modified: head/lib/libcuse/cuse_lib.c Modified: head/lib/libcuse/cuse_lib.c == --- head/lib/libcuse/cuse_lib.c Mon Oct 13 18:53:56 2014(r273058) +++ head/lib/libcuse/cuse_lib.c Mon Oct 13 19:05:18 2014(r273059) @@ -87,17 +87,11 @@ static TAILQ_HEAD(, cuse_dev_entered) h_ static struct cuse_vm_allocation a_cuse[CUSE_ALLOC_UNIT_MAX] __guarded_by(m_cuse); -static void -cuse_lock(void) __locks_exclusive(m_cuse) -{ - pthread_mutex_lock(&m_cuse); -} +#defineCUSE_LOCK() \ + pthread_mutex_lock(&m_cuse) -static void -cuse_unlock(void) __unlocks(m_cuse) -{ - pthread_mutex_unlock(&m_cuse); -} +#defineCUSE_UNLOCK() \ + pthread_mutex_unlock(&m_cuse) int cuse_init(void) @@ -150,7 +144,7 @@ cuse_vmoffset(void *_ptr) unsigned long remainder; int n; - cuse_lock(); + CUSE_LOCK(); for (n = 0; n != CUSE_ALLOC_UNIT_MAX; n++) { if (a_cuse[n].ptr == NULL) continue; @@ -160,7 +154,7 @@ cuse_vmoffset(void *_ptr) if ((ptr >= ptr_min) && (ptr <= ptr_max)) { - cuse_unlock(); + CUSE_UNLOCK(); remainder = (ptr - ptr_min); @@ -169,7 +163,7 @@ cuse_vmoffset(void *_ptr) return ((n * PAGE_SIZE * CUSE_ALLOC_PAGES_MAX) + remainder); } } - cuse_unlock(); + CUSE_UNLOCK(); return (0x8000UL); /* failure */ } @@ -192,7 +186,7 @@ cuse_vmalloc(int size) info.page_count = (size + PAGE_SIZE - 1) / PAGE_SIZE; - cuse_lock(); + CUSE_LOCK(); for (n = 0; n != CUSE_ALLOC_UNIT_MAX; n++) { if (a_cuse[n].ptr != NULL) @@ -201,7 +195,7 @@ cuse_vmalloc(int size) a_cuse[n].ptr = ((uint8_t *)1); /* reserve */ a_cuse[n].size = 0; - cuse_unlock(); + CUSE_UNLOCK(); info.alloc_nr = n; @@ -209,7 +203,7 @@ cuse_vmalloc(int size) if (error) { - cuse_lock(); + CUSE_LOCK(); a_cuse[n].ptr = NULL; @@ -230,20 +224,20 @@ cuse_vmalloc(int size) if (error) { /* ignore */ } - cuse_lock(); + CUSE_LOCK(); a_cuse[n].ptr = NULL; break; } - cuse_lock(); + CUSE_LOCK(); a_cuse[n].ptr = ptr; a_cuse[n].size = size; - cuse_unlock(); + CUSE_UNLOCK(); return (ptr); /* success */ } - cuse_unlock(); + CUSE_UNLOCK(); return (NULL); /* failure */ } @@ -255,12 +249,12 @@ cuse_is_vmalloc_addr(void *ptr) if (f_cuse < 0 || ptr == NULL) return (0); /* false */ - cuse_lock(); + CUSE_LOCK(); for (n = 0; n != CUSE_ALLOC_UNIT_MAX; n++) { if (a_cuse[n].ptr == ptr) break; } - cuse_unlock(); + CUSE_UNLOCK(); return (n != CUSE_ALLOC_UNIT_MAX); } @@ -268,6 +262,7 @@ cuse_is_vmalloc_addr(void *ptr) void cuse_vmfree(void *ptr) { + struct cuse_vm_allocation temp; struct cuse_alloc_info info; int error; int n; @@ -275,32 +270,35 @@ cuse_vmfree(void *ptr) if (f_cuse < 0) return; - memset(&info, 0, sizeof(info)); - - cuse_lock(); + CUSE_LOCK(); for (n = 0; n != CUSE_ALLOC_UNIT_MAX; n++) { if (a_cuse[n].ptr != ptr) continue; - cuse_unlock(); + temp = a_cuse[n]; - info.alloc_nr = n; + CUSE_UNLOCK(); + + munmap(temp.ptr, temp.size); - munmap(ptr, a_cuse[n].size); + memset(&info, 0, sizeof(info)); + + info.alloc_nr = n; error = ioctl(f_cuse, CUSE_IOCTL_FREE_MEMORY, &info); - if (error) { - /* ignore */ + if (error != 0) { + /* ignore any errors */ + DPRINTF("Freeing memory failed: %d\n", errno); } - cuse_lock(); + CUSE_LOCK(); a_cuse[n].ptr = NULL; a_cuse[n].size = 0; break; } - cuse_unlock(); + CUSE_UNLOCK(); } int @@ -407,9 +405,9 @@ cuse_dev_create(const struct cuse_me
Re: svn commit: r273009 - in head: etc/devd sys/powerpc/powermac
On Mon, Oct 13, 2014 at 11:10:08AM -0400, John Baldwin wrote: > On Sunday, October 12, 2014 12:26:36 PM Justin Hibbits wrote: > > On Sun, 12 Oct 2014 19:12:49 + (UTC) > > > > Justin Hibbits wrote: > > > Author: jhibbits > > > Date: Sun Oct 12 19:12:48 2014 > > > New Revision: 273009 > > > URL: https://svnweb.freebsd.org/changeset/base/273009 > > > > > > Log: > > > Add an AC line monitor so power_profile can work > > > > > > Summary: > > > Add a polling loop (1Hz) to monitor the battery and AC status, to > > > > > > notify devd like ACPI does for power monitoring. This > > > allows /etc/rc.d/power_profile to work on PowerPC laptops > > > > > > Test Plan: > > > Tested on a Titanium PowerBook, configuring economy_cpu_freq and > > > performance_cpu_freq, disabling powerd. > > > > > > Reviewers: #powerpc, nwhitehorn > > > > > > Reviewed By: nwhitehorn > > > > > > Subscribers: rpaulo > > > > > > Differential Revision: https://reviews.freebsd.org/D937 > > > > MFC After: 3 weeks > > Relnotes: Yes > > > > (Can we add a template to arc to include those fields in arc messages?) > > I think Baptiste looked at hacking the arcanist template to include our > template fields and in general be more like our messages and ran away > screaming instead. I've just been using copy and paste to copy the message > I type into arc from the web browswer into my normal commit window. > Yeah that is basically it :) Bapt pgppSwdIeecs4.pgp Description: PGP signature
svn commit: r273060 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: delphij Date: Mon Oct 13 20:39:51 2014 New Revision: 273060 URL: https://svnweb.freebsd.org/changeset/base/273060 Log: Use write_psize instead of write_asize when doing vdev_space_update. Without this change the accounting of L2ARC usage would be wrong and give 16EB free space because the number became negative and overflows. Obtained from:FreeNAS (issue #6239) MFC after:2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Oct 13 19:05:18 2014(r273059) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Oct 13 20:39:51 2014(r273060) @@ -5232,7 +5232,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_de ARCSTAT_INCR(arcstat_l2_write_bytes, write_asize); ARCSTAT_INCR(arcstat_l2_size, write_sz); ARCSTAT_INCR(arcstat_l2_asize, write_asize); - vdev_space_update(dev->l2ad_vdev, write_asize, 0, 0); + vdev_space_update(dev->l2ad_vdev, write_psize, 0, 0); /* * Bump device hand to the device start if it is approaching the end. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r273061 - head/share/man/man4
Author: sbruno Date: Mon Oct 13 21:04:14 2014 New Revision: 273061 URL: https://svnweb.freebsd.org/changeset/base/273061 Log: Update tcp(4) with plpmtud blackhole sysctls Submitted by: Mikhail MFC after:2 weeks Relnotes: yes Modified: head/share/man/man4/tcp.4 Modified: head/share/man/man4/tcp.4 == --- head/share/man/man4/tcp.4 Mon Oct 13 20:39:51 2014(r273060) +++ head/share/man/man4/tcp.4 Mon Oct 13 21:04:14 2014(r273061) @@ -518,6 +518,21 @@ avoid packet drops. Number of retries (SYN or SYN/ACK retransmits) before disabling ECN on a specific connection. This is needed to help with connection establishment when a broken firewall is in the network path. +.It Va pmtud_blackhole_detection +Turn on automatic path MTU blackhole detection. In case of retransmits we will +lower the MSS to check if it's MTU problem. If current MSS is greater than +configured value to try, it will be set to it, otherwise, MSS will be set to +default values (net.inet.tcp.mssdflt and net.inet.tcp.v6mssdflt). +.It Va pmtud_blackhole_mss +MSS to try for IPv4 if PMTU blackhole detection is turned on. +.It Va v6pmtud_blackhole_mss +MSS to try for IPv6 if PMTU blackhole detection is turned on. +.It Va pmtud_blackhole_activated +Number of times the code was activated to attempt a MSS downshift. +.It Va pmtud_blackhole_min_activated +Number of times the blackhole MSS was used in an attempt to downshift. +.It Va pmtud_blackhole_failed +Number of times that we failed to connect after we downshifted the MSS. .El .Sh ERRORS A socket operation may fail with one of the following errors returned: ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r273062 - head/sys/netinet
Author: sbruno Date: Mon Oct 13 21:05:29 2014 New Revision: 273062 URL: https://svnweb.freebsd.org/changeset/base/273062 Log: Catch ipv6 case when attempting to do PLPMTUD blackhole detection. Submitted by: Mikhail MFC after:2 weeks Relnotes: yes Modified: head/sys/netinet/tcp_output.c Modified: head/sys/netinet/tcp_output.c == --- head/sys/netinet/tcp_output.c Mon Oct 13 21:04:14 2014 (r273061) +++ head/sys/netinet/tcp_output.c Mon Oct 13 21:05:29 2014 (r273062) @@ -1273,6 +1273,11 @@ send: */ ip6->ip6_plen = htons(m->m_pkthdr.len - sizeof(*ip6)); + if (V_path_mtu_discovery && tp->t_maxopd > V_tcp_minmss) + tp->t_flags2 |= TF2_PLPMTU_PMTUD; + else + tp->t_flags2 &= ~TF2_PLPMTU_PMTUD; + if (tp->t_state == TCPS_SYN_SENT) TCP_PROBE5(connect__request, NULL, tp, ip6, tp, th); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r273063 - head/sys/netinet
Author: sbruno Date: Mon Oct 13 21:06:21 2014 New Revision: 273063 URL: https://svnweb.freebsd.org/changeset/base/273063 Log: Handle small file case with regards to plpmtud blackhole detection. Submitted by: Mikhail MFC after:2 weeks Relnotes: yes Modified: head/sys/netinet/tcp_timer.c Modified: head/sys/netinet/tcp_timer.c == --- head/sys/netinet/tcp_timer.cMon Oct 13 21:05:29 2014 (r273062) +++ head/sys/netinet/tcp_timer.cMon Oct 13 21:06:21 2014 (r273063) @@ -693,7 +693,15 @@ tcp_timer_rexmt(void * xtp) TCPT_RANGESET(tp->t_rxtcur, rexmt, tp->t_rttmin, TCPTV_REXMTMAX); - if (V_tcp_pmtud_blackhole_detect && (tp->t_state == TCPS_ESTABLISHED)) { + /* +* We enter the path for PLMTUD if connection is established or, if +* connection is FIN_WAIT_1 status, reason for the last is that if +* amount of data we send is very small, we could send it in couple of +* packets and process straight to FIN. In that case we won't catch +* ESTABLISHED state. +*/ + if (V_tcp_pmtud_blackhole_detect && (((tp->t_state == TCPS_ESTABLISHED)) + || (tp->t_state == TCPS_FIN_WAIT_1))) { int optlen; #ifdef INET6 int isipv6; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r273064 - head/share/man/man4
Author: sbruno Date: Mon Oct 13 21:08:27 2014 New Revision: 273064 URL: https://svnweb.freebsd.org/changeset/base/273064 Log: Bump .Dd Submitted by: gjb MFC after:2 weeks Relnotes: yes Modified: head/share/man/man4/tcp.4 Modified: head/share/man/man4/tcp.4 == --- head/share/man/man4/tcp.4 Mon Oct 13 21:06:21 2014(r273063) +++ head/share/man/man4/tcp.4 Mon Oct 13 21:08:27 2014(r273064) @@ -34,7 +34,7 @@ .\" From: @(#)tcp.48.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd November 8, 2013 +.Dd October 13, 2014 .Dt TCP 4 .Os .Sh NAME ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r273065 - in head: lib lib/libevent share/mk usr.sbin/ftp-proxy usr.sbin/ftp-proxy/ftp-proxy usr.sbin/ftp-proxy/libevent
Author: delphij Date: Mon Oct 13 22:15:26 2014 New Revision: 273065 URL: https://svnweb.freebsd.org/changeset/base/273065 Log: Promote libevent to lib/ level and fold ftp-proxy into its parent Makefile. This allows us to use libevent for other application in the future. For now libevent is still INTERNALLIB and no shared library is installed. MFC after:1 month Added: head/lib/libevent/ - copied from r273060, head/usr.sbin/ftp-proxy/libevent/ Deleted: head/usr.sbin/ftp-proxy/Makefile.inc head/usr.sbin/ftp-proxy/ftp-proxy/ head/usr.sbin/ftp-proxy/libevent/ Modified: head/lib/Makefile head/lib/libevent/Makefile head/share/mk/src.libnames.mk head/usr.sbin/ftp-proxy/Makefile Modified: head/lib/Makefile == --- head/lib/Makefile Mon Oct 13 21:08:27 2014(r273064) +++ head/lib/Makefile Mon Oct 13 22:15:26 2014(r273065) @@ -44,6 +44,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ libdevstat \ libdwarf \ libedit \ + ${_libevent} \ libexecinfo \ libexpat \ libfetch \ @@ -226,6 +227,10 @@ _libnetgraph= libnetgraph _libypclnt=libypclnt .endif +.if ${MK_PF} != "no" +_libevent= libevent +.endif + .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" _libsmb= libsmb _libvgl= libvgl Modified: head/lib/libevent/Makefile == --- head/usr.sbin/ftp-proxy/libevent/Makefile Mon Oct 13 20:39:51 2014 (r273060) +++ head/lib/libevent/Makefile Mon Oct 13 22:15:26 2014(r273065) @@ -1,10 +1,14 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../contrib/pf/libevent +.PATH: ${.CURDIR}/../../contrib/pf/libevent +.include + +LIB= event +SHLIB_MAJOR= 1 +PRIVATELIB= +INTERNALLIB= -LIB= event -INTERNALLIB=yes SRCS= buffer.c evbuffer.c event.c kqueue.c log.c poll.c select.c signal.c HDRS= event.h Modified: head/share/mk/src.libnames.mk == --- head/share/mk/src.libnames.mk Mon Oct 13 21:08:27 2014 (r273064) +++ head/share/mk/src.libnames.mk Mon Oct 13 22:15:26 2014 (r273065) @@ -21,6 +21,10 @@ LIBBSDSTATDIR= ${ROOTOBJDIR}/lib/libbsds LDBSDSTAT?=${LIBBSDSTATDIR}/libbsdstat.so LIBBSDSTAT?= ${LIBBSDSTATDIR}/libbsdstat.a +LIBEVENTDIR= ${ROOTOBJDIR}/lib/libevent +LDEVENT?= ${LIBEVENTDIR}/libevent.so +LIBEVENT?= ${LIBEVENTDIR}/libevent.a + LIBHEIMIPCCDIR=${ROOTOBJDIR}/kerberos5/lib/libheimipcc LDHEIMIPCC?= ${LIBHEIMIPCCDIR}/libheimipcc.so LIBHEIMIPCC?= ${LIBHEIMIPCCDIR}/libheimipcc.a Modified: head/usr.sbin/ftp-proxy/Makefile == --- head/usr.sbin/ftp-proxy/MakefileMon Oct 13 21:08:27 2014 (r273064) +++ head/usr.sbin/ftp-proxy/MakefileMon Oct 13 22:15:26 2014 (r273065) @@ -1,5 +1,17 @@ # $FreeBSD$ -SUBDIR= libevent ftp-proxy +.PATH: ${.CURDIR}/../../contrib/pf/ftp-proxy -.include +PROG= ftp-proxy +MAN= ftp-proxy.8 + +SRCS= ftp-proxy.c filter.c + +CFLAGS+=-I${.CURDIR}/../../contrib/pf/libevent + +LDADD+=${LIBEVENT} +DPADD+=${LIBEVENT} + +WARNS?=3 + +.include ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r273065 - in head: lib lib/libevent share/mk usr.sbin/ftp-proxy usr.sbin/ftp-proxy/ftp-proxy usr.sbin/ftp-proxy/libevent
On Mon, Oct 13, 2014 at 10:15:26PM +, Xin LI wrote: > Author: delphij > Date: Mon Oct 13 22:15:26 2014 > New Revision: 273065 > URL: https://svnweb.freebsd.org/changeset/base/273065 > > Log: > Promote libevent to lib/ level and fold ftp-proxy into its parent Makefile. > This allows us to use libevent for other application in the future. > > For now libevent is still INTERNALLIB and no shared library is installed. > > MFC after: 1 month > > Added: > head/lib/libevent/ > - copied from r273060, head/usr.sbin/ftp-proxy/libevent/ > Deleted: > head/usr.sbin/ftp-proxy/Makefile.inc > head/usr.sbin/ftp-proxy/ftp-proxy/ > head/usr.sbin/ftp-proxy/libevent/ > Modified: > head/lib/Makefile > head/lib/libevent/Makefile > head/share/mk/src.libnames.mk > head/usr.sbin/ftp-proxy/Makefile > > Modified: head/lib/Makefile > == > --- head/lib/Makefile Mon Oct 13 21:08:27 2014(r273064) > +++ head/lib/Makefile Mon Oct 13 22:15:26 2014(r273065) > @@ -44,6 +44,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ > libdevstat \ > libdwarf \ > libedit \ > + ${_libevent} \ > libexecinfo \ > libexpat \ > libfetch \ > @@ -226,6 +227,10 @@ _libnetgraph=libnetgraph > _libypclnt= libypclnt > .endif > > +.if ${MK_PF} != "no" > +_libevent= libevent > +.endif > + > .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" > _libsmb= libsmb > _libvgl= libvgl > > Modified: head/lib/libevent/Makefile > == > --- head/usr.sbin/ftp-proxy/libevent/Makefile Mon Oct 13 20:39:51 2014 > (r273060) > +++ head/lib/libevent/MakefileMon Oct 13 22:15:26 2014 > (r273065) > @@ -1,10 +1,14 @@ > # $FreeBSD$ > > -.PATH: ${.CURDIR}/../../../contrib/pf/libevent > +.PATH: ${.CURDIR}/../../contrib/pf/libevent > > +.include > + > +LIB= event > +SHLIB_MAJOR= 1 > +PRIVATELIB= > +INTERNALLIB= Both PRIVATELIB and INTERNALLIB looks wrong I think you only want PRIVATELIB regards, Bapt pgp2gOl53dvFB.pgp Description: PGP signature
svn commit: r273066 - head/contrib/libc++/include
Author: bapt Date: Mon Oct 13 22:30:08 2014 New Revision: 273066 URL: https://svnweb.freebsd.org/changeset/base/273066 Log: Import patch from libc++ r197313 which allows using libc++ headers with gcc Differential Revision:https://reviews.freebsd.org/D942 Reviewed by: imp Modified: head/contrib/libc++/include/__config Modified: head/contrib/libc++/include/__config == --- head/contrib/libc++/include/__configMon Oct 13 22:15:26 2014 (r273065) +++ head/contrib/libc++/include/__configMon Oct 13 22:30:08 2014 (r273066) @@ -374,6 +374,7 @@ namespace std { #define _LIBCPP_HAS_NO_VARIADICS #define _LIBCPP_HAS_NO_RVALUE_REFERENCES #define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS +#define _LIBCPP_HAS_NO_STRONG_ENUMS #else // __GXX_EXPERIMENTAL_CXX0X__ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r273067 - in head/usr.sbin/bsdconfig: includes share share/packages
Author: dteske Date: Tue Oct 14 03:11:46 2014 New Revision: 273067 URL: https://svnweb.freebsd.org/changeset/base/273067 Log: Fix awk(1) asorti() implementation to work when called in a loop. MFC after:3 days X-MFC-to: stable/10, stable/9 Modified: head/usr.sbin/bsdconfig/includes/includes head/usr.sbin/bsdconfig/share/device.subr head/usr.sbin/bsdconfig/share/packages/index.subr Modified: head/usr.sbin/bsdconfig/includes/includes == --- head/usr.sbin/bsdconfig/includes/includes Mon Oct 13 22:30:08 2014 (r273066) +++ head/usr.sbin/bsdconfig/includes/includes Tue Oct 14 03:11:46 2014 (r273067) @@ -71,8 +71,10 @@ show_include() -v show_desc=${SHOW_DESC:-0} ' function asorti(src, dest) { + k = nitems = 0; + # Copy src indices to dest and calculate array length - nitems = 0; for (i in src) dest[++nitems] = i + for (i in src) dest[++nitems] = i # Sort the array of indices (dest) using insertion sort method for (i = 1; i <= nitems; k = i++) Modified: head/usr.sbin/bsdconfig/share/device.subr == --- head/usr.sbin/bsdconfig/share/device.subr Mon Oct 13 22:30:08 2014 (r273066) +++ head/usr.sbin/bsdconfig/share/device.subr Tue Oct 14 03:11:46 2014 (r273067) @@ -1118,6 +1118,7 @@ f_device_sort_by_awk=' # -v prop="property" function asorti(src, dest) { + k = nitems = 0 for (i in src) dest[++nitems] = i for (i = 1; i <= nitems; k = i++) { idx = dest[i] Modified: head/usr.sbin/bsdconfig/share/packages/index.subr == --- head/usr.sbin/bsdconfig/share/packages/index.subr Mon Oct 13 22:30:08 2014(r273066) +++ head/usr.sbin/bsdconfig/share/packages/index.subr Tue Oct 14 03:11:46 2014(r273067) @@ -243,8 +243,10 @@ f_index_read() eval "$( debug= f_getvar "$var_to_get" | awk -F'|' ' function asorti(src, dest) { + k = nitems = 0 + # Copy src indices to dest and calculate array length - nitems = 0; for (i in src) dest[++nitems] = i + for (i in src) dest[++nitems] = i # Sort the array of indices (dest) using insertion sort method for (i = 1; i <= nitems; k = i++) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r273068 - in head/usr.sbin/bsdconfig: includes share share/packages
Author: dteske Date: Tue Oct 14 03:22:37 2014 New Revision: 273068 URL: https://svnweb.freebsd.org/changeset/base/273068 Log: Rename awk(1) implementation of GNU awk's built-in asorti() function to prevent fatal conflict should one-true-awk ever be replaced -- e.g., in an appliance -- with GNU awk. NB: Renamed my implementation to _asorti() MFC after:3 days X-MFC-to: stable/10, stable/9 Modified: head/usr.sbin/bsdconfig/includes/includes head/usr.sbin/bsdconfig/share/device.subr head/usr.sbin/bsdconfig/share/packages/index.subr Modified: head/usr.sbin/bsdconfig/includes/includes == --- head/usr.sbin/bsdconfig/includes/includes Tue Oct 14 03:11:46 2014 (r273067) +++ head/usr.sbin/bsdconfig/includes/includes Tue Oct 14 03:22:37 2014 (r273068) @@ -69,7 +69,7 @@ show_include() -v use_color=${USE_COLOR:-0} \ -v re="$pattern" \ -v show_desc=${SHOW_DESC:-0} ' -function asorti(src, dest) +function _asorti(src, dest) { k = nitems = 0; @@ -120,7 +120,7 @@ show_include() } } END { - n = asorti(syntax, sorted_indices) + n = _asorti(syntax, sorted_indices) for (i = 1; i <= n; i++) printf "%s", syntax[sorted_indices[i]] }' "$file" ) Modified: head/usr.sbin/bsdconfig/share/device.subr == --- head/usr.sbin/bsdconfig/share/device.subr Tue Oct 14 03:11:46 2014 (r273067) +++ head/usr.sbin/bsdconfig/share/device.subr Tue Oct 14 03:22:37 2014 (r273068) @@ -1116,7 +1116,7 @@ f_device_shutdown() f_device_sort_by_awk=' # Variables that should be defined on the invocation line: # -v prop="property" -function asorti(src, dest) +function _asorti(src, dest) { k = nitems = 0 for (i in src) dest[++nitems] = i @@ -1137,7 +1137,7 @@ function asorti(src, dest) } } END { - nitems = asorti(devices, devices_sorted) + nitems = _asorti(devices, devices_sorted) for (i = 1; i <= nitems; i++) print devices[devices_sorted[i]] } ' Modified: head/usr.sbin/bsdconfig/share/packages/index.subr == --- head/usr.sbin/bsdconfig/share/packages/index.subr Tue Oct 14 03:11:46 2014(r273067) +++ head/usr.sbin/bsdconfig/share/packages/index.subr Tue Oct 14 03:22:37 2014(r273068) @@ -241,7 +241,7 @@ f_index_read() export msg_packages eval "$( debug= f_getvar "$var_to_get" | awk -F'|' ' - function asorti(src, dest) + function _asorti(src, dest) { k = nitems = 0 @@ -292,7 +292,7 @@ f_index_read() END { print "_npkgs=" tpkgs # For convenience, total package count - n = asorti(categories, categories_sorted) + n = _asorti(categories, categories_sorted) # Produce package counts for each category for (i = 1; i <= n; i++) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r272244 - head/sys/net
2014-10-13 15:37 GMT+03:00 Gleb Smirnoff : > On Mon, Oct 13, 2014 at 12:05:10PM +0300, Markiyan Kushnir wrote: > M> Gleb, looks like there is something to do for userland apps to let > M> them replace their old counter code. An example would be devel/libgtop > M> that is failing to build now (I'm on r273006 of base/head and r370733 > M> on ports/head): > > I have fixed all ports a week ago. Those that were trivial to test, > I committed myself. For others I sent patches to their maintainers. > Surprised that libgtop fix is still not committed. > ok, thanks for prompt response. I'm cc-ing libgtop's maintainer to let them know. > -- > Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"