dragonfly.git
7 years agoigb: Remove unused macros
Sepherosa Ziehau [Sat, 16 Feb 2013 09:54:16 +0000 (17:54 +0800)]
igb: Remove unused macros

7 years agomtree: Remove /usr/libdata/lint. Must've overlooked it.
Sascha Wildner [Sat, 16 Feb 2013 09:22:45 +0000 (10:22 +0100)]
mtree: Remove /usr/libdata/lint. Must've overlooked it.

7 years agoccd.4: Break line after sentence.
Sascha Wildner [Wed, 13 Feb 2013 23:11:55 +0000 (00:11 +0100)]
ccd.4: Break line after sentence.

7 years agoccd.4: Add a conventional synopsis and remove config info in the text.
Sascha Wildner [Fri, 15 Feb 2013 17:13:32 +0000 (18:13 +0100)]
ccd.4: Add a conventional synopsis and remove config info in the text.

7 years agomtree: Add back a directory which I removed by mistake.
Sascha Wildner [Fri, 15 Feb 2013 16:49:47 +0000 (17:49 +0100)]
mtree: Add back a directory which I removed by mistake.

7 years agonetstat: Make "netstat -w" aware of new ifnet stats location
Sepherosa Ziehau [Fri, 15 Feb 2013 09:18:20 +0000 (17:18 +0800)]
netstat: Make "netstat -w" aware of new ifnet stats location

7 years agoif: Per-cpu ifnet/ifaddr statistics, step 3/3
Sepherosa Ziehau [Fri, 15 Feb 2013 08:15:47 +0000 (16:15 +0800)]
if: Per-cpu ifnet/ifaddr statistics, step 3/3

Make ifnet stats per-cpu.  The per-cpu stats are stored in cache aligned
ifdata_pcpu struct.

- if_mib code is adjusted, so callers of the IFMIB_IFDATA sysctl will not
  aware of the ifnet per-cpu stats, e.g. systat -if
- User space programs that directly access ifnet.if_data are modified to
  aware of the new location of the ifnet stats, e.g. netstat -in

7 years agoif: Per-cpu ifnet/ifaddr statistics, step 2/3
Sepherosa Ziehau [Fri, 15 Feb 2013 06:06:32 +0000 (14:06 +0800)]
if: Per-cpu ifnet/ifaddr statistics, step 2/3

Make ifaddr stats per-cpu.  The per-cpu stats are embedded into
ifaddr_container, which already carries per-cpu data for ifaddr.

7 years agoif: Per-cpu ifnet/ifaddr statistics, step 1/3
Sepherosa Ziehau [Wed, 13 Feb 2013 06:00:14 +0000 (14:00 +0800)]
if: Per-cpu ifnet/ifaddr statistics, step 1/3

Wrap ifnet/ifaddr stats updating, setting and extraction into macros;
ease upcoming changes.

7 years agotzsetup: Sync with FreeBSD.
Peter Avalos [Thu, 14 Feb 2013 18:23:09 +0000 (10:23 -0800)]
tzsetup: Sync with FreeBSD.

Primarily this is an update for the new libdialog, but while I'm here:

- Add a menu entry for UTC in the main menu.
- Add support for chrooted installs.
- Add examples to the man-page.
- Instead of having to know which timezone was picked last time, you
now can run "tzsetup -r" which will reinstall the last choice. This
data is recorded in /var/db/zoneinfo.
- Add a new options (-s) that, when specified, skips the question about
adjusting the clock to UTC. That avoids to write on /etc/wall_cmos_clock
which is useful in some cases (example: host user in a jail).
- Remove paths.h and embed it in the source.
- Fix style(9) issues.

Obtained-from:   FreeBSD

7 years agoDrag libdialog into the 21st century.
Peter Avalos [Thu, 14 Feb 2013 18:39:52 +0000 (10:39 -0800)]
Drag libdialog into the 21st century.

This updates libdialog and dialog's build to use contrib/dialog.
This also breaks buildworld since tzsetup needs to be ported over (see
next commit).

7 years agoAdd a README.DRAGONFLY for contrib/dialog.
Peter Avalos [Tue, 12 Feb 2013 06:02:54 +0000 (22:02 -0800)]
Add a README.DRAGONFLY for contrib/dialog.

7 years agodialog: Add README.DELETED.
Peter Avalos [Sun, 10 Feb 2013 13:24:49 +0000 (05:24 -0800)]
dialog: Add README.DELETED.

7 years agoImport dialog-1.2-20121230.
Peter Avalos [Sun, 10 Feb 2013 12:24:43 +0000 (04:24 -0800)]
Import dialog-1.2-20121230.

7 years agoUpdate locale and i18n files.
Sascha Wildner [Thu, 14 Feb 2013 10:29:42 +0000 (11:29 +0100)]
Update locale and i18n files.

This fixes <http://bugs.dragonflybsd.org/issues/2462> and at the same
fixes the "Couldn't read shell's output for..." warnings we were
getting with bmake in share/i18n/esdb.

Reported-by: marino
Taken-from:  FreeBSD, NetBSD

7 years agobsd.libnames.mk: Add LIBNCURSESW.
Peter Avalos [Tue, 12 Feb 2013 05:10:48 +0000 (21:10 -0800)]
bsd.libnames.mk: Add LIBNCURSESW.

7 years agoUpdate files for OpenSSL-1.0.1e import.
Peter Avalos [Wed, 13 Feb 2013 17:25:31 +0000 (09:25 -0800)]
Update files for OpenSSL-1.0.1e import.

7 years agoMerge branch 'vendor/OPENSSL'
Peter Avalos [Wed, 13 Feb 2013 17:19:10 +0000 (09:19 -0800)]
Merge branch 'vendor/OPENSSL'

7 years agoImport OpenSSL-1.0.1e.
Peter Avalos [Wed, 13 Feb 2013 17:15:43 +0000 (09:15 -0800)]
Import OpenSSL-1.0.1e.

o Corrected fix for CVE-2013-0169.

7 years agotap: Define TAP_MANUALMAKE; unbreak building
Sepherosa Ziehau [Wed, 13 Feb 2013 13:11:47 +0000 (21:11 +0800)]
tap: Define TAP_MANUALMAKE; unbreak building

7 years agobridge: Disable TSO on member interface
Sepherosa Ziehau [Wed, 13 Feb 2013 05:44:54 +0000 (13:44 +0800)]
bridge: Disable TSO on member interface

Report-by: dillon@
7 years agolibssl - Fix bug in libssl
Matthew Dillon [Wed, 13 Feb 2013 00:15:12 +0000 (16:15 -0800)]
libssl - Fix bug in libssl

* Fix a bug that was causing openssl's TLS code to assert.

* I believe the bug is already fixed in the openssl git master, but
  it isn't fixed in our sources (until now).

* Patch acquired from:

  fetch "http://git.openssl.org/gitweb/?p=openssl.git;a=patch;h=32cc247"

7 years agokernel - Do not auto-destroy tap interfaces which are manually created
Matthew Dillon [Wed, 13 Feb 2013 00:11:08 +0000 (16:11 -0800)]
kernel - Do not auto-destroy tap interfaces which are manually created

* When a tap interface is created via 'ifconfig tapN create' it
  will no longer be automatically destroyed on the last close.

* Previously could occur for tap units 4 or larger.

* Fixes unexpected ripouts of manually created interfaces, which
  can be particularly bad when the interface is used in a PF rule.

7 years agotip(1): Remove the clearing of the schg flag of cu(1) during installation.
Sascha Wildner [Tue, 12 Feb 2013 21:41:39 +0000 (22:41 +0100)]
tip(1): Remove the clearing of the schg flag of cu(1) during installation.

A long, long time ago (until 2004), when cu(1) was still a separate
program, its schg flag was set after installation, so it had to be
cleared on the installed cu before installing the new one over it.

In 0f3db4ffe, we removed cu(1) as a separate program and made it a
link to tip(1). In this commit, the setting of schg was commented
out but the clearing part had to be kept (for upgrading).

We can now remove the clearing of the flag as well, because we can
safely assume that since September 2004, all schg flags of cu(1)s
out there have been cleared (i.e., all systems that would ever want
to upgrade to master have a world newer than 0f3db4ffe).

7 years agokernel/callout: Remove some unused old code.
Sascha Wildner [Tue, 12 Feb 2013 21:36:45 +0000 (22:36 +0100)]
kernel/callout: Remove some unused old code.

Noticed-by: ftigeot
7 years agoifaddr: Cache align ifaddr_container
Sepherosa Ziehau [Tue, 12 Feb 2013 13:26:45 +0000 (21:26 +0800)]
ifaddr: Cache align ifaddr_container

ifaddr_container is per-cpu data struct; cache aligning it avoid possible
cache pollution

7 years agolibdialog: Increase MAX_LEN to 4096 (bug 2480)
John Marino [Mon, 11 Feb 2013 17:02:07 +0000 (18:02 +0100)]
libdialog: Increase MAX_LEN to 4096 (bug 2480)

While we are waiting for new libdialog, improve the ancient one so that
it at least doesn't core dump when used (e.g. ghostscript9 in dports)

7 years agomake upgrade: Remove another manpage (an MLINK) which has changed name.
Sascha Wildner [Mon, 11 Feb 2013 11:19:49 +0000 (12:19 +0100)]
make upgrade: Remove another manpage (an MLINK) which has changed name.

7 years agobsd.cpu.mk: Set gcc47 as default
John Marino [Mon, 11 Feb 2013 08:00:13 +0000 (09:00 +0100)]
bsd.cpu.mk: Set gcc47 as default

Yet another place the default compiler is defined and needs updating.

7 years agoFix our tree for -Wmissing-include-dirs.
Sascha Wildner [Mon, 11 Feb 2013 02:58:16 +0000 (03:58 +0100)]
Fix our tree for -Wmissing-include-dirs.

7 years agoacpi.4: Document that HPET is enabled by default.
Sascha Wildner [Sun, 10 Feb 2013 22:22:49 +0000 (23:22 +0100)]
acpi.4: Document that HPET is enabled by default.

Comment out the section about debug.acpi.enabled because currently
there are no ACPI devices/features that are off by default and have
to be enabled.

7 years agokernel: Nuke ISA sound card support.
Sascha Wildner [Sun, 10 Feb 2013 21:05:25 +0000 (22:05 +0100)]
kernel: Nuke ISA sound card support.

This removes the following modules:

snd_ad1816.ko
snd_ess.ko
snd_mss.ko
snd_sb8.ko
snd_sb16.ko
snd_sbc.ko

7 years agolibcsu: Assign environment when environ is NULL
John Marino [Sun, 10 Feb 2013 11:32:58 +0000 (12:32 +0100)]
libcsu: Assign environment when environ is NULL

Preloaded libraries can change the environment.  The current logic will
unconditionally reassign the environment, undoing any previous
customization.  This change preserves the previous customization.

Taken-from: FreeBSD SVN 245133 (07 Jan 2013)

7 years agoUpdate files for OpenSSL-1.0.1d import.
Peter Avalos [Sun, 10 Feb 2013 10:04:14 +0000 (02:04 -0800)]
Update files for OpenSSL-1.0.1d import.

7 years agoMerge branch 'vendor/OPENSSL'
Peter Avalos [Sun, 10 Feb 2013 09:34:31 +0000 (01:34 -0800)]
Merge branch 'vendor/OPENSSL'

7 years agoImport OpenSSL-1.0.1d.
Peter Avalos [Sun, 10 Feb 2013 09:23:52 +0000 (01:23 -0800)]
Import OpenSSL-1.0.1d.

      o Fix renegotiation in TLS 1.1, 1.2 by using the correct TLS version.
      o Fix OCSP bad key DoS attack CVE-2013-0166
      o Fix for SSL/TLS/DTLS CBC plaintext recovery attack CVE-2013-0169
      o Fix for TLS AESNI record handling flaw CVE-2012-2686

7 years agokernel: Properly lock dounmount()
François Tigeot [Wed, 6 Feb 2013 08:11:04 +0000 (09:11 +0100)]
kernel: Properly lock dounmount()

* dounmount() wasn't properly locked, make it grab the mntvnode_token

* It is necessary to synchronize against insmntque() clearing the vnode
  linkage

* This commit fixes issue #2506

Thanks to vsrinivas for directions

7 years agopf: Fix set-but-unused gcc47 warning
Sepherosa Ziehau [Sat, 9 Feb 2013 05:19:32 +0000 (13:19 +0800)]
pf: Fix set-but-unused gcc47 warning

7 years agoip6/mroute: Partly fix set-but-unused gcc47 warning
Sepherosa Ziehau [Sat, 9 Feb 2013 03:44:33 +0000 (11:44 +0800)]
ip6/mroute: Partly fix set-but-unused gcc47 warning

7 years agowlan: Partly fix set-but-unused gcc47 warning
Sepherosa Ziehau [Sat, 9 Feb 2013 02:48:08 +0000 (10:48 +0800)]
wlan: Partly fix set-but-unused gcc47 warning

7 years agoacpica: Fix set-but-unused gcc47 warning
Sepherosa Ziehau [Sat, 9 Feb 2013 02:29:00 +0000 (10:29 +0800)]
acpica: Fix set-but-unused gcc47 warning

7 years agoath: Partly fix set-but-unused gcc47 warning
Sepherosa Ziehau [Sat, 9 Feb 2013 02:12:46 +0000 (10:12 +0800)]
ath: Partly fix set-but-unused gcc47 warning

7 years agoiwn: Fix set-but-unused gcc47 warning
Sepherosa Ziehau [Sat, 9 Feb 2013 01:34:03 +0000 (09:34 +0800)]
iwn: Fix set-but-unused gcc47 warning

7 years agoral: Fix set-but-unused gcc47 warning
Sepherosa Ziehau [Sat, 9 Feb 2013 01:31:30 +0000 (09:31 +0800)]
ral: Fix set-but-unused gcc47 warning

7 years agosln: Fix set-but-unused gcc47 warning
Sepherosa Ziehau [Sat, 9 Feb 2013 01:30:05 +0000 (09:30 +0800)]
sln: Fix set-but-unused gcc47 warning

7 years agokernel/firewire: Remove #ifdef __DragonFly__ jungle.
Sascha Wildner [Fri, 8 Feb 2013 18:34:36 +0000 (19:34 +0100)]
kernel/firewire: Remove #ifdef __DragonFly__ jungle.

7 years agokernel/virtio: Constify some struct members to silence warnings.
Sascha Wildner [Fri, 8 Feb 2013 17:59:09 +0000 (18:59 +0100)]
kernel/virtio: Constify some struct members to silence warnings.

7 years agokernel/virtio: Remove some unneeded inclusions of <sys/cdefs.h>.
Sascha Wildner [Fri, 8 Feb 2013 17:45:03 +0000 (18:45 +0100)]
kernel/virtio: Remove some unneeded inclusions of <sys/cdefs.h>.

7 years agokernel/virtio: Remove some unused variables.
Sascha Wildner [Fri, 8 Feb 2013 17:43:08 +0000 (18:43 +0100)]
kernel/virtio: Remove some unused variables.

7 years agoRevert "Revert "i386/files: isa/clock.c is clean enough to compile w/ -Werror""
Sascha Wildner [Fri, 8 Feb 2013 17:21:45 +0000 (18:21 +0100)]
Revert "Revert "i386/files: isa/clock.c is clean enough to compile w/ -Werror""

This reverts commit 9b40fbdac1da8214991bb70ab4767862203f2375.

Now that we no longer have gcc41, it compiles without warnings on both of
our compilers.

7 years agotip(1): Fix some -Wmissing-parameter-type warnings.
Sascha Wildner [Fri, 8 Feb 2013 17:14:31 +0000 (18:14 +0100)]
tip(1): Fix some -Wmissing-parameter-type warnings.

It still needs more cleanup.

7 years agomxge: Fix set-but-unused gcc47 warning
Sepherosa Ziehau [Fri, 8 Feb 2013 14:18:44 +0000 (22:18 +0800)]
mxge: Fix set-but-unused gcc47 warning

7 years agotools/fw: Fix set-but-unused gcc47 warning in generated C file
Sepherosa Ziehau [Fri, 8 Feb 2013 14:17:18 +0000 (22:17 +0800)]
tools/fw: Fix set-but-unused gcc47 warning in generated C file

Only generate parent and the assignment code, if there are more
then 1 input firmware files.

7 years agobce: Fix set-but-unused gcc47 warning
Sepherosa Ziehau [Fri, 8 Feb 2013 13:35:27 +0000 (21:35 +0800)]
bce: Fix set-but-unused gcc47 warning

7 years agobfe: Fix set-but-unused gcc47 warning
Sepherosa Ziehau [Fri, 8 Feb 2013 13:34:47 +0000 (21:34 +0800)]
bfe: Fix set-but-unused gcc47 warning

7 years agobge: Fix set-but-unused gcc47 warning
Sepherosa Ziehau [Fri, 8 Feb 2013 13:33:59 +0000 (21:33 +0800)]
bge: Fix set-but-unused gcc47 warning

7 years agotl: Fix set-bu-unused gcc47 warning
Sepherosa Ziehau [Fri, 8 Feb 2013 13:31:57 +0000 (21:31 +0800)]
tl: Fix set-bu-unused gcc47 warning

7 years agokue: Fix set-but-unused gcc47 warning
Sepherosa Ziehau [Fri, 8 Feb 2013 13:27:33 +0000 (21:27 +0800)]
kue: Fix set-but-unused gcc47 warning

7 years agobnx: Fix set-but-unused gcc47 warning
Sepherosa Ziehau [Fri, 8 Feb 2013 13:23:20 +0000 (21:23 +0800)]
bnx: Fix set-but-unused gcc47 warning

7 years agobridge: Fix set-but-unused gcc47 warning
Sepherosa Ziehau [Fri, 8 Feb 2013 10:58:41 +0000 (18:58 +0800)]
bridge: Fix set-but-unused gcc47 warning

7 years agode: Fix set-but-unused gcc47 warning
Sepherosa Ziehau [Fri, 8 Feb 2013 10:58:14 +0000 (18:58 +0800)]
de: Fix set-but-unused gcc47 warning

7 years agoppp: Fix set-but-unused gcc47 warning
Sepherosa Ziehau [Fri, 8 Feb 2013 10:57:34 +0000 (18:57 +0800)]
ppp: Fix set-but-unused gcc47 warning

7 years agoemx: Implement multiple hardware TX queue support; disabled by default
Sepherosa Ziehau [Thu, 7 Feb 2013 06:38:04 +0000 (14:38 +0800)]
emx: Implement multiple hardware TX queue support; disabled by default

Two notes about the multiple hardware TX queue support:

- It could only be enabled on 82571, 82572 and es2lan.  Enabling it on
  82574, whose datasheet claims multiple hardware TX queue support,
  could cause watchdog timeout when heavy TCP receiving test are
  conducted.

- It is disabled by default.  Since 82571, 82572 and es2lan only have
  one global context for TX hardware checksum and TSO, the driver will
  have to setup TX context descriptor for each packet.  Using TX context
  descriptor for each packet could cause serious transmission performance
  regression for tiny packets, see comment of following commit:
  51e6819fc2ad7cefdf830dcc9f20bcbe2af2aa52

  However, multiple hardware TX queues still could be enabled depending
  on the workload (*):
  o  TSO probably are not affected by setting up a TX context descriptor
     for each TSO packet.
  o  Stuffs do not using hardware TX checksum, e.g. IP fast forwarding.

  Multiple hardware TX queues could be enabled globally by tunable:
      hw.emx.txr=2
  Multiple hardware TX queues could be enabled on individual interface by
  tunable:
      hw.emxY.txr=2

(*) Another thought is to add per-interface metric, which indicates the
size of packets that worth hardware checksum; if the packets' size is
below that metric, software checksum is used.

7 years agokether_ntoa.9: Fix prototypes.
Sascha Wildner [Thu, 7 Feb 2013 21:55:21 +0000 (22:55 +0100)]
kether_ntoa.9: Fix prototypes.

7 years agogames/atc: Fix a logic bug.
Sascha Wildner [Thu, 7 Feb 2013 19:05:52 +0000 (20:05 +0100)]
games/atc: Fix a logic bug.

The original logic should have really been:

if ((l < 'a' && l > 'z') || (l < 'A' && l > 'Z'))

But using islower()/isupper() is simpler and more readable.

Taken-from: NetBSD

7 years agokether_ntoa.9: Mention %D.
Sascha Wildner [Thu, 7 Feb 2013 17:38:23 +0000 (18:38 +0100)]
kether_ntoa.9: Mention %D.

Also, perform some minor cleanup.

7 years agohexncpy.9: Some little cleanup.
Sascha Wildner [Thu, 7 Feb 2013 17:37:31 +0000 (18:37 +0100)]
hexncpy.9: Some little cleanup.

7 years agoem/emx: Clear bit 28 of TARC1 for 82571/82572/es2lan
Sepherosa Ziehau [Thu, 7 Feb 2013 01:43:48 +0000 (09:43 +0800)]
em/emx: Clear bit 28 of TARC1 for 82571/82572/es2lan

Clearing bit 28 of TARC1 is done in HAL's device initialization, however,
it happens before the MULR bit is turned on in TX unit initialization;
MULR is not necessarily on by default, since its value is loaded from
EEPROM according to the datasheet.

7 years agodoc - Add a note about %D removal in porting_drivers.txt document.
Antonio Huete Jimenez [Thu, 7 Feb 2013 01:07:30 +0000 (02:07 +0100)]
doc - Add a note about %D removal in porting_drivers.txt document.

7 years agoAdd a manpage for hexncpy function.
Antonio Huete Jimenez [Thu, 7 Feb 2013 00:47:25 +0000 (01:47 +0100)]
Add a manpage for hexncpy function.

Also fix .Dd in kether_ntoa(9).

7 years agoAdd manual pages for kether_ntoa and kether_aton functions.
Antonio Huete Jimenez [Wed, 6 Feb 2013 23:03:28 +0000 (00:03 +0100)]
Add manual pages for kether_ntoa and kether_aton functions.

7 years agoigb: Sync w/ intel igb-2.3.7
Sepherosa Ziehau [Wed, 6 Feb 2013 08:50:52 +0000 (16:50 +0800)]
igb: Sync w/ intel igb-2.3.7

- Support I210 and I211
- EEE settings are only applied to copper chips
- Explicitly disable DMA coalesce, if not requested

7 years agoem: Sync w/ intel em-7.3.4
Sepherosa Ziehau [Wed, 6 Feb 2013 04:34:35 +0000 (12:34 +0800)]
em: Sync w/ intel em-7.3.4

- Move PBA configuration into em_reset(); mainly to put hardware into
  stable state after the driver attached.
- Add workaround for PCH2 chips during resuming.
- Fixup flow control parameters for PCH, ICH9, ICH10 and ES2LAN chips.
- Remove no longer needed ERT setting for PCH2, ICH9 and ICH10 chips.

7 years agoemx: Sync w/ intel em-7.3.4
Sepherosa Ziehau [Wed, 6 Feb 2013 04:32:16 +0000 (12:32 +0800)]
emx: Sync w/ intel em-7.3.4

Move PBA configuration into emx_reset(); mainly to put hardware into
stable state after the driver attached.

7 years agoig_hal: Merge intel em-7.3.4 and igb-2.3.7 hardware abstraction layer
Sepherosa Ziehau [Tue, 5 Feb 2013 09:05:57 +0000 (17:05 +0800)]
ig_hal: Merge intel em-7.3.4 and igb-2.3.7 hardware abstraction layer

7 years agoEnable -Werror for world building with gcc47.
Sascha Wildner [Sun, 20 Jan 2013 02:25:15 +0000 (03:25 +0100)]
Enable -Werror for world building with gcc47.

The kernel still has warnings to be reviewed.

7 years agoRemove xlint. It's outdated and there are much better checkers around.
Sascha Wildner [Tue, 5 Feb 2013 20:23:52 +0000 (21:23 +0100)]
Remove xlint. It's outdated and there are much better checkers around.

clang static analyzer, cppcheck, coccinelle et al.

So there's no need to maintain it in base.

7 years agolibm: Exclude -Woverflow from -Werror in s_csqrtl.c for gcc47/i386.
Sascha Wildner [Sun, 20 Jan 2013 02:15:59 +0000 (03:15 +0100)]
libm: Exclude -Woverflow from -Werror in s_csqrtl.c for gcc47/i386.

The issue is that a long double in gcc47 on i386 doesn't seem to be
able to hold LDBL_MAX. At least a warning is generated. Cause
unknown, might be a bug in gcc (or our gcc's configuration).

gcc47 on FreeBSD/i386 does not show this behavior (no warning
generated at least).

Until we have a better clue, don't turn this warning into an error,
even if -Werror is specified, so that building can go on.

FreeBSD-testing: tuxillo

7 years agoFix some more things related to the switch to gcc47.
Sascha Wildner [Tue, 5 Feb 2013 19:54:06 +0000 (20:54 +0100)]
Fix some more things related to the switch to gcc47.

* Adjust make.conf and its manual page.

* Create gcc47 MLINKS properly (clean up the Makefile a bit, too).

* Exclude gcc44 in the qemu setup.

7 years agoUPDATING: Adjust heading.
Sascha Wildner [Sun, 3 Feb 2013 11:53:24 +0000 (12:53 +0100)]
UPDATING: Adjust heading.

7 years agokernel -- ffs: Softdep lock fix (lk unheld in process_worklist_item)
Venkatesh Srinivas [Wed, 30 Jan 2013 18:21:10 +0000 (10:21 -0800)]
kernel -- ffs: Softdep lock fix (lk unheld in process_worklist_item)

In process_worklist_item, from newdirrem/request_cleanup, the softdep
lock was not held before removing workitems. Make newdirrem take the
softdep lock around request_cleanup.

Reported-by: swildner@
Bug: 2501

7 years agopktgen: Support multiple TX queues
Sepherosa Ziehau [Mon, 4 Feb 2013 09:59:04 +0000 (17:59 +0800)]
pktgen: Support multiple TX queues

- Dispatch start operation to subqueue owner CPU's netisr.
- Add PKTGENMQSTART to utilize multiple TX queues

7 years agopktgen: Factor out pktgen_ref
Sepherosa Ziehau [Mon, 4 Feb 2013 09:33:06 +0000 (17:33 +0800)]
pktgen: Factor out pktgen_ref

Will be needed for multiple TX queue support

7 years agopktgen: Move buflist and stop callout into per-cpu data struct
Sepherosa Ziehau [Mon, 4 Feb 2013 09:29:56 +0000 (17:29 +0800)]
pktgen: Move buflist and stop callout into per-cpu data struct

Prepare for the multiple TX queue support.

7 years agoUnbreak world with NO_GCC44
François Tigeot [Sun, 3 Feb 2013 12:32:01 +0000 (13:32 +0100)]
Unbreak world with NO_GCC44

gcc44 in now optional, do not require its use during buildworld
anymore.

7 years agoPromote GCC 4.7 to be the default compiler
John Marino [Sun, 3 Feb 2013 09:12:27 +0000 (10:12 +0100)]
Promote GCC 4.7 to be the default compiler

This commit causes world and kernel to be built by GCC 4.7 if the compiler
is not specified.  As a side effect, the make variable "NO_GCC47" no longer
functions.  GCC 4.7 will always be built.  In addition to changing the
default of WORLD_CCVER, the CCVER variable also defaults to "gcc47" now.

The variable "NO_GCC44" has been resurrected to prevent GCC 4.4 from
being built.  As noted in the UPDATING file, using this option is highly
discouraged.  GCC 4.4 is very useful in building some packages in pkgsrc
that fail to build with GCC 4.7's stricter standards.  The new DPorts
system is designed to use GCC 4.4 by default, regardless of the base's
default compiler setting.  If at all possible, build *both* compilers
for the maximum flexibility to build packages.

7 years agoUnbreak world (gcc47 plugin)
John Marino [Sat, 2 Feb 2013 22:35:27 +0000 (23:35 +0100)]
Unbreak world (gcc47 plugin)

The installincludes target is run before "depend" target, so gtype.state
hasn't been created by the time "installincludes" is executed in stage 4.
Luckily there is a similar functionality for FILES that is executed at
the install phase, which will unbreak world (broken on previous commit).

Other headers are generated as well, so swap INCSGROUPS with FILESGROUPS
for everything to avoid having to figure which ones.  The headers are
needed at runtime, not buildtime, so this is okay.

7 years agogcc47: Fix plugin mechanism
John Marino [Sat, 2 Feb 2013 15:29:40 +0000 (16:29 +0100)]
gcc47: Fix plugin mechanism

There were two problems with gcc 4.7 LTO plugin:
1) It needed a number of object files from libiberty.
   Unfortunately the previous object files couldn't be used as they need
   to be built with -fPIC and libiberty is only an internal (non-pic) lib.
2) The plugin header directory was missing completely, as seen with
   gcc -print-file-name=plugin only returning "plugin".

7 years agopktgen: Use atomic for pktgen and module reference count
Sepherosa Ziehau [Sat, 2 Feb 2013 08:23:57 +0000 (16:23 +0800)]
pktgen: Use atomic for pktgen and module reference count

Module's token is no longer needed in many places.  Ease the upcoming
changes to support multiple hardware TX queues.

7 years agokernel - Fix kernel panic caused by rename race
Matthew Dillon [Fri, 1 Feb 2013 21:47:37 +0000 (13:47 -0800)]
kernel - Fix kernel panic caused by rename race

* kern_rename() must temporarily unlock the source ncp when resolving the
  target ncp, and will sometimes have to temporarily unlock the target ncp
  when relocking both.  This can race against a topological removal of one
  or both ncp's, resulting in incorrect operation or a panic due to a
  NULL vp.

* Detect the case and return EAGAIN if the ncp's have been marked NCF_DESTROYED
  or if fromncp loses its vp resolution.  Callers detect the EAGAIN and retry
  the operation.

Reported-by: ftigeot
7 years agokernel - cycle vnode in cache_unlink()
Matthew Dillon [Fri, 1 Feb 2013 17:57:55 +0000 (09:57 -0800)]
kernel - cycle vnode in cache_unlink()

* cache_unlink() and cache_rename() are called by VFS's to update the
  namecache after a file deletion or rename.  cache_rename() also calls
  cache_unlink().

* Add code to this function which cycles any vnode attached to the
  namecache entry for the case where its refs are 0.  This will
  trigger VOP_INACTIVE and allow the VFS to detect file deletions.

  Generally speaking this means that VFS's no longer have to detect
  deleted files in code paths outside of VOP_INACTIVE w/regards to
  forcing a reclaim on the vnode.

* HAMMER2 now depends on this behavior.  The change in behavior allows
  HAMMER2 to do away with inode backpointers from chain structures,
  greatly simplifying the code and removing a chicken-egg dependency.

* Other VFSs (HAMMER, TMPFS, UFS) may be adjusted in the future but for
  now their file deletion code outside of VOP_INACTIVE is being left
  intact.

7 years agokernel - Fix memory leak on iocom terminaion
Matthew Dillon [Fri, 1 Feb 2013 17:54:43 +0000 (09:54 -0800)]
kernel - Fix memory leak on iocom terminaion

* freerd_state was being cleaned up by the reader thread, but during
  decomissioning the writer thread can simulate incoming packets
  to cleanly shutdown open transactions, and this can reload
  freerd_state.

* Move the cleanup for freerd_state and freewr_state out of the
  reader/writer threads and into kdmsg_iocom_uninit() proper.

* Fixes dangling 112 bytes of memory left allocated after uninit.

7 years agohammer2 - serialized flush work part 4
Matthew Dillon [Fri, 1 Feb 2013 17:19:41 +0000 (09:19 -0800)]
hammer2 - serialized flush work part 4

* Hardlink helper functions now take and return hammer2_chain pointers
  instead of messing with hammer2_inode's, which simplifies matters
  greatly.

* Major cleanup of the hardlink handling code.

* Get hardlink creation/deletion mostly working as expected again.
  There is still an issue with hammer_inode aliasing (see TODO),
  and the rename-directory-to-some-parent hardlink issue has not been
  addressed yet.

7 years agopktgen: Unbreak compile
Sepherosa Ziehau [Fri, 1 Feb 2013 08:33:21 +0000 (16:33 +0800)]
pktgen: Unbreak compile

7 years agohammer2 - serialized flush work part 3
Matthew Dillon [Fri, 1 Feb 2013 00:03:59 +0000 (16:03 -0800)]
hammer2 - serialized flush work part 3

* Clean up hammer2_inode vs hammer2_chain.  Remove chain->u.ip (the
  backpointer from the chain to the inode), which simplifies a lot
  of things.  This was only used to detect when a vnode might have to
  be recycled but we solve that a different way by adjusting the
  kernel's cache_unlink() code.

* Revamp hammer2_inode_get().  This routine now always kmalloc()'s a new
  hammer2_inode.  In HAMMER2, the hammer2_inode structure is actually
  an indirect pointer to an underlying chain so it does not have to be
  unique.  There can multiple ip's pointing to the same chain.

* Revamp hammer2_inode_put().  The ref on ip->chain is dropped via ip->chain,
  and the (passed_chain) argument is treated separately and does not
  necessarily have to match ip->chain.  This makes hammer2_inode_put()'s API
  comparable to hammer2_inode_unlock_ex(), reducing confusion.

* Depend on adjustments to cache_unlink() and cache_rename() to detect
  vnodes which should be recycled.  This code (in the proper kernel, not
  here) now triggers a deactivation if the vnode related to the namecache
  entry has no refs, allowing HAMMER2 to detect any deletions and vrecycle()
  the vnode immediately.

* Numerous ref/lock fixes.

7 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Fri, 1 Feb 2013 00:03:21 +0000 (16:03 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

7 years agoRemove legacy lex source files
John Marino [Thu, 31 Jan 2013 19:18:54 +0000 (20:18 +0100)]
Remove legacy lex source files

The ancient lex was replaced by flex recently.  The bootstrapping issue
seems to be solved, so let's go ahead and purge lex from base now.

7 years agolibstdc++47: Fix iostream bug 2478
John Marino [Thu, 31 Jan 2013 15:58:59 +0000 (16:58 +0100)]
libstdc++47: Fix iostream bug 2478

c++ iostreams were segfaulting -- apparently _M_table isn't defined in all
cases.  Fix inspired from FreeBSD configuration files.

https://bugs.dragonflybsd.org/issues/2478

7 years agohammer2 - serialized flush work part 2
Matthew Dillon [Thu, 31 Jan 2013 06:41:52 +0000 (22:41 -0800)]
hammer2 - serialized flush work part 2

* Adjust the hammer2_inode_lock*() API to separate the inode lock from
  the chain lock (it gets both).  The locked chain associated with the
  inode is now returned and can change during search iterations, eventually
  to be returned via hammer2_inode_unlock*().

* Fixes issues related to threads obtaining more than 1 shared lock on the
  same chain, which can deadlock deeper procedures which might need to
  temporarily upgrade the lock.

* Continue working through bugs.

7 years agohammer2 - serialized flush work part 1
Matthew Dillon [Thu, 31 Jan 2013 04:53:27 +0000 (20:53 -0800)]
hammer2 - serialized flush work part 1

This is preliminary work required to support chain structure replication
for the purposes of recording modifications which are then separated by
serialization points (by transaction id).  Ultimately this will allow the
flush code to flush to an exact serialization point and in the process
operate completely asynchronously from any further modifications being
made on the frontend after that serialization point.

* Separate hammer2_inode from hammer2_chain.

* Split the locking APIs for inodes and chains into their own functions.

* Move ip_data into chain->data->ipdata (kmalloc'd), instead of embedding
  it in hammer2_inode.  This allows the inode structure to disconnect from
  the chain.