svn commit: r269462 - head/sys/kern
Author: pluknet Date: Sun Aug 3 07:59:19 2014 New Revision: 269462 URL: http://svnweb.freebsd.org/changeset/base/269462 Log: vn_path_to_global_path: update comment. Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c == --- head/sys/kern/vfs_cache.c Sun Aug 3 05:53:53 2014(r269461) +++ head/sys/kern/vfs_cache.c Sun Aug 3 07:59:19 2014(r269462) @@ -1424,7 +1424,7 @@ cache_enter(struct vnode *dvp, struct vn * This function updates path string to vnode's full global path * and checks the size of the new path string against the pathlen argument. * - * Requires a locked, referenced vnode and GIANT lock held. + * Requires a locked, referenced vnode. * Vnode is re-locked on success or ENODEV, otherwise unlocked. * * If sysctl debug.disablefullpath is set, ENODEV is returned, ___ svn-src-all@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: r269466 - in head/sys/cddl: compat/opensolaris/sys contrib/opensolaris/uts/common/fs/zfs
Author: delphij Date: Sun Aug 3 09:47:51 2014 New Revision: 269466 URL: http://svnweb.freebsd.org/changeset/base/269466 Log: Revert r269404 and use cpu_ticks() for dbuf allocation. Encode CPU's number by XOR'ing the CPU ID against the 64-bit cpu_ticks(). Reviewed by: mav, gibbs Differential Revision: https://phabric.freebsd.org/D521 MFC after:2 weeks Modified: head/sys/cddl/compat/opensolaris/sys/time.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Modified: head/sys/cddl/compat/opensolaris/sys/time.h == --- head/sys/cddl/compat/opensolaris/sys/time.h Sun Aug 3 09:40:50 2014 (r269465) +++ head/sys/cddl/compat/opensolaris/sys/time.h Sun Aug 3 09:47:51 2014 (r269466) @@ -60,17 +60,6 @@ gethrtime(void) { struct timespec ts; hrtime_t nsec; - nanouptime(ts); - nsec = (hrtime_t)ts.tv_sec * NANOSEC + ts.tv_nsec; - return (nsec); -} - -static __inline hrtime_t -gethrtime_waitfree(void) { - - struct timespec ts; - hrtime_t nsec; - getnanouptime(ts); nsec = (hrtime_t)ts.tv_sec * NANOSEC + ts.tv_nsec; return (nsec); @@ -78,6 +67,7 @@ gethrtime_waitfree(void) { #definegethrestime_sec() (time_second) #definegethrestime(ts) getnanotime(ts) +#definegethrtime_waitfree()gethrtime() extern int nsec_per_tick; /* nanoseconds per clock tick */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Sun Aug 3 09:40:50 2014(r269465) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Sun Aug 3 09:47:51 2014(r269466) @@ -70,7 +70,11 @@ dbuf_cons(void *vdb, void *unused, int k cv_init(db-db_changed, NULL, CV_DEFAULT, NULL); refcount_create(db-db_holds); +#if defined(illumos) || !defined(_KERNEL) db-db_creation = gethrtime(); +#else + db-db_creation = cpu_ticks() ^ ((uint64_t)CPU_SEQID 48); +#endif return (0); } ___ svn-src-all@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: r269469 - head/sys/cam/scsi
Author: mav Date: Sun Aug 3 10:02:14 2014 New Revision: 269469 URL: http://svnweb.freebsd.org/changeset/base/269469 Log: Do not retry token errors. They are not going to disappear by themselves. MFC after:1 week Modified: head/sys/cam/scsi/scsi_all.c Modified: head/sys/cam/scsi/scsi_all.c == --- head/sys/cam/scsi/scsi_all.cSun Aug 3 09:53:34 2014 (r269468) +++ head/sys/cam/scsi/scsi_all.cSun Aug 3 10:02:14 2014 (r269469) @@ -1592,37 +1592,37 @@ static struct asc_table_entry asc_table[ { SST(0x22, 0x00, SS_FATAL | EINVAL, Illegal function (use 20 00, 24 00, or 26 00)) }, /* DT P B*/ - { SST(0x23, 0x00, SS_RDEF, /* XXX TBD */ + { SST(0x23, 0x00, SS_FATAL | EINVAL, Invalid token operation, cause not reportable) }, /* DT P B*/ - { SST(0x23, 0x01, SS_RDEF, /* XXX TBD */ + { SST(0x23, 0x01, SS_FATAL | EINVAL, Invalid token operation, unsupported token type) }, /* DT P B*/ - { SST(0x23, 0x02, SS_RDEF, /* XXX TBD */ + { SST(0x23, 0x02, SS_FATAL | EINVAL, Invalid token operation, remote token usage not supported) }, /* DT P B*/ - { SST(0x23, 0x03, SS_RDEF, /* XXX TBD */ + { SST(0x23, 0x03, SS_FATAL | EINVAL, Invalid token operation, remote ROD token creation not supported) }, /* DT P B*/ - { SST(0x23, 0x04, SS_RDEF, /* XXX TBD */ + { SST(0x23, 0x04, SS_FATAL | EINVAL, Invalid token operation, token unknown) }, /* DT P B*/ - { SST(0x23, 0x05, SS_RDEF, /* XXX TBD */ + { SST(0x23, 0x05, SS_FATAL | EINVAL, Invalid token operation, token corrupt) }, /* DT P B*/ - { SST(0x23, 0x06, SS_RDEF, /* XXX TBD */ + { SST(0x23, 0x06, SS_FATAL | EINVAL, Invalid token operation, token revoked) }, /* DT P B*/ - { SST(0x23, 0x07, SS_RDEF, /* XXX TBD */ + { SST(0x23, 0x07, SS_FATAL | EINVAL, Invalid token operation, token expired) }, /* DT P B*/ - { SST(0x23, 0x08, SS_RDEF, /* XXX TBD */ + { SST(0x23, 0x08, SS_FATAL | EINVAL, Invalid token operation, token cancelled) }, /* DT P B*/ - { SST(0x23, 0x09, SS_RDEF, /* XXX TBD */ + { SST(0x23, 0x09, SS_FATAL | EINVAL, Invalid token operation, token deleted) }, /* DT P B*/ - { SST(0x23, 0x0A, SS_RDEF, /* XXX TBD */ + { SST(0x23, 0x0A, SS_FATAL | EINVAL, Invalid token operation, invalid token length) }, /* DTLPWROMAEBKVF */ { SST(0x24, 0x00, SS_FATAL | EINVAL, ___ svn-src-all@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: r269470 - head/sys/dev/usb/serial
Author: joerg Date: Sun Aug 3 10:47:45 2014 New Revision: 269470 URL: http://svnweb.freebsd.org/changeset/base/269470 Log: Avoid a divide-by-zero panic when setting the baudrate to 0. MFC after:2 weeks Modified: head/sys/dev/usb/serial/umcs.c Modified: head/sys/dev/usb/serial/umcs.c == --- head/sys/dev/usb/serial/umcs.c Sun Aug 3 10:02:14 2014 (r269469) +++ head/sys/dev/usb/serial/umcs.c Sun Aug 3 10:47:45 2014 (r269470) @@ -1083,7 +1083,10 @@ umcs7840_calc_baudrate(uint32_t rate, ui for (i = 0; i umcs7840_baudrate_divisors_len - 1 !(rate umcs7840_baudrate_divisors[i] rate = umcs7840_baudrate_divisors[i + 1]); ++i); - *divisor = umcs7840_baudrate_divisors[i + 1] / rate; + if (rate == 0) + *divisor = 1; /* XXX */ + else + *divisor = umcs7840_baudrate_divisors[i + 1] / rate; /* 0x00 .. 0x70 */ *clk = i MCS7840_DEV_SPx_CLOCK_SHIFT; return (0); ___ svn-src-all@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: r269471 - head/sys/dev/vt/hw/vga
Author: ray Date: Sun Aug 3 11:01:35 2014 New Revision: 269471 URL: http://svnweb.freebsd.org/changeset/base/269471 Log: Fix vt_vga driver to draw not-8-bit-aligned fonts correctly. Still one bug here: mouse left some gaps on track when moving left. MFC after:1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/vt/hw/vga/vt_vga.c Modified: head/sys/dev/vt/hw/vga/vt_vga.c == --- head/sys/dev/vt/hw/vga/vt_vga.c Sun Aug 3 10:47:45 2014 (r269470) +++ head/sys/dev/vt/hw/vga/vt_vga.c Sun Aug 3 11:01:35 2014 (r269471) @@ -87,7 +87,7 @@ static const struct vt_driver vt_vga_dri .vd_init= vga_init, .vd_blank = vga_blank, .vd_bitbltchr = vga_bitbltchr, - .vd_maskbitbltchr = vga_maskbitbltchr, + .vd_maskbitbltchr = vga_bitbltchr, .vd_drawrect= vga_drawrect, .vd_setpixel= vga_setpixel, .vd_putchar = vga_putchar, @@ -172,88 +172,83 @@ vga_drawrect(struct vt_device *vd, int x } } -static inline void -vga_bitblt_draw(struct vt_device *vd, const uint8_t *src, -u_long ldst, uint8_t shift, unsigned int width, unsigned int height, -term_color_t color, int negate) -{ - u_long dst; - int w; - uint8_t b, r, out; - - for (; height 0; height--) { - dst = ldst; - ldst += VT_VGA_WIDTH / 8; - r = 0; - for (w = width; w 0; w -= 8) { - b = *src++; - if (negate) { - b = ~b; - /* Don't go too far. */ - if (w 8) - b = 0xff (8 - w); - } - /* Reintroduce bits from previous column. */ - out = (b shift) | r; - r = b (8 - shift); - vga_bitblt_put(vd, dst++, color, out); - } - /* Print the remainder. */ - vga_bitblt_put(vd, dst, color, r); +/* + * Shift bitmap of one row of the glyph. + * a - array of bytes with src bitmap and result storage. + * m - resulting background color bitmask. + * size - number of bytes per glyph row (+ one byte to store shift overflow). + * shift - offset for target bitmap. + */ + +static void +vga_shift_u8array(uint8_t *a, uint8_t *m, int size, int shift) +{ + int i; + + for (i = (size - 1); i 0; i--) { + a[i] = (a[i] shift) | (a[i-1] (7 - shift)); + m[i] = ~a[i]; } + a[0] = (a[0] shift); + m[0] = ~a[0] (0xff shift); + m[size - 1] = ~a[size - 1] (0xff (7 - shift)); } +/* XXX: fix gaps on mouse track when character size is not rounded to 8. */ static void vga_bitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, unsigned int height, term_color_t fg, term_color_t bg) { - u_long dst, ldst; - int w; + uint8_t aa[64], ma[64], *r; + int dst, shift, sz, x, y; + struct vga_softc *sc; - /* Don't try to put off screen pixels */ - if (((left + width) VT_VGA_WIDTH) || ((top + height) - VT_VGA_HEIGHT)) + if ((left + width) VT_VGA_WIDTH) + return; + if ((top + height) VT_VGA_HEIGHT) return; - dst = (VT_VGA_WIDTH * top + left) / 8; - - for (; height 0; height--) { - ldst = dst; - for (w = width; w 0; w -= 8) { - vga_bitblt_put(vd, ldst, fg, *src); - vga_bitblt_put(vd, ldst, bg, ~*src); - ldst++; - src++; - } - dst += VT_VGA_WIDTH / 8; - } -} + sc = vd-vd_softc; -/* Bitblt with mask support. Slow. */ -static void -vga_maskbitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, -int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, -unsigned int height, term_color_t fg, term_color_t bg) -{ - struct vga_softc *sc = vd-vd_softc; - u_long dst; - uint8_t shift; + sz = (width + 7) / 8; + shift = left % 8; dst = (VT_VGA_WIDTH * top + left) / 8; - shift = left % 8; - /* Don't try to put off screen pixels */ - if (((left + width) VT_VGA_WIDTH) || ((top + height) - VT_VGA_HEIGHT)) - return; + for (y = 0; y height; y++) { + r = (uint8_t *)src + (y * sz); + memcpy(aa, r, sz); + aa[sz] = 0; + vga_shift_u8array(aa, ma, sz + 1, shift); + + vga_setcolor(vd, bg); + for (x = 0; x (sz + 1); x ++) { + if (ma[x] == 0) +
svn commit: r269472 - head/sys/cam/scsi
Author: mav Date: Sun Aug 3 11:43:14 2014 New Revision: 269472 URL: http://svnweb.freebsd.org/changeset/base/269472 Log: Do not retry on set of non-transient XCOPY errors. MFC after:1 week Modified: head/sys/cam/scsi/scsi_all.c Modified: head/sys/cam/scsi/scsi_all.c == --- head/sys/cam/scsi/scsi_all.cSun Aug 3 11:01:35 2014 (r269471) +++ head/sys/cam/scsi/scsi_all.cSun Aug 3 11:43:14 2014 (r269472) @@ -1673,28 +1673,28 @@ static struct asc_table_entry asc_table[ { SST(0x26, 0x05, SS_RDEF, /* XXX TBD */ Data decryption error) }, /* DTLPWROK */ - { SST(0x26, 0x06, SS_RDEF, /* XXX TBD */ + { SST(0x26, 0x06, SS_FATAL | EINVAL, Too many target descriptors) }, /* DTLPWROK */ - { SST(0x26, 0x07, SS_RDEF, /* XXX TBD */ + { SST(0x26, 0x07, SS_FATAL | EINVAL, Unsupported target descriptor type code) }, /* DTLPWROK */ - { SST(0x26, 0x08, SS_RDEF, /* XXX TBD */ + { SST(0x26, 0x08, SS_FATAL | EINVAL, Too many segment descriptors) }, /* DTLPWROK */ - { SST(0x26, 0x09, SS_RDEF, /* XXX TBD */ + { SST(0x26, 0x09, SS_FATAL | EINVAL, Unsupported segment descriptor type code) }, /* DTLPWROK */ - { SST(0x26, 0x0A, SS_RDEF, /* XXX TBD */ + { SST(0x26, 0x0A, SS_FATAL | EINVAL, Unexpected inexact segment) }, /* DTLPWROK */ - { SST(0x26, 0x0B, SS_RDEF, /* XXX TBD */ + { SST(0x26, 0x0B, SS_FATAL | EINVAL, Inline data length exceeded) }, /* DTLPWROK */ - { SST(0x26, 0x0C, SS_RDEF, /* XXX TBD */ + { SST(0x26, 0x0C, SS_FATAL | EINVAL, Invalid operation for copy source or destination) }, /* DTLPWROK */ - { SST(0x26, 0x0D, SS_RDEF, /* XXX TBD */ + { SST(0x26, 0x0D, SS_FATAL | EINVAL, Copy segment granularity violation) }, /* DT PWROMAEBK */ { SST(0x26, 0x0E, SS_RDEF, /* XXX TBD */ ___ svn-src-all@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: r269474 - in head: share/man/man4 sys/dev/vt
Author: ray Date: Sun Aug 3 13:07:25 2014 New Revision: 269474 URL: http://svnweb.freebsd.org/changeset/base/269474 Log: Allow to disable some special key combinations handled by vt(4), like debug request, reboot request. Requested by: Claude Buisson Sponsored by: The FreeBSD Foundation Modified: head/share/man/man4/vt.4 head/sys/dev/vt/vt.h head/sys/dev/vt/vt_core.c Modified: head/share/man/man4/vt.4 == --- head/share/man/man4/vt.4Sun Aug 3 12:19:45 2014(r269473) +++ head/share/man/man4/vt.4Sun Aug 3 13:07:25 2014(r269474) @@ -45,6 +45,7 @@ In .Xr loader.conf 5 : .Cd hw.vga.textmode=1 .Cd kern.vty=vt +.Cd kern.vt.spclkeys=15 .Sh DESCRIPTION The .Nm @@ -195,6 +196,19 @@ or If this value is not set, .Xr sc 4 is used. +.It Va kern.vt.spclkeys +bitmap of allowed special keys. 1 is enabled, 0 is disabled. Encoded as: +.Bl -tag -compact -width 0x00 +.It 0x0001 +Debug request key combination. (Ctrl+Alt+Esc) +.It 0x0002 +Reboot. (Ctrl+Alt+Del) +.It 0x0004 +Halt. +.It 0x0008 +Power down. +.El +Default is 15, all enabled. .El .Sh FILES .Bl -tag -width /usr/share/syscons/keymaps/* -compact Modified: head/sys/dev/vt/vt.h == --- head/sys/dev/vt/vt.hSun Aug 3 12:19:45 2014(r269473) +++ head/sys/dev/vt/vt.hSun Aug 3 13:07:25 2014(r269474) @@ -87,6 +87,12 @@ static int vt_##_name = _default; \ SYSCTL_INT(_kern_vt, OID_AUTO, _name, CTLFLAG_RWTUN, vt_##_name, _default,\ _descr); +/* Allow to disable some special keys by users. */ +#defineVT_DEBUG_KEY_ENABLED(1 0) +#defineVT_REBOOT_KEY_ENABLED (1 1) +#defineVT_HALT_KEY_ENABLED (1 2) +#defineVT_POWEROFF_KEY_ENABLED (1 3) + struct vt_driver; void vt_allocate(struct vt_driver *, void *); Modified: head/sys/dev/vt/vt_core.c == --- head/sys/dev/vt/vt_core.c Sun Aug 3 12:19:45 2014(r269473) +++ head/sys/dev/vt/vt_core.c Sun Aug 3 13:07:25 2014(r269474) @@ -116,6 +116,9 @@ VT_SYSCTL_INT(enable_altgr, 1, Enable A VT_SYSCTL_INT(debug, 0, vt(9) debug level); VT_SYSCTL_INT(deadtimer, 15, Time to wait busy process in VT_PROCESS mode); VT_SYSCTL_INT(suspendswitch, 1, Switch to VT0 before suspend); +VT_SYSCTL_INT(spclkeys, (VT_DEBUG_KEY_ENABLED|VT_REBOOT_KEY_ENABLED| +VT_HALT_KEY_ENABLED|VT_POWEROFF_KEY_ENABLED), Enabled special keys +handled by vt(4)); static struct vt_devicevt_consdev; static unsigned int vt_unit = 0; @@ -402,17 +405,21 @@ vt_machine_kbdevent(int c) switch (c) { case SPCLKEY | DBG: - kdb_enter(KDB_WHY_BREAK, manual escape to debugger); + if (vt_spclkeys VT_DEBUG_KEY_ENABLED) + kdb_enter(KDB_WHY_BREAK, manual escape to debugger); return (1); case SPCLKEY | RBT: - /* XXX: Make this configurable! */ - shutdown_nice(0); + if (vt_spclkeys VT_REBOOT_KEY_ENABLED) + /* XXX: Make this configurable! */ + shutdown_nice(0); return (1); case SPCLKEY | HALT: - shutdown_nice(RB_HALT); + if (vt_spclkeys VT_HALT_KEY_ENABLED) + shutdown_nice(RB_HALT); return (1); case SPCLKEY | PDWN: - shutdown_nice(RB_HALT|RB_POWEROFF); + if (vt_spclkeys VT_POWEROFF_KEY_ENABLED) + shutdown_nice(RB_HALT|RB_POWEROFF); return (1); }; ___ svn-src-all@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: r269475 - in head: lib/libc/net sys/netinet
Author: tuexen Date: Sun Aug 3 14:10:10 2014 New Revision: 269475 URL: http://svnweb.freebsd.org/changeset/base/269475 Log: Add SCTP socket option SCTP_NRSACK_SUPPORTED to control the NRSACK extension. The default will still be off, since it it not an RFC (yet). Changing the sysctl name will be in a separate commit. MFC after: 1 week Modified: head/lib/libc/net/sctp_sys_calls.c head/sys/netinet/sctp.h head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_pcb.h head/sys/netinet/sctp_peeloff.c head/sys/netinet/sctp_structs.h head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_sysctl.h head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctputil.c Modified: head/lib/libc/net/sctp_sys_calls.c == --- head/lib/libc/net/sctp_sys_calls.c Sun Aug 3 13:07:25 2014 (r269474) +++ head/lib/libc/net/sctp_sys_calls.c Sun Aug 3 14:10:10 2014 (r269475) @@ -356,6 +356,9 @@ sctp_opt_info(int sd, sctp_assoc_t id, i case SCTP_PR_SUPPORTED: ((struct sctp_assoc_value *)arg)-assoc_id = id; break; + case SCTP_NRSACK_SUPPORTED: + ((struct sctp_assoc_value *)arg)-assoc_id = id; + break; case SCTP_MAX_BURST: ((struct sctp_assoc_value *)arg)-assoc_id = id; break; Modified: head/sys/netinet/sctp.h == --- head/sys/netinet/sctp.h Sun Aug 3 13:07:25 2014(r269474) +++ head/sys/netinet/sctp.h Sun Aug 3 14:10:10 2014(r269475) @@ -123,6 +123,7 @@ struct sctp_paramhdr { #define SCTP_REMOTE_UDP_ENCAPS_PORT 0x0024 #define SCTP_ECN_SUPPORTED 0x0025 #define SCTP_PR_SUPPORTED 0x0026 +#define SCTP_NRSACK_SUPPORTED 0x0027 /* * read-only options Modified: head/sys/netinet/sctp_input.c == --- head/sys/netinet/sctp_input.c Sun Aug 3 13:07:25 2014 (r269474) +++ head/sys/netinet/sctp_input.c Sun Aug 3 14:10:10 2014 (r269475) @@ -2787,6 +2787,7 @@ sctp_handle_cookie_echo(struct mbuf *m, inp-sctp_cmt_on_off = (*inp_p)-sctp_cmt_on_off; inp-ecn_supported = (*inp_p)-ecn_supported; inp-prsctp_supported = (*inp_p)-prsctp_supported; + inp-nrsack_supported = (*inp_p)-nrsack_supported; inp-partial_delivery_point = (*inp_p)-partial_delivery_point; inp-sctp_context = (*inp_p)-sctp_context; inp-local_strreset_support = (*inp_p)-local_strreset_support; @@ -4911,8 +4912,7 @@ process_control_chunks: SCTPDBG(SCTP_DEBUG_INDATA1, No stcb when processing NR-SACK chunk\n); break; } - if ((stcb-asoc.sctp_nr_sack_on_off == 0) || - (stcb-asoc.peer_supports_nr_sack == 0)) { + if (stcb-asoc.nrsack_supported == 0) { goto unknown_chunk; } if (chk_length sizeof(struct sctp_nr_sack_chunk)) { Modified: head/sys/netinet/sctp_output.c == --- head/sys/netinet/sctp_output.c Sun Aug 3 13:07:25 2014 (r269474) +++ head/sys/netinet/sctp_output.c Sun Aug 3 14:10:10 2014 (r269475) @@ -4822,7 +4822,7 @@ sctp_send_initiate(struct sctp_inpcb *in if (!SCTP_BASE_SYSCTL(sctp_auth_disable)) { pr_supported-chunk_types[num_ext++] = SCTP_AUTHENTICATION; } - if (stcb-asoc.sctp_nr_sack_on_off == 1) { + if (stcb-asoc.nrsack_supported == 1) { pr_supported-chunk_types[num_ext++] = SCTP_NR_SELECTIVE_ACK; } parameter_len = (uint16_t) sizeof(struct sctp_supported_chunk_types_param) + num_ext; @@ -5925,7 +5925,8 @@ do_a_abort: if (!SCTP_BASE_SYSCTL(sctp_auth_disable)) { pr_supported-chunk_types[num_ext++] = SCTP_AUTHENTICATION; } - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off)) { + if (((asoc != NULL) (asoc-nrsack_supported == 1)) || + ((asoc == NULL) (inp-nrsack_supported == 1))) { pr_supported-chunk_types[num_ext++] = SCTP_NR_SELECTIVE_ACK; } parameter_len = (uint16_t) sizeof(struct sctp_supported_chunk_types_param) + num_ext; @@ -10419,8 +10420,7 @@ sctp_send_sack(struct sctp_tcb *stcb, in uint8_t type; uint8_t tsn_map; - if ((stcb-asoc.sctp_nr_sack_on_off == 1) -
Re: svn commit: r268943 - in head: include lib/libc/stdlib
On Jul 21, 2014, at 12:51 PM, Pedro Giffuni p...@freebsd.org wrote: Il giorno 21/lug/2014, alle ore 11:42, Bruce Simpson b...@fastmail.net ha scritto: On 21/07/2014 16:22, Pedro F. Giffuni wrote: ] Log: Add re-entrant versions of the hash functions based on the GNU api. What, if anything, can be done about qsort_r() API incompatibility? qsort_r is non-standard and we did it first, plus we will want to stay compatible with Apple :). I guess we could do some ugly parameter swapping in the case where _GNU_SOURCE is defined, but I won’t volunteer to do that. Are there any ABI considerations for the change? Warner ___ svn-src-all@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
Re: svn commit: r268943 - in head: include lib/libc/stdlib
On 03/08/2014 15:27, Warner Losh wrote: What, if anything, can be done about qsort_r() API incompatibility? qsort_r is non-standard and we did it first, plus we will want to stay compatible with Apple :). I guess we could do some ugly parameter swapping in the case where _GNU_SOURCE is defined, but I won’t volunteer to do that. Are there any ABI considerations for the change? I'm in agreement with Pedro here. Some form of compile-time checking is the best one can hope for in that situation, as it would be difficult to ret-con the qsort_r() ABI itself. The glibc implementation swaps two pointers in its signature. One of those points to executable code. The last time this caused problems for me was when testing the new CScope indexing backend by Elad Lahav on BSD/Mac. He had developed on Linux, however the quick fix was to fall back to using non-reentrant qsort(). ___ svn-src-all@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: r269476 - head/sys/netinet
Author: tuexen Date: Sun Aug 3 15:09:13 2014 New Revision: 269476 URL: http://svnweb.freebsd.org/changeset/base/269476 Log: Use consistent names for SCTP sysctls. Rename nr_sack_on_off to nrsack_enable. Please note that this extension is off by default since it is not specified in an RFC (yet). Modified: head/sys/netinet/sctp_sysctl.c Modified: head/sys/netinet/sctp_sysctl.c == --- head/sys/netinet/sctp_sysctl.c Sun Aug 3 14:10:10 2014 (r269475) +++ head/sys/netinet/sctp_sysctl.c Sun Aug 3 15:09:13 2014 (r269476) @@ -865,7 +865,7 @@ SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUT SCTP_BASE_SYSCTL(sctp_pr_enable), 0, sysctl_sctp_check, IU, SCTPCTL_PR_ENABLE_DESC); -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, nr_sack_on_off, CTLTYPE_UINT | CTLFLAG_RW, +SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, nrsack_enable, CTLTYPE_UINT | CTLFLAG_RW, SCTP_BASE_SYSCTL(sctp_nrsack_enable), 0, sysctl_sctp_check, IU, SCTPCTL_NRSACK_ENABLE_DESC); ___ svn-src-all@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
Re: svn commit: r268943 - in head: include lib/libc/stdlib
Il giorno 03/ago/2014, alle ore 09:27, Warner Losh i...@bsdimp.com ha scritto: On Jul 21, 2014, at 12:51 PM, Pedro Giffuni p...@freebsd.org wrote: Il giorno 21/lug/2014, alle ore 11:42, Bruce Simpson b...@fastmail.net ha scritto: On 21/07/2014 16:22, Pedro F. Giffuni wrote: ] Log: Add re-entrant versions of the hash functions based on the GNU api. What, if anything, can be done about qsort_r() API incompatibility? qsort_r is non-standard and we did it first, plus we will want to stay compatible with Apple :). I guess we could do some ugly parameter swapping in the case where _GNU_SOURCE is defined, but I won’t volunteer to do that. Are there any ABI considerations for the change? I would keep the qsort_r() ABI unchanged and add a GNU-compatible version that is used only when _GNU_SOURCE (but not _BSD_SOURCE) is defined. This would already be pretty messy by itself because some portable code may define _GNU_SOURCE but still may try to use the Apple/BSD interface under another #ifdef. Perhaps it’s just better to leave our headers alone and let the end-users do the wrapping. Pedro. ___ svn-src-all@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
Re: svn commit: r267937 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json cddl/contrib/opensolaris/cmd/dtrace/test/tst/common
On Jul 28, 2014, at 9:23 PM, John Baldwin j...@freebsd.org wrote: On Thursday 26 June 2014 21:45:49 Rui Paulo wrote: Author: rpaulo Date: Thu Jun 26 21:45:49 2014 New Revision: 267937 URL: http://svnweb.freebsd.org/changeset/base/267937 Log: MFV illumos 4477 DTrace should speak JSON MFC after: 2 weeks This makes kernel builds depend on userland sources. This breaks a lot of my work trees where I only checkout 'sys', and breaks a generally long-standing feature that the kernel was self-contained (recent bmake breakage to require the '-m /usr/src/share/mk' hack aside). Perhaps you could copy strtolctype.h to sys/cddl/contrib/opensolaris/common/util? We already duplicate sys/cddl/contrib/opensolaris/common/avl/avl.c in a like manner, presumably for the same reason. Just FYI: my intention is to remove that hack requirement, at least for host != kernel version cases.. I’ve had some issues with the “fix” that wound up with a different set of hacks once the initial MAKESYSPATH is fixed. Warner ___ svn-src-all@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: r269479 - head/sys/dev/nfe
Author: marcel Date: Sun Aug 3 16:45:07 2014 New Revision: 269479 URL: http://svnweb.freebsd.org/changeset/base/269479 Log: Fix multicast, broken by the conversion of the nfe(4) driver to the driver API. Submitted by: Mikhail m...@lenta.ru Modified: head/sys/dev/nfe/if_nfe.c Modified: head/sys/dev/nfe/if_nfe.c == --- head/sys/dev/nfe/if_nfe.c Sun Aug 3 16:22:14 2014(r269478) +++ head/sys/dev/nfe/if_nfe.c Sun Aug 3 16:45:07 2014(r269479) @@ -2582,7 +2582,6 @@ nfe_setmulti(struct nfe_softc *sc) bcopy(etherbroadcastaddr, addr, ETHER_ADDR_LEN); bcopy(etherbroadcastaddr, mask, ETHER_ADDR_LEN); - if_maddr_rlock(ifp); mc_count = if_multiaddr_count(ifp, -1); mta = malloc(sizeof(uint8_t) * ETHER_ADDR_LEN * mc_count, M_DEVBUF, M_NOWAIT); @@ -2594,24 +2593,24 @@ nfe_setmulti(struct nfe_softc *sc) bzero(addr, ETHER_ADDR_LEN); bzero(mask, ETHER_ADDR_LEN); - free(mta, M_DEVBUF); - if_maddr_runlock(ifp); goto done; }; - if_setupmultiaddr(ifp, mta, mcnt, mc_count); + if_multiaddr_array(ifp, mta, mcnt, mc_count); for (i = 0; i mcnt; i++) { uint8_t *addrp; + int j; addrp = mta + (i * ETHER_ADDR_LEN); - for (i = 0; i ETHER_ADDR_LEN; i++) { - u_int8_t mcaddr = addrp[i]; - addr[i] = mcaddr; - mask[i] = ~mcaddr; + for (j = 0; j ETHER_ADDR_LEN; j++) { + u_int8_t mcaddr = addrp[j]; + addr[j] = mcaddr; + mask[j] = ~mcaddr; } } - if_maddr_runlock(ifp); + + free(mta, M_DEVBUF); for (i = 0; i ETHER_ADDR_LEN; i++) { mask[i] |= addr[i]; ___ svn-src-all@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
Re: svn commit: r269466 - in head/sys/cddl: compat/opensolaris/sys contrib/opensolaris/uts/common/fs/zfs
On Sun, 3 Aug 2014, Xin LI wrote: Log: Revert r269404 and use cpu_ticks() for dbuf allocation. Encode CPU's number by XOR'ing the CPU ID against the 64-bit cpu_ticks(). Reviewed by: mav, gibbs Differential Revision: https://phabric.freebsd.org/D521 MFC after: 2 weeks This is still broken. Modified: head/sys/cddl/compat/opensolaris/sys/time.h == --- head/sys/cddl/compat/opensolaris/sys/time.h Sun Aug 3 09:40:50 2014 (r269465) +++ head/sys/cddl/compat/opensolaris/sys/time.h Sun Aug 3 09:47:51 2014 (r269466) @@ -60,17 +60,6 @@ gethrtime(void) { struct timespec ts; hrtime_t nsec; - nanouptime(ts); - nsec = (hrtime_t)ts.tv_sec * NANOSEC + ts.tv_nsec; - return (nsec); -} The in-between version wasn't broken. nanouptime() is not too slow to use provided it is properly implemented. Unfortunately, this includes proper implementation in the hardware. - -static __inline hrtime_t -gethrtime_waitfree(void) { - - struct timespec ts; - hrtime_t nsec; - getnanouptime(ts); nsec = (hrtime_t)ts.tv_sec * NANOSEC + ts.tv_nsec; return (nsec); The existence of getnanouptime() is a bug. Someone might use it. @@ -78,6 +67,7 @@ gethrtime_waitfree(void) { #define gethrestime_sec() (time_second) #define gethrestime(ts) getnanotime(ts) +#definegethrtime_waitfree()gethrtime() extern int nsec_per_tick; /* nanoseconds per clock tick */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Sun Aug 3 09:40:50 2014(r269465) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Sun Aug 3 09:47:51 2014(r269466) @@ -70,7 +70,11 @@ dbuf_cons(void *vdb, void *unused, int k cv_init(db-db_changed, NULL, CV_DEFAULT, NULL); refcount_create(db-db_holds); +#if defined(illumos) || !defined(_KERNEL) db-db_creation = gethrtime(); +#else + db-db_creation = cpu_ticks() ^ ((uint64_t)CPU_SEQID 48); +#endif return (0); } cpu_ticks() is a hack to work around nanouptime() being too slow with some hardware. It is much harder to use than nanouptime(). There are no correct uses of it, including its main use. Frequency changes are hard to handle correctly. Here the bug is that it wraps after just 65536+ seconds (18+ hours) at 4GHz, even on x86 where ticks have 64 bits. This gives non-uniqeness in another way. The wrap is increased by wastefully supporting 65536 CPUs. This leaves only 48 bits before wrap occurs (the high bits are XORed. This helps for uniqueness but doesn't guarantee it. E.g., the value of 2**48 on CPU0 is indistingishable from the value of 0 on CPU1. These values occur just 65536+ seconds apart at 4GHz). There is likely to be noise in the lower bits, but this doesn't guarantee uniqueness. On other arches, ticks may have many fewer than 64 bits. Their main use assumes that they have enough bits to represent uptimes of several years, so the above probably has no additional problems. Arches without a TSC mostly use nanouptime() for ticks anyway. These tend to be the slowest arches. gibbs' original suggestion of: db-db_creation = pcup_counter++ ^ ((uint64_t)CPU_SEQID 48); probably works. Now the counter doesn't race off to infinity at 4GHz so it is obviously unique for 2**48 creations per CPU. It increases in a different unscaled, often nonlinear timescale with much longer ticks. This is also much faster, especially on slower arches without a TSC that emulate cpu_ticks() using nanoptime(). Bruce ___ svn-src-all@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: r269480 - stable/10/lib/libc/net
Author: pfg Date: Sun Aug 3 18:03:00 2014 New Revision: 269480 URL: http://svnweb.freebsd.org/changeset/base/269480 Log: MFC r268867, r268878: Use more consistent type for optlen in getsourcefilter() Proposed by: bde Modified: stable/10/lib/libc/net/sourcefilter.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/net/sourcefilter.c == --- stable/10/lib/libc/net/sourcefilter.c Sun Aug 3 16:45:07 2014 (r269479) +++ stable/10/lib/libc/net/sourcefilter.c Sun Aug 3 18:03:00 2014 (r269480) @@ -337,7 +337,8 @@ getsourcefilter(int s, uint32_t interfac { struct __msfilterreq msfr; sockunion_t *psu; - int err, level, nsrcs, optlen, optname; + socklen_toptlen; + int err, level, nsrcs, optname; if (interface == 0 || group == NULL || numsrc == NULL || fmode == NULL) { ___ svn-src-all@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: r269481 - in head: lib/libc/net sys/netinet
Author: tuexen Date: Sun Aug 3 18:12:55 2014 New Revision: 269481 URL: http://svnweb.freebsd.org/changeset/base/269481 Log: Add support for the SCTP_PKTDROP_SUPPORTED socket option and the corresponding sysctl variable. The default is off, since the specification is not an RFC yet. MFC after: 1 week Modified: head/lib/libc/net/sctp_sys_calls.c head/sys/netinet/sctp.h head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_pcb.h head/sys/netinet/sctp_peeloff.c head/sys/netinet/sctp_structs.h head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_sysctl.h head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctputil.c Modified: head/lib/libc/net/sctp_sys_calls.c == --- head/lib/libc/net/sctp_sys_calls.c Sun Aug 3 18:03:00 2014 (r269480) +++ head/lib/libc/net/sctp_sys_calls.c Sun Aug 3 18:12:55 2014 (r269481) @@ -359,6 +359,9 @@ sctp_opt_info(int sd, sctp_assoc_t id, i case SCTP_NRSACK_SUPPORTED: ((struct sctp_assoc_value *)arg)-assoc_id = id; break; + case SCTP_PKTDROP_SUPPORTED: + ((struct sctp_assoc_value *)arg)-assoc_id = id; + break; case SCTP_MAX_BURST: ((struct sctp_assoc_value *)arg)-assoc_id = id; break; Modified: head/sys/netinet/sctp.h == --- head/sys/netinet/sctp.h Sun Aug 3 18:03:00 2014(r269480) +++ head/sys/netinet/sctp.h Sun Aug 3 18:12:55 2014(r269481) @@ -124,6 +124,7 @@ struct sctp_paramhdr { #define SCTP_ECN_SUPPORTED 0x0025 #define SCTP_PR_SUPPORTED 0x0026 #define SCTP_NRSACK_SUPPORTED 0x0027 +#define SCTP_PKTDROP_SUPPORTED 0x0028 /* * read-only options Modified: head/sys/netinet/sctp_input.c == --- head/sys/netinet/sctp_input.c Sun Aug 3 18:03:00 2014 (r269480) +++ head/sys/netinet/sctp_input.c Sun Aug 3 18:12:55 2014 (r269481) @@ -2788,6 +2788,7 @@ sctp_handle_cookie_echo(struct mbuf *m, inp-ecn_supported = (*inp_p)-ecn_supported; inp-prsctp_supported = (*inp_p)-prsctp_supported; inp-nrsack_supported = (*inp_p)-nrsack_supported; + inp-pktdrop_supported = (*inp_p)-pktdrop_supported; inp-partial_delivery_point = (*inp_p)-partial_delivery_point; inp-sctp_context = (*inp_p)-sctp_context; inp-local_strreset_support = (*inp_p)-local_strreset_support; Modified: head/sys/netinet/sctp_output.c == --- head/sys/netinet/sctp_output.c Sun Aug 3 18:03:00 2014 (r269480) +++ head/sys/netinet/sctp_output.c Sun Aug 3 18:12:55 2014 (r269481) @@ -4817,7 +4817,9 @@ sctp_send_initiate(struct sctp_inpcb *in if (stcb-asoc.prsctp_supported == 1) { pr_supported-chunk_types[num_ext++] = SCTP_FORWARD_CUM_TSN; } - pr_supported-chunk_types[num_ext++] = SCTP_PACKET_DROPPED; + if (stcb-asoc.pktdrop_supported == 1) { + pr_supported-chunk_types[num_ext++] = SCTP_PACKET_DROPPED; + } pr_supported-chunk_types[num_ext++] = SCTP_STREAM_RESET; if (!SCTP_BASE_SYSCTL(sctp_auth_disable)) { pr_supported-chunk_types[num_ext++] = SCTP_AUTHENTICATION; @@ -5920,7 +5922,10 @@ do_a_abort: ((asoc == NULL) (inp-prsctp_supported == 1))) { pr_supported-chunk_types[num_ext++] = SCTP_FORWARD_CUM_TSN; } - pr_supported-chunk_types[num_ext++] = SCTP_PACKET_DROPPED; + if (((asoc != NULL) (asoc-pktdrop_supported == 1)) || + ((asoc == NULL) (inp-pktdrop_supported == 1))) { + pr_supported-chunk_types[num_ext++] = SCTP_PACKET_DROPPED; + } pr_supported-chunk_types[num_ext++] = SCTP_STREAM_RESET; if (!SCTP_BASE_SYSCTL(sctp_auth_disable)) { pr_supported-chunk_types[num_ext++] = SCTP_AUTHENTICATION; @@ -11399,7 +11404,7 @@ sctp_send_packet_dropped(struct sctp_tcb } asoc = stcb-asoc; SCTP_TCB_LOCK_ASSERT(stcb); - if (asoc-peer_supports_pktdrop == 0) { + if (asoc-pktdrop_supported == 0) { /*- * peer must declare support before I send one. */ Modified: head/sys/netinet/sctp_pcb.c == --- head/sys/netinet/sctp_pcb.c Sun Aug 3 18:03:00 2014(r269480) +++ head/sys/netinet/sctp_pcb.c Sun Aug 3 18:12:55 2014(r269481) @@ -2486,6 +2486,7 @@
svn commit: r269482 - stable/10/lib/libc/stdio
Author: pfg Date: Sun Aug 3 18:28:10 2014 New Revision: 269482 URL: http://svnweb.freebsd.org/changeset/base/269482 Log: MFC r268926, r268930, r268983: Use a correct errno in freopen. Use EBADF instead of EINVAL when working around incorrect O_ACCMODE. Adjust errno on failed prepwrite. rewind: always clear error indicator as required by POSIX. Obtained from:Apple Inc. (Libc 997.90.3) Phabric: D442 Modified: stable/10/lib/libc/stdio/freopen.c stable/10/lib/libc/stdio/rewind.c stable/10/lib/libc/stdio/vfprintf.c stable/10/lib/libc/stdio/vfwprintf.c stable/10/lib/libc/stdio/wbuf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdio/freopen.c == --- stable/10/lib/libc/stdio/freopen.c Sun Aug 3 18:12:55 2014 (r269481) +++ stable/10/lib/libc/stdio/freopen.c Sun Aug 3 18:28:10 2014 (r269482) @@ -96,7 +96,7 @@ freopen(const char * __restrict file, co (oflags O_ACCMODE)) { fclose(fp); FUNLOCKFILE(fp); - errno = EINVAL; + errno = EBADF; return (NULL); } if (fp-_flags __SWR) Modified: stable/10/lib/libc/stdio/rewind.c == --- stable/10/lib/libc/stdio/rewind.c Sun Aug 3 18:12:55 2014 (r269481) +++ stable/10/lib/libc/stdio/rewind.c Sun Aug 3 18:28:10 2014 (r269482) @@ -53,9 +53,8 @@ rewind(FILE *fp) __sinit(); FLOCKFILE(fp); - if (_fseeko(fp, (off_t)0, SEEK_SET, 1) == 0) { - clearerr_unlocked(fp); + if (_fseeko(fp, (off_t)0, SEEK_SET, 1) == 0) errno = serrno; - } + clearerr_unlocked(fp); /* POSIX: clear stdio error regardless */ FUNLOCKFILE(fp); } Modified: stable/10/lib/libc/stdio/vfprintf.c == --- stable/10/lib/libc/stdio/vfprintf.c Sun Aug 3 18:12:55 2014 (r269481) +++ stable/10/lib/libc/stdio/vfprintf.c Sun Aug 3 18:28:10 2014 (r269482) @@ -455,8 +455,10 @@ __vfprintf(FILE *fp, locale_t locale, co return (__xvprintf(fp, fmt0, ap)); /* sorry, fprintf(read_only_file, ) returns EOF, not 0 */ - if (prepwrite(fp) != 0) + if (prepwrite(fp) != 0) { + errno = EBADF; return (EOF); + } convbuf = NULL; fmt = (char *)fmt0; Modified: stable/10/lib/libc/stdio/vfwprintf.c == --- stable/10/lib/libc/stdio/vfwprintf.cSun Aug 3 18:12:55 2014 (r269481) +++ stable/10/lib/libc/stdio/vfwprintf.cSun Aug 3 18:28:10 2014 (r269482) @@ -531,8 +531,10 @@ __vfwprintf(FILE *fp, locale_t locale, c /* sorry, fwprintf(read_only_file, L) returns WEOF, not 0 */ - if (prepwrite(fp) != 0) + if (prepwrite(fp) != 0) { + errno = EBADF; return (EOF); + } convbuf = NULL; fmt = (wchar_t *)fmt0; Modified: stable/10/lib/libc/stdio/wbuf.c == --- stable/10/lib/libc/stdio/wbuf.c Sun Aug 3 18:12:55 2014 (r269481) +++ stable/10/lib/libc/stdio/wbuf.c Sun Aug 3 18:28:10 2014 (r269482) @@ -36,6 +36,7 @@ static char sccsid[] = @(#)wbuf.c8.1 ( #include sys/cdefs.h __FBSDID($FreeBSD$); +#include errno.h #include stdio.h #include local.h @@ -59,8 +60,10 @@ __swbuf(int c, FILE *fp) * calls might wrap _w from negative to positive. */ fp-_w = fp-_lbfsize; - if (prepwrite(fp) != 0) + if (prepwrite(fp) != 0) { + errno = EBADF; return (EOF); + } c = (unsigned char)c; ORIENT(fp, -1); ___ svn-src-all@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: r269483 - stable/10/lib/libc/stdtime
Author: pfg Date: Sun Aug 3 18:31:52 2014 New Revision: 269483 URL: http://svnweb.freebsd.org/changeset/base/269483 Log: MFC r269124: strftime() xlocale cleanups. Replace fprintf_l with fputs when output is unformatted. Use locale_t in _conv() since it was using sprintf (now sprintf_l) Use locale_t on _yconv() since it calls _conv() Obtained from:Apple Inc. (Libc 997.90.3) CR: D482 Reviewed by: theraven Modified: stable/10/lib/libc/stdtime/strftime.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdtime/strftime.c == --- stable/10/lib/libc/stdtime/strftime.c Sun Aug 3 18:28:10 2014 (r269482) +++ stable/10/lib/libc/stdtime/strftime.c Sun Aug 3 18:31:52 2014 (r269483) @@ -46,10 +46,10 @@ __FBSDID($FreeBSD$); #include timelocal.h static char * _add(const char *, char *, const char *); -static char * _conv(int, const char *, char *, const char *); +static char * _conv(int, const char *, char *, const char *, locale_t); static char * _fmt(const char *, const struct tm *, char *, const char *, int *, locale_t); -static char * _yconv(int, int, int, int, char *, const char *); +static char * _yconv(int, int, int, int, char *, const char *, locale_t); extern char * tzname[]; @@ -101,16 +101,16 @@ strftime_l(char * __restrict s, size_t m if (warn != IN_NONE getenv(YEAR_2000_NAME) != NULL) { (void) fprintf_l(stderr, loc, \n); if (format == NULL) - (void) fprintf_l(stderr, loc, NULL strftime format ); + (void) fputs(NULL strftime format , stderr); else(void) fprintf_l(stderr, loc, strftime format \%s\ , format); - (void) fprintf_l(stderr, loc, yields only two digits of years in ); + (void) fputs(yields only two digits of years in , stderr); if (warn == IN_SOME) - (void) fprintf_l(stderr, loc, some locales); + (void) fputs(some locales, stderr); else if (warn == IN_THIS) - (void) fprintf_l(stderr, loc, the current locale); - else(void) fprintf_l(stderr, loc, all locales); - (void) fprintf_l(stderr, loc, \n); + (void) fputs(the current locale, stderr); + else(void) fputs(all locales, stderr); + (void) fputs(\n, stderr); } #endif /* !defined NO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU */ if (p == s + maxsize) @@ -183,7 +183,7 @@ label: * (ado, 1993-05-24) */ pt = _yconv(t-tm_year, TM_YEAR_BASE, 1, 0, - pt, ptlim); + pt, ptlim, loc); continue; case 'c': { @@ -200,8 +200,9 @@ label: pt = _fmt(%m/%d/%y, t, pt, ptlim, warnp, loc); continue; case 'd': - pt = _conv(t-tm_mday, fmt_padding[PAD_FMT_DAYOFMONTH][PadIndex], - pt, ptlim); + pt = _conv(t-tm_mday, + fmt_padding[PAD_FMT_DAYOFMONTH][PadIndex], + pt, ptlim, loc); continue; case 'E': if (Ealternative || Oalternative) @@ -227,24 +228,26 @@ label: goto label; case 'e': pt = _conv(t-tm_mday, - fmt_padding[PAD_FMT_SDAYOFMONTH][PadIndex], pt, ptlim); + fmt_padding[PAD_FMT_SDAYOFMONTH][PadIndex], + pt, ptlim, loc); continue; case 'F': pt = _fmt(%Y-%m-%d, t, pt, ptlim, warnp, loc); continue; case 'H': pt = _conv(t-tm_hour, fmt_padding[PAD_FMT_HMS][PadIndex], - pt, ptlim); + pt, ptlim, loc); continue; case 'I': pt = _conv((t-tm_hour % 12) ? (t-tm_hour % 12) : 12, fmt_padding[PAD_FMT_HMS][PadIndex], - pt, ptlim); +
svn commit: r269484 - in stable/10: lib/libc/regex sys/sys
Author: pfg Date: Sun Aug 3 18:39:11 2014 New Revision: 269484 URL: http://svnweb.freebsd.org/changeset/base/269484 Log: MFC r268066: regex(3): Add support for \ and \ word delimiters Solaris and other OSs have support for \ and \ as word delimiters in utilities like sed(1). These are useful to have for general compatiblity with Solaris but should be avoided for portability with other systems, including the traditional BSDs. Bump __FreeBSD_version as this is likely to affect some userland utilities. Reference: https://www.illumos.org/issues/516 PR: bin/153257 Obtained from:Illumos Modified: stable/10/lib/libc/regex/re_format.7 stable/10/lib/libc/regex/regcomp.c stable/10/sys/sys/param.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/regex/re_format.7 == --- stable/10/lib/libc/regex/re_format.7Sun Aug 3 18:31:52 2014 (r269483) +++ stable/10/lib/libc/regex/re_format.7Sun Aug 3 18:39:11 2014 (r269484) @@ -36,7 +36,7 @@ .\@(#)re_format.7 8.3 (Berkeley) 3/20/94 .\ $FreeBSD$ .\ -.Dd March 20, 1994 +.Dd June 30, 2014 .Dt RE_FORMAT 7 .Os .Sh NAME @@ -314,6 +314,13 @@ compatible with but not specified by .St -p1003.2 , and should be used with caution in software intended to be portable to other systems. +The additional word delimiters +.Ql \e +and +.Ql \e +are provided to ease compatibility with traditional +.Xr svr4 4 +systems but are not portable and should be avoided. .Pp In the event that an RE could match more than one substring of a given string, Modified: stable/10/lib/libc/regex/regcomp.c == --- stable/10/lib/libc/regex/regcomp.c Sun Aug 3 18:31:52 2014 (r269483) +++ stable/10/lib/libc/regex/regcomp.c Sun Aug 3 18:39:11 2014 (r269484) @@ -412,7 +412,17 @@ p_ere_exp(struct parse *p) case '\\': (void)REQUIRE(MORE(), REG_EESCAPE); wc = WGETNEXT(); - ordinary(p, wc); + switch (wc) { + case '': + EMIT(OBOW, 0); + break; + case '': + EMIT(OEOW, 0); + break; + default: + ordinary(p, wc); + break; + } break; case '{': /* okay as ordinary except if digit follows */ (void)REQUIRE(!MORE() || !isdigit((uch)PEEK()), REG_BADRPT); @@ -569,6 +579,12 @@ p_simp_re(struct parse *p, case '[': p_bracket(p); break; + case BACKSL|'': + EMIT(OBOW, 0); + break; + case BACKSL|'': + EMIT(OEOW, 0); + break; case BACKSL|'{': SETERROR(REG_BADRPT); break; Modified: stable/10/sys/sys/param.h == --- stable/10/sys/sys/param.h Sun Aug 3 18:31:52 2014(r269483) +++ stable/10/sys/sys/param.h Sun Aug 3 18:39:11 2014(r269484) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000712 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000713 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, ___ svn-src-all@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: r269485 - in head: . share/man/man9 sys/amd64/amd64 sys/arm/arm sys/i386/i386 sys/i386/xen sys/mips/mips sys/powerpc/aim sys/powerpc/booke sys/powerpc/powerpc sys/sparc64/sparc64 sys/vm
Author: alc Date: Sun Aug 3 20:40:51 2014 New Revision: 269485 URL: http://svnweb.freebsd.org/changeset/base/269485 Log: Retire pmap_change_wiring(). We have never used it to wire virtual pages. We continue to use pmap_enter() for that. For unwiring virtual pages, we now use pmap_unwire(), which unwires a range of virtual addresses instead of a single virtual page. Sponsored by: EMC / Isilon Storage Division Deleted: head/share/man/man9/pmap_change_wiring.9 Modified: head/ObsoleteFiles.inc head/share/man/man9/Makefile head/share/man/man9/pmap.9 head/sys/amd64/amd64/pmap.c head/sys/arm/arm/pmap-v6.c head/sys/arm/arm/pmap.c head/sys/i386/i386/pmap.c head/sys/i386/xen/pmap.c head/sys/mips/mips/pmap.c head/sys/powerpc/aim/mmu_oea.c head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/booke/pmap.c head/sys/powerpc/powerpc/mmu_if.m head/sys/powerpc/powerpc/pmap_dispatch.c head/sys/sparc64/sparc64/pmap.c head/sys/vm/pmap.h Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Sun Aug 3 18:39:11 2014(r269484) +++ head/ObsoleteFiles.inc Sun Aug 3 20:40:51 2014(r269485) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20140803: Remove an obsolete man page +OLD_FILES+=usr/share/man/man9/pmap_change_wiring.9.gz # 20140728: libsbuf restored to old version. OLD_LIBS+=lib/libsbuf.so.7 # 20140728: Remove an obsolete man page Modified: head/share/man/man9/Makefile == --- head/share/man/man9/MakefileSun Aug 3 18:39:11 2014 (r269484) +++ head/share/man/man9/MakefileSun Aug 3 20:40:51 2014 (r269485) @@ -199,7 +199,6 @@ MAN=accept_filter.9 \ physio.9 \ pmap.9 \ pmap_activate.9 \ - pmap_change_wiring.9 \ pmap_clear_modify.9 \ pmap_copy.9 \ pmap_enter.9 \ Modified: head/share/man/man9/pmap.9 == --- head/share/man/man9/pmap.9 Sun Aug 3 18:39:11 2014(r269484) +++ head/share/man/man9/pmap.9 Sun Aug 3 20:40:51 2014(r269485) @@ -25,7 +25,7 @@ .\ .\ $FreeBSD$ .\ -.Dd July 18, 2014 +.Dd August 3, 2014 .Dt PMAP 9 .Os .Sh NAME @@ -89,7 +89,6 @@ operation. .Sh SEE ALSO .Xr pmap 9 , .Xr pmap_activate 9 , -.Xr pmap_change_wiring 9 , .Xr pmap_clear_modify 9 , .Xr pmap_copy 9 , .Xr pmap_copy_page 9 , Modified: head/sys/amd64/amd64/pmap.c == --- head/sys/amd64/amd64/pmap.c Sun Aug 3 18:39:11 2014(r269484) +++ head/sys/amd64/amd64/pmap.c Sun Aug 3 20:40:51 2014(r269485) @@ -4693,58 +4693,6 @@ pmap_object_init_pt(pmap_t pmap, vm_offs } /* - * Routine:pmap_change_wiring - * Function: Change the wiring attribute for a map/virtual-address - * pair. - * In/out conditions: - * The mapping must already exist in the pmap. - */ -void -pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired) -{ - pd_entry_t *pde; - pt_entry_t *pte; - boolean_t pv_lists_locked; - - pv_lists_locked = FALSE; - - /* -* Wiring is not a hardware characteristic so there is no need to -* invalidate TLB. -*/ -retry: - PMAP_LOCK(pmap); - pde = pmap_pde(pmap, va); - if ((*pde PG_PS) != 0) { - if (!wired != ((*pde PG_W) == 0)) { - if (!pv_lists_locked) { - pv_lists_locked = TRUE; - if (!rw_try_rlock(pvh_global_lock)) { - PMAP_UNLOCK(pmap); - rw_rlock(pvh_global_lock); - goto retry; - } - } - if (!pmap_demote_pde(pmap, pde, va)) - panic(pmap_change_wiring: demotion failed); - } else - goto out; - } - pte = pmap_pde_to_pte(pde, va); - if (wired (*pte PG_W) == 0) { - pmap-pm_stats.wired_count++; - atomic_set_long(pte, PG_W); - } else if (!wired (*pte PG_W) != 0) { - pmap-pm_stats.wired_count--; - atomic_clear_long(pte, PG_W); - } -out: - if (pv_lists_locked) - rw_runlock(pvh_global_lock); - PMAP_UNLOCK(pmap); -} - -/* * Clear the wired attribute from the mappings for the specified range of * addresses in the given pmap. Every valid mapping within that range * must have the wired attribute set. In contrast, invalid mappings Modified: head/sys/arm/arm/pmap-v6.c
svn commit: r269487 - head/sbin/geom/class/part
Author: issyl0 (doc committer) Date: Sun Aug 3 21:54:22 2014 New Revision: 269487 URL: http://svnweb.freebsd.org/changeset/base/269487 Log: Add generic list, status, load and unload docs to gpart(8) - In the style of gmirror(8). PR: docs/191534 Reviewed by: gavin Modified: head/sbin/geom/class/part/gpart.8 Modified: head/sbin/geom/class/part/gpart.8 == --- head/sbin/geom/class/part/gpart.8 Sun Aug 3 21:37:12 2014 (r269486) +++ head/sbin/geom/class/part/gpart.8 Sun Aug 3 21:54:22 2014 (r269487) @@ -24,7 +24,7 @@ .\ .\ $FreeBSD$ .\ -.Dd July 1, 2014 +.Dd August 3, 2014 .Dt GPART 8 .Os .Sh NAME @@ -129,6 +129,14 @@ .Op Fl f Ar flags .Ar geom .\ +.Nm +.Cm list +.Nm +.Cm status +.Nm +.Cm load +.Nm +.Cm unload .Sh DESCRIPTION The .Nm @@ -467,6 +475,18 @@ See the section entitled below for a discussion about its use. .El +.It Cm list +See +.Xr geom 8 . +.It Cm status +See +.Xr geom 8 . +.It Cm load +See +.Xr geom 8 . +.It Cm unload +See +.Xr geom 8 . .El .Sh PARTITIONING SCHEMES Several partitioning schemes are supported by the ___ svn-src-all@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: r269488 - head/sys/dev/pccbb
Author: gavin Date: Sun Aug 3 21:56:53 2014 New Revision: 269488 URL: http://svnweb.freebsd.org/changeset/base/269488 Log: For reasons which are not clear, r254263 broke some PCMCIA and CardBus bridges in strange ways, either rendering them unable to detect insertion and removal events, or possibly unable to read from the device behind the bridge. This fixes at least one laptop, a Toshiba Tecra M5 with a Texas Instruments PCxx12 (d=0x8039 v=0c104c) bridge. The very similar Tecra M9 has the same bridge, but worked fine without this change. The bridge chip has no I/O port BAR, and there is nothing in the spec to suggest I/O decoding should be enabled; however enabling it fixes the issue. Add an XXX comment to this effect. Discussed with: jhb, imp MFC after:2 weeks Modified: head/sys/dev/pccbb/pccbb_pci.c Modified: head/sys/dev/pccbb/pccbb_pci.c == --- head/sys/dev/pccbb/pccbb_pci.c Sun Aug 3 21:54:22 2014 (r269487) +++ head/sys/dev/pccbb/pccbb_pci.c Sun Aug 3 21:56:53 2014 (r269488) @@ -481,6 +481,8 @@ cbb_chipinit(struct cbb_softc *sc) /* Enable memory access */ pci_enable_busmaster(sc-dev); + /* XXX: This should not be necessary, but some chipsets require it */ + PCI_MASK_CONFIG(sc-dev, PCIR_COMMAND, | PCIM_CMD_PORTEN, 2); /* disable Legacy IO */ switch (sc-chipset) { ___ svn-src-all@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: r269489 - head/sys/kern
Author: peter Date: Sun Aug 3 22:37:21 2014 New Revision: 269489 URL: http://svnweb.freebsd.org/changeset/base/269489 Log: Partial revert of r262867. r262867 was described as fixing socket buffer checks for SOCK_SEQPACKET, but also changed one of the SOCK_DGRAM code paths to use the new sbappendaddr_nospacecheck_locked() function. This lead to SOCK_DGRAM bypassing socket buffer limits. Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c == --- head/sys/kern/uipc_usrreq.c Sun Aug 3 21:56:53 2014(r269488) +++ head/sys/kern/uipc_usrreq.c Sun Aug 3 22:37:21 2014(r269489) @@ -897,7 +897,7 @@ uipc_send(struct socket *so, int flags, from = sun_noname; so2 = unp2-unp_socket; SOCKBUF_LOCK(so2-so_rcv); - if (sbappendaddr_nospacecheck_locked(so2-so_rcv, from, m, + if (sbappendaddr_locked(so2-so_rcv, from, m, control)) { sorwakeup_locked(so2); m = NULL; ___ svn-src-all@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: r269490 - stable/10/sys/kern
Author: peter Date: Sun Aug 3 22:59:47 2014 New Revision: 269490 URL: http://svnweb.freebsd.org/changeset/base/269490 Log: Insta-MFC r269489: partial revert of r262867 which was MFC'ed as r263820. Don't ignore sndbuf/rcvbuf limits for SOCK_DGRAM sockets. This appears to be an edit error or patch fuzz mismatch. Modified: stable/10/sys/kern/uipc_usrreq.c Modified: stable/10/sys/kern/uipc_usrreq.c == --- stable/10/sys/kern/uipc_usrreq.cSun Aug 3 22:37:21 2014 (r269489) +++ stable/10/sys/kern/uipc_usrreq.cSun Aug 3 22:59:47 2014 (r269490) @@ -897,7 +897,7 @@ uipc_send(struct socket *so, int flags, from = sun_noname; so2 = unp2-unp_socket; SOCKBUF_LOCK(so2-so_rcv); - if (sbappendaddr_nospacecheck_locked(so2-so_rcv, from, m, + if (sbappendaddr_locked(so2-so_rcv, from, m, control)) { sorwakeup_locked(so2); m = NULL; ___ svn-src-all@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: r269491 - stable/10/lib/libc/stdlib
Author: pfg Date: Mon Aug 4 00:51:57 2014 New Revision: 269491 URL: http://svnweb.freebsd.org/changeset/base/269491 Log: MFC r268945: Fix hdestroy() compliance issue. The hcreate(3) implementation and related functions we inherited from NetBSD used to free() the key value, something that is not supported by the standard implementation. This would cause a segmentation fault when attempting to run the examples from the opengroup and linux manpages. There is no need to bump the __FreeBSD_version as we have always claimed XPG4.2 compliance but if some reference is required, the bump for r269484 can be used. Reference: http://bugs.dragonflybsd.org/issues/1398 Modified: stable/10/lib/libc/stdlib/hcreate.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdlib/hcreate.c == --- stable/10/lib/libc/stdlib/hcreate.c Sun Aug 3 22:59:47 2014 (r269490) +++ stable/10/lib/libc/stdlib/hcreate.c Mon Aug 4 00:51:57 2014 (r269491) @@ -142,7 +142,6 @@ hdestroy(void) while (!SLIST_EMPTY(htable[idx])) { ie = SLIST_FIRST(htable[idx]); SLIST_REMOVE_HEAD(htable[idx], link); - free(ie-ent.key); free(ie); } } ___ svn-src-all@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: r269492 - head/sys/net
Author: mav Date: Mon Aug 4 00:58:12 2014 New Revision: 269492 URL: http://svnweb.freebsd.org/changeset/base/269492 Log: Improve locking of multicast addresses in VLAN and LAGG interfaces. This fixes several scenarios of reproducible panics, cause by races between multicast address changes and interface destruction. MFC after:2 weeks Modified: head/sys/net/if_lagg.c head/sys/net/if_lagg.h head/sys/net/if_vlan.c Modified: head/sys/net/if_lagg.c == --- head/sys/net/if_lagg.c Mon Aug 4 00:51:57 2014(r269491) +++ head/sys/net/if_lagg.c Mon Aug 4 00:58:12 2014(r269492) @@ -1217,35 +1217,39 @@ lagg_ether_cmdmulti(struct lagg_port *lp struct ifnet *ifp = lp-lp_ifp; struct ifnet *scifp = sc-sc_ifp; struct lagg_mc *mc; - struct ifmultiaddr *ifma, *rifma = NULL; - struct sockaddr_dl sdl; + struct ifmultiaddr *ifma; int error; LAGG_WLOCK_ASSERT(sc); - link_init_sdl(ifp, (struct sockaddr *)sdl, IFT_ETHER); - sdl.sdl_alen = ETHER_ADDR_LEN; - if (set) { + IF_ADDR_WLOCK(scifp); TAILQ_FOREACH(ifma, scifp-if_multiaddrs, ifma_link) { if (ifma-ifma_addr-sa_family != AF_LINK) continue; - bcopy(LLADDR((struct sockaddr_dl *)ifma-ifma_addr), - LLADDR(sdl), ETHER_ADDR_LEN); - - error = if_addmulti(ifp, (struct sockaddr *)sdl, rifma); - if (error) - return (error); mc = malloc(sizeof(struct lagg_mc), M_DEVBUF, M_NOWAIT); - if (mc == NULL) + if (mc == NULL) { + IF_ADDR_WUNLOCK(scifp); return (ENOMEM); - mc-mc_ifma = rifma; + } + bcopy(ifma-ifma_addr, mc-mc_addr, + ifma-ifma_addr-sa_len); + mc-mc_addr.sdl_index = ifp-if_index; + mc-mc_ifma = NULL; SLIST_INSERT_HEAD(lp-lp_mc_head, mc, mc_entries); } + IF_ADDR_WUNLOCK(scifp); + SLIST_FOREACH (mc, lp-lp_mc_head, mc_entries) { + error = if_addmulti(ifp, + (struct sockaddr *)mc-mc_addr, mc-mc_ifma); + if (error) + return (error); + } } else { while ((mc = SLIST_FIRST(lp-lp_mc_head)) != NULL) { SLIST_REMOVE(lp-lp_mc_head, mc, lagg_mc, mc_entries); - if_delmulti_ifma(mc-mc_ifma); + if (mc-mc_ifma !lp-lp_detaching) + if_delmulti_ifma(mc-mc_ifma); free(mc, M_DEVBUF); } } Modified: head/sys/net/if_lagg.h == --- head/sys/net/if_lagg.h Mon Aug 4 00:51:57 2014(r269491) +++ head/sys/net/if_lagg.h Mon Aug 4 00:58:12 2014(r269492) @@ -174,6 +174,7 @@ struct lagg_lb { }; struct lagg_mc { + struct sockaddr_dl mc_addr; struct ifmultiaddr *mc_ifma; SLIST_ENTRY(lagg_mc)mc_entries; }; Modified: head/sys/net/if_vlan.c == --- head/sys/net/if_vlan.c Mon Aug 4 00:51:57 2014(r269491) +++ head/sys/net/if_vlan.c Mon Aug 4 00:58:12 2014(r269492) @@ -460,48 +460,48 @@ trunk_destroy(struct ifvlantrunk *trunk) * traffic that it doesn't really want, which ends up being discarded * later by the upper protocol layers. Unfortunately, there's no way * to avoid this: there really is only one physical interface. - * - * XXX: There is a possible race here if more than one thread is - * modifying the multicast state of the vlan interface at the same time. */ static int vlan_setmulti(struct ifnet *ifp) { struct ifnet*ifp_p; - struct ifmultiaddr *ifma, *rifma = NULL; + struct ifmultiaddr *ifma; struct ifvlan *sc; struct vlan_mc_entry*mc; int error; - /*VLAN_LOCK_ASSERT();*/ - /* Find the parent. */ sc = ifp-if_softc; + TRUNK_LOCK_ASSERT(TRUNK(sc)); ifp_p = PARENT(sc); CURVNET_SET_QUIET(ifp_p-if_vnet); /* First, remove any existing filter entries. */ while ((mc = SLIST_FIRST(sc-vlan_mc_listhead)) != NULL) { - error = if_delmulti(ifp_p, (struct sockaddr *)mc-mc_addr); - if (error) - return (error);
svn commit: r269493 - stable/10/sys/fs/nullfs
Author: kib Date: Mon Aug 4 01:10:47 2014 New Revision: 269493 URL: http://svnweb.freebsd.org/changeset/base/269493 Log: MFC r269187: Assert that nullfs vnode has VV_ROOT set whenever lower vnode has. Assert that dotdot lookup on the root vnode is not performed. Modified: stable/10/sys/fs/nullfs/null_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nullfs/null_vnops.c == --- stable/10/sys/fs/nullfs/null_vnops.cMon Aug 4 00:58:12 2014 (r269492) +++ stable/10/sys/fs/nullfs/null_vnops.cMon Aug 4 01:10:47 2014 (r269493) @@ -372,6 +372,10 @@ null_lookup(struct vop_lookup_args *ap) */ ldvp = NULLVPTOLOWERVP(dvp); vp = lvp = NULL; + KASSERT((ldvp-v_vflag VV_ROOT) == 0 || + ((dvp-v_vflag VV_ROOT) != 0 (flags ISDOTDOT) == 0), + (ldvp %p fl %#x dvp %p fl %#x flags %#x, ldvp, ldvp-v_vflag, +dvp, dvp-v_vflag, flags)); error = VOP_LOOKUP(ldvp, lvp, cnp); if (error == EJUSTRETURN (flags ISLASTCN) (dvp-v_mount-mnt_flag MNT_RDONLY) ___ svn-src-all@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: r269494 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: kib Date: Mon Aug 4 01:12:49 2014 New Revision: 269494 URL: http://svnweb.freebsd.org/changeset/base/269494 Log: MFC r269189: Initialize zfs vnode v_hash when the vnode is allocated. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c == --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Aug 4 01:10:47 2014(r269493) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Aug 4 01:12:49 2014(r269494) @@ -2076,8 +2076,6 @@ zfs_vget(vfs_t *vfsp, ino_t ino, int fla err = vn_lock(*vpp, flags); if (err != 0) *vpp = NULL; - else - (*vpp)-v_hash = ino; return (err); } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c == --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon Aug 4 01:10:47 2014(r269493) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon Aug 4 01:12:49 2014(r269494) @@ -1228,9 +1228,10 @@ again: vnode_t *vp = ZTOV(zp); err = insmntque(vp, zfsvfs-z_vfs); - if (err == 0) + if (err == 0) { + vp-v_hash = obj_num; VOP_UNLOCK(vp, 0); - else { + } else { zp-z_vnode = NULL; zfs_znode_dmu_fini(zp); zfs_znode_free(zp); ___ svn-src-all@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: r269495 - in stable/10/sys: dev/md kern
Author: kib Date: Mon Aug 4 01:14:27 2014 New Revision: 269495 URL: http://svnweb.freebsd.org/changeset/base/269495 Log: MFC r269190: For md(4), posix shm(3) and tmpfs(5), free swap space used by paged in dirty page, which is written by the process. Modified: stable/10/sys/dev/md/md.c stable/10/sys/kern/uipc_shm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/md/md.c == --- stable/10/sys/dev/md/md.c Mon Aug 4 01:12:49 2014(r269494) +++ stable/10/sys/dev/md/md.c Mon Aug 4 01:14:27 2014(r269495) @@ -895,8 +895,10 @@ mdstart_swap(struct md_s *sc, struct bio else vm_page_activate(m); vm_page_unlock(m); - if (bp-bio_cmd == BIO_WRITE) + if (bp-bio_cmd == BIO_WRITE) { vm_page_dirty(m); + vm_pager_page_unswapped(m); + } /* Actions on further pages start at offset 0 */ p += PAGE_SIZE - offs; Modified: stable/10/sys/kern/uipc_shm.c == --- stable/10/sys/kern/uipc_shm.c Mon Aug 4 01:12:49 2014 (r269494) +++ stable/10/sys/kern/uipc_shm.c Mon Aug 4 01:14:27 2014 (r269495) @@ -199,6 +199,7 @@ uiomove_object_page(vm_object_t obj, siz if (uio-uio_rw == UIO_WRITE error == 0) { VM_OBJECT_WLOCK(obj); vm_page_dirty(m); + vm_pager_page_unswapped(m); VM_OBJECT_WUNLOCK(obj); } vm_page_lock(m); ___ svn-src-all@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: r269496 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: kib Date: Mon Aug 4 01:16:08 2014 New Revision: 269496 URL: http://svnweb.freebsd.org/changeset/base/269496 Log: MFC r269189: Initialize zfs vnode v_hash when the vnode is allocated. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Aug 4 01:14:27 2014(r269495) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Aug 4 01:16:08 2014(r269496) @@ -2077,8 +2077,6 @@ zfs_vget(vfs_t *vfsp, ino_t ino, int fla err = vn_lock(*vpp, flags); if (err != 0) *vpp = NULL; - else - (*vpp)-v_hash = ino; return (err); } Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon Aug 4 01:14:27 2014(r269495) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon Aug 4 01:16:08 2014(r269496) @@ -1228,9 +1228,10 @@ again: vnode_t *vp = ZTOV(zp); err = insmntque(vp, zfsvfs-z_vfs); - if (err == 0) + if (err == 0) { + vp-v_hash = obj_num; VOP_UNLOCK(vp, 0); - else { + } else { zp-z_vnode = NULL; zfs_znode_dmu_fini(zp); zfs_znode_free(zp); ___ svn-src-all@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: r269497 - in head/sys/cam: ctl scsi
Author: mav Date: Mon Aug 4 01:16:20 2014 New Revision: 269497 URL: http://svnweb.freebsd.org/changeset/base/269497 Log: Add support for Windows dialect of EXTENDED COPY command, aka Microsoft ODX. This allows to avoid extra network traffic when copying files on NTFS iSCSI disks within one storage host by drag'n'dropping them in Windows Explorer of Windows 8/2012. It should also accelerate Hyper-V VM operations, etc. MFC after:2 weeks Sponsored by: iXsystems, Inc. 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/ctl/ctl_ser_table.c head/sys/cam/ctl/ctl_tpc.c head/sys/cam/scsi/scsi_all.c head/sys/cam/scsi/scsi_all.h Modified: head/sys/cam/ctl/ctl.c == --- head/sys/cam/ctl/ctl.c Mon Aug 4 01:16:08 2014(r269496) +++ head/sys/cam/ctl/ctl.c Mon Aug 4 01:16:20 2014(r269497) @@ -1023,6 +1023,7 @@ ctl_init(void) STAILQ_INIT(softc-port_list); STAILQ_INIT(softc-be_list); STAILQ_INIT(softc-io_pools); + ctl_tpc_init(softc); if (ctl_pool_create(softc, CTL_POOL_INTERNAL, CTL_POOL_ENTRIES_INTERNAL, internal_pool)!= 0){ @@ -1170,6 +1171,7 @@ ctl_shutdown(void) mtx_destroy(softc-queue_lock); #endif + ctl_tpc_shutdown(softc); mtx_destroy(softc-pool_lock); mtx_destroy(softc-ctl_lock); @@ -4596,7 +4598,7 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft TAILQ_INIT(lun-ooa_queue); TAILQ_INIT(lun-blocked_queue); STAILQ_INIT(lun-error_list); - ctl_tpc_init(lun); + ctl_tpc_lun_init(lun); /* * Initialize the mode page index. @@ -4748,7 +4750,7 @@ ctl_free_lun(struct ctl_lun *lun) atomic_subtract_int(lun-be_lun-be-num_luns, 1); lun-be_lun-lun_shutdown(lun-be_lun-be_lun); - ctl_tpc_shutdown(lun); + ctl_tpc_lun_shutdown(lun); mtx_destroy(lun-lun_lock); free(lun-lun_devid, M_CTL); if (lun-flags CTL_LUN_MALLOCED) Modified: head/sys/cam/ctl/ctl_cmd_table.c == --- head/sys/cam/ctl/ctl_cmd_table.cMon Aug 4 01:16:08 2014 (r269496) +++ head/sys/cam/ctl/ctl_cmd_table.cMon Aug 4 01:16:20 2014 (r269497) @@ -248,10 +248,18 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* 10 POPULATE TOKEN */ -{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, +{ctl_populate_token, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_SLUN | + CTL_FLAG_DATA_OUT, + CTL_LUN_PAT_NONE, + 16, { 0x10, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, /* 11 WRITE USING TOKEN */ -{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, +{ctl_write_using_token, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_SLUN | + CTL_FLAG_DATA_OUT, + CTL_LUN_PAT_NONE, + 16, { 0x11, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, /* 12 */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, @@ -334,10 +342,18 @@ const struct ctl_cmd_entry ctl_cmd_table {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, /* 07 RECEIVE ROD TOKEN INFORMATION */ -{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, +{ctl_receive_rod_token_information, CTL_SERIDX_RD_CAP, + CTL_CMD_FLAG_OK_ON_BOTH | + CTL_FLAG_DATA_IN, + CTL_LUN_PAT_NONE, + 16, {0x07, 0xff, 0xff, 0xff, 0xff, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, /* 08 REPORT ALL ROD TOKENS */ -{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, +{ctl_report_all_rod_tokens, CTL_SERIDX_RD_CAP, + CTL_CMD_FLAG_OK_ON_BOTH | + CTL_FLAG_DATA_IN, + CTL_LUN_PAT_NONE, + 16, {0x08, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, }; /* 9E SERVICE ACTION IN(16) */ Modified: head/sys/cam/ctl/ctl_private.h == --- head/sys/cam/ctl/ctl_private.h Mon Aug 4 01:16:08 2014 (r269496) +++ head/sys/cam/ctl/ctl_private.h Mon Aug 4 01:16:20 2014 (r269497) @@ -422,6 +422,7 @@ struct ctl_thread { STAILQ_HEAD(, ctl_io_hdr) isc_queue; }; +struct tpc_token; struct ctl_softc { struct mtx ctl_lock; struct cdev *dev; @@ -460,6 +461,8 @@ struct ctl_softc { time_t last_print_jiffies; uint32_t skipped_prints; struct ctl_thread threads[CTL_MAX_THREADS]; + TAILQ_HEAD(tpc_tokens, tpc_token) tpc_tokens; + struct callout tpc_timeout; }; #ifdef _KERNEL @@ -500,8 +503,10 @@ int ctl_report_supported_tmf(struct ctl_ int ctl_report_timestamp(struct ctl_scsiio *ctsio); int ctl_isc(struct ctl_scsiio *ctsio); -void ctl_tpc_init(struct ctl_lun *lun); -void
Re: svn commit: r268943 - in head: include lib/libc/stdlib
On Aug 3, 2014, at 9:39 AM, Pedro Giffuni p...@freebsd.org wrote: Il giorno 03/ago/2014, alle ore 09:27, Warner Losh i...@bsdimp.com ha scritto: On Jul 21, 2014, at 12:51 PM, Pedro Giffuni p...@freebsd.org wrote: Il giorno 21/lug/2014, alle ore 11:42, Bruce Simpson b...@fastmail.net ha scritto: On 21/07/2014 16:22, Pedro F. Giffuni wrote: ] Log: Add re-entrant versions of the hash functions based on the GNU api. What, if anything, can be done about qsort_r() API incompatibility? qsort_r is non-standard and we did it first, plus we will want to stay compatible with Apple :). I guess we could do some ugly parameter swapping in the case where _GNU_SOURCE is defined, but I won’t volunteer to do that. Are there any ABI considerations for the change? I would keep the qsort_r() ABI unchanged and add a GNU-compatible version that is used only when _GNU_SOURCE (but not _BSD_SOURCE) is defined. This would already be pretty messy by itself because some portable code may define _GNU_SOURCE but still may try to use the Apple/BSD interface under another #ifdef. Perhaps it’s just better to leave our headers alone and let the end-users do the wrapping. If there’s no ABI change, then I don’t care what we do about a non-standard API. However, once we’ve made an API public, standard or do, we have to support that ABI essentially forever when libc is involved. Warner signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r269498 - in stable/10: share/man/man4 share/man/man5 share/man/man9 usr.bin/sort
Author: gjb Date: Mon Aug 4 03:59:48 2014 New Revision: 269498 URL: http://svnweb.freebsd.org/changeset/base/269498 Log: MFC r269289, r269290, r269291, r269292, r269293: r269289: sort(1): Remove trailing '.' from See Also section. r269290: acpi_wmi(4): Remove trailing comma from standalone Xref. r269291: hptiop(4): Remove trailing comma from ending Xref. r269292: pf.conf(5): Remove trailing comma from ending Xref. r269293: kernel_mount(9): Remove trailing comma from ending Xref. Sponsored by: The FreeBSD Foundation Modified: stable/10/share/man/man4/acpi_wmi.4 stable/10/share/man/man4/hptiop.4 stable/10/share/man/man5/pf.conf.5 stable/10/share/man/man9/kernel_mount.9 stable/10/usr.bin/sort/sort.1.in Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/acpi_wmi.4 == --- stable/10/share/man/man4/acpi_wmi.4 Mon Aug 4 01:16:20 2014 (r269497) +++ stable/10/share/man/man4/acpi_wmi.4 Mon Aug 4 03:59:48 2014 (r269498) @@ -74,7 +74,7 @@ GUID IN {8F1F6435-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NOBI .Ed .Sh SEE ALSO -.Xr acpi 4 , +.Xr acpi 4 .Sh HISTORY The .Nm Modified: stable/10/share/man/man4/hptiop.4 == --- stable/10/share/man/man4/hptiop.4 Mon Aug 4 01:16:20 2014 (r269497) +++ stable/10/share/man/man4/hptiop.4 Mon Aug 4 03:59:48 2014 (r269498) @@ -126,7 +126,7 @@ The driver has only been tested on the i386 and amd64 platforms. .Sh SEE ALSO .Xr cam 4 , -.Xr hptmv 4 , +.Xr hptmv 4 .Sh HISTORY The .Nm Modified: stable/10/share/man/man5/pf.conf.5 == --- stable/10/share/man/man5/pf.conf.5 Mon Aug 4 01:16:20 2014 (r269497) +++ stable/10/share/man/man5/pf.conf.5 Mon Aug 4 03:59:48 2014 (r269498) @@ -3058,7 +3058,7 @@ Service name database. .Xr services 5 , .Xr ftp-proxy 8 , .Xr pfctl 8 , -.Xr pflogd 8 , +.Xr pflogd 8 .Sh HISTORY The .Nm Modified: stable/10/share/man/man9/kernel_mount.9 == --- stable/10/share/man/man9/kernel_mount.9 Mon Aug 4 01:16:20 2014 (r269497) +++ stable/10/share/man/man9/kernel_mount.9 Mon Aug 4 03:59:48 2014 (r269498) @@ -194,7 +194,7 @@ must come in pairs, e.g., .Ed .Sh SEE ALSO .Xr VFS 9 , -.Xr VFS_MOUNT 9 , +.Xr VFS_MOUNT 9 .Sh HISTORY The .Fn kernel_mount Modified: stable/10/usr.bin/sort/sort.1.in == --- stable/10/usr.bin/sort/sort.1.inMon Aug 4 01:16:20 2014 (r269497) +++ stable/10/usr.bin/sort/sort.1.inMon Aug 4 03:59:48 2014 (r269498) @@ -581,7 +581,7 @@ An error occurred. .Sh SEE ALSO .Xr comm 1 , .Xr join 1 , -.Xr uniq 1 . +.Xr uniq 1 .Sh STANDARDS The .Nm ___ svn-src-all@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: r269499 - in stable/9/share/man: man4 man9
Author: gjb Date: Mon Aug 4 04:00:48 2014 New Revision: 269499 URL: http://svnweb.freebsd.org/changeset/base/269499 Log: MFC r269290, r269291, r269293: r269290: acpi_wmi(4): Remove trailing comma from standalone Xref. r269291: hptiop(4): Remove trailing comma from ending Xref. r269293: kernel_mount(9): Remove trailing comma from ending Xref. Sponsored by: The FreeBSD Foundation Modified: stable/9/share/man/man4/acpi_wmi.4 stable/9/share/man/man4/hptiop.4 stable/9/share/man/man9/kernel_mount.9 Directory Properties: stable/9/share/man/man4/ (props changed) stable/9/share/man/man9/ (props changed) Modified: stable/9/share/man/man4/acpi_wmi.4 == --- stable/9/share/man/man4/acpi_wmi.4 Mon Aug 4 03:59:48 2014 (r269498) +++ stable/9/share/man/man4/acpi_wmi.4 Mon Aug 4 04:00:48 2014 (r269499) @@ -74,7 +74,7 @@ GUID IN {8F1F6435-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NOBI .Ed .Sh SEE ALSO -.Xr acpi 4 , +.Xr acpi 4 .Sh HISTORY The .Nm Modified: stable/9/share/man/man4/hptiop.4 == --- stable/9/share/man/man4/hptiop.4Mon Aug 4 03:59:48 2014 (r269498) +++ stable/9/share/man/man4/hptiop.4Mon Aug 4 04:00:48 2014 (r269499) @@ -126,7 +126,7 @@ The driver has only been tested on the i386 and amd64 platforms. .Sh SEE ALSO .Xr cam 4 , -.Xr hptmv 4 , +.Xr hptmv 4 .Sh HISTORY The .Nm Modified: stable/9/share/man/man9/kernel_mount.9 == --- stable/9/share/man/man9/kernel_mount.9 Mon Aug 4 03:59:48 2014 (r269498) +++ stable/9/share/man/man9/kernel_mount.9 Mon Aug 4 04:00:48 2014 (r269499) @@ -194,7 +194,7 @@ must come in pairs, e.g., .Ed .Sh SEE ALSO .Xr VFS 9 , -.Xr VFS_MOUNT 9 , +.Xr VFS_MOUNT 9 .Sh HISTORY The .Fn kernel_mount ___ svn-src-all@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: r269500 - head/sys/modules/ixgbe
Author: adrian Date: Mon Aug 4 04:21:32 2014 New Revision: 269500 URL: http://svnweb.freebsd.org/changeset/base/269500 Log: Make the ixgbe(4) module buildable outside of the tree. It defaults to RSS not being enabled. Modified: head/sys/modules/ixgbe/Makefile Modified: head/sys/modules/ixgbe/Makefile == --- head/sys/modules/ixgbe/Makefile Mon Aug 4 04:00:48 2014 (r269499) +++ head/sys/modules/ixgbe/Makefile Mon Aug 4 04:21:32 2014 (r269500) @@ -6,7 +6,7 @@ KMOD= if_ixgbe SRCS= device_if.h bus_if.h pci_if.h -SRCS += opt_inet.h opt_inet6.h +SRCS += opt_inet.h opt_inet6.h opt_rss.h SRCS+= ixgbe.c ixv.c # Shared source SRCS+= ixgbe_common.c ixgbe_api.c ixgbe_phy.c ixgbe_mbx.c ixgbe_vf.c @@ -24,6 +24,10 @@ opt_inet.h: opt_inet6.h: @echo #define INET6 1 ${.TARGET} .endif + +opt_rss.h: + @echo ${.TARGET} + .endif .include bsd.kmod.mk ___ svn-src-all@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: r269501 - head/sys/modules/igb
Author: adrian Date: Mon Aug 4 04:23:45 2014 New Revision: 269501 URL: http://svnweb.freebsd.org/changeset/base/269501 Log: Make igb(4) build outside of the kernel build. Ths defaults to RSS being disabled. Modified: head/sys/modules/igb/Makefile Modified: head/sys/modules/igb/Makefile == --- head/sys/modules/igb/Makefile Mon Aug 4 04:21:32 2014 (r269500) +++ head/sys/modules/igb/Makefile Mon Aug 4 04:23:45 2014 (r269501) @@ -4,7 +4,7 @@ .PATH: ${.CURDIR}/../../dev/e1000 KMOD= if_igb -SRCS= device_if.h bus_if.h pci_if.h opt_inet.h opt_inet6.h +SRCS= device_if.h bus_if.h pci_if.h opt_inet.h opt_inet6.h opt_rss.h SRCS+= if_igb.c $(SHARED_SRCS) SHARED_SRCS = e1000_api.c e1000_phy.c e1000_nvm.c e1000_mac.c e1000_manage.c SHARED_SRCS += e1000_80003es2lan.c e1000_82542.c e1000_82541.c e1000_82543.c @@ -33,6 +33,10 @@ opt_inet.h: opt_inet6.h: @echo #define INET6 1 ${.TARGET} .endif + +opt_rss.h: + @echo ${.TARGET} + .endif .include bsd.kmod.mk ___ svn-src-all@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
Re: svn commit: r269501 - head/sys/modules/igb
2014-08-04 12:23 GMT+08:00 Adrian Chadd adr...@freebsd.org: Author: adrian Date: Mon Aug 4 04:23:45 2014 New Revision: 269501 URL: http://svnweb.freebsd.org/changeset/base/269501 Log: Make igb(4) build outside of the kernel build. Ths defaults to RSS being disabled. Modified: head/sys/modules/igb/Makefile Modified: head/sys/modules/igb/Makefile == --- head/sys/modules/igb/Makefile Mon Aug 4 04:21:32 2014 (r269500) +++ head/sys/modules/igb/Makefile Mon Aug 4 04:23:45 2014 (r269501) @@ -4,7 +4,7 @@ .PATH: ${.CURDIR}/../../dev/e1000 KMOD= if_igb -SRCS= device_if.h bus_if.h pci_if.h opt_inet.h opt_inet6.h +SRCS= device_if.h bus_if.h pci_if.h opt_inet.h opt_inet6.h opt_rss.h SRCS+= if_igb.c $(SHARED_SRCS) SHARED_SRCS = e1000_api.c e1000_phy.c e1000_nvm.c e1000_mac.c e1000_manage.c SHARED_SRCS += e1000_80003es2lan.c e1000_82542.c e1000_82541.c e1000_82543.c @@ -33,6 +33,10 @@ opt_inet.h: opt_inet6.h: @echo #define INET6 1 ${.TARGET} .endif + +opt_rss.h: + @echo ${.TARGET} + .endif .include bsd.kmod.mk Just for record, missed: Submitted by: araujo@ Best Regards, -- -- Marcelo Araujo(__)ara...@freebsd.org \\\'',)http://www.FreeBSD.org http://www.freebsd.org/ \/ \ ^ Power To Server. .\. /_) ___ svn-src-all@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
Re: svn commit: r268917 - head/sys/dev/ixgbe
2014-08-04 12:27 GMT+08:00 Marcelo Araujo araujobsdp...@gmail.com: 2014-07-20 16:43 GMT+08:00 Adrian Chadd adr...@freebsd.org: Author: adrian Date: Sun Jul 20 08:43:53 2014 New Revision: 268917 URL: http://svnweb.freebsd.org/changeset/base/268917 Log: Add the UDP hash - RSS mbuf hash type for the ixgbe(4) driver. Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Sun Jul 20 07:45:48 2014(r268916) +++ head/sys/dev/ixgbe/ixgbe.c Sun Jul 20 08:43:53 2014(r268917) @@ -4745,12 +4745,15 @@ ixgbe_rxeof(struct ix_queue *que) case IXGBE_RXDADV_RSSTYPE_IPV6_TCP_EX: M_HASHTYPE_SET(sendmp, M_HASHTYPE_RSS_TCP_IPV6_EX); break; - /* XXX no UDP support in RSS just yet */ -#ifdef notyet - case IGXBE_RXDADV_RSSTYPE_IPV4_UDP: - case IGXBE_RXDADV_RSSTYPE_IPV6_UDP: - case IGXBE_RXDADV_RSSTYPE_IPV6_UDP_EX: -#endif /* notyet */ + case IXGBE_RXDADV_RSSTYPE_IPV4_UDP: + M_HASHTYPE_SET(sendmp, M_HASHTYPE_RSS_UDP_IPV4); + break; + case IXGBE_RXDADV_RSSTYPE_IPV6_UDP: + M_HASHTYPE_SET(sendmp, M_HASHTYPE_RSS_UDP_IPV6); + break; + case IXGBE_RXDADV_RSSTYPE_IPV6_UDP_EX: + M_HASHTYPE_SET(sendmp, M_HASHTYPE_RSS_UDP_IPV6_EX); + break; default: /* XXX fallthrough */ M_HASHTYPE_SET(sendmp, M_HASHTYPE_NONE); Just for record, missed: Submitted by: araujo@ Best Regards, Ops, not this one :D -- -- Marcelo Araujo(__)ara...@freebsd.org \\\'',)http://www.FreeBSD.org http://www.freebsd.org/ \/ \ ^ Power To Server. .\. /_) ___ svn-src-all@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
Re: svn commit: r268917 - head/sys/dev/ixgbe
2014-07-20 16:43 GMT+08:00 Adrian Chadd adr...@freebsd.org: Author: adrian Date: Sun Jul 20 08:43:53 2014 New Revision: 268917 URL: http://svnweb.freebsd.org/changeset/base/268917 Log: Add the UDP hash - RSS mbuf hash type for the ixgbe(4) driver. Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Sun Jul 20 07:45:48 2014(r268916) +++ head/sys/dev/ixgbe/ixgbe.c Sun Jul 20 08:43:53 2014(r268917) @@ -4745,12 +4745,15 @@ ixgbe_rxeof(struct ix_queue *que) case IXGBE_RXDADV_RSSTYPE_IPV6_TCP_EX: M_HASHTYPE_SET(sendmp, M_HASHTYPE_RSS_TCP_IPV6_EX); break; - /* XXX no UDP support in RSS just yet */ -#ifdef notyet - case IGXBE_RXDADV_RSSTYPE_IPV4_UDP: - case IGXBE_RXDADV_RSSTYPE_IPV6_UDP: - case IGXBE_RXDADV_RSSTYPE_IPV6_UDP_EX: -#endif /* notyet */ + case IXGBE_RXDADV_RSSTYPE_IPV4_UDP: + M_HASHTYPE_SET(sendmp, M_HASHTYPE_RSS_UDP_IPV4); + break; + case IXGBE_RXDADV_RSSTYPE_IPV6_UDP: + M_HASHTYPE_SET(sendmp, M_HASHTYPE_RSS_UDP_IPV6); + break; + case IXGBE_RXDADV_RSSTYPE_IPV6_UDP_EX: + M_HASHTYPE_SET(sendmp, M_HASHTYPE_RSS_UDP_IPV6_EX); + break; default: /* XXX fallthrough */ M_HASHTYPE_SET(sendmp, M_HASHTYPE_NONE); Just for record, missed: Submitted by: araujo@ Best Regards, -- -- Marcelo Araujo(__)ara...@freebsd.org \\\'',)http://www.FreeBSD.org http://www.freebsd.org/ \/ \ ^ Power To Server. .\. /_) ___ svn-src-all@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
Re: svn commit: r269500 - head/sys/modules/ixgbe
2014-08-04 12:21 GMT+08:00 Adrian Chadd adr...@freebsd.org: Author: adrian Date: Mon Aug 4 04:21:32 2014 New Revision: 269500 URL: http://svnweb.freebsd.org/changeset/base/269500 Log: Make the ixgbe(4) module buildable outside of the tree. It defaults to RSS not being enabled. Modified: head/sys/modules/ixgbe/Makefile Modified: head/sys/modules/ixgbe/Makefile == --- head/sys/modules/ixgbe/Makefile Mon Aug 4 04:00:48 2014 (r269499) +++ head/sys/modules/ixgbe/Makefile Mon Aug 4 04:21:32 2014 (r269500) @@ -6,7 +6,7 @@ KMOD= if_ixgbe SRCS= device_if.h bus_if.h pci_if.h -SRCS += opt_inet.h opt_inet6.h +SRCS += opt_inet.h opt_inet6.h opt_rss.h SRCS+= ixgbe.c ixv.c # Shared source SRCS+= ixgbe_common.c ixgbe_api.c ixgbe_phy.c ixgbe_mbx.c ixgbe_vf.c @@ -24,6 +24,10 @@ opt_inet.h: opt_inet6.h: @echo #define INET6 1 ${.TARGET} .endif + +opt_rss.h: + @echo ${.TARGET} + .endif .include bsd.kmod.mk This one, Just for record, missed: Submitted by: araujo@ Best Regards, -- -- Marcelo Araujo(__)ara...@freebsd.org \\\'',)http://www.FreeBSD.org http://www.freebsd.org/ \/ \ ^ Power To Server. .\. /_) ___ svn-src-all@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
Re: svn commit: r267937 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json cddl/contrib/opensolaris/cmd/dtrace/test/tst/common
On Aug 3, 2014, at 9:47 AM, Warner Losh i...@bsdimp.com wrote: On Jul 28, 2014, at 9:23 PM, John Baldwin j...@freebsd.org wrote: On Thursday 26 June 2014 21:45:49 Rui Paulo wrote: Author: rpaulo Date: Thu Jun 26 21:45:49 2014 New Revision: 267937 URL: http://svnweb.freebsd.org/changeset/base/267937 Log: MFV illumos 4477 DTrace should speak JSON MFC after: 2 weeks This makes kernel builds depend on userland sources. This breaks a lot of my work trees where I only checkout 'sys', and breaks a generally long-standing feature that the kernel was self-contained (recent bmake breakage to require the '-m /usr/src/share/mk' hack aside). Perhaps you could copy strtolctype.h to sys/cddl/contrib/opensolaris/common/util? We already duplicate sys/cddl/contrib/opensolaris/common/avl/avl.c in a like manner, presumably for the same reason. Just FYI: my intention is to remove that hack requirement, at least for host != kernel version cases.. I’ve had some issues with the “fix” that wound up with a different set of hacks once the initial MAKESYSPATH is fixed. Ah, the modules issue… I didn’t understand the breakage until I tried it myself... https://phabric.freebsd.org/D529 will fix it, if anybody wants to comment on it. Warner signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r269502 - head/sys/kern
Author: davide Date: Mon Aug 4 05:40:51 2014 New Revision: 269502 URL: http://svnweb.freebsd.org/changeset/base/269502 Log: Fix an overflow in getsockopt(). optval isn't big enough to hold sbintime_t. Re-introduce r255030 behaviour capping socket timeouts to INT_32 if they're too large. CR: https://phabric.freebsd.org/D433 Reported by: demon Reviewed by: bde [1], jhb [2] MFC after:2 weeks Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c == --- head/sys/kern/uipc_socket.c Mon Aug 4 04:23:45 2014(r269501) +++ head/sys/kern/uipc_socket.c Mon Aug 4 05:40:51 2014(r269502) @@ -2544,8 +2544,10 @@ sosetopt(struct socket *so, struct socko error = EDOM; goto bad; } - val = tvtosbt(tv); - + if (tv.tv_sec INT32_MAX) + val = SBT_MAX; + else + val = tvtosbt(tv); switch (sopt-sopt_name) { case SO_SNDTIMEO: so-so_snd.sb_timeo = val; @@ -2694,10 +2696,8 @@ integer: case SO_SNDTIMEO: case SO_RCVTIMEO: - optval = (sopt-sopt_name == SO_SNDTIMEO ? - so-so_snd.sb_timeo : so-so_rcv.sb_timeo); - - tv = sbttotv(optval); + tv = sbttotv(sopt-sopt_name == SO_SNDTIMEO ? + so-so_snd.sb_timeo : so-so_rcv.sb_timeo); #ifdef COMPAT_FREEBSD32 if (SV_CURPROC_FLAG(SV_ILP32)) { struct timeval32 tv32; ___ svn-src-all@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: r269503 - head/libexec/rtld-elf/tests
Author: ngie Date: Mon Aug 4 05:45:09 2014 New Revision: 269503 URL: http://svnweb.freebsd.org/changeset/base/269503 Log: Remove hardcoded path to TESTSDIR (Makefile, ld_library_pathfds.c) at build time by using atf_tc_get_config_var(tc, srcdir)) This will allow end-users to move the binaries to different locations after they've been built without having to rebuild the binaries with the new paths Phabric: D525 (part of a larger patch) Reviewed by: jmmv Approved by: jmmv (co-mentor) Modified: head/libexec/rtld-elf/tests/Makefile head/libexec/rtld-elf/tests/ld_library_pathfds.c Modified: head/libexec/rtld-elf/tests/Makefile == --- head/libexec/rtld-elf/tests/MakefileMon Aug 4 05:40:51 2014 (r269502) +++ head/libexec/rtld-elf/tests/MakefileMon Aug 4 05:45:09 2014 (r269503) @@ -9,6 +9,4 @@ SUBDIR+=libpythagoras target ATF_TESTS_C= ld_library_pathfds -CFLAGS+=-DTESTSDIR=\${TESTSDIR}\ - .include bsd.test.mk Modified: head/libexec/rtld-elf/tests/ld_library_pathfds.c == --- head/libexec/rtld-elf/tests/ld_library_pathfds.cMon Aug 4 05:40:51 2014(r269502) +++ head/libexec/rtld-elf/tests/ld_library_pathfds.cMon Aug 4 05:45:09 2014(r269503) @@ -38,7 +38,7 @@ struct descriptors { int usr; }; -static voidsetup(struct descriptors *); +static voidsetup(struct descriptors *, const atf_tc_t *); static voidexpect_success(int binary, char *pathfds); static voidexpect_missing_library(int binary, char *pathfds); @@ -53,7 +53,7 @@ ATF_TC_BODY(missing_library, tc) { struct descriptors files; - setup(files); + setup(files, tc); expect_missing_library(files.binary, NULL); } @@ -64,7 +64,7 @@ ATF_TC_BODY(wrong_library_directories, t struct descriptors files; char *pathfds; - setup(files); + setup(files, tc); ATF_REQUIRE( asprintf(pathfds, LD_LIBRARY_PATH_FDS=%d, files.etc) 0); @@ -78,7 +78,7 @@ ATF_TC_BODY(bad_library_directories, tc) struct descriptors files; char *pathfds; - setup(files); + setup(files, tc); ATF_REQUIRE(asprintf(pathfds, ::, files.etc) 0); expect_missing_library(files.binary, pathfds); @@ -91,7 +91,7 @@ ATF_TC_BODY(single_library_directory, tc struct descriptors files; char *pathfds; - setup(files); + setup(files, tc); ATF_REQUIRE( asprintf(pathfds, LD_LIBRARY_PATH_FDS=%d, files.testdir) 0); @@ -105,7 +105,7 @@ ATF_TC_BODY(first_library_directory, tc) struct descriptors files; char *pathfds; - setup(files); + setup(files, tc); ATF_REQUIRE( asprintf(pathfds, LD_LIBRARY_PATH_FDS=%d:%d, files.testdir, files.etc) 0); @@ -120,7 +120,7 @@ ATF_TC_BODY(middle_library_directory, tc struct descriptors files; char *pathfds; - setup(files); + setup(files, tc); ATF_REQUIRE( asprintf(pathfds, LD_LIBRARY_PATH_FDS=%d:%d:%d, files.root, files.testdir, files.usr) 0); @@ -135,7 +135,7 @@ ATF_TC_BODY(last_library_directory, tc) struct descriptors files; char *pathfds; - setup(files); + setup(files, tc); ATF_REQUIRE( asprintf(pathfds, LD_LIBRARY_PATH_FDS=%d:%d, files.root, files.testdir) 0); @@ -161,10 +161,11 @@ ATF_TP_ADD_TCS(tp) static void -setup(struct descriptors *dp) +setup(struct descriptors *dp, const atf_tc_t *tc) { - ATF_REQUIRE((dp-testdir = opendir(TESTSDIR)) = 0); + dp-testdir = opendir(atf_tc_get_config_var(tc, srcdir)); + ATF_REQUIRE(dp-testdir = 0); ATF_REQUIRE( (dp-binary = openat(dp-testdir, target, O_RDONLY)) = 0); ___ svn-src-all@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: r269504 - head/libexec/rtld-elf/tests
Author: ngie Date: Mon Aug 4 05:46:10 2014 New Revision: 269504 URL: http://svnweb.freebsd.org/changeset/base/269504 Log: Fix a -Wsecurity warning with clang Phabric: D525 (part of a larger patch) Reviewed by: jmmv Approved by: jmmv (co-mentor) Modified: head/libexec/rtld-elf/tests/ld_library_pathfds.c Modified: head/libexec/rtld-elf/tests/ld_library_pathfds.c == --- head/libexec/rtld-elf/tests/ld_library_pathfds.cMon Aug 4 05:45:09 2014(r269503) +++ head/libexec/rtld-elf/tests/ld_library_pathfds.cMon Aug 4 05:46:10 2014(r269504) @@ -79,7 +79,7 @@ ATF_TC_BODY(bad_library_directories, tc) char *pathfds; setup(files, tc); - ATF_REQUIRE(asprintf(pathfds, ::, files.etc) 0); + ATF_REQUIRE(asprintf(pathfds, LD_LIBRARY_PATH_FDS=::) 0); expect_missing_library(files.binary, pathfds); } ___ svn-src-all@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: r269505 - head/libexec/rtld-elf/tests/target
Author: ngie Date: Mon Aug 4 05:49:13 2014 New Revision: 269505 URL: http://svnweb.freebsd.org/changeset/base/269505 Log: Move a -L argument from LDADD to LDFLAGS Phabric: D525 (part of a larger patch) Reviewed by: jmmv Approved by: jmmv (co-mentor) Modified: head/libexec/rtld-elf/tests/target/Makefile Modified: head/libexec/rtld-elf/tests/target/Makefile == --- head/libexec/rtld-elf/tests/target/Makefile Mon Aug 4 05:46:10 2014 (r269504) +++ head/libexec/rtld-elf/tests/target/Makefile Mon Aug 4 05:49:13 2014 (r269505) @@ -6,7 +6,9 @@ PROG= target BINDIR=${TESTSBASE}${TESTSDIR}/libexec/rtld-elf CFLAGS+= -I${.CURDIR}/../libpythagoras -LDADD= -L${.OBJDIR}/../libpythagoras -lpythagoras + +LDFLAGS+= -L${.OBJDIR}/../libpythagoras +LDADD= -lpythagoras MAN= ___ svn-src-all@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: r269506 - head/libexec/rtld-elf/tests/target
Author: ngie Date: Mon Aug 4 05:50:21 2014 New Revision: 269506 URL: http://svnweb.freebsd.org/changeset/base/269506 Log: Fix BINDIR to not duplicate ${TESTSDIR} This should fix 'make release' with MK_TESTS != no Phabric: D525 (part of a larger patch) Reviewed by: jmmv Approved by: jmmv (co-mentor) Modified: head/libexec/rtld-elf/tests/target/Makefile Modified: head/libexec/rtld-elf/tests/target/Makefile == --- head/libexec/rtld-elf/tests/target/Makefile Mon Aug 4 05:49:13 2014 (r269505) +++ head/libexec/rtld-elf/tests/target/Makefile Mon Aug 4 05:50:21 2014 (r269506) @@ -3,7 +3,7 @@ .include bsd.own.mk PROG= target -BINDIR=${TESTSBASE}${TESTSDIR}/libexec/rtld-elf +BINDIR=${TESTSBASE}/libexec/rtld-elf CFLAGS+= -I${.CURDIR}/../libpythagoras ___ svn-src-all@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