Re: svn commit: r258346 - stable/10/sys/dev/ixgbe
On Mon, Dec 16, 2013 at 08:53:21PM +0400, Andrey V. Elsukov wrote: On 19.11.2013 18:24, Oleg Bulyzhin wrote: Author: oleg Date: Tue Nov 19 14:24:25 2013 New Revision: 258346 URL: http://svnweb.freebsd.org/changeset/base/258346 Log: MFC: 257695 - Fix link loss on vlan reconfiguration. - Fix issues with 'vlanhwfilter'. Hi, Oleg, do you plan to merge this in stable/9 too? -- WBR, Andrey V. Elsukov I didn't plan it (i'm still hoping jfv@ will fix it). -- Oleg. === Oleg Bulyzhin -- OBUL-RIPN -- OBUL-RIPE -- o...@rinet.ru === ___ 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: r259609 - head/sys/kern
Author: se Date: Thu Dec 19 09:01:46 2013 New Revision: 259609 URL: http://svnweb.freebsd.org/changeset/base/259609 Log: Fix overflow for timeout values of more than 68 years, which is the maximum covered by sbintime (LONG_MAX seconds). Some programs use timeout values in excess of 1000 years. The conversion to sbintime caused wrap-around on overflow, which resulted in short or negative timeout values. This caused long delays on sockets opened by affected programs (e.g. OpenSSH). Kernels compiled without -fno-strict-overflow were not affected, apparently because the compiler tested the sign of the timeout value before performing the multiplication that lead to overflow. When the -fno-strict-overflow option was added to CFLAGS, this optimization was disabled and the test was performed on the result of the multiplication. Negative products were caught and resulted in EINVAL being returned, but wrap-around to positive values just shortened the timeout value to the residue of the result that could be represented by sbintime. The fix is to cap the timeout values at the maximum that can be represented by sbintime, which is 2^31 - 1 seconds or more than 68 years. After this change, the kernel can be compiled with -fno-strict-overflow with no ill effects. MFC after:3 days Modified: head/sys/kern/kern_event.c Modified: head/sys/kern/kern_event.c == --- head/sys/kern/kern_event.c Thu Dec 19 07:33:07 2013(r259608) +++ head/sys/kern/kern_event.c Thu Dec 19 09:01:46 2013(r259609) @@ -526,7 +526,8 @@ knote_fork(struct knlist *list, int pid) static __inline sbintime_t timer2sbintime(intptr_t data) { - + if (data LLONG_MAX / SBT_1MS) + return LLONG_MAX; return (SBT_1MS * data); } ___ 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: r259610 - in stable/8/sys/dev/usb: . serial
Author: truckman Date: Thu Dec 19 09:46:14 2013 New Revision: 259610 URL: http://svnweb.freebsd.org/changeset/base/259610 Log: MFC r258363: Add alternate ID for Novatel MiFi 2200 CDMA, which is used by my Virgin Mobile branded device. It needs the U3GINIT_SCSIEJECT quirk. Modified: stable/8/sys/dev/usb/serial/u3g.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/serial/u3g.c == --- stable/8/sys/dev/usb/serial/u3g.c Thu Dec 19 09:01:46 2013 (r259609) +++ stable/8/sys/dev/usb/serial/u3g.c Thu Dec 19 09:46:14 2013 (r259610) @@ -340,6 +340,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(NOVATEL, MC760, 0), U3G_DEV(NOVATEL, MC547, 0), U3G_DEV(NOVATEL, MC950D, 0), + U3G_DEV(NOVATEL, MIFI2200V, U3GINIT_SCSIEJECT), U3G_DEV(NOVATEL, U720, 0), U3G_DEV(NOVATEL, U727, 0), U3G_DEV(NOVATEL, U727_2, 0), Modified: stable/8/sys/dev/usb/usbdevs == --- stable/8/sys/dev/usb/usbdevsThu Dec 19 09:01:46 2013 (r259609) +++ stable/8/sys/dev/usb/usbdevsThu Dec 19 09:46:14 2013 (r259610) @@ -3068,6 +3068,7 @@ product NOVATEL EU870D0x2420 Expedite product NOVATEL U727 0x4100 Merlin U727 CDMA product NOVATEL MC950D 0x4400 Novatel MC950D HSUPA product NOVATEL ZEROCD 0x5010 Novatel ZeroCD +product NOVATEL MIFI2200V 0x5020 Novatel MiFi 2200 CDMA Virgin Mobile product NOVATEL ZEROCD20x5030 Novatel ZeroCD product NOVATEL U727_2 0x5100 Merlin U727 CDMA product NOVATEL U760 0x6000 Novatel U760 ___ 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: r259609 - head/sys/kern
On Thu, 19 Dec 2013, Stefan Esser wrote: Log: Fix overflow for timeout values of more than 68 years, which is the maximum covered by sbintime (LONG_MAX seconds). Not LONG_MAX seconds, but INT32_MAX seconds. LONG_MAX seconds is about 2**32 times larger on 64-bit arches. sbintimes and their complexity give many more possibilities for overflow. I thought that the new overflow bugs and some old ones were already fixed. Some programs use timeout values in excess of 1000 years. The conversion to sbintime caused wrap-around on overflow, which resulted in short or negative timeout values. This caused long delays on sockets opened by affected programs (e.g. OpenSSH). Kernels compiled without -fno-strict-overflow were not affected, apparently because the compiler tested the sign of the timeout value before performing the multiplication that lead to overflow. I think it just gave a garbage value that was accidentally less harmful. When the -fno-strict-overflow option was added to CFLAGS, this optimization was disabled and the test was performed on the result of the multiplication. Negative products were caught and resulted in EINVAL being returned, but wrap-around to positive values just shortened the timeout value to the residue of the result that could be represented by sbintime. This shows one reason why -fno-strict-overflow shouldn't be used. It just wastes time to give different undefined behaviour with undocumented details. The fix is to cap the timeout values at the maximum that can be represented by sbintime, which is 2^31 - 1 seconds or more than 68 years. 2^31 - 1 is a correct spelling of INT32_MAX, unlike LONG_MAX. After this change, the kernel can be compiled with -fno-strict-overflow with no ill effects. Modified: head/sys/kern/kern_event.c == --- head/sys/kern/kern_event.c Thu Dec 19 07:33:07 2013(r259608) +++ head/sys/kern/kern_event.c Thu Dec 19 09:01:46 2013(r259609) @@ -526,7 +526,8 @@ knote_fork(struct knlist *list, int pid) static __inline sbintime_t timer2sbintime(intptr_t data) { - + if (data LLONG_MAX / SBT_1MS) + return LLONG_MAX; return (SBT_1MS * data); } This has the following style bugs: - it removes the empty line after the (null) declarations - it is missing parentheses around the return value - it uses the long long abomination This has the following type errors: - using the long long abomination is not just a style bug. sbintime_t has type int64_t, not long long. The overflow check will break if long long becomes longer than int64_t - returning LLONG_MAX is usually just a style bug. When long long is longer than int64_t, the return value will overflow, but the implementation-defined behaviour for this is usually to convert it to the correct value. INT64_MAX is a dangerous default maximum timeout. You can't even add the minimum sbintime_t of 2**-32 seconds to this without overflowing. Old timeout code used the following method to reduce the problem of overflowing timeouts: For alarm() and setitimer(), limit the timeout to 100 million seconds (3.17 years) and return EINVAL if it is too large. This works with 32-bit time_t until about 2035. POSIX doesn't allow this. Clamping the time to 100 million seconds isn't allowed either, since the residual time can be seen from applications. Note that 64-bit time_t has little effect on this problem. Uses wishing to overflow the kernel simply ask for a timeout in a timeval of INT64_MAX seconds plus 99 seconds so that adding just 1 microseconds to it overflow. With seconds in sbintime_t instead of in time_t, overflow occurs much sooner. This is quite broken now: - the limit of 1 used to be enforced in itimerfix(), but this was removed in connection with implementing POSIX realtime timers without even breaking the documentaion to match or touching PR(s) about the POSIX non-conformance of the limit. - setitimer() mostly uses sbintimes now, so the old limit is irrelevant and enforcing it in itimerfix() would break the new sbintime code and presumably the not so new realtime timers code. The sbintime code uses a modified limit that is also not allowed by POSIX. This limit is of course undocumented. It is INT32_MAX / 2, so that there is plenty of room for expansion. This is what the above should use, modulo the conformance bug. EINVAL is returned when this limit is exceeded. - select() and poll() were more careful and seem to be correct now. The timeout in poll() is limited to INT_MAX milliseconds, so it fits in sbintime_t. Except this assumes that int is 32 bits. select() limits the timeout to INT32_MAX seconds so that it is representable as an sbintime_t and then does a further overflow check involving INT64_MAX. When overflow would occur, it sets asbt to -1, which I think means an infinite
Re: svn commit: r259562 - head/usr.bin/netstat
On Wed, Dec 18, 2013 at 04:40:52PM -0500, John Baldwin wrote: J On Wednesday, December 18, 2013 3:07:58 pm Alexander V. Chernikov wrote: J On 18.12.2013 22:45, John-Mark Gurney wrote: J Alexander V. Chernikov wrote this message on Wed, Dec 18, 2013 at 18:25 +: J Author: melifaro J Date: Wed Dec 18 18:25:27 2013 J New Revision: 259562 J URL: http://svnweb.freebsd.org/changeset/base/259562 J J Log: J Switch netstat -rn to use standard API for retrieving list of routes J instead of peeking inside in-kernel radix via kget. J This permits us to change kernel structures without breaking userland. J Additionally, this change provide more reliable and faster output. J J `Refs` and `Use` fields available in IPv4 by default (and via -W J for other families) were removed. `Refs` is radix-specific thing J which is not informative for users. `Use` field value is handy sometimes, J but a) current API does not support it and b) I'm not sure we will J support per-rte pcpu counters in near future. J J Old method of retrieving data is still supported (either by defining J NewTree=0 or running netstat with -A). However, Refs/Use fields are J hidden. J J Sponsored by: Yandex LLC J MFC after:4 weeks J PR: kern/167204 J J How will this impact the use of netstat -rn -M vmcore -N kernel ? Will J this change make it not usable, or will you still automatically use J Well. It will probably break in (maybe, near) future. J J Please don't gratuitiously break things that /usr/sbin/crashinfo runs. It's J fine if kvm mode is fragile and requires the binary to be in sync with the J kernel and is only used for crash dumps, but it is very useful to extract J all sorts of info out of a crash dump. The problem is that these tools (netstat, and some others) prevent us from improving the kernel network stack. We can't make improvements that are mergeable to stable/x branch, since the tools would be broken. Moreover any improvement in head/, requires from developer additional work in netstat code, which I must admit isn't a pleasure to work with. And any improvement in head adds additional incompatibility between newer kernel and older world, which is of course allowed in CURRENT, but still we'd prefer to reduce number of such events. I agree that usage of tools on vmcores is useful. But we all should agree that it has very limited use. Only kernel hackers and developers are expected to do this. However, speaking of myself, I was never interested in routing table from a vmcore neither interface statistics, when fixing a bug in networking stack, and I've fixed quite a lot of them. Still, I believe, that some developers find this useful. My suggestion is that all this code is deleted from src/usr.bin/netstat, and moved to src/tools, and we relax assertion that src/tools must be compatible with any kernel within the branch. So, any person who wants this functionality, needs to keep his src/tools in sync with kernel and compile a tool when he desires to dump routing table from a vmcore. Finally, when we remove all the kvm(3) usage from a tool, then we can remove the sugid bit from it, which would be a another fine point. -- Totus tuus, Glebius. ___ 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: r259612 - head/sys/dev/drm2/ttm
Author: avg Date: Thu Dec 19 12:00:48 2013 New Revision: 259612 URL: http://svnweb.freebsd.org/changeset/base/259612 Log: ttm_bo_vm_lookup_rb: actually make use of the red-black tree Previously the code would just iterate over the whole tree as if it were just a list. Without this change I would observe X server becoming more and more jerky over time. MFC after:5 days Modified: head/sys/dev/drm2/ttm/ttm_bo_vm.c Modified: head/sys/dev/drm2/ttm/ttm_bo_vm.c == --- head/sys/dev/drm2/ttm/ttm_bo_vm.c Thu Dec 19 10:28:54 2013 (r259611) +++ head/sys/dev/drm2/ttm/ttm_bo_vm.c Thu Dec 19 12:00:48 2013 (r259612) @@ -76,13 +76,16 @@ static struct ttm_buffer_object *ttm_bo_ struct ttm_buffer_object *bo; struct ttm_buffer_object *best_bo = NULL; - RB_FOREACH(bo, ttm_bo_device_buffer_objects, bdev-addr_space_rb) { + bo = RB_ROOT(bdev-addr_space_rb); + while (bo != NULL) { cur_offset = bo-vm_node-start; if (page_start = cur_offset) { best_bo = bo; if (page_start == cur_offset) break; - } + bo = RB_RIGHT(bo, vm_rb); + } else + bo = RB_LEFT(bo, vm_rb); } if (unlikely(best_bo == 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: r259613 - stable/10/usr.sbin/pkg
Author: bdrewery Date: Thu Dec 19 12:33:24 2013 New Revision: 259613 URL: http://svnweb.freebsd.org/changeset/base/259613 Log: MFC r259266: Fix multi-repository support by properly respecting 'enabled' flag. This will read the REPOS_DIR env/config setting (default is /etc/pkg and /usr/local/etc/pkg/repos) and use the last enabled repository. This can be changed in the environment using a comma-separated list, or in /usr/local/etc/pkg.conf with JSON array syntax of: REPOS_DIR: [/etc/pkg, /usr/local/etc/pkg/repos] Approved by: bapt (mentor) Modified: stable/10/usr.sbin/pkg/config.c stable/10/usr.sbin/pkg/config.h stable/10/usr.sbin/pkg/pkg.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pkg/config.c == --- stable/10/usr.sbin/pkg/config.c Thu Dec 19 12:00:48 2013 (r259612) +++ stable/10/usr.sbin/pkg/config.c Thu Dec 19 12:33:24 2013 (r259613) @@ -32,8 +32,10 @@ __FBSDID($FreeBSD$); #include sys/sbuf.h #include sys/elf_common.h #include sys/endian.h +#include sys/types.h #include assert.h +#include dirent.h #include yaml.h #include ctype.h #include err.h @@ -51,11 +53,17 @@ __FBSDID($FreeBSD$); #define roundup2(x, y) (((x)+((y)-1))(~((y)-1))) /* if y is powers of two */ +struct config_value { + char *value; + STAILQ_ENTRY(config_value) next; +}; + struct config_entry { uint8_t type; const char *key; const char *val; char *value; + STAILQ_HEAD(, config_value) *list; bool envset; }; @@ -65,6 +73,7 @@ static struct config_entry c[] = { PACKAGESITE, URL_SCHEME_PREFIX http://pkg.FreeBSD.org/${ABI}/latest;, NULL, + NULL, false, }, [ABI] = { @@ -72,6 +81,7 @@ static struct config_entry c[] = { ABI, NULL, NULL, + NULL, false, }, [MIRROR_TYPE] = { @@ -79,6 +89,7 @@ static struct config_entry c[] = { MIRROR_TYPE, SRV, NULL, + NULL, false, }, [ASSUME_ALWAYS_YES] = { @@ -86,6 +97,7 @@ static struct config_entry c[] = { ASSUME_ALWAYS_YES, NO, NULL, + NULL, false, }, [SIGNATURE_TYPE] = { @@ -93,6 +105,7 @@ static struct config_entry c[] = { SIGNATURE_TYPE, NULL, NULL, + NULL, false, }, [FINGERPRINTS] = { @@ -100,6 +113,15 @@ static struct config_entry c[] = { FINGERPRINTS, NULL, NULL, + NULL, + false, + }, + [REPOS_DIR] = { + PKG_CONFIG_LIST, + REPOS_DIR, + NULL, + NULL, + NULL, false, }, }; @@ -474,17 +496,34 @@ subst_packagesite(const char *abi) c[PACKAGESITE].value = strdup(sbuf_data(newval)); } +static int +boolstr_to_bool(const char *str) +{ + if (str != NULL (strcasecmp(str, true) == 0 || + strcasecmp(str, yes) == 0 || strcasecmp(str, on) == 0 || + str[0] == '1')) + return (true); + + return (false); +} + static void config_parse(yaml_document_t *doc, yaml_node_t *node, pkg_conf_file_t conftype) { + yaml_node_item_t *item; yaml_node_pair_t *pair; - yaml_node_t *key, *val; + yaml_node_t *key, *val, *item_val; struct sbuf *buf = sbuf_new_auto(); + struct config_entry *temp_config; + struct config_value *cv; int i; size_t j; pair = node-data.mapping.pairs.start; + /* Temporary config for configs that may be disabled. */ + temp_config = calloc(CONFIG_SIZE, sizeof(struct config_entry)); + while (pair node-data.mapping.pairs.top) { key = yaml_document_get_node(doc, pair-key); val = yaml_document_get_node(doc, pair-value); @@ -530,7 +569,12 @@ config_parse(yaml_document_t *doc, yaml_ else if (strcasecmp(key-data.scalar.value, fingerprints) == 0) sbuf_cpy(buf, FINGERPRINTS); - else { /* Skip unknown entries for future use. */ + else if (strcasecmp(key-data.scalar.value, + enabled) == 0) { + /* Skip disabled repos. */ + if (!boolstr_to_bool(val-data.scalar.value)) + goto cleanup; + } else { /* Skip unknown entries for future use. */ ++pair;
svn commit: r259614 - releng/10.0/usr.sbin/pkg
Author: bdrewery Date: Thu Dec 19 13:44:07 2013 New Revision: 259614 URL: http://svnweb.freebsd.org/changeset/base/259614 Log: MFS r259613: Fix multi-repository support by properly respecting 'enabled' flag. This will read the REPOS_DIR env/config setting (default is /etc/pkg and /usr/local/etc/pkg/repos) and use the last enabled repository. This can be changed in the environment using a comma-separated list, or in /usr/local/etc/pkg.conf with JSON array syntax of: REPOS_DIR: [/etc/pkg, /usr/local/etc/pkg/repos] Approved by: bapt (mentor) Approved by: re (gjb) Modified: releng/10.0/usr.sbin/pkg/config.c releng/10.0/usr.sbin/pkg/config.h releng/10.0/usr.sbin/pkg/pkg.7 Directory Properties: releng/10.0/ (props changed) Modified: releng/10.0/usr.sbin/pkg/config.c == --- releng/10.0/usr.sbin/pkg/config.c Thu Dec 19 12:33:24 2013 (r259613) +++ releng/10.0/usr.sbin/pkg/config.c Thu Dec 19 13:44:07 2013 (r259614) @@ -32,8 +32,10 @@ __FBSDID($FreeBSD$); #include sys/sbuf.h #include sys/elf_common.h #include sys/endian.h +#include sys/types.h #include assert.h +#include dirent.h #include yaml.h #include ctype.h #include err.h @@ -51,11 +53,17 @@ __FBSDID($FreeBSD$); #define roundup2(x, y) (((x)+((y)-1))(~((y)-1))) /* if y is powers of two */ +struct config_value { + char *value; + STAILQ_ENTRY(config_value) next; +}; + struct config_entry { uint8_t type; const char *key; const char *val; char *value; + STAILQ_HEAD(, config_value) *list; bool envset; }; @@ -65,6 +73,7 @@ static struct config_entry c[] = { PACKAGESITE, URL_SCHEME_PREFIX http://pkg.FreeBSD.org/${ABI}/latest;, NULL, + NULL, false, }, [ABI] = { @@ -72,6 +81,7 @@ static struct config_entry c[] = { ABI, NULL, NULL, + NULL, false, }, [MIRROR_TYPE] = { @@ -79,6 +89,7 @@ static struct config_entry c[] = { MIRROR_TYPE, SRV, NULL, + NULL, false, }, [ASSUME_ALWAYS_YES] = { @@ -86,6 +97,7 @@ static struct config_entry c[] = { ASSUME_ALWAYS_YES, NO, NULL, + NULL, false, }, [SIGNATURE_TYPE] = { @@ -93,6 +105,7 @@ static struct config_entry c[] = { SIGNATURE_TYPE, NULL, NULL, + NULL, false, }, [FINGERPRINTS] = { @@ -100,6 +113,15 @@ static struct config_entry c[] = { FINGERPRINTS, NULL, NULL, + NULL, + false, + }, + [REPOS_DIR] = { + PKG_CONFIG_LIST, + REPOS_DIR, + NULL, + NULL, + NULL, false, }, }; @@ -474,17 +496,34 @@ subst_packagesite(const char *abi) c[PACKAGESITE].value = strdup(sbuf_data(newval)); } +static int +boolstr_to_bool(const char *str) +{ + if (str != NULL (strcasecmp(str, true) == 0 || + strcasecmp(str, yes) == 0 || strcasecmp(str, on) == 0 || + str[0] == '1')) + return (true); + + return (false); +} + static void config_parse(yaml_document_t *doc, yaml_node_t *node, pkg_conf_file_t conftype) { + yaml_node_item_t *item; yaml_node_pair_t *pair; - yaml_node_t *key, *val; + yaml_node_t *key, *val, *item_val; struct sbuf *buf = sbuf_new_auto(); + struct config_entry *temp_config; + struct config_value *cv; int i; size_t j; pair = node-data.mapping.pairs.start; + /* Temporary config for configs that may be disabled. */ + temp_config = calloc(CONFIG_SIZE, sizeof(struct config_entry)); + while (pair node-data.mapping.pairs.top) { key = yaml_document_get_node(doc, pair-key); val = yaml_document_get_node(doc, pair-value); @@ -530,7 +569,12 @@ config_parse(yaml_document_t *doc, yaml_ else if (strcasecmp(key-data.scalar.value, fingerprints) == 0) sbuf_cpy(buf, FINGERPRINTS); - else { /* Skip unknown entries for future use. */ + else if (strcasecmp(key-data.scalar.value, + enabled) == 0) { + /* Skip disabled repos. */ + if (!boolstr_to_bool(val-data.scalar.value)) + goto cleanup; + } else { /* Skip unknown entries for future use. */
svn commit: r259615 - head/sys/dev/vt
Author: ray Date: Thu Dec 19 15:31:20 2013 New Revision: 259615 URL: http://svnweb.freebsd.org/changeset/base/259615 Log: Enable mouse support for terminal clients (like dialog(1)). Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/vt/vt.h head/sys/dev/vt/vt_core.c head/sys/dev/vt/vt_sysmouse.c Modified: head/sys/dev/vt/vt.h == --- head/sys/dev/vt/vt.hThu Dec 19 13:44:07 2013(r259614) +++ head/sys/dev/vt/vt.hThu Dec 19 15:31:20 2013(r259615) @@ -412,7 +412,7 @@ int vtfont_load(vfnt_t *f, struct vt_f /* Sysmouse. */ void sysmouse_process_event(mouse_info_t *mi); #ifndef SC_NO_CUTPASTE -void vt_mouse_event(int type, int x, int y, int event, int cnt); +void vt_mouse_event(int type, int x, int y, int event, int cnt, int mlevel); void vt_mouse_state(int show); #endif #defineVT_MOUSE_SHOW 1 Modified: head/sys/dev/vt/vt_core.c == --- head/sys/dev/vt/vt_core.c Thu Dec 19 13:44:07 2013(r259614) +++ head/sys/dev/vt/vt_core.c Thu Dec 19 15:31:20 2013(r259615) @@ -1120,8 +1120,68 @@ finish_vt_acq(struct vt_window *vw) } #ifndef SC_NO_CUTPASTE +static void +vt_mouse_terminput_button(struct vt_device *vd, int button) +{ + struct vt_window *vw; + struct vt_font *vf; + char mouseb[6] = \x1B[M; + int i, x, y; + + vw = vd-vd_curwindow; + vf = vw-vw_font; + + /* Translate to char position. */ + x = vd-vd_mx / vf-vf_width; + y = vd-vd_my / vf-vf_height; + /* Avoid overflow. */ + x = MIN(x, 255 - '!'); + y = MIN(y, 255 - '!'); + + mouseb[3] = ' ' + button; + mouseb[4] = '!' + x; + mouseb[5] = '!' + y; + + for (i = 0; i sizeof(mouseb); i++ ) + terminal_input_char(vw-vw_terminal, mouseb[i]); +} + +static void +vt_mouse_terminput(struct vt_device *vd, int type, int x, int y, int event, +int cnt) +{ + + switch (type) { + case MOUSE_BUTTON_EVENT: + if (cnt 0) { + /* Mouse button pressed. */ + if (event MOUSE_BUTTON1DOWN) + vt_mouse_terminput_button(vd, 0); + if (event MOUSE_BUTTON2DOWN) + vt_mouse_terminput_button(vd, 1); + if (event MOUSE_BUTTON3DOWN) + vt_mouse_terminput_button(vd, 2); + } else { + /* Mouse button released. */ + vt_mouse_terminput_button(vd, 3); + } + break; +#ifdef notyet + case MOUSE_MOTION_EVENT: + if (mouse-u.data.z 0) { + /* Scroll up. */ + sc_mouse_input_button(vd, 64); + } else if (mouse-u.data.z 0) { + /* Scroll down. */ + sc_mouse_input_button(vd, 65); + } + break; +#endif + } +} + void -vt_mouse_event(int type, int x, int y, int event, int cnt) +vt_mouse_event(int type, int x, int y, int event, int cnt, int mlevel) { struct vt_device *vd; struct vt_window *vw; @@ -1146,6 +1206,9 @@ vt_mouse_event(int type, int x, int y, i * under mouse pointer when nothing changed. */ + if (mlevel 0) + vt_mouse_terminput(vd, type, x, y, event, cnt); + switch (type) { case MOUSE_ACTION: case MOUSE_MOTION_EVENT: Modified: head/sys/dev/vt/vt_sysmouse.c == --- head/sys/dev/vt/vt_sysmouse.c Thu Dec 19 13:44:07 2013 (r259614) +++ head/sys/dev/vt/vt_sysmouse.c Thu Dec 19 15:31:20 2013 (r259615) @@ -192,7 +192,8 @@ sysmouse_process_event(mouse_info_t *mi) #ifndef SC_NO_CUTPASTE mtx_unlock(sysmouse_lock); - vt_mouse_event(mi-operation, x, y, mi-u.event.id, mi-u.event.value); + vt_mouse_event(mi-operation, x, y, mi-u.event.id, mi-u.event.value, + sysmouse_level); return; #endif ___ 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: r259407 - head/sys/kern
On 12/17/13, 8:34 PM, John Baldwin wrote: On Tuesday, December 17, 2013 1:17:45 pm Mateusz Guzik wrote: On Tue, Dec 17, 2013 at 11:41:49AM -0500, John Baldwin wrote: On Saturday, December 14, 2013 11:11:43 pm Mateusz Guzik wrote: Author: mjg Date: Sun Dec 15 04:11:43 2013 New Revision: 259407 URL: http://svnweb.freebsd.org/changeset/base/259407 Log: proc exit: don't take PROC_LOCK while freeing rlimits Code wishing to check rlimits of some process should check whether it is exiting first, which current consumers do. Does this measurably reduce contention? No, this is just a cosmetic change I did while doing some other work with rlimits. It would use some more cosmetic work (e.g. no reason not to lim_free(p-plimit); p-p_limit = NULL) and maybe I'll get to that later unless this kind of stuff is unwanted. I find it useful to leave the locking in place so it is clear that p_limit is always written to with the lock held. If we ever got a static analyzer that understood locking rules then leaving this locking in would reduce false positives. When I first did locking for fields in struct proc I did it by hand based on grepping the source tree for all uses of a field and ensuring they were locked. I think it might be more confusing later on for another reader to see unlocked access and then have to think about why that is safe. leave the locks there but commented out with an explanatory comment. ___ 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: r259616 - releng/10.0/sys/ofed/drivers/net/mlx4
Author: alfred Date: Thu Dec 19 15:45:03 2013 New Revision: 259616 URL: http://svnweb.freebsd.org/changeset/base/259616 Log: Defer start/stop port to workqueues. MF10: r259608 Approved by: re Modified: releng/10.0/sys/ofed/drivers/net/mlx4/en_netdev.c releng/10.0/sys/ofed/drivers/net/mlx4/mlx4_en.h Directory Properties: releng/10.0/ (props changed) Modified: releng/10.0/sys/ofed/drivers/net/mlx4/en_netdev.c == --- releng/10.0/sys/ofed/drivers/net/mlx4/en_netdev.c Thu Dec 19 15:31:20 2013(r259615) +++ releng/10.0/sys/ofed/drivers/net/mlx4/en_netdev.c Thu Dec 19 15:45:03 2013(r259616) @@ -153,6 +153,19 @@ restart: return (i); } +static void mlx4_en_stop_port(struct net_device *dev) +{ + struct mlx4_en_priv *priv = netdev_priv(dev); + + queue_work(priv-mdev-workqueue, priv-stop_port_task); +} + +static void mlx4_en_start_port(struct net_device *dev) +{ + struct mlx4_en_priv *priv = netdev_priv(dev); + + queue_work(priv-mdev-workqueue, priv-start_port_task); +} static void mlx4_en_set_multicast(struct net_device *dev) { @@ -473,6 +486,7 @@ static void mlx4_en_do_get_stats(struct queue_delayed_work(mdev-workqueue, priv-stats_task, STATS_DELAY); } + mlx4_en_QUERY_PORT(priv-mdev, priv-port); mutex_unlock(mdev-state_lock); } @@ -498,8 +512,31 @@ static void mlx4_en_linkstate(struct wor mutex_unlock(mdev-state_lock); } +static void mlx4_en_lock_and_stop_port(struct work_struct *work) +{ + struct mlx4_en_priv *priv = container_of(work, struct mlx4_en_priv, +stop_port_task); + struct net_device *dev = priv-dev; + struct mlx4_en_dev *mdev = priv-mdev; + + mutex_lock(mdev-state_lock); + mlx4_en_do_stop_port(dev); + mutex_unlock(mdev-state_lock); +} + +static void mlx4_en_lock_and_start_port(struct work_struct *work) +{ + struct mlx4_en_priv *priv = container_of(work, struct mlx4_en_priv, +start_port_task); + struct net_device *dev = priv-dev; + struct mlx4_en_dev *mdev = priv-mdev; + + mutex_lock(mdev-state_lock); + mlx4_en_do_start_port(dev); + mutex_unlock(mdev-state_lock); +} -int mlx4_en_start_port(struct net_device *dev) +int mlx4_en_do_start_port(struct net_device *dev) { struct mlx4_en_priv *priv = netdev_priv(dev); struct mlx4_en_dev *mdev = priv-mdev; @@ -691,7 +728,7 @@ cq_err: } -void mlx4_en_stop_port(struct net_device *dev) +void mlx4_en_do_stop_port(struct net_device *dev) { struct mlx4_en_priv *priv = netdev_priv(dev); struct mlx4_en_dev *mdev = priv-mdev; @@ -761,8 +798,8 @@ reset: mutex_lock(mdev-state_lock); if (priv-port_up) { - mlx4_en_stop_port(dev); - if (mlx4_en_start_port(dev)) + mlx4_en_do_stop_port(dev); + if (mlx4_en_do_start_port(dev)) en_err(priv, Failed restarting port %d\n, priv-port); } mutex_unlock(mdev-state_lock); @@ -793,7 +830,7 @@ mlx4_en_init_locked(struct mlx4_en_priv dev = priv-dev; mdev = priv-mdev; if (dev-if_drv_flags IFF_DRV_RUNNING) - mlx4_en_stop_port(dev); + mlx4_en_do_stop_port(dev); if (!mdev-device_up) { en_err(priv, Cannot open - device down/disabled\n); @@ -816,7 +853,7 @@ mlx4_en_init_locked(struct mlx4_en_priv } mlx4_en_set_default_moderation(priv); - if (mlx4_en_start_port(dev)) + if (mlx4_en_do_start_port(dev)) en_err(priv, Failed starting port:%d\n, priv-port); } @@ -905,7 +942,7 @@ void mlx4_en_destroy_netdev(struct net_d mlx4_free_hwq_res(mdev-dev, priv-res, MLX4_EN_PAGE_SIZE); mutex_lock(mdev-state_lock); - mlx4_en_stop_port(dev); + mlx4_en_do_stop_port(dev); mutex_unlock(mdev-state_lock); cancel_delayed_work(priv-stats_task); @@ -925,7 +962,6 @@ void mlx4_en_destroy_netdev(struct net_d mtx_destroy(priv-stats_lock.m); mtx_destroy(priv-vlan_lock.m); - mtx_destroy(priv-ioctl_lock.m); kfree(priv); if_free(dev); } @@ -951,9 +987,9 @@ static int mlx4_en_change_mtu(struct net * the port */ en_dbg(DRV, priv, Change MTU called with card down!?\n); } else { - mlx4_en_stop_port(dev); + mlx4_en_do_stop_port(dev); mlx4_en_set_default_moderation(priv); - err = mlx4_en_start_port(dev); + err = mlx4_en_do_start_port(dev); if (err) { en_err(priv, Failed restarting port:%d\n,
Re: svn commit: r259609 - head/sys/kern
Am 19.12.2013 11:49, schrieb Bruce Evans: On Thu, 19 Dec 2013, Stefan Esser wrote: Log: Fix overflow for timeout values of more than 68 years, which is the maximum covered by sbintime (LONG_MAX seconds). Not LONG_MAX seconds, but INT32_MAX seconds. LONG_MAX seconds is about 2**32 times larger on 64-bit arches. Hi Bruce, yes, you are of course correct ... The limit is 2^31-2^-32 seconds, to be exact ;-) This is represented by LONG_MAX in sbintime, which made me use that wrong constant in the commit message. sbintimes and their complexity give many more possibilities for overflow. I thought that the new overflow bugs and some old ones were already fixed. Some programs use timeout values in excess of 1000 years. The conversion to sbintime caused wrap-around on overflow, which resulted in short or negative timeout values. This caused long delays on sockets opened by affected programs (e.g. OpenSSH). Kernels compiled without -fno-strict-overflow were not affected, apparently because the compiler tested the sign of the timeout value before performing the multiplication that lead to overflow. I think it just gave a garbage value that was accidentally less harmful. The result of the multiplication was performed modulo 2^64 due to the limited range of the operation. The result was then interpreted as a signed 64 bit 2s-complement number. The factor 2^32/1000 is 0x418937, which multiplied with a round decimal number over 1000*2^32 will result in random bit sequence in the resulting sbintime. Half the values will have been positive, and many will have corresponded to substantial timeout values, but some will have been very low, resulting in unexpectedly low timeouts. When the -fno-strict-overflow option was added to CFLAGS, this optimization was disabled and the test was performed on the result of the multiplication. Negative products were caught and resulted in EINVAL being returned, but wrap-around to positive values just shortened the timeout value to the residue of the result that could be represented by sbintime. This shows one reason why -fno-strict-overflow shouldn't be used. It just wastes time to give different undefined behaviour with undocumented details. Well, I thought so when I found the cause of the breakage (long delays opening TCP connections) that were the result of the compilation with -fno-strict-overflow. But I reconsidered, because a real bug in the code has been identied, this way. The bug existed, without being detected (because too short but non-zero timeout values were caught at the application layer, which just re-issued the call with the remaining time as timeout parameter). If applications didn't have to worry about short timeouts for other reasons, then this bug would have led to observable problems, even with -fno-strict-overflow. The fix is to cap the timeout values at the maximum that can be represented by sbintime, which is 2^31 - 1 seconds or more than 68 years. 2^31 - 1 is a correct spelling of INT32_MAX, unlike LONG_MAX. Yes, sbintime is defined in units of 2^-32 seconds, which makes the highest representable time exactly (2^31 - 2^-32) seconds. This value is represented by LLONG_MAX units of 2^32 seconds ... After this change, the kernel can be compiled with -fno-strict-overflow with no ill effects. Modified: head/sys/kern/kern_event.c == --- head/sys/kern/kern_event.cThu Dec 19 07:33:07 2013(r259608) +++ head/sys/kern/kern_event.cThu Dec 19 09:01:46 2013(r259609) @@ -526,7 +526,8 @@ knote_fork(struct knlist *list, int pid) static __inline sbintime_t timer2sbintime(intptr_t data) { - +if (data LLONG_MAX / SBT_1MS) +return LLONG_MAX; return (SBT_1MS * data); } This has the following style bugs: - it removes the empty line after the (null) declarations - it is missing parentheses around the return value - it uses the long long abomination Ughh, I'll fix the style bugs ... It had taken me several hours over the last week to find this bug, and I committed the fix that worked on my system without making it compliant with FreeBSD style. Sorry for that ... This has the following type errors: - using the long long abomination is not just a style bug. sbintime_t has type int64_t, not long long. The overflow check will break if long long becomes longer than int64_t The definition of sbintime is int64_t on all architectures. If any architecture used a wider integer type for sbintime, the fix would just limit the maximum timeout to 68 years (instead of many magnitudes longer than the universe will last), which is still way beyond any sensible timeout value. And functions will have to check for too short timeouts to be robust, anyway. The functions in kern_timeout.c heavily depend on sbintime having at least 64 bits and perform calculations under the assumption,
Re: svn commit: r259562 - head/usr.bin/netstat
Gleb Smirnoff wrote this message on Thu, Dec 19, 2013 at 15:57 +0400: On Wed, Dec 18, 2013 at 04:40:52PM -0500, John Baldwin wrote: J On Wednesday, December 18, 2013 3:07:58 pm Alexander V. Chernikov wrote: J On 18.12.2013 22:45, John-Mark Gurney wrote: J Alexander V. Chernikov wrote this message on Wed, Dec 18, 2013 at 18:25 +: J Author: melifaro J Date: Wed Dec 18 18:25:27 2013 J New Revision: 259562 J URL: http://svnweb.freebsd.org/changeset/base/259562 J J Log: J Switch netstat -rn to use standard API for retrieving list of routes J instead of peeking inside in-kernel radix via kget. J This permits us to change kernel structures without breaking userland. J Additionally, this change provide more reliable and faster output. J J `Refs` and `Use` fields available in IPv4 by default (and via -W J for other families) were removed. `Refs` is radix-specific thing J which is not informative for users. `Use` field value is handy sometimes, J but a) current API does not support it and b) I'm not sure we will J support per-rte pcpu counters in near future. J J Old method of retrieving data is still supported (either by defining J NewTree=0 or running netstat with -A). However, Refs/Use fields are J hidden. J J Sponsored by: Yandex LLC J MFC after: 4 weeks J PR: kern/167204 J J How will this impact the use of netstat -rn -M vmcore -N kernel ? Will J this change make it not usable, or will you still automatically use J Well. It will probably break in (maybe, near) future. J J Please don't gratuitiously break things that /usr/sbin/crashinfo runs. It's J fine if kvm mode is fragile and requires the binary to be in sync with the J kernel and is only used for crash dumps, but it is very useful to extract J all sorts of info out of a crash dump. The problem is that these tools (netstat, and some others) prevent us from improving the kernel network stack. We can't make improvements that are mergeable to stable/x branch, since the tools would be broken. Moreover any improvement in head/, requires from developer additional work in netstat code, which I must admit isn't a pleasure to work with. And any improvement in head adds additional incompatibility between newer kernel and older world, which is of course allowed in CURRENT, but still we'd prefer to reduce number of such events. I've thought about this issue a bit, and I realized that w/ ctf (from dtrace) that we could make netstat and related tools be able to understand what fields are available, even w/ older/different kernels... It does mean we'd have to be careful not to repurpose struct names, but that shouldn't be too hard... I haven't been happy w/ reading raw structs, but w/ ctf, there would be meaning behind the data... We could even add a SYSCTL_ that prepends the data w/ the CTF data and the tool could support both methods... I agree that usage of tools on vmcores is useful. But we all should agree that it has very limited use. Only kernel hackers and developers are expected to do this. However, speaking of myself, I was never interested in routing table from a vmcore neither interface statistics, when fixing a bug in networking stack, and I've fixed quite a lot of them. Still, I believe, that some developers find this useful. My suggestion is that all this code is deleted from src/usr.bin/netstat, and moved to src/tools, and we relax assertion that src/tools must be compatible with any kernel within the branch. So, any person who wants this functionality, needs to keep his src/tools in sync with kernel and compile a tool when he desires to dump routing table from a vmcore. Having recently debugged a kernel issue, it was very nice that tools like dmesg could operate on a core... Finally, when we remove all the kvm(3) usage from a tool, then we can remove the sugid bit from it, which would be a another fine point. Which is a good thing, but shouldn't need to remove the kvm access.. We have dual kvm/sysctl access for most things in the kernel... Once a tool has completed sysctl access for all data it needs, why would it need the sgid bit? I will admit, I've never liked having dual access... -- John-Mark Gurney Voice: +1 415 225 5579 All that I will do, has been done, All that I have, has not. ___ 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: r259617 - in stable/9/sys: mips/include powerpc/include
Author: pluknet Date: Thu Dec 19 17:29:56 2013 New Revision: 259617 URL: http://svnweb.freebsd.org/changeset/base/259617 Log: MFC r255194 and prerequisites r229494,229496: Introduce internal macros for __U/INT64_C to define the U/INT64_MAX/MIN values properly. The previous definition only worked if __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS were defined at the same time. Newer versions of gcc define __INT64_C and __UINT64_C, so avoid redefining them if gcc provides them. Applying r255194 fixes stable/9 host to allow source upgrading to the newer versions with usr.bin/dtc included in bootstrap tools. Approved by: imp (MFC to stable/9) Modified: stable/9/sys/mips/include/_stdint.h stable/9/sys/powerpc/include/_stdint.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/mips/include/_stdint.h == --- stable/9/sys/mips/include/_stdint.h Thu Dec 19 15:45:03 2013 (r259616) +++ stable/9/sys/mips/include/_stdint.h Thu Dec 19 17:29:56 2013 (r259617) @@ -66,6 +66,16 @@ #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) +#ifndef __INT64_C +#ifdef __mips_n64 +#define __INT64_C(c) (c ## L) +#define __UINT64_C(c) (c ## UL) +#else +#define __INT64_C(c) (c ## LL) +#define __UINT64_C(c) (c ## ULL) +#endif +#endif + /* * ISO/IEC 9899:1999 * 7.18.2.1 Limits of exact-width integer types @@ -74,19 +84,19 @@ #defineINT8_MIN(-0x7f-1) #defineINT16_MIN (-0x7fff-1) #defineINT32_MIN (-0x7fff-1) -#defineINT64_MIN (-INT64_C(0x7fff)-1) +#defineINT64_MIN (-__INT64_C(0x7fff)-1) /* Maximum values of exact-width signed integer types. */ #defineINT8_MAX0x7f #defineINT16_MAX 0x7fff #defineINT32_MAX 0x7fff -#defineINT64_MAX INT64_C(0x7fff) +#defineINT64_MAX __INT64_C(0x7fff) /* Maximum values of exact-width unsigned integer types. */ #defineUINT8_MAX 0xff #defineUINT16_MAX 0x #defineUINT32_MAX 0x -#defineUINT64_MAX UINT64_C(0x) +#defineUINT64_MAX __UINT64_C(0x) /* * ISO/IEC 9899:1999 Modified: stable/9/sys/powerpc/include/_stdint.h == --- stable/9/sys/powerpc/include/_stdint.h Thu Dec 19 15:45:03 2013 (r259616) +++ stable/9/sys/powerpc/include/_stdint.h Thu Dec 19 17:29:56 2013 (r259617) @@ -65,6 +65,16 @@ #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) +#ifndef __INT64_C +#ifdef __LP64__ +#define__INT64_C(c)(c ## L) +#define__UINT64_C(c) (c ## UL) +#else +#define__INT64_C(c)(c ## LL) +#define__UINT64_C(c) (c ## ULL) +#endif +#endif + /* * ISO/IEC 9899:1999 * 7.18.2.1 Limits of exact-width integer types @@ -73,19 +83,19 @@ #defineINT8_MIN(-0x7f-1) #defineINT16_MIN (-0x7fff-1) #defineINT32_MIN (-0x7fff-1) -#defineINT64_MIN (-INT64_C(0x7fff)-1) +#defineINT64_MIN (-__INT64_C(0x7fff)-1) /* Maximum values of exact-width signed integer types. */ #defineINT8_MAX0x7f #defineINT16_MAX 0x7fff #defineINT32_MAX 0x7fff -#defineINT64_MAX INT64_C(0x7fff) +#defineINT64_MAX __INT64_C(0x7fff) /* Maximum values of exact-width unsigned integer types. */ #defineUINT8_MAX 0xff #defineUINT16_MAX 0x #defineUINT32_MAX 0x -#defineUINT64_MAX UINT64_C(0x) +#defineUINT64_MAX __UINT64_C(0x) /* * ISO/IEC 9899:1999 ___ 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: r259618 - stable/9/sys/conf
Author: imp Date: Thu Dec 19 18:06:52 2013 New Revision: 259618 URL: http://svnweb.freebsd.org/changeset/base/259618 Log: Improve compatibility with earlier parts of the 9 branch by defaulting to MK_CLANG_IS_CC is no when it isn't otherwise defined. Also, bsd.compiler.mk wasn't present in 9.0, so don't require it. With these changes, you can compile a tip of 9.x kernel and modules old-school on a 9.0 system. # Direct commit since this isn't relevant to 10 or current. Modified: stable/9/sys/conf/kern.mk stable/9/sys/conf/kern.pre.mk stable/9/sys/conf/kmod.mk Modified: stable/9/sys/conf/kern.mk == --- stable/9/sys/conf/kern.mk Thu Dec 19 17:29:56 2013(r259617) +++ stable/9/sys/conf/kern.mk Thu Dec 19 18:06:52 2013(r259618) @@ -8,6 +8,7 @@ CWARNFLAGS?=-Wall -Wredundant-decls -Wn -Wundef -Wno-pointer-sign -fformat-extensions \ -Wmissing-include-dirs -fdiagnostics-show-option \ ${CWARNEXTRA} +MK_CLANG_IS_CC ?= no # # The following flags are next up for working on: # -Wextra Modified: stable/9/sys/conf/kern.pre.mk == --- stable/9/sys/conf/kern.pre.mk Thu Dec 19 17:29:56 2013 (r259617) +++ stable/9/sys/conf/kern.pre.mk Thu Dec 19 18:06:52 2013 (r259618) @@ -4,10 +4,11 @@ # of the definitions that need to be before %BEFORE_DEPEND. .include bsd.own.mk -.include bsd.compiler.mk +.sinclude bsd.compiler.mk # backwards compat option for older systems. MACHINE_CPUARCH?=${MACHINE_ARCH:C/mipse[lb]/mips/:C/armeb/arm/:C/powerpc64/powerpc/} +COMPILER_TYPE?=gcc # Can be overridden by makeoptions or /etc/make.conf KERNEL_KO?=kernel Modified: stable/9/sys/conf/kmod.mk == --- stable/9/sys/conf/kmod.mk Thu Dec 19 17:29:56 2013(r259617) +++ stable/9/sys/conf/kmod.mk Thu Dec 19 18:06:52 2013(r259618) @@ -73,10 +73,15 @@ OBJCOPY?= objcopy .endif .include bsd.init.mk -.include bsd.compiler.mk +.sinclude bsd.compiler.mk + +# backwards compat option for older systems. +COMPILER_TYPE?=gcc .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S +MK_CLANG_IS_CC ?= no + # amd64 and mips use direct linking for kmod, all others use shared binaries .if ${MACHINE_CPUARCH} != amd64 ${MACHINE_CPUARCH} != mips __KLD_SHARED=yes ___ 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: r259619 - in head/contrib/gcc: . cp doc
Author: pfg Date: Thu Dec 19 18:27:32 2013 New Revision: 259619 URL: http://svnweb.freebsd.org/changeset/base/259619 Log: gcc: backport upstream fix for issue with C++'s placement new Fixes GCC libstdc++/29286 Obtained from:gcc 4.3 (rev. 125603, 125653; GPLv2) MFC after:2 weeks Modified: head/contrib/gcc/ChangeLog.gcc43 head/contrib/gcc/cp/ChangeLog.gcc43 head/contrib/gcc/cp/init.c head/contrib/gcc/doc/c-tree.texi head/contrib/gcc/expr.c head/contrib/gcc/gimple-low.c head/contrib/gcc/gimplify.c head/contrib/gcc/omp-low.c head/contrib/gcc/print-tree.c head/contrib/gcc/tree-gimple.c head/contrib/gcc/tree-inline.c head/contrib/gcc/tree-pretty-print.c head/contrib/gcc/tree-ssa-alias.c head/contrib/gcc/tree-ssa-dce.c head/contrib/gcc/tree-ssa-operands.c head/contrib/gcc/tree-ssa-structalias.c head/contrib/gcc/tree.def head/contrib/gcc/tree.h Modified: head/contrib/gcc/ChangeLog.gcc43 == --- head/contrib/gcc/ChangeLog.gcc43Thu Dec 19 18:06:52 2013 (r259618) +++ head/contrib/gcc/ChangeLog.gcc43Thu Dec 19 18:27:32 2013 (r259619) @@ -65,6 +65,48 @@ fvisibility-ms-compat. * c.opt (fvisibility-ms-compat): New. +2007-06-12 Ian Lance Taylor i...@google.com (r125653) + Daniel Berlin dber...@dberlin.org + + PR libstdc++/29286 + * tree.def: Add CHANGE_DYNAMIC_TYPE_EXPR. + * tree.h (CHANGE_DYNAMIC_TYPE_NEW_TYPE): Define. + (CHANGE_DYNAMIC_TYPE_LOCATION): Define. + (DECL_NO_TBAA_P): Define. + (struct tree_decl_common): Add no_tbaa_flag field. + * tree-ssa-structalias.c (struct variable_info): Add + no_tbaa_pruning field. + (new_var_info): Initialize no_tbaa_pruning field. + (unify_nodes): Copy no_tbaa_pruning field. + (find_func_aliases): Handle CHANGE_DYNAMIC_TYPE_EXPR. + (dump_solution_for_var): Print no_tbaa_pruning flag. + (set_uids_in_ptset): Add no_tbaa_pruning parameter. Change all + callers. + (compute_tbaa_pruning): New static function. + (compute_points_to_sets): Remove CHANGE_DYNAMIC_TYPE_EXPR nodes. + Call compute_tbaa_pruning. + * tree-ssa-alias.c (may_alias_p): Test no_tbaa_flag for pointers. + * gimplify.c (gimplify_expr): Handle CHANGE_DYNAMIC_TYPE_EXPR. + * gimple-low.c (lower_stmt): Likewise. + * tree-gimple.c (is_gimple_stmt): Likewise. + * tree-ssa-operands.c (get_expr_operands): Likewise. + * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise. + * tree-inline.c (estimate_num_insns_1): Likewise. + (copy_result_decl_to_var): Likewise. + * expr.c (expand_expr_real_1): Likewise. + * tree-pretty-print.c (dump_generic_node): Likewise. + * tree-inline.c (copy_decl_to_var): Copy DECL_NO_TBAA_P flag. + * omp-low.c (omp_copy_decl_2): Likewise. + * print-tree.c (print_node): Print DECL_NO_TBAA_P flag. + * doc/c-tree.texi (Expression trees): Document + CHANGE_DYNAMIC_TYPE_EXPR. + +2007-06-09 Daniel Berlin dber...@dberlin.org (r125603) + + * tree-ssa-structalias.c (set_uids_in_ptset): Add is_deref'd + parameter, use it. + (find_what_p_points_to): Pass new parameter to set_uids_in_ptset. + 2007-06-05 Joerg Wunsch j@uriah.heep.sax.de (r125346) PR preprocessor/23479 Modified: head/contrib/gcc/cp/ChangeLog.gcc43 == --- head/contrib/gcc/cp/ChangeLog.gcc43 Thu Dec 19 18:06:52 2013 (r259618) +++ head/contrib/gcc/cp/ChangeLog.gcc43 Thu Dec 19 18:27:32 2013 (r259619) @@ -25,6 +25,12 @@ * decl2.c (determine_visibility): Remove duplicate code for handling type info. +2007-06-12 Ian Lance Taylor i...@google.com (r125653) + + PR libstdc++/29286 + * init.c (avoid_placement_new_aliasing): New static function. + (build_new_1): Call it. + 2007-05-31 Daniel Berlin dber...@dberlin.org (r125239) * typeck.c (build_binary_op): Include types in error. Modified: head/contrib/gcc/cp/init.c == --- head/contrib/gcc/cp/init.c Thu Dec 19 18:06:52 2013(r259618) +++ head/contrib/gcc/cp/init.c Thu Dec 19 18:27:32 2013(r259619) @@ -1,6 +1,7 @@ /* Handle initialization things in C++. Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 + Free Software Foundation, Inc. Contributed by Michael Tiemann (tiem...@cygnus.com) This file is part of GCC. @@ -1564,6 +1565,55 @@ build_raw_new_expr (tree placement, tree return new_expr; } +/* Make sure that there are no aliasing issues with T, a placement new + expression applied to
svn commit: r259621 - stable/10/usr.sbin/bsdinstall/scripts
Author: dteske Date: Thu Dec 19 18:52:41 2013 New Revision: 259621 URL: http://svnweb.freebsd.org/changeset/base/259621 Log: MFC r259276,259468-259470,259472,259474,259476-259478,259480-259481,259570, 259572, and 259597-259598... r259276: Fix bug in `services' script in adding dumpdev comment to rc.conf r259468: Ignore spurious escape generated by VMware's Ctrl-Cmd combination r259469: Mask errors in `config' script from newaliases(1) about non-FQHN r259470: Set atime=on for /var/mail zfsboot dataset to support mail server r259472: Accept NULL input for zfsboot SWAP to indicate SWAP of zero bytes r259474: Multiple changes, including bug-fixes and debugging improvements r259476: Change default ZFS disk layout, making it easier to resize r259477: fletcher4 is now the default (zfsboot related) r259478: De-uglify the geli(8)-setup infobox (zfsboot related) r259480: Fix ghosted zroot issue by always performing labelclear on swap r259481: Auto-enable 4k sector alignmet when geli(8) is enabled (zfsboot) r259570: Fix numerical comparison error (zfsboot) r259572: Mask spurious rm error in bsdinstall_log from `auto' script r259597: Fix zfsboot regression when installing to 3+ disks r259598: Set cachefile property of bootpool so it imports to new system Modified: stable/10/usr.sbin/bsdinstall/scripts/auto stable/10/usr.sbin/bsdinstall/scripts/config stable/10/usr.sbin/bsdinstall/scripts/services stable/10/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/auto == --- stable/10/usr.sbin/bsdinstall/scripts/auto Thu Dec 19 18:52:27 2013 (r259620) +++ stable/10/usr.sbin/bsdinstall/scripts/auto Thu Dec 19 18:52:41 2013 (r259621) @@ -49,6 +49,10 @@ error() { MAIN +# Don't send ESC on function-key 62/63 (left/right command key) +f_quietly kbdcontrol -f 62 '' +f_quietly kbdcontrol -f 63 '' + f_dprintf Began Installation at %s $( date ) rm -rf $BSDINSTALL_TMPETC @@ -99,7 +103,7 @@ if [ -n $FETCH_DISTRIBUTIONS ]; then export BSDINSTALL_DISTSITE fi -rm $PATH_FSTAB +rm -f $PATH_FSTAB touch $PATH_FSTAB PMODES=\ @@ -120,8 +124,7 @@ exec 31 PARTMODE=`echo $PMODES | xargs dialog --backtitle FreeBSD Installer \ --title Partitioning \ --menu How would you like to partition your disk? \ - 0 0 0 21 13` -if [ $? -eq $DIALOG_CANCEL ]; then exit 1; fi + 0 0 0 21 13` || exit 1 exec 3- case $PARTMODE in Modified: stable/10/usr.sbin/bsdinstall/scripts/config == --- stable/10/usr.sbin/bsdinstall/scripts/configThu Dec 19 18:52:27 2013(r259620) +++ stable/10/usr.sbin/bsdinstall/scripts/configThu Dec 19 18:52:41 2013(r259621) @@ -42,7 +42,7 @@ cp $BSDINSTALL_TMPBOOT/* $BSDINSTALL_CHR [ ${debugFile#+} ] cp ${debugFile#+} $BSDINSTALL_CHROOT/var/log/ # Set up other things from installed config -chroot $BSDINSTALL_CHROOT /usr/bin/newaliases +chroot $BSDINSTALL_CHROOT /usr/bin/newaliases /dev/null 21 # END Modified: stable/10/usr.sbin/bsdinstall/scripts/services == --- stable/10/usr.sbin/bsdinstall/scripts/services Thu Dec 19 18:52:27 2013(r259620) +++ stable/10/usr.sbin/bsdinstall/scripts/services Thu Dec 19 18:52:41 2013(r259621) @@ -50,13 +50,12 @@ DAEMONS=$(dialog --backtitle FreeBSD In 21 13) exec 3- -local havedump= +havedump= for daemon in $DAEMONS; do if [ $daemon == dumpdev ]; then havedump=1 - echo \# Set dumpdev to \AUTO\ to enable crash dumps, \ - \NO\ to disable \ - $BSDINSTALL_TMPETC/rc.conf.services + echo '# Set dumpdev to AUTO to enable crash dumps, NO' \ +'to disable' $BSDINSTALL_TMPETC/rc.conf.services echo dumpdev=\AUTO\ $BSDINSTALL_TMPETC/rc.conf.services continue fi Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot == --- stable/10/usr.sbin/bsdinstall/scripts/zfsboot Thu Dec 19 18:52:27 2013(r259620) +++ stable/10/usr.sbin/bsdinstall/scripts/zfsboot Thu Dec 19 18:52:41 2013(r259621) @@ -66,23 +66,30 @@ f_include $BSDCFG_SHARE/variable.subr # # Should we use geli(8) to encrypt the drives? +# NB: Automatically enables ZFSBOOT_BOOT_POOL # : ${ZFSBOOT_GELI_ENCRYPTION=} # -# Default name the unencrypted pool when using geli(8) to encrypt the drives +# Default path to the geli(8) keyfile used in drive encryption
svn commit: r259622 - stable/10/share/man/man4
Author: np Date: Thu Dec 19 19:15:24 2013 New Revision: 259622 URL: http://svnweb.freebsd.org/changeset/base/259622 Log: MFC r259569: cxgbe.4: Belated update to the man page to reflect T5 support. Modified: stable/10/share/man/man4/cxgbe.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/cxgbe.4 == --- stable/10/share/man/man4/cxgbe.4Thu Dec 19 18:52:41 2013 (r259621) +++ stable/10/share/man/man4/cxgbe.4Thu Dec 19 19:15:24 2013 (r259622) @@ -1,4 +1,4 @@ -.\ Copyright (c) 2011-2012, Chelsio Inc +.\ Copyright (c) 2011-2013, Chelsio Inc .\ All rights reserved. .\ .\ Redistribution and use in source and binary forms, with or without @@ -31,12 +31,12 @@ .\ .\ $FreeBSD$ .\ -.Dd February 25, 2012 +.Dd December 18, 2013 .Dt CXGBE 4 .Os .Sh NAME .Nm cxgbe -.Nd Chelsio T4 10Gb and 1Gb Ethernet adapter driver +.Nd Chelsio T4 and T5 based 40Gb, 10Gb, and 1Gb Ethernet adapter driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -50,13 +50,14 @@ module at boot time, place the following .Xr loader.conf 5 : .Bd -literal -offset indent t4fw_cfg_load=YES +t5fw_cfg_load=YES if_cxgbe_load=YES .Ed .Sh DESCRIPTION The .Nm driver provides support for PCI Express Ethernet adapters based on -the Chelsio Terminator 4 (T4) ASIC. +the Chelsio Terminator 4 and Terminator 5 ASICs (T4 and T5). The driver supports Jumbo Frames, Transmit/Receive checksum offload, TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN tag insertion/extraction, VLAN checksum offload, VLAN TSO, and @@ -65,11 +66,50 @@ For further hardware information and que requirements, see .Pa http://www.chelsio.com/ . .Pp +Note that ports of T5 cards are named cxl and attach to a t5nex parent device +(in contrast to ports named cxgbe that attach to a t4nex parent for a T4 card). +Loader tunables with the hw.cxgbe prefix apply to both T4 and T5 cards. +The sysctl MIBs are at dev.t5nex and dev.cxl for T5 cards and at dev.t4nex and +dev.cxgbe for T4 cards. + +.Pp For more information on configuring this device, see .Xr ifconfig 8 . .Sh HARDWARE The .Nm +driver supports 40Gb, 10Gb and 1Gb Ethernet adapters based on the T5 ASIC +(ports will be named cxl): +.Pp +.Bl -bullet -compact +.It +Chelsio T580-CR +.It +Chelsio T580-LP-CR +.It +Chelsio T580-LP-SO-CR +.It +Chelsio T560-CR +.It +Chelsio T540-CR +.It +Chelsio T540-LP-CR +.It +Chelsio T522-CR +.It +Chelsio T520-LL-CR +.It +Chelsio T520-CR +.It +Chelsio T520-SO +.It +Chelsio T520-BT +.It +Chelsio T504-BT +.El +.Pp +The +.Nm driver supports 10Gb and 1Gb Ethernet adapters based on the T4 ASIC: .Pp .Bl -bullet -compact @@ -139,8 +179,8 @@ by default (all values are in microsecon value from this list. The default value is 1 for both 10Gb and 1Gb ports, which means the timer value is 5us. -Different cxgbe interfaces can be assigned different values at any time via the -dev.cxgbe.X.holdoff_tmr_idx sysctl. +Different interfaces can be assigned different values at any time via the +dev.cxgbe.X.holdoff_tmr_idx or dev.cxl.X.holdoff_tmr_idx sysctl. .It Va hw.cxgbe.holdoff_pktc_idx_10G .It Va hw.cxgbe.holdoff_pktc_idx_1G The packet-count index value to use to delay interrupts. @@ -149,8 +189,8 @@ and the index selects a value from this The default value is -1 for both 10Gb and 1Gb ports, which means packet counting is disabled and interrupts are generated based solely on the holdoff timer value. -Different cxgbe interfaces can be assigned different values via the -dev.cxgbe.X.holdoff_pktc_idx sysctl. +Different interfaces can be assigned different values via the +dev.cxgbe.X.holdoff_pktc_idx or dev.cxl.X.holdoff_pktc_idx sysctl. This sysctl works only when the interface has never been marked up (as done by ifconfig up). .It Va hw.cxgbe.qsize_txq @@ -161,16 +201,16 @@ software queuing. See .Xr ifnet 9 . The default value is 1024. -Different cxgbe interfaces can be assigned different values via the -dev.cxgbe.X.qsize_txq sysctl. +Different interfaces can be assigned different values via the +dev.cxgbe.X.qsize_txq sysctl or dev.cxl.X.qsize_txq sysctl. This sysctl works only when the interface has never been marked up (as done by ifconfig up). .It Va hw.cxgbe.qsize_rxq The size, in number of entries, of the descriptor ring used for an rx queue. The default value is 1024. -Different cxgbe interfaces can be assigned different values via the -dev.cxgbe.X.qsize_rxq sysctl. +Different interfaces can be assigned different values via the +dev.cxgbe.X.qsize_rxq or dev.cxl.X.qsize_rxq sysctl. This sysctl works only when the interface has never been marked up (as done by ifconfig up). .It Va hw.cxgbe.interrupt_types @@ -231,6 +271,10 @@ The .Nm device driver first appeared in .Fx 9.0 . +Support for T5 cards first appeared in +.Fx 9.2 +and +.Fx 10.0 . .Sh AUTHORS .An -nosplit The
Re: svn commit: r259479 - head/usr.sbin/bsdinstall/scripts
On Dec 18, 2013, at 10:08 PM, Teske, Devin wrote: On Dec 16, 2013, at 2:03 PM, Nathan Whitehorn wrote: On 12/16/13 15:55, Teske, Devin wrote: On Dec 16, 2013, at 1:50 PM, Nathan Whitehorn wrote: On 12/16/13 15:48, Teske, Devin wrote: On Dec 16, 2013, at 1:40 PM, Teske, Devin wrote: On Dec 16, 2013, at 1:26 PM, Nathan Whitehorn wrote: On 12/16/13 13:47, Devin Teske wrote: Author: dteske Date: Mon Dec 16 19:47:04 2013 New Revision: 259479 URL: http://svnweb.freebsd.org/changeset/base/259479 Log: Add kern.geom.label.disk_ident.enable=0 to loader.conf(5). Discussed on: -current, -stable MFC after: 3 days Modified: head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/usr.sbin/bsdinstall/scripts/zfsboot == --- head/usr.sbin/bsdinstall/scripts/zfsboot Mon Dec 16 19:44:45 2013(r259478) +++ head/usr.sbin/bsdinstall/scripts/zfsboot Mon Dec 16 19:47:04 2013(r259479) @@ -1159,6 +1159,9 @@ zfs_create_boot() $BSDINSTALL_TMPETC/rc.conf.zfs || return $FAILURE f_eval_catch $funcname echo $ECHO_APPEND 'zfs_load=\YES\' \ $BSDINSTALL_TMPBOOT/loader.conf.zfs || return $FAILURE + f_eval_catch $funcname echo $ECHO_APPEND \ + 'kern.geom.label.disk_ident.enable=\0\' \ + $BSDINSTALL_TMPBOOT/loader.conf.zfs || return $FAILURE # We're all done unless we should go on for boot pool [ $ZFSBOOT_BOOT_POOL ] || return $SUCCESS Uh -- what is all of this? Why are we disabling kernel functions depending on what the root filesystem is? Please don't MFC this. https://urldefense.proofpoint.com/v1/url?u=http://lists.freebsd.org/pipermail/freebsd-stable/2013-December/076365.htmlk=%2FbkpAUdJWZuiTILCq%2FFnQg%3D%3D%0Ar=LTzUWWrRnz2iN3PtHDubWRSAh9itVJ%2BMUcNBCQ4tyeo%3D%0Am=WCmXzB4036KuOzNScbJsBQLKdo%2BAo15QWLYq4A7DKis%3D%0As=4f16f0d6399e3a3c5e105a7869c580884327a8721c2f44c1711b319212a23db7 https://urldefense.proofpoint.com/v1/url?u=http://lists.freebsd.org/pipermail/freebsd-stable/2013-December/076471.htmlk=%2FbkpAUdJWZuiTILCq%2FFnQg%3D%3D%0Ar=LTzUWWrRnz2iN3PtHDubWRSAh9itVJ%2BMUcNBCQ4tyeo%3D%0Am=WCmXzB4036KuOzNScbJsBQLKdo%2BAo15QWLYq4A7DKis%3D%0As=17882f97e3633c1e3ebd45f332e62d2212dc53d1f0577acc4ae15d8234d09c7f NB: Happy to rip it out... but want something in-reply to those threads (pretty please). Basically... the logic is... The ZFS pool is built on vdevs of a specific name. The names that are used should remain the same. Adding this to the loader.conf ensures that the names that the pool(s) was/were built upon do not change. This goes beyond just a swap partition I imagine. For example... copying the data to a new drive using a duplicator. I'm sure there are other cases too. Thanks for the explanation! I wonder if we should just turn off the disk ident stuff by default globally -- it was causing problems for me as well without ZFS root. As I was making the commit to zfsboot... the very thought had occurred to me. I'm happy to rip this out in favor of a new global default. The end-result is that what Johan experienced won't be repeated. I think there's an urgency to get something to solve this into 10. Yeah, I can see that. Let me bring this up on -CURRENT, with a short timeout, and see what the options are. Any updates on this? As requested, I have held-back SVN r259479 from the merge process. However, as I'm sure RC3 is approaching, wanted to know if we should continue to look into changing the default (otherwise, we have r259479 available). -- Devin _ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. ___ 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: r259623 - releng/10.0/share/man/man4
Author: np Date: Thu Dec 19 19:39:24 2013 New Revision: 259623 URL: http://svnweb.freebsd.org/changeset/base/259623 Log: Merge r259622: cxgbe.4: Belated update to the man page to reflect T5 support. Approved by: re (gjb) Modified: releng/10.0/share/man/man4/cxgbe.4 Directory Properties: releng/10.0/ (props changed) Modified: releng/10.0/share/man/man4/cxgbe.4 == --- releng/10.0/share/man/man4/cxgbe.4 Thu Dec 19 19:15:24 2013 (r259622) +++ releng/10.0/share/man/man4/cxgbe.4 Thu Dec 19 19:39:24 2013 (r259623) @@ -1,4 +1,4 @@ -.\ Copyright (c) 2011-2012, Chelsio Inc +.\ Copyright (c) 2011-2013, Chelsio Inc .\ All rights reserved. .\ .\ Redistribution and use in source and binary forms, with or without @@ -31,12 +31,12 @@ .\ .\ $FreeBSD$ .\ -.Dd February 25, 2012 +.Dd December 18, 2013 .Dt CXGBE 4 .Os .Sh NAME .Nm cxgbe -.Nd Chelsio T4 10Gb and 1Gb Ethernet adapter driver +.Nd Chelsio T4 and T5 based 40Gb, 10Gb, and 1Gb Ethernet adapter driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -50,13 +50,14 @@ module at boot time, place the following .Xr loader.conf 5 : .Bd -literal -offset indent t4fw_cfg_load=YES +t5fw_cfg_load=YES if_cxgbe_load=YES .Ed .Sh DESCRIPTION The .Nm driver provides support for PCI Express Ethernet adapters based on -the Chelsio Terminator 4 (T4) ASIC. +the Chelsio Terminator 4 and Terminator 5 ASICs (T4 and T5). The driver supports Jumbo Frames, Transmit/Receive checksum offload, TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN tag insertion/extraction, VLAN checksum offload, VLAN TSO, and @@ -65,11 +66,50 @@ For further hardware information and que requirements, see .Pa http://www.chelsio.com/ . .Pp +Note that ports of T5 cards are named cxl and attach to a t5nex parent device +(in contrast to ports named cxgbe that attach to a t4nex parent for a T4 card). +Loader tunables with the hw.cxgbe prefix apply to both T4 and T5 cards. +The sysctl MIBs are at dev.t5nex and dev.cxl for T5 cards and at dev.t4nex and +dev.cxgbe for T4 cards. + +.Pp For more information on configuring this device, see .Xr ifconfig 8 . .Sh HARDWARE The .Nm +driver supports 40Gb, 10Gb and 1Gb Ethernet adapters based on the T5 ASIC +(ports will be named cxl): +.Pp +.Bl -bullet -compact +.It +Chelsio T580-CR +.It +Chelsio T580-LP-CR +.It +Chelsio T580-LP-SO-CR +.It +Chelsio T560-CR +.It +Chelsio T540-CR +.It +Chelsio T540-LP-CR +.It +Chelsio T522-CR +.It +Chelsio T520-LL-CR +.It +Chelsio T520-CR +.It +Chelsio T520-SO +.It +Chelsio T520-BT +.It +Chelsio T504-BT +.El +.Pp +The +.Nm driver supports 10Gb and 1Gb Ethernet adapters based on the T4 ASIC: .Pp .Bl -bullet -compact @@ -139,8 +179,8 @@ by default (all values are in microsecon value from this list. The default value is 1 for both 10Gb and 1Gb ports, which means the timer value is 5us. -Different cxgbe interfaces can be assigned different values at any time via the -dev.cxgbe.X.holdoff_tmr_idx sysctl. +Different interfaces can be assigned different values at any time via the +dev.cxgbe.X.holdoff_tmr_idx or dev.cxl.X.holdoff_tmr_idx sysctl. .It Va hw.cxgbe.holdoff_pktc_idx_10G .It Va hw.cxgbe.holdoff_pktc_idx_1G The packet-count index value to use to delay interrupts. @@ -149,8 +189,8 @@ and the index selects a value from this The default value is -1 for both 10Gb and 1Gb ports, which means packet counting is disabled and interrupts are generated based solely on the holdoff timer value. -Different cxgbe interfaces can be assigned different values via the -dev.cxgbe.X.holdoff_pktc_idx sysctl. +Different interfaces can be assigned different values via the +dev.cxgbe.X.holdoff_pktc_idx or dev.cxl.X.holdoff_pktc_idx sysctl. This sysctl works only when the interface has never been marked up (as done by ifconfig up). .It Va hw.cxgbe.qsize_txq @@ -161,16 +201,16 @@ software queuing. See .Xr ifnet 9 . The default value is 1024. -Different cxgbe interfaces can be assigned different values via the -dev.cxgbe.X.qsize_txq sysctl. +Different interfaces can be assigned different values via the +dev.cxgbe.X.qsize_txq sysctl or dev.cxl.X.qsize_txq sysctl. This sysctl works only when the interface has never been marked up (as done by ifconfig up). .It Va hw.cxgbe.qsize_rxq The size, in number of entries, of the descriptor ring used for an rx queue. The default value is 1024. -Different cxgbe interfaces can be assigned different values via the -dev.cxgbe.X.qsize_rxq sysctl. +Different interfaces can be assigned different values via the +dev.cxgbe.X.qsize_rxq or dev.cxl.X.qsize_rxq sysctl. This sysctl works only when the interface has never been marked up (as done by ifconfig up). .It Va hw.cxgbe.interrupt_types @@ -231,6 +271,10 @@ The .Nm device driver first appeared in .Fx 9.0 . +Support for T5 cards first appeared in +.Fx 9.2 +and +.Fx 10.0 .
svn commit: r259624 - vendor/tzdata/dist
Author: edwin Date: Thu Dec 19 20:15:49 2013 New Revision: 259624 URL: http://svnweb.freebsd.org/changeset/base/259624 Log: Vendor import of tzdata2013i: Removed support for solar-time-based time zones Jordan stays at summer time this year. Fix historical data for Cuba Obtained from:ftp://ftp.iana.org/tz/releases/ Deleted: vendor/tzdata/dist/solar87 vendor/tzdata/dist/solar88 vendor/tzdata/dist/solar89 Modified: vendor/tzdata/dist/asia vendor/tzdata/dist/northamerica Modified: vendor/tzdata/dist/asia == --- vendor/tzdata/dist/asia Thu Dec 19 19:39:24 2013(r259623) +++ vendor/tzdata/dist/asia Thu Dec 19 20:15:49 2013(r259624) @@ -1380,12 +1380,22 @@ ZoneAsia/Tokyo 9:18:59 - LMT 1887 Dec 3 # switch back to standard time this winter, so the will stay on DST # until about the same time next year (at least). # http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?NewsID=88950 -# -# From Paul Eggert (2013-09-21): -# It's looking like this change will be permanent; see -# Petra News Agency, Cancelling winter saved Jordan $7 million (2013-02-20) -# http://www.albawaba.com/business/jordan-winter-electricity--472005. -# So move Jordan to UTC+3 as of the abovementioned date. + +# From Steffen Thorsen (2013-12-11): +# Jordan Times and other sources say that Jordan is going back to +# UTC+2 on 2013-12-19 at midnight: +# http://jordantimes.com/govt-decides-to-switch-back-to-wintertime +# Official, in Arabic: +# http://www.petra.gov.jo/public_news/Nws_NewsDetails.aspx?Menu_ID=Site_Id=2lang=1NewsID=133230CatID=14 +# ... Our background/permalink about it +# http://www.timeanddate.com/news/time/jordan-reverses-dst-decision.html +# ... +# http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?lang=2site_id=1NewsID=133313Type=P +# ... says midnight for the coming one and 1:00 for the ones in the future +# (and they will use DST again next year, using the normal schedule). + +# From Paul Eggert (2013-12-11): +# As Steffen suggested, consider the past 21-month experiment to be DST. # Rule NAMEFROMTO TYPEIN ON AT SAVELETTER/S Rule Jordan 1973only- Jun 6 0:001:00S @@ -1415,11 +1425,13 @@ RuleJordan 20022012- Mar lastThu 24:0 Rule Jordan 2003only- Oct 24 0:00s 0 - Rule Jordan 2004only- Oct 15 0:00s 0 - Rule Jordan 2005only- Sep lastFri 0:00s 0 - -Rule Jordan 20062012- Oct lastFri 0:00s 0 - +Rule Jordan 20062011- Oct lastFri 0:00s 0 - +Rule Jordan 2013only- Dec 20 0:000 - +Rule Jordan 2014max - Mar lastThu 24:00 1:00S +Rule Jordan 2014max - Oct lastFri 0:00s 0 - # Zone NAMEGMTOFF RULES FORMAT [UNTIL] Zone Asia/Amman 2:23:44 - LMT 1931 - 2:00Jordan EE%sT 2012 Oct 26 0:00s - 3:00- AST + 2:00Jordan EE%sT # Kazakhstan Modified: vendor/tzdata/dist/northamerica == --- vendor/tzdata/dist/northamerica Thu Dec 19 19:39:24 2013 (r259623) +++ vendor/tzdata/dist/northamerica Thu Dec 19 20:15:49 2013 (r259624) @@ -2665,6 +2665,11 @@ Zone America/Costa_Rica -5:36:13 - LMT 1 # to DST--and one more hour on 1999-04-04--when the announcers will have # returned to Baltimore, which switches on that date.) +# From Steffen Thorsen (2013-11-11): +# DST start in Cuba in 2004 ... does not follow the same rules as the +# years before. The correct date should be Sunday 2004-03-28 00:00 ... +# https://web.archive.org/web/20040402060750/http://www.granma.cu/espanol/2004/marzo/sab27/reloj.html + # From Evert van der Veer via Steffen Thorsen (2004-10-28): # Cuba is not going back to standard time this year. # From Paul Eggert (2006-03-22): @@ -2854,7 +2859,8 @@ Rule Cuba1996only- Oct 6 0:00s 0 S Rule Cuba1997only- Oct 12 0:00s 0 S Rule Cuba19981999- Mar lastSun 0:00s 1:00D Rule Cuba19982003- Oct lastSun 0:00s 0 S -Rule Cuba20002004- Apr Sun=1 0:00s 1:00D +Rule Cuba20002003- Apr Sun=1 0:00s 1:00D +Rule Cuba2004only- Mar lastSun 0:00s 1:00D Rule Cuba20062010- Oct lastSun 0:00s 0 S Rule Cuba2007only- Mar Sun=8 0:00s 1:00D Rule Cuba2008only- Mar Sun=15 0:00s 1:00D
svn commit: r259625 - vendor/tzdata/tzdata2013i
Author: edwin Date: Thu Dec 19 20:18:21 2013 New Revision: 259625 URL: http://svnweb.freebsd.org/changeset/base/259625 Log: Tag of tzdata2013i sources Added: vendor/tzdata/tzdata2013i/ - copied from r259624, vendor/tzdata/dist/ ___ 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: r259626 - head/contrib/tzdata
Author: edwin Date: Thu Dec 19 20:19:57 2013 New Revision: 259626 URL: http://svnweb.freebsd.org/changeset/base/259626 Log: MFV of r259624, tzdata2013i Removed support for solar-time-based time zones Jordan stays at summer time this year. Fix historical data for Cuba Obtained from: ftp://ftp.iana.org/tz/releases/ Modified: head/contrib/tzdata/asia head/contrib/tzdata/northamerica Directory Properties: head/contrib/tzdata/ (props changed) Modified: head/contrib/tzdata/asia == --- head/contrib/tzdata/asiaThu Dec 19 20:18:21 2013(r259625) +++ head/contrib/tzdata/asiaThu Dec 19 20:19:57 2013(r259626) @@ -1380,12 +1380,22 @@ ZoneAsia/Tokyo 9:18:59 - LMT 1887 Dec 3 # switch back to standard time this winter, so the will stay on DST # until about the same time next year (at least). # http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?NewsID=88950 -# -# From Paul Eggert (2013-09-21): -# It's looking like this change will be permanent; see -# Petra News Agency, Cancelling winter saved Jordan $7 million (2013-02-20) -# http://www.albawaba.com/business/jordan-winter-electricity--472005. -# So move Jordan to UTC+3 as of the abovementioned date. + +# From Steffen Thorsen (2013-12-11): +# Jordan Times and other sources say that Jordan is going back to +# UTC+2 on 2013-12-19 at midnight: +# http://jordantimes.com/govt-decides-to-switch-back-to-wintertime +# Official, in Arabic: +# http://www.petra.gov.jo/public_news/Nws_NewsDetails.aspx?Menu_ID=Site_Id=2lang=1NewsID=133230CatID=14 +# ... Our background/permalink about it +# http://www.timeanddate.com/news/time/jordan-reverses-dst-decision.html +# ... +# http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?lang=2site_id=1NewsID=133313Type=P +# ... says midnight for the coming one and 1:00 for the ones in the future +# (and they will use DST again next year, using the normal schedule). + +# From Paul Eggert (2013-12-11): +# As Steffen suggested, consider the past 21-month experiment to be DST. # Rule NAMEFROMTO TYPEIN ON AT SAVELETTER/S Rule Jordan 1973only- Jun 6 0:001:00S @@ -1415,11 +1425,13 @@ RuleJordan 20022012- Mar lastThu 24:0 Rule Jordan 2003only- Oct 24 0:00s 0 - Rule Jordan 2004only- Oct 15 0:00s 0 - Rule Jordan 2005only- Sep lastFri 0:00s 0 - -Rule Jordan 20062012- Oct lastFri 0:00s 0 - +Rule Jordan 20062011- Oct lastFri 0:00s 0 - +Rule Jordan 2013only- Dec 20 0:000 - +Rule Jordan 2014max - Mar lastThu 24:00 1:00S +Rule Jordan 2014max - Oct lastFri 0:00s 0 - # Zone NAMEGMTOFF RULES FORMAT [UNTIL] Zone Asia/Amman 2:23:44 - LMT 1931 - 2:00Jordan EE%sT 2012 Oct 26 0:00s - 3:00- AST + 2:00Jordan EE%sT # Kazakhstan Modified: head/contrib/tzdata/northamerica == --- head/contrib/tzdata/northamericaThu Dec 19 20:18:21 2013 (r259625) +++ head/contrib/tzdata/northamericaThu Dec 19 20:19:57 2013 (r259626) @@ -2665,6 +2665,11 @@ Zone America/Costa_Rica -5:36:13 - LMT 1 # to DST--and one more hour on 1999-04-04--when the announcers will have # returned to Baltimore, which switches on that date.) +# From Steffen Thorsen (2013-11-11): +# DST start in Cuba in 2004 ... does not follow the same rules as the +# years before. The correct date should be Sunday 2004-03-28 00:00 ... +# https://web.archive.org/web/20040402060750/http://www.granma.cu/espanol/2004/marzo/sab27/reloj.html + # From Evert van der Veer via Steffen Thorsen (2004-10-28): # Cuba is not going back to standard time this year. # From Paul Eggert (2006-03-22): @@ -2854,7 +2859,8 @@ Rule Cuba1996only- Oct 6 0:00s 0 S Rule Cuba1997only- Oct 12 0:00s 0 S Rule Cuba19981999- Mar lastSun 0:00s 1:00D Rule Cuba19982003- Oct lastSun 0:00s 0 S -Rule Cuba20002004- Apr Sun=1 0:00s 1:00D +Rule Cuba20002003- Apr Sun=1 0:00s 1:00D +Rule Cuba2004only- Mar lastSun 0:00s 1:00D Rule Cuba20062010- Oct lastSun 0:00s 0 S Rule Cuba2007only- Mar Sun=8 0:00s 1:00D Rule Cuba2008only- Mar Sun=15 0:00s 1:00D ___
svn commit: r259627 - stable/6/share/zoneinfo
Author: edwin Date: Thu Dec 19 20:25:49 2013 New Revision: 259627 URL: http://svnweb.freebsd.org/changeset/base/259627 Log: MFC of 259626, tzdata2013i: Removed support for solar-time-based time zones Jordan stays at summer time this year. Fix historical data for Cuba Modified: stable/6/share/zoneinfo/asia stable/6/share/zoneinfo/northamerica Directory Properties: stable/6/share/zoneinfo/ (props changed) Modified: stable/6/share/zoneinfo/asia == --- stable/6/share/zoneinfo/asiaThu Dec 19 20:19:57 2013 (r259626) +++ stable/6/share/zoneinfo/asiaThu Dec 19 20:25:49 2013 (r259627) @@ -1380,12 +1380,22 @@ ZoneAsia/Tokyo 9:18:59 - LMT 1887 Dec 3 # switch back to standard time this winter, so the will stay on DST # until about the same time next year (at least). # http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?NewsID=88950 -# -# From Paul Eggert (2013-09-21): -# It's looking like this change will be permanent; see -# Petra News Agency, Cancelling winter saved Jordan $7 million (2013-02-20) -# http://www.albawaba.com/business/jordan-winter-electricity--472005. -# So move Jordan to UTC+3 as of the abovementioned date. + +# From Steffen Thorsen (2013-12-11): +# Jordan Times and other sources say that Jordan is going back to +# UTC+2 on 2013-12-19 at midnight: +# http://jordantimes.com/govt-decides-to-switch-back-to-wintertime +# Official, in Arabic: +# http://www.petra.gov.jo/public_news/Nws_NewsDetails.aspx?Menu_ID=Site_Id=2lang=1NewsID=133230CatID=14 +# ... Our background/permalink about it +# http://www.timeanddate.com/news/time/jordan-reverses-dst-decision.html +# ... +# http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?lang=2site_id=1NewsID=133313Type=P +# ... says midnight for the coming one and 1:00 for the ones in the future +# (and they will use DST again next year, using the normal schedule). + +# From Paul Eggert (2013-12-11): +# As Steffen suggested, consider the past 21-month experiment to be DST. # Rule NAMEFROMTO TYPEIN ON AT SAVELETTER/S Rule Jordan 1973only- Jun 6 0:001:00S @@ -1415,11 +1425,13 @@ RuleJordan 20022012- Mar lastThu 24:0 Rule Jordan 2003only- Oct 24 0:00s 0 - Rule Jordan 2004only- Oct 15 0:00s 0 - Rule Jordan 2005only- Sep lastFri 0:00s 0 - -Rule Jordan 20062012- Oct lastFri 0:00s 0 - +Rule Jordan 20062011- Oct lastFri 0:00s 0 - +Rule Jordan 2013only- Dec 20 0:000 - +Rule Jordan 2014max - Mar lastThu 24:00 1:00S +Rule Jordan 2014max - Oct lastFri 0:00s 0 - # Zone NAMEGMTOFF RULES FORMAT [UNTIL] Zone Asia/Amman 2:23:44 - LMT 1931 - 2:00Jordan EE%sT 2012 Oct 26 0:00s - 3:00- AST + 2:00Jordan EE%sT # Kazakhstan Modified: stable/6/share/zoneinfo/northamerica == --- stable/6/share/zoneinfo/northamericaThu Dec 19 20:19:57 2013 (r259626) +++ stable/6/share/zoneinfo/northamericaThu Dec 19 20:25:49 2013 (r259627) @@ -2665,6 +2665,11 @@ Zone America/Costa_Rica -5:36:13 - LMT 1 # to DST--and one more hour on 1999-04-04--when the announcers will have # returned to Baltimore, which switches on that date.) +# From Steffen Thorsen (2013-11-11): +# DST start in Cuba in 2004 ... does not follow the same rules as the +# years before. The correct date should be Sunday 2004-03-28 00:00 ... +# https://web.archive.org/web/20040402060750/http://www.granma.cu/espanol/2004/marzo/sab27/reloj.html + # From Evert van der Veer via Steffen Thorsen (2004-10-28): # Cuba is not going back to standard time this year. # From Paul Eggert (2006-03-22): @@ -2854,7 +2859,8 @@ Rule Cuba1996only- Oct 6 0:00s 0 S Rule Cuba1997only- Oct 12 0:00s 0 S Rule Cuba19981999- Mar lastSun 0:00s 1:00D Rule Cuba19982003- Oct lastSun 0:00s 0 S -Rule Cuba20002004- Apr Sun=1 0:00s 1:00D +Rule Cuba20002003- Apr Sun=1 0:00s 1:00D +Rule Cuba2004only- Mar lastSun 0:00s 1:00D Rule Cuba20062010- Oct lastSun 0:00s 0 S Rule Cuba2007only- Mar Sun=8 0:00s 1:00D Rule Cuba2008only- Mar Sun=15 0:00s 1:00D ___
svn commit: r259629 - stable/8/share/zoneinfo
Author: edwin Date: Thu Dec 19 20:26:00 2013 New Revision: 259629 URL: http://svnweb.freebsd.org/changeset/base/259629 Log: MFC of 259626, tzdata2013i: Removed support for solar-time-based time zones Jordan stays at summer time this year. Fix historical data for Cuba Modified: stable/8/share/zoneinfo/asia stable/8/share/zoneinfo/northamerica Directory Properties: stable/8/share/zoneinfo/ (props changed) Modified: stable/8/share/zoneinfo/asia == --- stable/8/share/zoneinfo/asiaThu Dec 19 20:25:55 2013 (r259628) +++ stable/8/share/zoneinfo/asiaThu Dec 19 20:26:00 2013 (r259629) @@ -1380,12 +1380,22 @@ ZoneAsia/Tokyo 9:18:59 - LMT 1887 Dec 3 # switch back to standard time this winter, so the will stay on DST # until about the same time next year (at least). # http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?NewsID=88950 -# -# From Paul Eggert (2013-09-21): -# It's looking like this change will be permanent; see -# Petra News Agency, Cancelling winter saved Jordan $7 million (2013-02-20) -# http://www.albawaba.com/business/jordan-winter-electricity--472005. -# So move Jordan to UTC+3 as of the abovementioned date. + +# From Steffen Thorsen (2013-12-11): +# Jordan Times and other sources say that Jordan is going back to +# UTC+2 on 2013-12-19 at midnight: +# http://jordantimes.com/govt-decides-to-switch-back-to-wintertime +# Official, in Arabic: +# http://www.petra.gov.jo/public_news/Nws_NewsDetails.aspx?Menu_ID=Site_Id=2lang=1NewsID=133230CatID=14 +# ... Our background/permalink about it +# http://www.timeanddate.com/news/time/jordan-reverses-dst-decision.html +# ... +# http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?lang=2site_id=1NewsID=133313Type=P +# ... says midnight for the coming one and 1:00 for the ones in the future +# (and they will use DST again next year, using the normal schedule). + +# From Paul Eggert (2013-12-11): +# As Steffen suggested, consider the past 21-month experiment to be DST. # Rule NAMEFROMTO TYPEIN ON AT SAVELETTER/S Rule Jordan 1973only- Jun 6 0:001:00S @@ -1415,11 +1425,13 @@ RuleJordan 20022012- Mar lastThu 24:0 Rule Jordan 2003only- Oct 24 0:00s 0 - Rule Jordan 2004only- Oct 15 0:00s 0 - Rule Jordan 2005only- Sep lastFri 0:00s 0 - -Rule Jordan 20062012- Oct lastFri 0:00s 0 - +Rule Jordan 20062011- Oct lastFri 0:00s 0 - +Rule Jordan 2013only- Dec 20 0:000 - +Rule Jordan 2014max - Mar lastThu 24:00 1:00S +Rule Jordan 2014max - Oct lastFri 0:00s 0 - # Zone NAMEGMTOFF RULES FORMAT [UNTIL] Zone Asia/Amman 2:23:44 - LMT 1931 - 2:00Jordan EE%sT 2012 Oct 26 0:00s - 3:00- AST + 2:00Jordan EE%sT # Kazakhstan Modified: stable/8/share/zoneinfo/northamerica == --- stable/8/share/zoneinfo/northamericaThu Dec 19 20:25:55 2013 (r259628) +++ stable/8/share/zoneinfo/northamericaThu Dec 19 20:26:00 2013 (r259629) @@ -2665,6 +2665,11 @@ Zone America/Costa_Rica -5:36:13 - LMT 1 # to DST--and one more hour on 1999-04-04--when the announcers will have # returned to Baltimore, which switches on that date.) +# From Steffen Thorsen (2013-11-11): +# DST start in Cuba in 2004 ... does not follow the same rules as the +# years before. The correct date should be Sunday 2004-03-28 00:00 ... +# https://web.archive.org/web/20040402060750/http://www.granma.cu/espanol/2004/marzo/sab27/reloj.html + # From Evert van der Veer via Steffen Thorsen (2004-10-28): # Cuba is not going back to standard time this year. # From Paul Eggert (2006-03-22): @@ -2854,7 +2859,8 @@ Rule Cuba1996only- Oct 6 0:00s 0 S Rule Cuba1997only- Oct 12 0:00s 0 S Rule Cuba19981999- Mar lastSun 0:00s 1:00D Rule Cuba19982003- Oct lastSun 0:00s 0 S -Rule Cuba20002004- Apr Sun=1 0:00s 1:00D +Rule Cuba20002003- Apr Sun=1 0:00s 1:00D +Rule Cuba2004only- Mar lastSun 0:00s 1:00D Rule Cuba20062010- Oct lastSun 0:00s 0 S Rule Cuba2007only- Mar Sun=8 0:00s 1:00D Rule Cuba2008only- Mar Sun=15 0:00s 1:00D ___
svn commit: r259628 - stable/7/share/zoneinfo
Author: edwin Date: Thu Dec 19 20:25:55 2013 New Revision: 259628 URL: http://svnweb.freebsd.org/changeset/base/259628 Log: MFC of 259626, tzdata2013i: Removed support for solar-time-based time zones Jordan stays at summer time this year. Fix historical data for Cuba Modified: stable/7/share/zoneinfo/asia stable/7/share/zoneinfo/northamerica Directory Properties: stable/7/share/zoneinfo/ (props changed) Modified: stable/7/share/zoneinfo/asia == --- stable/7/share/zoneinfo/asiaThu Dec 19 20:25:49 2013 (r259627) +++ stable/7/share/zoneinfo/asiaThu Dec 19 20:25:55 2013 (r259628) @@ -1380,12 +1380,22 @@ ZoneAsia/Tokyo 9:18:59 - LMT 1887 Dec 3 # switch back to standard time this winter, so the will stay on DST # until about the same time next year (at least). # http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?NewsID=88950 -# -# From Paul Eggert (2013-09-21): -# It's looking like this change will be permanent; see -# Petra News Agency, Cancelling winter saved Jordan $7 million (2013-02-20) -# http://www.albawaba.com/business/jordan-winter-electricity--472005. -# So move Jordan to UTC+3 as of the abovementioned date. + +# From Steffen Thorsen (2013-12-11): +# Jordan Times and other sources say that Jordan is going back to +# UTC+2 on 2013-12-19 at midnight: +# http://jordantimes.com/govt-decides-to-switch-back-to-wintertime +# Official, in Arabic: +# http://www.petra.gov.jo/public_news/Nws_NewsDetails.aspx?Menu_ID=Site_Id=2lang=1NewsID=133230CatID=14 +# ... Our background/permalink about it +# http://www.timeanddate.com/news/time/jordan-reverses-dst-decision.html +# ... +# http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?lang=2site_id=1NewsID=133313Type=P +# ... says midnight for the coming one and 1:00 for the ones in the future +# (and they will use DST again next year, using the normal schedule). + +# From Paul Eggert (2013-12-11): +# As Steffen suggested, consider the past 21-month experiment to be DST. # Rule NAMEFROMTO TYPEIN ON AT SAVELETTER/S Rule Jordan 1973only- Jun 6 0:001:00S @@ -1415,11 +1425,13 @@ RuleJordan 20022012- Mar lastThu 24:0 Rule Jordan 2003only- Oct 24 0:00s 0 - Rule Jordan 2004only- Oct 15 0:00s 0 - Rule Jordan 2005only- Sep lastFri 0:00s 0 - -Rule Jordan 20062012- Oct lastFri 0:00s 0 - +Rule Jordan 20062011- Oct lastFri 0:00s 0 - +Rule Jordan 2013only- Dec 20 0:000 - +Rule Jordan 2014max - Mar lastThu 24:00 1:00S +Rule Jordan 2014max - Oct lastFri 0:00s 0 - # Zone NAMEGMTOFF RULES FORMAT [UNTIL] Zone Asia/Amman 2:23:44 - LMT 1931 - 2:00Jordan EE%sT 2012 Oct 26 0:00s - 3:00- AST + 2:00Jordan EE%sT # Kazakhstan Modified: stable/7/share/zoneinfo/northamerica == --- stable/7/share/zoneinfo/northamericaThu Dec 19 20:25:49 2013 (r259627) +++ stable/7/share/zoneinfo/northamericaThu Dec 19 20:25:55 2013 (r259628) @@ -2665,6 +2665,11 @@ Zone America/Costa_Rica -5:36:13 - LMT 1 # to DST--and one more hour on 1999-04-04--when the announcers will have # returned to Baltimore, which switches on that date.) +# From Steffen Thorsen (2013-11-11): +# DST start in Cuba in 2004 ... does not follow the same rules as the +# years before. The correct date should be Sunday 2004-03-28 00:00 ... +# https://web.archive.org/web/20040402060750/http://www.granma.cu/espanol/2004/marzo/sab27/reloj.html + # From Evert van der Veer via Steffen Thorsen (2004-10-28): # Cuba is not going back to standard time this year. # From Paul Eggert (2006-03-22): @@ -2854,7 +2859,8 @@ Rule Cuba1996only- Oct 6 0:00s 0 S Rule Cuba1997only- Oct 12 0:00s 0 S Rule Cuba19981999- Mar lastSun 0:00s 1:00D Rule Cuba19982003- Oct lastSun 0:00s 0 S -Rule Cuba20002004- Apr Sun=1 0:00s 1:00D +Rule Cuba20002003- Apr Sun=1 0:00s 1:00D +Rule Cuba2004only- Mar lastSun 0:00s 1:00D Rule Cuba20062010- Oct lastSun 0:00s 0 S Rule Cuba2007only- Mar Sun=8 0:00s 1:00D Rule Cuba2008only- Mar Sun=15 0:00s 1:00D ___
svn commit: r259630 - stable/9/contrib/tzdata
Author: edwin Date: Thu Dec 19 20:26:06 2013 New Revision: 259630 URL: http://svnweb.freebsd.org/changeset/base/259630 Log: MFC of 259626, tzdata2013i: Removed support for solar-time-based time zones Jordan stays at summer time this year. Fix historical data for Cuba Modified: stable/9/contrib/tzdata/asia stable/9/contrib/tzdata/northamerica Directory Properties: stable/9/contrib/tzdata/ (props changed) Modified: stable/9/contrib/tzdata/asia == --- stable/9/contrib/tzdata/asiaThu Dec 19 20:26:00 2013 (r259629) +++ stable/9/contrib/tzdata/asiaThu Dec 19 20:26:06 2013 (r259630) @@ -1380,12 +1380,22 @@ ZoneAsia/Tokyo 9:18:59 - LMT 1887 Dec 3 # switch back to standard time this winter, so the will stay on DST # until about the same time next year (at least). # http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?NewsID=88950 -# -# From Paul Eggert (2013-09-21): -# It's looking like this change will be permanent; see -# Petra News Agency, Cancelling winter saved Jordan $7 million (2013-02-20) -# http://www.albawaba.com/business/jordan-winter-electricity--472005. -# So move Jordan to UTC+3 as of the abovementioned date. + +# From Steffen Thorsen (2013-12-11): +# Jordan Times and other sources say that Jordan is going back to +# UTC+2 on 2013-12-19 at midnight: +# http://jordantimes.com/govt-decides-to-switch-back-to-wintertime +# Official, in Arabic: +# http://www.petra.gov.jo/public_news/Nws_NewsDetails.aspx?Menu_ID=Site_Id=2lang=1NewsID=133230CatID=14 +# ... Our background/permalink about it +# http://www.timeanddate.com/news/time/jordan-reverses-dst-decision.html +# ... +# http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?lang=2site_id=1NewsID=133313Type=P +# ... says midnight for the coming one and 1:00 for the ones in the future +# (and they will use DST again next year, using the normal schedule). + +# From Paul Eggert (2013-12-11): +# As Steffen suggested, consider the past 21-month experiment to be DST. # Rule NAMEFROMTO TYPEIN ON AT SAVELETTER/S Rule Jordan 1973only- Jun 6 0:001:00S @@ -1415,11 +1425,13 @@ RuleJordan 20022012- Mar lastThu 24:0 Rule Jordan 2003only- Oct 24 0:00s 0 - Rule Jordan 2004only- Oct 15 0:00s 0 - Rule Jordan 2005only- Sep lastFri 0:00s 0 - -Rule Jordan 20062012- Oct lastFri 0:00s 0 - +Rule Jordan 20062011- Oct lastFri 0:00s 0 - +Rule Jordan 2013only- Dec 20 0:000 - +Rule Jordan 2014max - Mar lastThu 24:00 1:00S +Rule Jordan 2014max - Oct lastFri 0:00s 0 - # Zone NAMEGMTOFF RULES FORMAT [UNTIL] Zone Asia/Amman 2:23:44 - LMT 1931 - 2:00Jordan EE%sT 2012 Oct 26 0:00s - 3:00- AST + 2:00Jordan EE%sT # Kazakhstan Modified: stable/9/contrib/tzdata/northamerica == --- stable/9/contrib/tzdata/northamericaThu Dec 19 20:26:00 2013 (r259629) +++ stable/9/contrib/tzdata/northamericaThu Dec 19 20:26:06 2013 (r259630) @@ -2665,6 +2665,11 @@ Zone America/Costa_Rica -5:36:13 - LMT 1 # to DST--and one more hour on 1999-04-04--when the announcers will have # returned to Baltimore, which switches on that date.) +# From Steffen Thorsen (2013-11-11): +# DST start in Cuba in 2004 ... does not follow the same rules as the +# years before. The correct date should be Sunday 2004-03-28 00:00 ... +# https://web.archive.org/web/20040402060750/http://www.granma.cu/espanol/2004/marzo/sab27/reloj.html + # From Evert van der Veer via Steffen Thorsen (2004-10-28): # Cuba is not going back to standard time this year. # From Paul Eggert (2006-03-22): @@ -2854,7 +2859,8 @@ Rule Cuba1996only- Oct 6 0:00s 0 S Rule Cuba1997only- Oct 12 0:00s 0 S Rule Cuba19981999- Mar lastSun 0:00s 1:00D Rule Cuba19982003- Oct lastSun 0:00s 0 S -Rule Cuba20002004- Apr Sun=1 0:00s 1:00D +Rule Cuba20002003- Apr Sun=1 0:00s 1:00D +Rule Cuba2004only- Mar lastSun 0:00s 1:00D Rule Cuba20062010- Oct lastSun 0:00s 0 S Rule Cuba2007only- Mar Sun=8 0:00s 1:00D Rule Cuba2008only- Mar Sun=15 0:00s 1:00D ___
Re: svn commit: r259609 - head/sys/kern
On 19.12.13 18:00, Stefan Esser wrote: I'd replace the two occurances of LLONG_MAX with INT64_MAX and add the missing empty line: static __inline sbintime_t timer2sbintime(intptr_t data) { if (data INT64_MAX / SBT_1MS) return INT64_MAX; return (SBT_1MS * data); } If you can show evidence that a limit of INT64_MAX/2 is more appropriate (2^30 seconds or 34 years), the limit could be of course be reduced to that value. I could not find any code that would not tolerate INT64_MAX, though ... Aehm, what about 32-bit systems where intptr_t == __int32_t? cc1: warnings being treated as errors /export/devel/fbsd/src/sys/kern/kern_event.c: In function 'timer2sbintime': /export/devel/fbsd/src/sys/kern/kern_event.c:529: warning: comparison is always false due to limited range of data type Andreas ___ 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: r259631 - stable/10/contrib/jemalloc/include/jemalloc
Author: peter Date: Thu Dec 19 21:03:08 2013 New Revision: 259631 URL: http://svnweb.freebsd.org/changeset/base/259631 Log: MF9: Don't fail to build if MALLOC_PRODUCTION is defined in make.conf Modified: stable/10/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Modified: stable/10/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h == --- stable/10/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Thu Dec 19 20:26:06 2013(r259630) +++ stable/10/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h Thu Dec 19 21:03:08 2013(r259631) @@ -4,7 +4,9 @@ #undef JEMALLOC_OVERRIDE_VALLOC +#ifndef MALLOC_PRODUCTION #defineMALLOC_PRODUCTION +#endif #ifndef MALLOC_PRODUCTION #defineJEMALLOC_DEBUG ___ 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: r259609 - head/sys/kern
Am 19.12.2013 21:46, schrieb Andreas Tobler: On 19.12.13 18:00, Stefan Esser wrote: I'd replace the two occurances of LLONG_MAX with INT64_MAX and add the missing empty line: static __inline sbintime_t timer2sbintime(intptr_t data) { if (data INT64_MAX / SBT_1MS) return INT64_MAX; return (SBT_1MS * data); } If you can show evidence that a limit of INT64_MAX/2 is more appropriate (2^30 seconds or 34 years), the limit could be of course be reduced to that value. I could not find any code that would not tolerate INT64_MAX, though ... Aehm, what about 32-bit systems where intptr_t == __int32_t? cc1: warnings being treated as errors /export/devel/fbsd/src/sys/kern/kern_event.c: In function 'timer2sbintime': /export/devel/fbsd/src/sys/kern/kern_event.c:529: warning: comparison is always false due to limited range of data type You are right, this needs to be fixed, too :( I see two possibilities: 1) Conditional compilation: There is no need to check an upper bound on ILP32 architectures. INT32_MAX seconds can be expressed as sbintime. Architectures where intptr_t has at least 48 bits will support the maximum time that can be expressed in sbintime and the comparison can be left as is for them. 2) Calculate the upper bound in such a way, that it is guaranteed to be lower than the highest value that can be expressed as intptr_t. This value is (INT32_MAX - 1) on 32 bit architectures, while it remains (INT64_MAX / SBT_1MS) on 64 bit architectures. I'm afraid that the warning emitted for 32 bit architectures will cause tinderbox build failures, but I haven't seen a failure message, yet. Should I back-out the commit that added the range check? As long as -fno-strict-overflow is not put back into CFLAGS, the test is not strictly required (only for the extremely unlikely case that a number 1000 * MAX32_INT results in an extremely short remainder after multiplication with SBT_1MS modulo 32 ...). Regards, STefan NB: I should have known better and should have asked for a review of this change before it wa committed. Sorry for the inconvenience caused :( ___ 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: r259632 - head/sys/rpc
Author: mav Date: Thu Dec 19 21:31:28 2013 New Revision: 259632 URL: http://svnweb.freebsd.org/changeset/base/259632 Log: Rework flow control for connection-oriented (TCP) RPC server. When processing receive buffer, write the amount of data, expected in present request record, into socket's so_rcv.sb_lowat to make stack aware about our needs. When processing following upcalls, ignore them until socket collect enough data to be read and processed in one turn. This change reduces number of context switches and other operations in RPC stack during large NFS writes (especially via non-Jumbo networks) by order of magnitude. After precessing current packet, take another look into the pending buffer to find out whether the next packet had been already received. If not, deactivate this port right there without making RPC code to push this port to another thread just to find that there is nothing. If the next packet is received partially, also deactivate the port, but also update socket's so_rcv.sb_lowat to not be woken up prematurely. This change additionally reduces number of context switches per NFS request about in half. Modified: head/sys/rpc/svc_vc.c Modified: head/sys/rpc/svc_vc.c == --- head/sys/rpc/svc_vc.c Thu Dec 19 21:03:08 2013(r259631) +++ head/sys/rpc/svc_vc.c Thu Dec 19 21:31:28 2013(r259632) @@ -381,15 +381,11 @@ svc_vc_rendezvous_recv(SVCXPRT *xprt, st * We must re-test for new connections after taking * the lock to protect us in the case where a new * connection arrives after our call to accept fails -* with EWOULDBLOCK. The pool lock protects us from -* racing the upcall after our TAILQ_EMPTY() call -* returns false. +* with EWOULDBLOCK. */ ACCEPT_LOCK(); - mtx_lock(xprt-xp_pool-sp_lock); if (TAILQ_EMPTY(xprt-xp_socket-so_comp)) - xprt_inactive_locked(xprt); - mtx_unlock(xprt-xp_pool-sp_lock); + xprt_inactive(xprt); ACCEPT_UNLOCK(); sx_xunlock(xprt-xp_lock); return (FALSE); @@ -526,35 +522,14 @@ static enum xprt_stat svc_vc_stat(SVCXPRT *xprt) { struct cf_conn *cd; - struct mbuf *m; - size_t n; cd = (struct cf_conn *)(xprt-xp_p1); if (cd-strm_stat == XPRT_DIED) return (XPRT_DIED); - /* -* Return XPRT_MOREREQS if we have buffered data and we are -* mid-record or if we have enough data for a record -* marker. Since this is only a hint, we read mpending and -* resid outside the lock. We do need to take the lock if we -* have to traverse the mbuf chain. -*/ - if (cd-mpending) { - if (cd-resid) - return (XPRT_MOREREQS); - n = 0; - sx_xlock(xprt-xp_lock); - m = cd-mpending; - while (m n sizeof(uint32_t)) { - n += m-m_len; - m = m-m_next; - } - sx_xunlock(xprt-xp_lock); - if (n = sizeof(uint32_t)) - return (XPRT_MOREREQS); - } + if (cd-mreq != NULL cd-resid == 0 cd-eor) + return (XPRT_MOREREQS); if (soreadable(xprt-xp_socket)) return (XPRT_MOREREQS); @@ -575,6 +550,78 @@ svc_vc_backchannel_stat(SVCXPRT *xprt) return (XPRT_IDLE); } +/* + * If we have an mbuf chain in cd-mpending, try to parse a record from it, + * leaving the result in cd-mreq. If we don't have a complete record, leave + * the partial result in cd-mreq and try to read more from the socket. + */ +static void +svc_vc_process_pending(SVCXPRT *xprt) +{ + struct cf_conn *cd = (struct cf_conn *) xprt-xp_p1; + struct socket *so = xprt-xp_socket; + struct mbuf *m; + + /* +* If cd-resid is non-zero, we have part of the +* record already, otherwise we are expecting a record +* marker. +*/ + if (!cd-resid cd-mpending) { + /* +* See if there is enough data buffered to +* make up a record marker. Make sure we can +* handle the case where the record marker is +* split across more than one mbuf. +*/ + size_t n = 0; + uint32_t header; + + m = cd-mpending; + while (n sizeof(uint32_t) m) { + n += m-m_len; + m = m-m_next; + } + if (n sizeof(uint32_t)) { + so-so_rcv.sb_lowat = sizeof(uint32_t) - n; + return; +
svn commit: r259633 - head/sys/kern
Author: se Date: Thu Dec 19 21:35:33 2013 New Revision: 259633 URL: http://svnweb.freebsd.org/changeset/base/259633 Log: Fix compilation on 32 bit architectures and use INT64_MAX instead of LONG_MAX for the upper bound check. Modified: head/sys/kern/kern_event.c Modified: head/sys/kern/kern_event.c == --- head/sys/kern/kern_event.c Thu Dec 19 21:31:28 2013(r259632) +++ head/sys/kern/kern_event.c Thu Dec 19 21:35:33 2013(r259633) @@ -523,11 +523,14 @@ knote_fork(struct knlist *list, int pid) * XXX: EVFILT_TIMER should perhaps live in kern_time.c beside the * interval timer support code. */ -static __inline sbintime_t +static __inline sbintime_t timer2sbintime(intptr_t data) { - if (data LLONG_MAX / SBT_1MS) - return LLONG_MAX; + +#ifdef __LP64__ + if (data INT64_MAX / SBT_1MS) + return INT64_MAX; +#endif return (SBT_1MS * data); } ___ 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: r259634 - head/sys/geom/mirror
Author: ae Date: Thu Dec 19 22:13:12 2013 New Revision: 259634 URL: http://svnweb.freebsd.org/changeset/base/259634 Log: Prevent users from deactivating the last component of a mirror. PR: 184985 MFC after:1 week Modified: head/sys/geom/mirror/g_mirror_ctl.c Modified: head/sys/geom/mirror/g_mirror_ctl.c == --- head/sys/geom/mirror/g_mirror_ctl.c Thu Dec 19 21:35:33 2013 (r259633) +++ head/sys/geom/mirror/g_mirror_ctl.c Thu Dec 19 22:13:12 2013 (r259634) @@ -695,7 +695,7 @@ g_mirror_ctl_deactivate(struct gctl_req const char *name; char param[16]; int *nargs; - u_int i; + u_int i, active; nargs = gctl_get_paraml(req, nargs, sizeof(*nargs)); if (nargs == NULL) { @@ -716,6 +716,7 @@ g_mirror_ctl_deactivate(struct gctl_req gctl_error(req, No such device: %s., name); return; } + active = g_mirror_ndisks(sc, G_MIRROR_DISK_STATE_ACTIVE); for (i = 1; i (u_int)*nargs; i++) { snprintf(param, sizeof(param), arg%u, i); name = gctl_get_asciiparam(req, param); @@ -728,6 +729,16 @@ g_mirror_ctl_deactivate(struct gctl_req gctl_error(req, No such provider: %s., name); continue; } + if (disk-d_state == G_MIRROR_DISK_STATE_ACTIVE) { + if (active 1) + active--; + else { + gctl_error(req, %s: Can't deactivate the + last ACTIVE component %s., + sc-sc_geom-name, name); + continue; + } + } disk-d_flags |= G_MIRROR_DISK_FLAG_INACTIVE; disk-d_flags = ~G_MIRROR_DISK_FLAG_FORCE_SYNC; g_mirror_update_metadata(disk); ___ 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: r259635 - head/usr.sbin/bhyve
Author: neel Date: Thu Dec 19 22:27:28 2013 New Revision: 259635 URL: http://svnweb.freebsd.org/changeset/base/259635 Log: Add an option to ignore accesses by the guest to unimplemented MSRs. Also, ignore a couple of SandyBridge uncore PMC MSRs that Centos 6.4 writes to during boot. Reviewed by: grehan Modified: head/usr.sbin/bhyve/bhyve.8 head/usr.sbin/bhyve/bhyverun.c head/usr.sbin/bhyve/xmsr.c head/usr.sbin/bhyve/xmsr.h Modified: head/usr.sbin/bhyve/bhyve.8 == --- head/usr.sbin/bhyve/bhyve.8 Thu Dec 19 22:13:12 2013(r259634) +++ head/usr.sbin/bhyve/bhyve.8 Thu Dec 19 22:27:28 2013(r259635) @@ -32,7 +32,7 @@ .Nd run a guest operating system inside a virtual machine .Sh SYNOPSIS .Nm -.Op Fl aehAHPW +.Op Fl aehwAHPW .Op Fl c Ar numcpus .Op Fl g Ar gdbport .Op Fl p Ar pinnedcpu @@ -229,6 +229,8 @@ Force .Nm to exit when a guest issues an access to an I/O port that is not emulated. This is intended for debug purposes. +.It Fl w +Ignore accesses to unimplemented Model Specific Registers (MSRs). This is intended for debug purposes. .It Fl h Print help message and exit. .It Ar vmname Modified: head/usr.sbin/bhyve/bhyverun.c == --- head/usr.sbin/bhyve/bhyverun.c Thu Dec 19 22:13:12 2013 (r259634) +++ head/usr.sbin/bhyve/bhyverun.c Thu Dec 19 22:27:28 2013 (r259635) @@ -87,6 +87,7 @@ static int guest_vmexit_on_hlt, guest_vm static int virtio_msix = 1; static int strictio; +static int strictmsr = 1; static int acpi; @@ -122,7 +123,7 @@ usage(int code) { fprintf(stderr, -Usage: %s [-aehAHIPW] [-g gdb port] [-s pci] [-S pci]\n +Usage: %s [-aehwAHIPW] [-g gdb port] [-s pci] [-S pci]\n %*s [-c vcpus] [-p pincpu] [-m mem] [-l lpc] vm\n -a: local apic is in XAPIC mode (default is X2APIC)\n -A: create an ACPI table\n @@ -137,7 +138,8 @@ usage(int code) -s: slot,driver,configinfo PCI slot config\n -S: slot,driver,configinfo legacy PCI slot config\n -l: LPC device configuration\n - -m: memory size in MB\n, + -m: memory size in MB\n + -w: ignore unimplemented MSRs\n, progname, (int)strlen(progname), ); exit(code); @@ -310,20 +312,43 @@ vmexit_inout(struct vmctx *ctx, struct v static int vmexit_rdmsr(struct vmctx *ctx, struct vm_exit *vme, int *pvcpu) { - fprintf(stderr, vm exit rdmsr 0x%x, cpu %d\n, vme-u.msr.code, - *pvcpu); - return (VMEXIT_ABORT); + uint64_t val; + uint32_t eax, edx; + int error; + + val = 0; + error = emulate_rdmsr(ctx, *pvcpu, vme-u.msr.code, val); + if (error != 0) { + fprintf(stderr, rdmsr to register %#x on vcpu %d\n, + vme-u.msr.code, *pvcpu); + if (strictmsr) + return (VMEXIT_ABORT); + } + + eax = val; + error = vm_set_register(ctx, *pvcpu, VM_REG_GUEST_RAX, eax); + assert(error == 0); + + edx = val 32; + error = vm_set_register(ctx, *pvcpu, VM_REG_GUEST_RDX, edx); + assert(error == 0); + + return (VMEXIT_CONTINUE); } static int vmexit_wrmsr(struct vmctx *ctx, struct vm_exit *vme, int *pvcpu) { - int newcpu; - int retval = VMEXIT_CONTINUE; - - newcpu = emulate_wrmsr(ctx, *pvcpu, vme-u.msr.code,vme-u.msr.wval); + int error; -return (retval); + error = emulate_wrmsr(ctx, *pvcpu, vme-u.msr.code, vme-u.msr.wval); + if (error != 0) { + fprintf(stderr, wrmsr to register %#x(%#lx) on vcpu %d\n, + vme-u.msr.code, vme-u.msr.wval, *pvcpu); + if (strictmsr) + return (VMEXIT_ABORT); + } + return (VMEXIT_CONTINUE); } static int @@ -577,7 +602,7 @@ main(int argc, char *argv[]) guest_ncpus = 1; memsize = 256 * MB; - while ((c = getopt(argc, argv, abehAHIPWp:g:c:s:S:m:l:)) != -1) { + while ((c = getopt(argc, argv, abehwAHIPWp:g:c:s:S:m:l:)) != -1) { switch (c) { case 'a': disable_x2apic = 1; @@ -636,6 +661,9 @@ main(int argc, char *argv[]) case 'e': strictio = 1; break; + case 'w': + strictmsr = 0; + break; case 'W': virtio_msix = 0; break; Modified: head/usr.sbin/bhyve/xmsr.c == --- head/usr.sbin/bhyve/xmsr.c Thu Dec 19 22:13:12 2013(r259634) +++
Re: svn commit: r259562 - head/usr.bin/netstat
On Thursday, December 19, 2013 6:57:35 am Gleb Smirnoff wrote: On Wed, Dec 18, 2013 at 04:40:52PM -0500, John Baldwin wrote: J On Wednesday, December 18, 2013 3:07:58 pm Alexander V. Chernikov wrote: J On 18.12.2013 22:45, John-Mark Gurney wrote: J Alexander V. Chernikov wrote this message on Wed, Dec 18, 2013 at 18:25 +: J Author: melifaro J Date: Wed Dec 18 18:25:27 2013 J New Revision: 259562 J URL: http://svnweb.freebsd.org/changeset/base/259562 J J Log: J Switch netstat -rn to use standard API for retrieving list of routes J instead of peeking inside in-kernel radix via kget. J This permits us to change kernel structures without breaking userland. J Additionally, this change provide more reliable and faster output. J J `Refs` and `Use` fields available in IPv4 by default (and via -W J for other families) were removed. `Refs` is radix-specific thing J which is not informative for users. `Use` field value is handy sometimes, J but a) current API does not support it and b) I'm not sure we will J support per-rte pcpu counters in near future. J J Old method of retrieving data is still supported (either by defining J NewTree=0 or running netstat with -A). However, Refs/Use fields are J hidden. J J Sponsored by: Yandex LLC J MFC after: 4 weeks J PR: kern/167204 J J How will this impact the use of netstat -rn -M vmcore -N kernel ? Will J this change make it not usable, or will you still automatically use J Well. It will probably break in (maybe, near) future. J J Please don't gratuitiously break things that /usr/sbin/crashinfo runs. It's J fine if kvm mode is fragile and requires the binary to be in sync with the J kernel and is only used for crash dumps, but it is very useful to extract J all sorts of info out of a crash dump. The problem is that these tools (netstat, and some others) prevent us from improving the kernel network stack. We can't make improvements that are mergeable to stable/x branch, since the tools would be broken. No, I explicitly said it's fine if the kvm mode is fragile and requires the binary to be in sync and is only used for crash dumps. That means it's fine to merge changes as long as you merge the whole thing together. It also means you don't have to support all possible internal kernel ABIs in a branch. Moreover any improvement in head/, requires from developer additional work in netstat code, which I must admit isn't a pleasure to work with. Well, yes, there all sorts of things like, say, documentation that one has to do beyond the original hacking in order to make a logical change more complete. Plus, if you think writing netstat stuff in C is bad, try writing the equivalent in kgdb scripts instead (which is what you'd need to do to provide equivalent functionality) I agree that usage of tools on vmcores is useful. But we all should agree that it has very limited use. Only kernel hackers and developers are expected to do this. If users enable crashinfo then they all run this for each crash, so not just developers. Having worked in an environment with hundreds of crashes per day, having some post-processed output to dig through rather than firing up kgdb every time is quite valuable. My suggestion is that all this code is deleted from src/usr.bin/netstat, and moved to src/tools, and we relax assertion that src/tools must be compatible with any kernel within the branch. So, any person who wants this functionality, needs to keep his src/tools in sync with kernel and compile a tool when he desires to dump routing table from a vmcore. That is mostly what I suggested in terms of not having the same ABI guarantees, but I still want crashinfo to provide a comprehensive set of details to developers so that users can just mail that file to a developer without having to be walked through intricate gdb gymnastics. Finally, when we remove all the kvm(3) usage from a tool, then we can remove the sugid bit from it, which would be a another fine point. That is 100% irrelevant to crash dumps. I only ask that the KVM mode needs to work for crash dumps. I am more than happy for all live access to use sysctls instead of kvm and to not need the set-gid bit as a result. -- John Baldwin ___ 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: r259636 - stable/10/contrib/tzdata
Author: edwin Date: Thu Dec 19 23:29:34 2013 New Revision: 259636 URL: http://svnweb.freebsd.org/changeset/base/259636 Log: MFC of 259626, tzdata2013i Removed support for solar-time-based time zones Jordan stays at summer time this year. Fix historical data for Cuba Modified: stable/10/contrib/tzdata/asia stable/10/contrib/tzdata/northamerica Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/tzdata/asia == --- stable/10/contrib/tzdata/asia Thu Dec 19 22:27:28 2013 (r259635) +++ stable/10/contrib/tzdata/asia Thu Dec 19 23:29:34 2013 (r259636) @@ -1380,12 +1380,22 @@ ZoneAsia/Tokyo 9:18:59 - LMT 1887 Dec 3 # switch back to standard time this winter, so the will stay on DST # until about the same time next year (at least). # http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?NewsID=88950 -# -# From Paul Eggert (2013-09-21): -# It's looking like this change will be permanent; see -# Petra News Agency, Cancelling winter saved Jordan $7 million (2013-02-20) -# http://www.albawaba.com/business/jordan-winter-electricity--472005. -# So move Jordan to UTC+3 as of the abovementioned date. + +# From Steffen Thorsen (2013-12-11): +# Jordan Times and other sources say that Jordan is going back to +# UTC+2 on 2013-12-19 at midnight: +# http://jordantimes.com/govt-decides-to-switch-back-to-wintertime +# Official, in Arabic: +# http://www.petra.gov.jo/public_news/Nws_NewsDetails.aspx?Menu_ID=Site_Id=2lang=1NewsID=133230CatID=14 +# ... Our background/permalink about it +# http://www.timeanddate.com/news/time/jordan-reverses-dst-decision.html +# ... +# http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?lang=2site_id=1NewsID=133313Type=P +# ... says midnight for the coming one and 1:00 for the ones in the future +# (and they will use DST again next year, using the normal schedule). + +# From Paul Eggert (2013-12-11): +# As Steffen suggested, consider the past 21-month experiment to be DST. # Rule NAMEFROMTO TYPEIN ON AT SAVELETTER/S Rule Jordan 1973only- Jun 6 0:001:00S @@ -1415,11 +1425,13 @@ RuleJordan 20022012- Mar lastThu 24:0 Rule Jordan 2003only- Oct 24 0:00s 0 - Rule Jordan 2004only- Oct 15 0:00s 0 - Rule Jordan 2005only- Sep lastFri 0:00s 0 - -Rule Jordan 20062012- Oct lastFri 0:00s 0 - +Rule Jordan 20062011- Oct lastFri 0:00s 0 - +Rule Jordan 2013only- Dec 20 0:000 - +Rule Jordan 2014max - Mar lastThu 24:00 1:00S +Rule Jordan 2014max - Oct lastFri 0:00s 0 - # Zone NAMEGMTOFF RULES FORMAT [UNTIL] Zone Asia/Amman 2:23:44 - LMT 1931 - 2:00Jordan EE%sT 2012 Oct 26 0:00s - 3:00- AST + 2:00Jordan EE%sT # Kazakhstan Modified: stable/10/contrib/tzdata/northamerica == --- stable/10/contrib/tzdata/northamerica Thu Dec 19 22:27:28 2013 (r259635) +++ stable/10/contrib/tzdata/northamerica Thu Dec 19 23:29:34 2013 (r259636) @@ -2665,6 +2665,11 @@ Zone America/Costa_Rica -5:36:13 - LMT 1 # to DST--and one more hour on 1999-04-04--when the announcers will have # returned to Baltimore, which switches on that date.) +# From Steffen Thorsen (2013-11-11): +# DST start in Cuba in 2004 ... does not follow the same rules as the +# years before. The correct date should be Sunday 2004-03-28 00:00 ... +# https://web.archive.org/web/20040402060750/http://www.granma.cu/espanol/2004/marzo/sab27/reloj.html + # From Evert van der Veer via Steffen Thorsen (2004-10-28): # Cuba is not going back to standard time this year. # From Paul Eggert (2006-03-22): @@ -2854,7 +2859,8 @@ Rule Cuba1996only- Oct 6 0:00s 0 S Rule Cuba1997only- Oct 12 0:00s 0 S Rule Cuba19981999- Mar lastSun 0:00s 1:00D Rule Cuba19982003- Oct lastSun 0:00s 0 S -Rule Cuba20002004- Apr Sun=1 0:00s 1:00D +Rule Cuba20002003- Apr Sun=1 0:00s 1:00D +Rule Cuba2004only- Mar lastSun 0:00s 1:00D Rule Cuba20062010- Oct lastSun 0:00s 0 S Rule Cuba2007only- Mar Sun=8 0:00s 1:00D Rule Cuba2008only- Mar Sun=15 0:00s 1:00D ___ svn-src-all@freebsd.org
svn commit: r259637 - in releng/10.0/sys: amd64/conf dev/xen/netback dev/xen/netfront
Author: glebius Date: Fri Dec 20 00:09:14 2013 New Revision: 259637 URL: http://svnweb.freebsd.org/changeset/base/259637 Log: Merge r259541 from stable/10: Merge r256868,257276-257277,257515,257913 from head. These are fixes required to make Xen buildable w/o INET. Approved by: re (delphij) Modified: releng/10.0/sys/amd64/conf/NOTES releng/10.0/sys/dev/xen/netback/netback.c releng/10.0/sys/dev/xen/netback/netback_unit_tests.c releng/10.0/sys/dev/xen/netfront/netfront.c Directory Properties: releng/10.0/ (props changed) Modified: releng/10.0/sys/amd64/conf/NOTES == --- releng/10.0/sys/amd64/conf/NOTESThu Dec 19 23:29:34 2013 (r259636) +++ releng/10.0/sys/amd64/conf/NOTESFri Dec 20 00:09:14 2013 (r259637) @@ -473,6 +473,12 @@ device virtio_blk # VirtIO Block device device virtio_scsi # VirtIO SCSI device device virtio_balloon # VirtIO Memory Balloon device +device hyperv # HyperV drivers + +# Xen HVM Guest Optimizations +optionsXENHVM # Xen HVM kernel infrastructure +device xenpci # Xen HVM Hypervisor services driver + # # Modified: releng/10.0/sys/dev/xen/netback/netback.c == --- releng/10.0/sys/dev/xen/netback/netback.c Thu Dec 19 23:29:34 2013 (r259636) +++ releng/10.0/sys/dev/xen/netback/netback.c Fri Dec 20 00:09:14 2013 (r259637) @@ -42,6 +42,7 @@ __FBSDID($FreeBSD$); * from this FreeBSD domain to other domains. */ #include opt_inet.h +#include opt_inet6.h #include opt_global.h #include opt_sctp.h @@ -183,7 +184,6 @@ static int xnb_rxpkt2gnttab(const struct static int xnb_rxpkt2rsp(const struct xnb_pkt *pkt, const gnttab_copy_table gnttab, int n_entries, netif_rx_back_ring_t *ring); -static voidxnb_add_mbuf_cksum(struct mbuf *mbufc); static voidxnb_stop(struct xnb_softc*); static int xnb_ioctl(struct ifnet*, u_long, caddr_t); static voidxnb_start_locked(struct ifnet*); @@ -194,6 +194,9 @@ static void xnb_ifinit(void*); static int xnb_unit_test_main(SYSCTL_HANDLER_ARGS); static int xnb_dump_rings(SYSCTL_HANDLER_ARGS); #endif +#if defined(INET) || defined(INET6) +static voidxnb_add_mbuf_cksum(struct mbuf *mbufc); +#endif /*-- Data Structures -*/ @@ -1778,7 +1781,9 @@ xnb_update_mbufc(struct mbuf *mbufc, con } mbufc-m_pkthdr.len = total_size; +#if defined(INET) || defined(INET6) xnb_add_mbuf_cksum(mbufc); +#endif } /** @@ -2121,6 +2126,7 @@ xnb_rxpkt2rsp(const struct xnb_pkt *pkt, return n_responses; } +#if defined(INET) || defined(INET6) /** * Add IP, TCP, and/or UDP checksums to every mbuf in a chain. The first mbuf * in the chain must start with a struct ether_header. @@ -2175,6 +2181,7 @@ xnb_add_mbuf_cksum(struct mbuf *mbufc) break; } } +#endif /* INET || INET6 */ static void xnb_stop(struct xnb_softc *xnb) @@ -2191,8 +2198,8 @@ static int xnb_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct xnb_softc *xnb = ifp-if_softc; -#ifdef INET struct ifreq *ifr = (struct ifreq*) data; +#ifdef INET struct ifaddr *ifa = (struct ifaddr*)data; #endif int error = 0; Modified: releng/10.0/sys/dev/xen/netback/netback_unit_tests.c == --- releng/10.0/sys/dev/xen/netback/netback_unit_tests.cThu Dec 19 23:29:34 2013(r259636) +++ releng/10.0/sys/dev/xen/netback/netback_unit_tests.cFri Dec 20 00:09:14 2013(r259637) @@ -104,10 +104,6 @@ struct test_fixture { typedef struct test_fixture test_fixture_t; -static voidxnb_fill_eh_and_ip(struct mbuf *m, uint16_t ip_len, - uint16_t ip_id, uint16_t ip_p, - uint16_t ip_off, uint16_t ip_sum); -static voidxnb_fill_tcp(struct mbuf *m); static int xnb_get1pkt(struct xnb_pkt *pkt, size_t size, uint16_t flags); static int xnb_unit_test_runner(test_fixture_t const tests[], int ntests, char *buffer, size_t buflen); @@ -163,17 +159,24 @@ static testcase_t xnb_rxpkt2rsp_extra; static testcase_t xnb_rxpkt2rsp_2short; static testcase_t xnb_rxpkt2rsp_2slots; static testcase_t xnb_rxpkt2rsp_copyerror; +static testcase_t xnb_sscanf_llu; +static testcase_t xnb_sscanf_lld; +static testcase_t xnb_sscanf_hhu; +static testcase_t xnb_sscanf_hhd; +static testcase_t xnb_sscanf_hhn; + +#if defined(INET) || defined(INET6) /* TODO: add test cases for xnb_add_mbuf_cksum
svn commit: r259638 - head/usr.bin/netstat
Author: melifaro Date: Fri Dec 20 00:17:26 2013 New Revision: 259638 URL: http://svnweb.freebsd.org/changeset/base/259638 Log: Use more fine-grained kvm(3) symbol lookup: routing code retrieves only necessary symbols needed per subsystem. Main kvm(3) init is now delayed as much as possbile. This finally fixes performance issues reported in kern/167204. Some non-working code (ng_socket.ko symbol addresses calculation) removed. Some global variables eliminated. PR: kern/167204 MFC after:4 weeks Modified: head/usr.bin/netstat/if.c head/usr.bin/netstat/main.c head/usr.bin/netstat/mroute.c head/usr.bin/netstat/mroute6.c head/usr.bin/netstat/netgraph.c head/usr.bin/netstat/netstat.h head/usr.bin/netstat/route.c Modified: head/usr.bin/netstat/if.c == --- head/usr.bin/netstat/if.c Fri Dec 20 00:09:14 2013(r259637) +++ head/usr.bin/netstat/if.c Fri Dec 20 00:17:26 2013(r259638) @@ -223,7 +223,7 @@ next_ifma(struct ifmaddrs *ifma, const c * Print a description of the network interfaces. */ void -intpr(int interval, void (*pfunc)(char *)) +intpr(int interval, void (*pfunc)(char *), int af) { struct ifaddrs *ifap, *ifa; struct ifmaddrs *ifmap, *ifma; Modified: head/usr.bin/netstat/main.c == --- head/usr.bin/netstat/main.c Fri Dec 20 00:09:14 2013(r259637) +++ head/usr.bin/netstat/main.c Fri Dec 20 00:17:26 2013(r259638) @@ -319,7 +319,6 @@ int gflag; /* show group (multicast) ro inthflag; /* show counters in human readable format */ intiflag; /* show interfaces */ intLflag; /* show size of listen queues */ -intMflag; /* read statistics from core */ intmflag; /* show memory stats */ intnoutputs = 0; /* how much outputs before we exit */ intnumeric_addr; /* show addresses numerically */ @@ -425,7 +424,6 @@ main(int argc, char *argv[]) Lflag = 1; break; case 'M': - Mflag = 1; memf = optarg; break; case 'm': @@ -554,40 +552,40 @@ main(int argc, char *argv[]) * used for the queries, which is slower. */ #endif - kread(0, NULL, 0); if (iflag !sflag) { - intpr(interval, NULL); + intpr(interval, NULL, af); exit(0); } if (rflag) { if (sflag) - rt_stats(nl[N_RTSTAT].n_value, nl[N_RTTRASH].n_value); + rt_stats(); else - routepr(nl[N_RTREE].n_value, fib); + routepr(fib, af); exit(0); } + if (gflag) { if (sflag) { if (af == AF_INET || af == AF_UNSPEC) - mrt_stats(nl[N_MRTSTAT].n_value); + mrt_stats(); #ifdef INET6 if (af == AF_INET6 || af == AF_UNSPEC) - mrt6_stats(nl[N_MRT6STAT].n_value); + mrt6_stats(); #endif } else { if (af == AF_INET || af == AF_UNSPEC) - mroutepr(nl[N_MFCHASHTBL].n_value, -nl[N_MFCTABLESIZE].n_value, -nl[N_VIFTABLE].n_value); + mroutepr(); #ifdef INET6 if (af == AF_INET6 || af == AF_UNSPEC) - mroute6pr(nl[N_MF6CTABLE].n_value, - nl[N_MIF6TABLE].n_value); + mroute6pr(); #endif } exit(0); } + /* Load all necessary kvm symbols */ + kresolve_list(nl); + if (tp) { printproto(tp, tp-pr_name); exit(0); @@ -640,7 +638,7 @@ printproto(struct protox *tp, const char if (sflag) { if (iflag) { if (tp-pr_istats) - intpr(interval, tp-pr_istats); + intpr(interval, tp-pr_istats, af); else if (pflag) printf(%s: no per-interface stats routine\n, tp-pr_name); @@ -703,7 +701,23 @@ kvmd_init(void) return (-1); } - if (kvm_nlist(kvmd, nl) 0) { + return (0); +} + +/* + * Resolve symbol list, return 0 on success. + */ +int +kresolve_list(struct nlist *_nl) +{ + + if ((kvmd == NULL) (kvmd_init() != 0)) + return (-1); + + if (_nl[0].n_type != 0) +
Re: svn commit: r259562 - head/usr.bin/netstat
John, On Thu, Dec 19, 2013 at 03:52:03PM -0500, John Baldwin wrote: J J Please don't gratuitiously break things that /usr/sbin/crashinfo runs. It's J J fine if kvm mode is fragile and requires the binary to be in sync with the J J kernel and is only used for crash dumps, but it is very useful to extract J J all sorts of info out of a crash dump. J J The problem is that these tools (netstat, and some others) prevent us from J improving the kernel network stack. We can't make improvements that are J mergeable to stable/x branch, since the tools would be broken. J J No, I explicitly said it's fine if the kvm mode is fragile and requires the J binary to be in sync and is only used for crash dumps. That means it's J fine to merge changes as long as you merge the whole thing together. It also J means you don't have to support all possible internal kernel ABIs in a branch. Sorry but this is not true. Yeah, I'm grateful that you personally allow me to break ABIs, but the general FreeBSD project policy doesn't allow that anymore in stable branches. I don't have strong opinion on this, I really think that running kernel and world out of sync is a bad idea, so I may agree with you. But the project as a whole have established a policy that within a stable branch newer kernel can run tools from x.0-RELEASE. And agree or not, I abide. J Moreover J any improvement in head/, requires from developer additional work in netstat J code, which I must admit isn't a pleasure to work with. J J Well, yes, there all sorts of things like, say, documentation that one has to J do beyond the original hacking in order to make a logical change more complete. J Plus, if you think writing netstat stuff in C is bad, try writing the equivalent J in kgdb scripts instead (which is what you'd need to do to provide equivalent J functionality) Actually I do that often, and find it easier to make kgdb scripts. J I agree that usage of tools on vmcores is useful. But we all should agree that J it has very limited use. Only kernel hackers and developers are expected to J do this. J J If users enable crashinfo then they all run this for each crash, so not just J developers. Having worked in an environment with hundreds of crashes per day, J having some post-processed output to dig through rather than firing up kgdb J every time is quite valuable. I've fixed quite a lot of PRs in network stack and never payed attention to the routing table or ifnet stats provided by netstat in that long submissions attached to PRs. As said, w/o addresses this output is quite useless for debugging. J My suggestion is that all this code is deleted from src/usr.bin/netstat, and J moved to src/tools, and we relax assertion that src/tools must be compatible J with any kernel within the branch. So, any person who wants this functionality, J needs to keep his src/tools in sync with kernel and compile a tool when he J desires to dump routing table from a vmcore. J J That is mostly what I suggested in terms of not having the same ABI guarantees, J but I still want crashinfo to provide a comprehensive set of details to developers J so that users can just mail that file to a developer without having to be walked J through intricate gdb gymnastics. Good, then this stuff just needs to migrate to a special crashdump tool. And probably its output shouldn't resemble netstat(1), since there is no reason for that. Perfectly if structures are just dumped as a whole. Yeah, here gdb scripting comes into mind. J Finally, when we remove all the kvm(3) usage from a tool, then we can remove J the sugid bit from it, which would be a another fine point. J J That is 100% irrelevant to crash dumps. I only ask that the KVM mode needs J to work for crash dumps. I am more than happy for all live access to use J sysctls instead of kvm and to not need the set-gid bit as a result. Looks like we are coming to agreement. The way to go is to remove kvm access from netstat, substituting it with proper APIs. The better crashdump utility needs to be started. Not yet sure that C + kvm(3) is a proper framework for it. I don't understand the plan with dtrace based tool well, but reading John-Marks' email I find it interesting. gdb scripting is also an option. -- Totus tuus, Glebius. ___ 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: r259639 - releng/10.0/usr.sbin/bhyve
Author: grehan Date: Fri Dec 20 00:47:54 2013 New Revision: 259639 URL: http://svnweb.freebsd.org/changeset/base/259639 Log: MFStable r259536 MFC r259302,r259413 r259302 bhyve(8) man page r259413 mdoc: sort SEE ALSO Approved by: re@ (glebius) Added: releng/10.0/usr.sbin/bhyve/bhyve.8 - copied unchanged from r259536, stable/10/usr.sbin/bhyve/bhyve.8 Modified: releng/10.0/usr.sbin/bhyve/Makefile Directory Properties: releng/10.0/ (props changed) Modified: releng/10.0/usr.sbin/bhyve/Makefile == --- releng/10.0/usr.sbin/bhyve/Makefile Fri Dec 20 00:17:26 2013 (r259638) +++ releng/10.0/usr.sbin/bhyve/Makefile Fri Dec 20 00:47:54 2013 (r259639) @@ -6,6 +6,7 @@ PROG= bhyve DEBUG_FLAGS= -g -O0 +MAN= bhyve.8 SRCS= acpi.c atpic.c bhyverun.c block_if.c consport.c dbgport.c elcr.c SRCS+= inout.c ioapic.c legacy_irq.c mem.c mevent.c mptbl.c pci_ahci.c SRCS+= pci_emul.c pci_hostbridge.c pci_lpc.c pci_passthru.c pci_virtio_block.c @@ -15,8 +16,6 @@ SRCS+=uart_emul.c virtio.c xmsr.c spinu .PATH: ${.CURDIR}/../../sys/amd64/vmm SRCS+= vmm_instruction_emul.c -NO_MAN= - DPADD= ${LIBVMMAPI} ${LIBMD} ${LIBUTIL} ${LIBPTHREAD} LDADD= -lvmmapi -lmd -lutil -lpthread Copied: releng/10.0/usr.sbin/bhyve/bhyve.8 (from r259536, stable/10/usr.sbin/bhyve/bhyve.8) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ releng/10.0/usr.sbin/bhyve/bhyve.8 Fri Dec 20 00:47:54 2013 (r259639, copy of r259536, stable/10/usr.sbin/bhyve/bhyve.8) @@ -0,0 +1,299 @@ +.\ Copyright (c) 2013 Peter Grehan +.\ All rights reserved. +.\ +.\ Redistribution and use in source and binary forms, with or without +.\ modification, are permitted provided that the following conditions +.\ are met: +.\ 1. Redistributions of source code must retain the above copyright +.\notice, this list of conditions and the following disclaimer. +.\ 2. Redistributions in binary form must reproduce the above copyright +.\notice, this list of conditions and the following disclaimer in the +.\documentation and/or other materials provided with the distribution. +.\ +.\ THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +.\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +.\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\ SUCH DAMAGE. +.\ +.\ $FreeBSD$ +.\ +.Dd December 12, 2013 +.Dt BHYVE 8 +.Os +.Sh NAME +.Nm bhyve +.Nd run a guest operating system inside a virtual machine +.Sh SYNOPSIS +.Nm +.Op Fl aehAHPW +.Op Fl c Ar numcpus +.Op Fl g Ar gdbport +.Op Fl p Ar pinnedcpu +.Op Fl s Ar slot,emulation Ns Op , Ns Ar conf +.Op Fl S Ar slot,emulation Ns Op , Ns Ar conf +.Op Fl l Ar lpcdev Ns Op , Ns Ar conf +.Ar vmname +.Sh DESCRIPTION +.Nm +is an experimental hypervisor that runs guest operating systems inside a +virtual machine. +.Pp +Parameters such as the number of virtual CPUs, amount of guest memory, and +I/O connectivity can be specified with command-line parameters. +.Pp +The guest operating system must be loaded with +.Xr bhyveload 4 +or a similar boot loader before running +.Nm . +.Pp +.Nm +runs until the guest operating system reboots or an unhandled hypervisor +exit is detected. +.Sh OPTIONS +.Bl -tag -width 10n +.It Fl a +Disallow use of the local APIC in X2APIC mode. +.It Fl A +Generate ACPI tables. +Required for +.Fx Ns /amd64 +guests. +.It Fl c Ar numcpus +Number of guest virtual CPUs. +The default is 1 and the maximum is 16. +.It Fl H +Yield the virtual CPU thread when a HLT instruction is detected. +If this option is not specified, virtual CPUs will use 100% of a host CPU. +.It Fl g Ar gdbport +For +.Fx Ns /amd64 kernels compiled with +.Cd option bvmdebug , +allow a remote kernel kgdb to be relayed to the guest kernel gdb stub +via a local IPv4 address and this port. +This option will be deprecated in a future version. +.It Fl p Ar pinnedcpu +Force guest virtual CPUs to be pinned to host CPUs. +Virtual CPU +.Em n +is pinned to host CPU +.Em pinnedcpu+n . +.It Fl P +Force the guest virtual CPU to exit when a PAUSE instruction is detected. +.It Fl W +Force virtio PCI device emulations to use MSI interrupts instead of MSI-X +interrupts. +.It Fl s Ar slot,emulation Ns Op , Ns Ar conf
svn commit: r259640 - in head/sys: arm/arm arm/include conf
Author: ganbold (doc committer) Date: Fri Dec 20 00:56:23 2013 New Revision: 259640 URL: http://svnweb.freebsd.org/changeset/base/259640 Log: Add identification and necessary type checks for Krait CPU cores. Krait CPU is used in Qualcomm Snapdragon S4 and Snapdragon 400/600/800 SoCs and has architectural similarities to ARM Cortex-A15. As for development boards IFC6400 series embedded boards from Inforce Computing uses Snapdragon S4 Pro/APQ8064. Approved by: stas (mentor) Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/elf_trampoline.c head/sys/arm/arm/identcpu.c head/sys/arm/arm/locore.S head/sys/arm/arm/swtch.S head/sys/arm/include/armreg.h head/sys/arm/include/cpuconf.h head/sys/arm/include/cpufunc.h head/sys/arm/include/intr.h head/sys/arm/include/md_var.h head/sys/conf/files.arm head/sys/conf/options.arm Modified: head/sys/arm/arm/cpufunc.c == --- head/sys/arm/arm/cpufunc.c Fri Dec 20 00:47:54 2013(r259639) +++ head/sys/arm/arm/cpufunc.c Fri Dec 20 00:56:23 2013(r259640) @@ -1038,7 +1038,7 @@ struct cpu_functions arm1176_cpufuncs = }; #endif /*CPU_ARM1176 */ -#if defined(CPU_CORTEXA) +#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) struct cpu_functions cortexa_cpufuncs = { /* CPU functions */ @@ -1118,7 +1118,7 @@ u_int cpu_reset_needs_v4_MMU_disable; /* defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ defined(CPU_FA526) || defined(CPU_FA626TE) || defined(CPU_MV_PJ4B) || \ defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) || \ - defined(CPU_CORTEXA) + defined(CPU_CORTEXA) || defined(CPU_KRAIT) static void get_cachetype_cp15(void); @@ -1416,7 +1416,7 @@ set_cpufuncs() goto out; } #endif /* CPU_ARM1136 || CPU_ARM1176 */ -#ifdef CPU_CORTEXA +#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) if (cputype == CPU_ID_CORTEXA5 || cputype == CPU_ID_CORTEXA7 || cputype == CPU_ID_CORTEXA8R1 || @@ -1425,7 +1425,8 @@ set_cpufuncs() cputype == CPU_ID_CORTEXA9R1 || cputype == CPU_ID_CORTEXA9R2 || cputype == CPU_ID_CORTEXA9R3 || - cputype == CPU_ID_CORTEXA15 ) { + cputype == CPU_ID_CORTEXA15 || + cputype == CPU_ID_KRAIT ) { cpufuncs = cortexa_cpufuncs; cpu_reset_needs_v4_MMU_disable = 1; /* V4 or higher */ get_cachetype_cp15(); @@ -2407,7 +2408,7 @@ pj4bv7_setup(args) } #endif /* CPU_MV_PJ4B */ -#ifdef CPU_CORTEXA +#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) void cortexa_setup(char *args) Modified: head/sys/arm/arm/elf_trampoline.c == --- head/sys/arm/arm/elf_trampoline.c Fri Dec 20 00:47:54 2013 (r259639) +++ head/sys/arm/arm/elf_trampoline.c Fri Dec 20 00:56:23 2013 (r259640) @@ -102,7 +102,7 @@ extern void xscalec3_l2cache_purge(void) #elif defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) #define cpu_l2cache_wbinv_all sheeva_l2cache_wbinv_all extern void sheeva_l2cache_wbinv_all(void); -#elif defined(CPU_CORTEXA) +#elif defined(CPU_CORTEXA) || defined(CPU_KRAIT) #define cpu_idcache_wbinv_all armv7_idcache_wbinv_all #define cpu_l2cache_wbinv_all() #else Modified: head/sys/arm/arm/identcpu.c == --- head/sys/arm/arm/identcpu.c Fri Dec 20 00:47:54 2013(r259639) +++ head/sys/arm/arm/identcpu.c Fri Dec 20 00:56:23 2013(r259640) @@ -254,6 +254,8 @@ const struct cpuidtab cpuids[] = { generic_steppings }, { CPU_ID_CORTEXA15, CPU_CLASS_CORTEXA, Cortex A15, generic_steppings }, + { CPU_ID_KRAIT, CPU_CLASS_KRAIT,Krait, + generic_steppings }, { CPU_ID_SA110, CPU_CLASS_SA1, SA-110, sa110_steppings }, @@ -353,6 +355,7 @@ const struct cpu_classtab cpu_classes[] { ARM10E, CPU_ARM10 }, /* CPU_CLASS_ARM10E */ { ARM10EJ,CPU_ARM10 }, /* CPU_CLASS_ARM10EJ */ { Cortex-A, CPU_CORTEXA },/* CPU_CLASS_CORTEXA */ + { Krait, CPU_KRAIT }, /* CPU_CLASS_KRAIT */ { SA-1, CPU_SA110 }, /* CPU_CLASS_SA1 */ { XScale, CPU_XSCALE_... }, /* CPU_CLASS_XSCALE */ { ARM11J, CPU_ARM11 }, /* CPU_CLASS_ARM11J */ Modified: head/sys/arm/arm/locore.S == --- head/sys/arm/arm/locore.S Fri Dec 20 00:47:54 2013(r259639) +++ head/sys/arm/arm/locore.S Fri Dec 20 00:56:23 2013(r259640) @@ -170,7 +170,7 @@ Lunmapped: mcr p15, 0, r0, c2, c0, 0 /* Set TTB */ mcr p15, 0, r0, c8, c7, 0 /* Flush TLB */
Re: svn commit: r259562 - head/usr.bin/netstat
Gleb Smirnoff wrote this message on Fri, Dec 20, 2013 at 04:28 +0400: Looks like we are coming to agreement. The way to go is to remove kvm access from netstat, substituting it with proper APIs. The better crashdump utility needs to be started. Not yet sure that C + kvm(3) is a proper framework for it. I don't understand the plan with dtrace based tool well, but reading John-Marks' email I find it interesting. gdb scripting is also an option. So, CTF contains all the type information necessary and the members of the struct... For example: ctfdump -t /boot/kernel/kernel contains: 919 POINTER (anon) refers to 1556 [...] [1377] POINTER (anon) refers to 919 [1378] STRUCT (anon) (16 bytes) le_next type=919 off=0 le_prev type=1377 off=64 [...] 1556 STRUCT proc (1208 bytes) p_list type=1378 off=0 [...] So, we can now, assuming we don't repurpose field names, have a copy kernel struct to userland struct function that uses CTF to make the proper mappings... Obviously if userland has a field that is missing in the kernel or vise versa, or size/type doesn't match, then some handling will be needed, but for the most part we could ignore the new fields as that's often what the tools have to do when we change a padded field to not be padding... The interesting thing about this also is that it would mean we could also remove the need for padding, since the CTF would describe the struct size, etc. I have not looked at the internals of CTF, so I don't know how easy it would be to just extract the parts that we need for the struct, or if we'd need a sysctl to fetch all CTF data, or fetch it from the kernel.. Having the data split may be better so the kernel wouldn't have to fetch it all out each time, etc, plus it could be cached in the library... -- John-Mark Gurney Voice: +1 415 225 5579 All that I will do, has been done, All that I have, has not. ___ 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: r259562 - head/usr.bin/netstat
On Fri, Dec 20, 2013 at 04:28:50AM +0400, Gleb Smirnoff wrote: in stable branches. I don't have strong opinion on this, I really think that running kernel and world out of sync is a bad idea, so I may agree with you. This notorious requirement (or strong recommendation) of keeping one's world and kernel in sync is a pain in the ass and an indication of certain design (or implementation) deficiencies. Linux does not have this problem, for instance. It should be perfectly OK to run any kernel and userland within reasonable time frame, instead of it being a bad idea. Looks like we are coming to agreement. The way to go is to remove kvm access from netstat, substituting it with proper APIs. Correct. Proper APIs. This would definitely help to decouple kernel and userland. ./danfe ___ 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: r259609 - head/sys/kern
On 19 December 2013 13:15, Stefan Esser s...@freebsd.org wrote: NB: I should have known better and should have asked for a review of this change before it wa committed. Sorry for the inconvenience caused :( Hey, don't be (too) sorry - you chased down and debugged a substantially annoying bug that's been around since forever. Great work. :) -a ___ 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: r259562 - head/usr.bin/netstat
Linux doesn't have this problem because debugging LInux is a wildly different thing. Maybe it's time we actually just bit the bullet and made libkvm much more fleshed out for pulling out stuff like this from core files. -a ___ 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: r259641 - in head/sys/amd64: amd64 include vmm/intel
Author: neel Date: Fri Dec 20 05:50:22 2013 New Revision: 259641 URL: http://svnweb.freebsd.org/changeset/base/259641 Log: Re-arrange bits in the amd64/pmap 'pm_flags' field. The least significant 8 bits of 'pm_flags' are now used for the IPI vector to use for nested page table TLB shootdown. Previously we used IPI_AST to interrupt the host cpu which is functionally correct but could lead to misleading interrupt counts for AST handler. The AST handler was also doing a lot more than what is required for the nested page table TLB shootdown (EOI and IRET). Modified: head/sys/amd64/amd64/pmap.c head/sys/amd64/include/pmap.h head/sys/amd64/vmm/intel/ept.c Modified: head/sys/amd64/amd64/pmap.c == --- head/sys/amd64/amd64/pmap.c Fri Dec 20 00:56:23 2013(r259640) +++ head/sys/amd64/amd64/pmap.c Fri Dec 20 05:50:22 2013(r259641) @@ -1295,6 +1295,7 @@ pmap_invalidate_page_pcid(pmap_t pmap, v static __inline void pmap_invalidate_ept(pmap_t pmap) { + int ipinum; sched_pin(); KASSERT(!CPU_ISSET(curcpu, pmap-pm_active), @@ -1319,11 +1320,9 @@ pmap_invalidate_ept(pmap_t pmap) /* * Force the vcpu to exit and trap back into the hypervisor. -* -* XXX this is not optimal because IPI_AST builds a trapframe -* whereas all we need is an 'eoi' followed by 'iret'. */ - ipi_selected(pmap-pm_active, IPI_AST); + ipinum = pmap-pm_flags PMAP_NESTED_IPIMASK; + ipi_selected(pmap-pm_active, ipinum); sched_unpin(); } Modified: head/sys/amd64/include/pmap.h == --- head/sys/amd64/include/pmap.h Fri Dec 20 00:56:23 2013 (r259640) +++ head/sys/amd64/include/pmap.h Fri Dec 20 05:50:22 2013 (r259641) @@ -312,9 +312,10 @@ struct pmap { }; /* flags */ -#definePMAP_PDE_SUPERPAGE (1 0)/* supports 2MB superpages */ -#definePMAP_EMULATE_AD_BITS(1 1)/* needs A/D bits emulation */ -#definePMAP_SUPPORTS_EXEC_ONLY (1 2)/* execute only mappings ok */ +#definePMAP_NESTED_IPIMASK 0xff +#definePMAP_PDE_SUPERPAGE (1 8)/* supports 2MB superpages */ +#definePMAP_EMULATE_AD_BITS(1 9)/* needs A/D bits emulation */ +#definePMAP_SUPPORTS_EXEC_ONLY (1 10) /* execute only mappings ok */ typedef struct pmap*pmap_t; Modified: head/sys/amd64/vmm/intel/ept.c == --- head/sys/amd64/vmm/intel/ept.c Fri Dec 20 00:56:23 2013 (r259640) +++ head/sys/amd64/vmm/intel/ept.c Fri Dec 20 05:50:22 2013 (r259641) @@ -43,6 +43,7 @@ __FBSDID($FreeBSD$); #include machine/vmm.h #include vmx_cpufunc.h +#include vmm_ipi.h #include vmx_msr.h #include ept.h @@ -98,6 +99,8 @@ ept_init(void) !INVEPT_ALL_TYPES_SUPPORTED(cap)) return (EINVAL); + ept_pmap_flags = vmm_ipinum PMAP_NESTED_IPIMASK; + use_superpages = 1; TUNABLE_INT_FETCH(hw.vmm.ept.use_superpages, use_superpages); if (use_superpages EPT_PDE_SUPERPAGE(cap)) ___ 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: r259642 - head/sys/netinet
Author: adrian Date: Fri Dec 20 07:41:03 2013 New Revision: 259642 URL: http://svnweb.freebsd.org/changeset/base/259642 Log: Disable the now unpredicably bogus check for whether we have eneough queue space before queuing a bunch of IP fragments. As the comment in the committed change says, in the post-if_transmit(), post-SMP, post-preemption world, there's just too much overlapping concurrent code paths and different approaches to driver transmit queue management to have this code even remotely be effective. The only specific place it could be useful is if ALTQ is enabled but again it doesn't at all promise that all the fragments will be transmitted anyway. The main reason for committing this change is to disable a parallel place where the drops counter is incremented. This is a side effect of an upcoming change to ixgbe/cxgbe to handle the queue drops counter slightly better. Sponsored by: Netflix, Inc. Modified: head/sys/netinet/ip_output.c Modified: head/sys/netinet/ip_output.c == --- head/sys/netinet/ip_output.cFri Dec 20 05:50:22 2013 (r259641) +++ head/sys/netinet/ip_output.cFri Dec 20 07:41:03 2013 (r259642) @@ -123,7 +123,9 @@ ip_output(struct mbuf *m, struct mbuf *o struct mbuf *m0; int hlen = sizeof (struct ip); int mtu; +#if 0 int n; /* scratchpad */ +#endif int error = 0; struct sockaddr_in *dst; const struct sockaddr_in *gw; @@ -431,6 +433,25 @@ again: } /* +* Both in the SMP world, pre-emption world if_transmit() world, +* the following code doesn't really function as intended any further. +* +* + There can and will be multiple CPUs running this code path +* in parallel, and we do no lock holding when checking the +* queue depth; +* + And since other threads can be running concurrently, even if +* we do pass this check, another thread may queue some frames +* before this thread does and it will end up partially or fully +* failing to send anyway; +* + if_transmit() based drivers don't necessarily set ifq_len +* at all. +* +* This should be replaced with a method of pushing an entire list +* of fragment frames to the driver and have the driver decide +* whether it can queue or not queue the entire set. +*/ +#if 0 + /* * Verify that we have any chance at all of being able to queue the * packet or packet fragments, unless ALTQ is enabled on the given * interface in which case packetdrop should be done by queueing. @@ -446,6 +467,7 @@ again: ifp-if_snd.ifq_drops += n; goto bad; } +#endif /* * Look for broadcast address and ___ 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