svn commit: r306944 - head/sys/dev/sfxge/common
Author: arybchik Date: Mon Oct 10 09:54:01 2016 New Revision: 306944 URL: https://svnweb.freebsd.org/changeset/base/306944 Log: sfxge(4): sync tlv_layout.h with firmwaresrc and update port-mode definition use It fixes driver attach issue to a new firmware which reports a new port-modes. Reviewed by:gnn Submitted by: Tom Millington Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D8203 Modified: head/sys/dev/sfxge/common/ef10_nic.c head/sys/dev/sfxge/common/ef10_tlv_layout.h Modified: head/sys/dev/sfxge/common/ef10_nic.c == --- head/sys/dev/sfxge/common/ef10_nic.cMon Oct 10 08:46:26 2016 (r306943) +++ head/sys/dev/sfxge/common/ef10_nic.cMon Oct 10 09:54:01 2016 (r306944) @@ -164,6 +164,7 @@ ef10_nic_get_port_mode_bandwidth( break; case TLV_PORT_MODE_10G_10G_10G_10G: case TLV_PORT_MODE_10G_10G_10G_10G_Q: + case TLV_PORT_MODE_10G_10G_10G_10G_Q1_Q2: case TLV_PORT_MODE_10G_10G_10G_10G_Q2: bandwidth = 1 * 4; break; @@ -1122,8 +1123,7 @@ static struct { { EFX_FAMILY_MEDFORD, (1 << TLV_PORT_MODE_10G) | - (1 << TLV_PORT_MODE_10G_10G) | - (1 << TLV_PORT_MODE_10G_10G_10G_10G), + (1 << TLV_PORT_MODE_10G_10G), 1 }, /* Supported modes requiring 2 outputs per port */ @@ -1140,13 +1140,15 @@ static struct { (1 << TLV_PORT_MODE_40G) | (1 << TLV_PORT_MODE_40G_40G) | (1 << TLV_PORT_MODE_40G_10G_10G) | - (1 << TLV_PORT_MODE_10G_10G_40G), + (1 << TLV_PORT_MODE_10G_10G_40G) | + (1 << TLV_PORT_MODE_10G_10G_10G_10G_Q1_Q2), 2 }, /* Supported modes requiring 4 outputs per port */ { EFX_FAMILY_MEDFORD, (1 << TLV_PORT_MODE_10G_10G_10G_10G_Q) | + (1 << TLV_PORT_MODE_10G_10G_10G_10G_Q1) | (1 << TLV_PORT_MODE_10G_10G_10G_10G_Q2), 4 }, Modified: head/sys/dev/sfxge/common/ef10_tlv_layout.h == --- head/sys/dev/sfxge/common/ef10_tlv_layout.h Mon Oct 10 08:46:26 2016 (r306943) +++ head/sys/dev/sfxge/common/ef10_tlv_layout.h Mon Oct 10 09:54:01 2016 (r306944) @@ -553,12 +553,14 @@ struct tlv_global_port_mode { #define TLV_PORT_MODE_40G(1) /* 40G, single QSFP/40G-KR */ #define TLV_PORT_MODE_10G_10G(2) /* 2x10G, dual SFP/10G-KR or single QSFP */ #define TLV_PORT_MODE_40G_40G(3) /* 40G + 40G, dual QSFP/40G-KR (Greenport, Medford) */ -#define TLV_PORT_MODE_10G_10G_10G_10G(4) /* 2x10G + 2x10G, quad SFP/10G-KR or dual QSFP (Greenport, Medford) */ -#define TLV_PORT_MODE_10G_10G_10G_10G_Q (5) /* 4x10G, single QSFP, cage 0 (Medford) */ +#define TLV_PORT_MODE_10G_10G_10G_10G(4) /* 2x10G + 2x10G, quad SFP/10G-KR or dual QSFP (Greenport) */ +#define TLV_PORT_MODE_10G_10G_10G_10G_Q1 (4) /* 4x10G, single QSFP, cage 0 (Medford) */ +#define TLV_PORT_MODE_10G_10G_10G_10G_Q (5) /* 4x10G, single QSFP, cage 0 (Medford) OBSOLETE DO NOT USE */ #define TLV_PORT_MODE_40G_10G_10G(6) /* 1x40G + 2x10G, dual QSFP (Greenport, Medford) */ #define TLV_PORT_MODE_10G_10G_40G(7) /* 2x10G + 1x40G, dual QSFP (Greenport, Medford) */ #define TLV_PORT_MODE_10G_10G_10G_10G_Q2 (8) /* 4x10G, single QSFP, cage 1 (Medford) */ -#define TLV_PORT_MODE_MAX TLV_PORT_MODE_10G_10G_10G_10G_Q2 +#define TLV_PORT_MODE_10G_10G_10G_10G_Q1_Q2 (9) /* 2x10G + 2x10G, dual QSFP (Medford) */ +#define TLV_PORT_MODE_MAX TLV_PORT_MODE_10G_10G_10G_10G_Q1_Q2 }; /* Type of the v-switch created implicitly by the firmware */ @@ -765,8 +767,8 @@ struct tlv_rx_event_merging_config { #define TLV_RX_EVENT_MERGING_CONFIG_MAX_EVENTS_MAX ((1 << 4) - 1) uint32_t timeout_ns; }; -#define TLV_RX_EVENT_MERGING_MAX_EVENTS_DEFAULT 7 -#define TLV_RX_EVENT_MERGING_TIMEOUT_NS_DEFAULT 8740 +#define TLV_RX_EVENT_MERGING_MAX_EVENTS_DEFAULT (0x) +#define TLV_RX_EVENT_MERGING_TIMEOUT_NS_DEFAULT (0x) #define TLV_TAG_PCIE_LINK_SETTINGS (0x101f) struct tlv_pcie_link_settings { @@ -791,9 +793,9 @@ struct tlv_tx_event_merging_config { uint32_t timeout_ns; uint32_t qempty_timeout_ns; /* Medford only */ }; -#define TLV_TX_EVENT_MERGING_MAX_EVENTS_DEFAULT 7 -#define TLV_TX_EVENT_MERGING_TIMEOUT_NS_DEFAULT 1400 -#define TLV_TX_EVENT_MERGING_QEMPTY_TIMEOUT_NS_DEFAULT 700 +#define TLV_TX_EVENT_MERGING_MAX_EVENTS_DEFAULT (0x) +#define TLV_TX_EVENT_MERGING_TIMEOUT_NS_DEFAULT (0x) +#define TLV_TX_EVENT_MER
svn commit: r306962 - head/tests/sys/kern/pipe
Author: br Date: Mon Oct 10 13:40:05 2016 New Revision: 306962 URL: https://svnweb.freebsd.org/changeset/base/306962 Log: Ensure data in pipe is available to read. Useful for latest (5th, direct mode) test only. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/tests/sys/kern/pipe/pipe_fstat_bug_test.c Modified: head/tests/sys/kern/pipe/pipe_fstat_bug_test.c == --- head/tests/sys/kern/pipe/pipe_fstat_bug_test.c Mon Oct 10 11:53:54 2016(r306961) +++ head/tests/sys/kern/pipe/pipe_fstat_bug_test.c Mon Oct 10 13:40:05 2016(r306962) @@ -26,6 +26,7 @@ SUCH DAMAGE. #include #include #include +#include #include #include #include @@ -49,10 +50,12 @@ main(void) { char buffer[32768], buffer2[32768], go[] = "go", go2[] = "go2"; int desc[2], ipc_coord[2]; + struct kevent event, ke; ssize_t error; int successes = 0; struct stat status; pid_t new_pid; + int kq; error = pipe(desc); if (error == -1) @@ -118,9 +121,24 @@ main(void) _exit(0); } + kq = kqueue(); + if (kq == -1) + _exit(1); + + EV_SET(&ke, desc[0], EVFILT_READ, EV_ADD, 0, 0, NULL); + + /* Attach event to the kqueue. */ + if (kevent(kq, &ke, 1, NULL, 0, NULL) != 0) + _exit(2); + while (successes < 5) { SYNC_W(1, go); SYNC_R(1, go2); + + /* Ensure data is available to read */ + if (kevent(kq, NULL, 0, &event, 1, NULL) != 1) + _exit(3); + fstat(desc[0], &status); error = read(desc[0], &buffer2, sizeof(buffer2)); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306964 - head/tests/sys/kern
Author: br Date: Mon Oct 10 14:21:40 2016 New Revision: 306964 URL: https://svnweb.freebsd.org/changeset/base/306964 Log: Skip test on MIPS as we don't have shared page implemented yet. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/tests/sys/kern/kern_copyin.c Modified: head/tests/sys/kern/kern_copyin.c == --- head/tests/sys/kern/kern_copyin.c Mon Oct 10 14:21:21 2016 (r306963) +++ head/tests/sys/kern/kern_copyin.c Mon Oct 10 14:21:40 2016 (r306964) @@ -59,6 +59,11 @@ ATF_TC_BODY(kern_copyin, tc) { char template[] = "copyin.XX"; +#ifdef __mips__ + /* MIPS has no shared page implemented yet. */ + atf_tc_skip("Platform is not supported."); +#endif + scratch_file = mkstemp(template); ATF_REQUIRE(scratch_file != -1); unlink(template); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306963 - head/usr.sbin/chown
Author: emaste Date: Mon Oct 10 14:21:21 2016 New Revision: 306963 URL: https://svnweb.freebsd.org/changeset/base/306963 Log: chown: use NULL instead of 0 for null pointer Modified: head/usr.sbin/chown/chown.c Modified: head/usr.sbin/chown/chown.c == --- head/usr.sbin/chown/chown.c Mon Oct 10 13:40:05 2016(r306962) +++ head/usr.sbin/chown/chown.c Mon Oct 10 14:21:21 2016(r306963) @@ -159,7 +159,7 @@ main(int argc, char **argv) } else a_gid(*argv); - if ((ftsp = fts_open(++argv, fts_options, 0)) == NULL) + if ((ftsp = fts_open(++argv, fts_options, NULL)) == NULL) err(1, NULL); for (rval = 0; (p = fts_read(ftsp)) != NULL;) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306965 - head/tools/build/mk
Author: emaste Date: Mon Oct 10 15:29:59 2016 New Revision: 306965 URL: https://svnweb.freebsd.org/changeset/base/306965 Log: Remove old makewhatis(1) man page when using mandoc mandoc installs makewhatis(8) Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc == --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Oct 10 14:21:40 2016(r306964) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Oct 10 15:29:59 2016(r306965) @@ -6014,6 +6014,10 @@ OLD_FILES+=usr/share/man/whatis OLD_FILES+=usr/share/openssl/man/whatis .endif +.if ${MK_MANDOCDB} != no +OLD_FILES+=usr/share/man/man1/makewhatis.1.gz +.endif + .if ${MK_NDIS} == no OLD_FILES+=usr/sbin/ndiscvt OLD_FILES+=usr/sbin/ndisgen ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r306962 - head/tests/sys/kern/pipe
We also observed this test was broken, but I think the right fix is much smaller: --- a/tests/sys/kern/pipe/pipe_fstat_bug_test.c +++ b/tests/sys/kern/pipe/pipe_fstat_bug_test.c @@ -108,7 +108,6 @@ main(void) SYNC_W(0, go2); SYNC_R(0, go); - SYNC_W(0, go2); /* XXX: why is this required? */ WRITE(8192); SYNC_W(0, go2); (That line breaks the synchronization mechanism that is the only guarantee the test passes.) Best, Conrad On Mon, Oct 10, 2016 at 6:40 AM, Ruslan Bukin wrote: > Author: br > Date: Mon Oct 10 13:40:05 2016 > New Revision: 306962 > URL: https://svnweb.freebsd.org/changeset/base/306962 > > Log: > Ensure data in pipe is available to read. > Useful for latest (5th, direct mode) test only. > > Sponsored by: DARPA, AFRL > Sponsored by: HEIF5 > > Modified: > head/tests/sys/kern/pipe/pipe_fstat_bug_test.c > > Modified: head/tests/sys/kern/pipe/pipe_fstat_bug_test.c > == > --- head/tests/sys/kern/pipe/pipe_fstat_bug_test.c Mon Oct 10 11:53:54 > 2016(r306961) > +++ head/tests/sys/kern/pipe/pipe_fstat_bug_test.c Mon Oct 10 13:40:05 > 2016(r306962) > @@ -26,6 +26,7 @@ SUCH DAMAGE. > #include > #include > #include > +#include > #include > #include > #include > @@ -49,10 +50,12 @@ main(void) > { > char buffer[32768], buffer2[32768], go[] = "go", go2[] = "go2"; > int desc[2], ipc_coord[2]; > + struct kevent event, ke; > ssize_t error; > int successes = 0; > struct stat status; > pid_t new_pid; > + int kq; > > error = pipe(desc); > if (error == -1) > @@ -118,9 +121,24 @@ main(void) > _exit(0); > } > > + kq = kqueue(); > + if (kq == -1) > + _exit(1); > + > + EV_SET(&ke, desc[0], EVFILT_READ, EV_ADD, 0, 0, NULL); > + > + /* Attach event to the kqueue. */ > + if (kevent(kq, &ke, 1, NULL, 0, NULL) != 0) > + _exit(2); > + > while (successes < 5) { > SYNC_W(1, go); > SYNC_R(1, go2); > + > + /* Ensure data is available to read */ > + if (kevent(kq, NULL, 0, &event, 1, NULL) != 1) > + _exit(3); > + > fstat(desc[0], &status); > error = read(desc[0], &buffer2, sizeof(buffer2)); > > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306966 - head/tools/build/options
Author: emaste Date: Mon Oct 10 15:40:08 2016 New Revision: 306966 URL: https://svnweb.freebsd.org/changeset/base/306966 Log: Correct sense of WITHOUT_MANDOCDB knob WITHOUT_MANDOCDB *disables* the use of mandoc's makewhatis. Modified: head/tools/build/options/WITHOUT_MANDOCDB Modified: head/tools/build/options/WITHOUT_MANDOCDB == --- head/tools/build/options/WITHOUT_MANDOCDB Mon Oct 10 15:29:59 2016 (r306965) +++ head/tools/build/options/WITHOUT_MANDOCDB Mon Oct 10 15:40:08 2016 (r306966) @@ -1,6 +1,9 @@ .\" $FreeBSD$ -Use the -.Xr mandoc 1 -version of +Use the version of +.Xr makewhatis 1 +introduced in +.Fx 2.1 , +instead of the .Xr makewhatis 8 -database and utilities. +database and utilities from +.Xr mandoc 1 . ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306969 - head/share/man/man5
Author: emaste Date: Mon Oct 10 15:47:30 2016 New Revision: 306969 URL: https://svnweb.freebsd.org/changeset/base/306969 Log: src.conf.5: regen after r306965 Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Mon Oct 10 15:44:42 2016 (r306968) +++ head/share/man/man5/src.conf.5 Mon Oct 10 15:47:30 2016 (r306969) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 306729 2016-10-05 20:12:00Z emaste .\" $FreeBSD$ -.Dd October 5, 2016 +.Dd October 10, 2016 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1075,12 +1075,15 @@ is set explicitly) Set to not to install compressed man pages. Only the uncompressed versions will be installed. .It Va WITHOUT_MANDOCDB -.\" from FreeBSD: head/tools/build/options/WITHOUT_MANDOCDB 283777 2015-05-30 17:41:37Z bapt -Use the -.Xr mandoc 1 -version of +.\" from FreeBSD: head/tools/build/options/WITHOUT_MANDOCDB 306966 2016-10-10 15:40:08Z emaste +Use the version of +.Xr makewhatis 1 +introduced in +.Fx 2.1 , +instead of the .Xr makewhatis 8 -database and utilities. +database and utilities from +.Xr mandoc 1 . .It Va WITHOUT_MAN_UTILS .\" from FreeBSD: head/tools/build/options/WITHOUT_MAN_UTILS 208322 2010-05-20 00:07:21Z jkim Set to not build utilities for manual pages, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r306964 - head/tests/sys/kern
On Mon, Oct 10, 2016 at 02:21:41PM +, Ruslan Bukin wrote: > Author: br > Date: Mon Oct 10 14:21:40 2016 > New Revision: 306964 > URL: https://svnweb.freebsd.org/changeset/base/306964 > > Log: > Skip test on MIPS as we don't have shared page implemented yet. > > Sponsored by: DARPA, AFRL > Sponsored by: HEIF5 > > Modified: > head/tests/sys/kern/kern_copyin.c > > Modified: head/tests/sys/kern/kern_copyin.c > == > --- head/tests/sys/kern/kern_copyin.c Mon Oct 10 14:21:21 2016 > (r306963) > +++ head/tests/sys/kern/kern_copyin.c Mon Oct 10 14:21:40 2016 > (r306964) > @@ -59,6 +59,11 @@ ATF_TC_BODY(kern_copyin, tc) > { > char template[] = "copyin.XX"; > > +#ifdef __mips__ > + /* MIPS has no shared page implemented yet. */ > + atf_tc_skip("Platform is not supported."); > +#endif > + > scratch_file = mkstemp(template); > ATF_REQUIRE(scratch_file != -1); > unlink(template); Shared page does not have much to do with the test failure. The cause is that the UVA map on mips ends the highest mapped entry at the VM_MAXUSER_ADDRESS - PAGE_SIZE, while all other arches map either stack or shared page up to the VM_MAXUSER_ADDRESS. >From the comment in mips/include/vmparam.h it is not clear whether the test could be fixed by mapping a page at VM_MAXUSER_ADDRESS - PAGE_SIZE. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r306962 - head/tests/sys/kern/pipe
There is some direct mode activated when you send >=8192, so this line is required Ruslan On Mon, Oct 10, 2016 at 08:04:44AM -0700, Conrad Meyer wrote: > We also observed this test was broken, but I think the right fix is > much smaller: > > --- a/tests/sys/kern/pipe/pipe_fstat_bug_test.c > +++ b/tests/sys/kern/pipe/pipe_fstat_bug_test.c > @@ -108,7 +108,6 @@ main(void) > SYNC_W(0, go2); > > SYNC_R(0, go); > - SYNC_W(0, go2); /* XXX: why is this required? */ > WRITE(8192); > SYNC_W(0, go2); > > (That line breaks the synchronization mechanism that is the only > guarantee the test passes.) > > Best, > Conrad > > > On Mon, Oct 10, 2016 at 6:40 AM, Ruslan Bukin wrote: > > Author: br > > Date: Mon Oct 10 13:40:05 2016 > > New Revision: 306962 > > URL: https://svnweb.freebsd.org/changeset/base/306962 > > > > Log: > > Ensure data in pipe is available to read. > > Useful for latest (5th, direct mode) test only. > > > > Sponsored by: DARPA, AFRL > > Sponsored by: HEIF5 > > > > Modified: > > head/tests/sys/kern/pipe/pipe_fstat_bug_test.c > > > > Modified: head/tests/sys/kern/pipe/pipe_fstat_bug_test.c > > == > > --- head/tests/sys/kern/pipe/pipe_fstat_bug_test.c Mon Oct 10 11:53:54 > > 2016(r306961) > > +++ head/tests/sys/kern/pipe/pipe_fstat_bug_test.c Mon Oct 10 13:40:05 > > 2016(r306962) > > @@ -26,6 +26,7 @@ SUCH DAMAGE. > > #include > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -49,10 +50,12 @@ main(void) > > { > > char buffer[32768], buffer2[32768], go[] = "go", go2[] = "go2"; > > int desc[2], ipc_coord[2]; > > + struct kevent event, ke; > > ssize_t error; > > int successes = 0; > > struct stat status; > > pid_t new_pid; > > + int kq; > > > > error = pipe(desc); > > if (error == -1) > > @@ -118,9 +121,24 @@ main(void) > > _exit(0); > > } > > > > + kq = kqueue(); > > + if (kq == -1) > > + _exit(1); > > + > > + EV_SET(&ke, desc[0], EVFILT_READ, EV_ADD, 0, 0, NULL); > > + > > + /* Attach event to the kqueue. */ > > + if (kevent(kq, &ke, 1, NULL, 0, NULL) != 0) > > + _exit(2); > > + > > while (successes < 5) { > > SYNC_W(1, go); > > SYNC_R(1, go2); > > + > > + /* Ensure data is available to read */ > > + if (kevent(kq, NULL, 0, &event, 1, NULL) != 1) > > + _exit(3); > > + > > fstat(desc[0], &status); > > error = read(desc[0], &buffer2, sizeof(buffer2)); > > > > > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r306999 - head/release/doc/en_US.ISO8859-1/hardware
Author: jhb Date: Mon Oct 10 17:00:12 2016 New Revision: 306999 URL: https://svnweb.freebsd.org/changeset/base/306999 Log: Add a missing word. MFC after:1 month Modified: head/release/doc/en_US.ISO8859-1/hardware/article.xml Modified: head/release/doc/en_US.ISO8859-1/hardware/article.xml == --- head/release/doc/en_US.ISO8859-1/hardware/article.xml Mon Oct 10 16:41:17 2016(r306998) +++ head/release/doc/en_US.ISO8859-1/hardware/article.xml Mon Oct 10 17:00:12 2016(r306999) @@ -149,7 +149,7 @@ &intel; EM64T is an extended version of IA-32 (x86) and - different from &intel; IA-64 (Itanium) architecture. Some + different from &intel; IA-64 (Itanium) architecture. Some of &intel;'s old documentation refers to &intel; EM64T as 64-bit extension technology or IA-32e. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r307000 - in head: . share/man/man9
Author: avos Date: Mon Oct 10 17:16:02 2016 New Revision: 307000 URL: https://svnweb.freebsd.org/changeset/base/307000 Log: mbuf(9), mbuf_tags(9): fix function prototypes. - Add m_getclr(9) symlink to ObsoleteFiles.inc (removed in r295481). - Add const qualifiers in m_dup(), m_dup_pkthdr() and m_tag_copy_chain() (r286450). - Fix m_dup_pkthdr() definition (it's not the same as m_move_pkthdr()). MFC after:5 days Modified: head/ObsoleteFiles.inc head/share/man/man9/Makefile head/share/man/man9/mbuf.9 head/share/man/man9/mbuf_tags.9 Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Mon Oct 10 17:00:12 2016(r306999) +++ head/ObsoleteFiles.inc Mon Oct 10 17:16:02 2016(r307000) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20161010: remove link to removed m_getclr(9) macro +OLD_FILES+=usr/share/man/man9/m_getclr.9 # 20161003: MK_ELFCOPY_AS_OBJCOPY option retired OLD_FILES+=usr/bin/elfcopy OLD_FILES+=usr/share/man/man1/elfcopy.1.gz Modified: head/share/man/man9/Makefile == --- head/share/man/man9/MakefileMon Oct 10 17:00:12 2016 (r306999) +++ head/share/man/man9/MakefileMon Oct 10 17:16:02 2016 (r307000) @@ -1138,7 +1138,6 @@ MLINKS+=\ mbuf.9 m_get2.9 \ mbuf.9 m_getjcl.9 \ mbuf.9 m_getcl.9 \ - mbuf.9 m_getclr.9 \ mbuf.9 MGETHDR.9 \ mbuf.9 m_gethdr.9 \ mbuf.9 m_getm.9 \ Modified: head/share/man/man9/mbuf.9 == --- head/share/man/man9/mbuf.9 Mon Oct 10 17:00:12 2016(r306999) +++ head/share/man/man9/mbuf.9 Mon Oct 10 17:16:02 2016(r307000) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 30, 2016 +.Dd October 10, 2016 .Dt MBUF 9 .Os .\" @@ -79,8 +79,6 @@ .Ft struct mbuf * .Fn m_getcl "int how" "short type" "int flags" .Ft struct mbuf * -.Fn m_getclr "int how" "short type" -.Ft struct mbuf * .Fn m_gethdr "int how" "short type" .Ft struct mbuf * .Fn m_free "struct mbuf *mbuf" @@ -107,7 +105,7 @@ .Ft struct mbuf * .Fn m_copypacket "struct mbuf *mbuf" "int how" .Ft struct mbuf * -.Fn m_dup "struct mbuf *mbuf" "int how" +.Fn m_dup "const struct mbuf *mbuf" "int how" .Ft void .Fn m_copydata "const struct mbuf *mbuf" "int offset" "int len" "caddr_t buf" .Ft void @@ -126,8 +124,8 @@ .Fn m_catpkt "struct mbuf *m" "struct mbuf *n" .Ft u_int .Fn m_fixhdr "struct mbuf *mbuf" -.Ft void -.Fn m_dup_pkthdr "struct mbuf *to" "struct mbuf *from" +.Ft int +.Fn m_dup_pkthdr "struct mbuf *to" "const struct mbuf *from" "int how" .Ft void .Fn m_move_pkthdr "struct mbuf *to" "struct mbuf *from" .Ft u_int @@ -602,10 +600,6 @@ This is like but it the size of the cluster allocated will be large enough for .Fa size bytes. -.It Fn m_getclr how type -Allocate an -.Vt mbuf -and zero out the data region. .It Fn m_free mbuf Frees .Vt mbuf . Modified: head/share/man/man9/mbuf_tags.9 == --- head/share/man/man9/mbuf_tags.9 Mon Oct 10 17:00:12 2016 (r306999) +++ head/share/man/man9/mbuf_tags.9 Mon Oct 10 17:16:02 2016 (r307000) @@ -33,7 +33,7 @@ .Ft "struct m_tag *" .Fn m_tag_copy "struct m_tag *t" "int how" .Ft int -.Fn m_tag_copy_chain "struct mbuf *to" "struct mbuf *from" "int how" +.Fn m_tag_copy_chain "struct mbuf *to" "const struct mbuf *from" "int how" .Ft void .Fn m_tag_delete "struct mbuf *m" "struct m_tag *t" .Ft void ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r307001 - head
Author: avos Date: Mon Oct 10 17:18:23 2016 New Revision: 307001 URL: https://svnweb.freebsd.org/changeset/base/307001 Log: Add missing *.gz extension. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Mon Oct 10 17:16:02 2016(r307000) +++ head/ObsoleteFiles.inc Mon Oct 10 17:18:23 2016(r307001) @@ -39,7 +39,7 @@ # done # 20161010: remove link to removed m_getclr(9) macro -OLD_FILES+=usr/share/man/man9/m_getclr.9 +OLD_FILES+=usr/share/man/man9/m_getclr.9.gz # 20161003: MK_ELFCOPY_AS_OBJCOPY option retired OLD_FILES+=usr/bin/elfcopy OLD_FILES+=usr/share/man/man1/elfcopy.1.gz ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r306962 - head/tests/sys/kern/pipe
On Mon, Oct 10, 2016 at 9:50 AM, Ruslan Bukin wrote: > On Mon, Oct 10, 2016 at 08:04:44AM -0700, Conrad Meyer wrote: >> We also observed this test was broken, but I think the right fix is >> much smaller: >> >> --- a/tests/sys/kern/pipe/pipe_fstat_bug_test.c >> +++ b/tests/sys/kern/pipe/pipe_fstat_bug_test.c >> @@ -108,7 +108,6 @@ main(void) >> SYNC_W(0, go2); >> >> SYNC_R(0, go); >> - SYNC_W(0, go2); /* XXX: why is this required? */ >> WRITE(8192); >> SYNC_W(0, go2); >> >> (That line breaks the synchronization mechanism that is the only >> guarantee the test passes.) > > There is some direct mode activated when you send >=8192, > so this line is required Given that line breaks the parent-child synchronization entirely and your kevent replaces it, why not remove the remaining go/go2 pipe and read/writes? Best, Conrad ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r307002 - head/share/misc
Author: maxim Date: Mon Oct 10 18:36:26 2016 New Revision: 307002 URL: https://svnweb.freebsd.org/changeset/base/307002 Log: FreeBSD 11.0 release date added. Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree == --- head/share/misc/bsd-family-tree Mon Oct 10 17:18:23 2016 (r307001) +++ head/share/misc/bsd-family-tree Mon Oct 10 18:36:26 2016 (r307002) @@ -703,6 +703,7 @@ FreeBSD 10.32016-04-04 [FBD] NetBSD 7.0.1 2016-05-22 [NBD] DragonFly 4.6.02016-08-02 [DFB] OpenBSD 6.02016-09-01 [OBD] +FreeBSD 11.0 2016-10-10 [FBD] Bibliography ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r307003 - head/contrib/mdocml
Author: emaste Date: Mon Oct 10 19:09:35 2016 New Revision: 307003 URL: https://svnweb.freebsd.org/changeset/base/307003 Log: makewhatis: make output reproducible The mandoc search database generation uses each page's inode number as a hash key to index hard linked pages only once. However, it also processed the pages ordered by hash key resulting in effectively non- deterministic output. Instead: 1) provide fts_open() with a comparison function to process directories and files in a deterministic order 2) in addition to the existing hash, insert pages into a linked list which will be sorted (by virtue of 1) 3) iterate over pages by the list in 2, instead of hash order I will work on upstreaming this change. Reviewed by: bapt MFC after:1 month Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D8213 Modified: head/contrib/mdocml/mandocdb.c Modified: head/contrib/mdocml/mandocdb.c == --- head/contrib/mdocml/mandocdb.c Mon Oct 10 18:36:26 2016 (r307002) +++ head/contrib/mdocml/mandocdb.c Mon Oct 10 19:09:35 2016 (r307003) @@ -103,6 +103,7 @@ struct mpage { char*arch;/* architecture from file content */ char*title; /* title from file content */ char*desc;/* description from file content */ + struct mpage*next;/* singly linked list */ struct mlink*mlinks; /* singly linked list */ int form;/* format from file content */ int name_head_done; @@ -146,6 +147,7 @@ static void dbadd_mlink_name(const stru static int dbopen(int); static void dbprune(void); static void filescan(const char *); +static int fts_compare(const FTSENT *const *, const FTSENT *const *); static void mlink_add(struct mlink *, const struct stat *); static void mlink_check(struct mpage *, struct mlink *); static void mlink_free(struct mlink *); @@ -204,6 +206,7 @@ static struct ohash strings; /* table o static sqlite3 *db = NULL; /* current database */ static sqlite3_stmt*stmts[STMT__MAX]; /* current statements */ static uint64_t name_mask; +static struct mpage*mpage_head; static const struct mdoc_handler mdocs[MDOC_MAX] = { { NULL, 0 }, /* Ap */ @@ -571,6 +574,20 @@ usage: return (int)MANDOCLEVEL_BADARG; } +static int +fts_compare(const FTSENT *const *a, const FTSENT *const *b) +{ + + /* +* The mpage list is processed in the opposite order to which pages are +* added, so traverse the hierarchy in reverse alpha order, resulting +* in database inserts in alpha order. This is not required for correct +* operation, but is helpful when inspecting the database during +* development. +*/ + return -strcmp((*a)->fts_name, (*b)->fts_name); +} + /* * Scan a directory tree rooted at "basedir" for manpages. * We use fts(), scanning directory parts along the way for clues to our @@ -600,8 +617,8 @@ treescan(void) argv[0] = "."; argv[1] = (char *)NULL; - f = fts_open((char * const *)argv, - FTS_PHYSICAL | FTS_NOCHDIR, NULL); + f = fts_open((char * const *)argv, FTS_PHYSICAL | FTS_NOCHDIR, + fts_compare); if (f == NULL) { exitcode = (int)MANDOCLEVEL_SYSERR; say("", "&fts_open"); @@ -966,6 +983,8 @@ mlink_add(struct mlink *mlink, const str mpage = mandoc_calloc(1, sizeof(struct mpage)); mpage->inodev.st_ino = inodev.st_ino; mpage->inodev.st_dev = inodev.st_dev; + mpage->next = mpage_head; + mpage_head = mpage; ohash_insert(&mpages, slot, mpage); } else mlink->next = mpage->mlinks; @@ -989,20 +1008,18 @@ mpages_free(void) { struct mpage*mpage; struct mlink*mlink; - unsigned int slot; - mpage = ohash_first(&mpages, &slot); - while (NULL != mpage) { + while (NULL != (mpage = mpage_head)) { while (NULL != (mlink = mpage->mlinks)) { mpage->mlinks = mlink->next; mlink_free(mlink); } + mpage_head = mpage->next; free(mpage->sec); free(mpage->arch); free(mpage->title); free(mpage->desc); free(mpage); - mpage = ohash_next(&mpages, &slot); } } @@ -1123,16 +1140,14 @@ mpages_merge(struct mparse *mp) char*sodest; char*cp; int fd; - unsigned int pslot; if ( ! nodb) SQL_EXEC("BEGIN TRA
svn commit: r307008 - in head/release: . tools
Author: np Date: Mon Oct 10 22:36:44 2016 New Revision: 307008 URL: https://svnweb.freebsd.org/changeset/base/307008 Log: Add the ability to override the size of the swap partition when building VM images. The default continues to be 1G. Reviewed by: gjb@ Sponsored by: Chelsio Communications Modified: head/release/Makefile.vm head/release/tools/vmimage.subr Modified: head/release/Makefile.vm == --- head/release/Makefile.vmMon Oct 10 21:12:56 2016(r307007) +++ head/release/Makefile.vmMon Oct 10 22:36:44 2016(r307008) @@ -8,6 +8,7 @@ VMTARGETS= vm-image VMFORMATS?=vhd vmdk qcow2 raw VMSIZE?= 20G +SWAPSIZE?= 1G VMBASE?= vm VHD_DESC= Azure, VirtualPC, Hyper-V, Xen disk image Modified: head/release/tools/vmimage.subr == --- head/release/tools/vmimage.subr Mon Oct 10 21:12:56 2016 (r307007) +++ head/release/tools/vmimage.subr Mon Oct 10 22:36:44 2016 (r307008) @@ -11,7 +11,7 @@ trap "cleanup" INT QUIT TRAP ABRT TERM write_partition_layout() { if [ -z "${NOSWAP}" ]; then - SWAPOPT="-p freebsd-swap/swapfs::1G" + SWAPOPT="-p freebsd-swap/swapfs::${SWAPSIZE}" fi _OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR)" ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r307012 - in head/sys/dev/hyperv: include vmbus
Author: sephe Date: Tue Oct 11 02:43:23 2016 New Revision: 307012 URL: https://svnweb.freebsd.org/changeset/base/307012 Log: hyperv/vmbus: Allow driver to inject synchronous task into channel taskq. MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D8208 Modified: head/sys/dev/hyperv/include/vmbus.h head/sys/dev/hyperv/vmbus/vmbus_chan.c Modified: head/sys/dev/hyperv/include/vmbus.h == --- head/sys/dev/hyperv/include/vmbus.h Tue Oct 11 02:25:59 2016 (r307011) +++ head/sys/dev/hyperv/include/vmbus.h Tue Oct 11 02:43:23 2016 (r307012) @@ -117,6 +117,7 @@ struct vmbus_chan_br { struct vmbus_channel; struct hyperv_guid; +struct task; typedef void (*vmbus_chan_callback_t)(struct vmbus_channel *, void *); @@ -134,6 +135,8 @@ int vmbus_chan_open_br(struct vmbus_cha int udlen, vmbus_chan_callback_t cb, void *cbarg); void vmbus_chan_close(struct vmbus_channel *chan); void vmbus_chan_intr_drain(struct vmbus_channel *chan); +void vmbus_chan_run_task(struct vmbus_channel *chan, + struct task *task); intvmbus_chan_gpadl_connect(struct vmbus_channel *chan, bus_addr_t paddr, int size, uint32_t *gpadl); Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c == --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Tue Oct 11 02:25:59 2016 (r307011) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Tue Oct 11 02:43:23 2016 (r307012) @@ -1713,3 +1713,11 @@ vmbus_chan_rx_empty(const struct vmbus_c return (vmbus_rxbr_empty(&chan->ch_rxbr)); } + +void +vmbus_chan_run_task(struct vmbus_channel *chan, struct task *task) +{ + + taskqueue_enqueue(chan->ch_tq, task); + taskqueue_drain(chan->ch_tq, task); +} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r307013 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Tue Oct 11 02:54:56 2016 New Revision: 307013 URL: https://svnweb.freebsd.org/changeset/base/307013 Log: hyperv/hn: Rework link status support. This is the preamble for network device SR-IOV and NDIS_STATUS_NETWORK_CHANGE handling. MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D8209 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c head/sys/dev/hyperv/netvsc/hv_rndis_filter.c head/sys/dev/hyperv/netvsc/if_hnvar.h Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h == --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Tue Oct 11 02:43:23 2016 (r307012) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Tue Oct 11 02:54:56 2016 (r307013) @@ -233,6 +233,10 @@ struct hn_softc { struct vmbus_xact_ctx *hn_xact; uint32_thn_nvs_ver; + struct taskqueue*hn_mgmt_taskq; + struct taskqueue*hn_mgmt_taskq0; + struct task hn_link_task; + uint32_thn_caps;/* HN_CAP_ */ uint32_thn_flags; /* HN_FLAG_ */ void*hn_rxbuf; @@ -271,7 +275,6 @@ struct hn_softc { */ struct hn_send_ctx; -void netvsc_linkstatus_callback(struct hn_softc *sc, uint32_t status); int hv_nv_on_send(struct vmbus_channel *chan, uint32_t rndis_mtype, struct hn_send_ctx *sndc, struct vmbus_gpa *gpa, int gpa_cnt); Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c == --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Tue Oct 11 02:43:23 2016(r307012) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Tue Oct 11 02:54:56 2016(r307013) @@ -334,6 +334,8 @@ static void hn_fixup_tx_data(struct hn_s static void hn_destroy_tx_data(struct hn_softc *); static void hn_start_taskfunc(void *, int); static void hn_start_txeof_taskfunc(void *, int); +static void hn_link_taskfunc(void *, int); +static void hn_suspend_mgmt_taskfunc(void *, int); static int hn_encap(struct hn_tx_ring *, struct hn_txdesc *, struct mbuf **); static int hn_create_rx_data(struct hn_softc *sc, int); static void hn_destroy_rx_data(struct hn_softc *sc); @@ -349,6 +351,8 @@ static int hn_synth_attach(struct hn_sof static void hn_synth_detach(struct hn_softc *); static bool hn_tx_ring_pending(struct hn_tx_ring *); static void hn_suspend(struct hn_softc *); +static void hn_suspend_data(struct hn_softc *); +static void hn_suspend_mgmt(struct hn_softc *); static void hn_resume(struct hn_softc *); static void hn_rx_drain(struct vmbus_channel *); static void hn_tx_resume(struct hn_softc *, int); @@ -518,7 +522,6 @@ netvsc_attach(device_t dev) struct sysctl_oid_list *child; struct sysctl_ctx_list *ctx; uint8_t eaddr[ETHER_ADDR_LEN]; - uint32_t link_status; struct ifnet *ifp = NULL; int error, ring_cnt, tx_ring_cnt; @@ -551,6 +554,15 @@ netvsc_attach(device_t dev) } /* +* Setup taskqueue for mangement tasks, e.g. link status. +*/ + sc->hn_mgmt_taskq0 = taskqueue_create("hn_mgmt", M_WAITOK, + taskqueue_thread_enqueue, &sc->hn_mgmt_taskq0); + taskqueue_start_threads(&sc->hn_mgmt_taskq0, 1, PI_NET, "%s mgmt", + device_get_nameunit(dev)); + TASK_INIT(&sc->hn_link_task, 0, hn_link_taskfunc, sc); + + /* * Allocate ifnet and setup its name earlier, so that if_printf * can be used by functions, which will be called after * ether_ifattach(). @@ -621,12 +633,6 @@ netvsc_attach(device_t dev) if (error) goto failed; - error = hn_rndis_get_linkstatus(sc, &link_status); - if (error) - goto failed; - if (link_status == NDIS_MEDIA_STATE_CONNECTED) - sc->hn_carrier = 1; - error = hn_rndis_get_eaddr(sc, eaddr); if (error) goto failed; @@ -736,6 +742,12 @@ netvsc_attach(device_t dev) /* Inform the upper layer about the long frame support. */ ifp->if_hdrlen = sizeof(struct ether_vlan_header); + /* +* Kick off link status check. +*/ + sc->hn_mgmt_taskq = sc->hn_mgmt_taskq0; + hn_link_status_update(sc); + return (0); failed: if (sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) @@ -755,6 +767,12 @@ netvsc_detach(device_t dev) if (sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) { if (ifp->if_drv_flags & IFF_DRV_RUNNING) hn_stop(sc); + /* +* NOTE: +* hn_stop() only suspends data, so managment +* stuffs have to be suspended manually here.