dragonfly.git
11 years agoixgbe.4: Remove trailing whitespace.
Sascha Wildner [Mon, 2 Jul 2012 08:13:02 +0000 (10:13 +0200)]
ixgbe.4: Remove trailing whitespace.

11 years agobge: Adjust PHY workaround settings
Sepherosa Ziehau [Mon, 2 Jul 2012 02:56:27 +0000 (10:56 +0800)]
bge: Adjust PHY workaround settings

Obtained-from: OpenBSD if_bge.c 1.309

11 years agomii: Define MII_PROBEMASK_DEFAULT and MII_CAPMASK_DEFAULT
Sepherosa Ziehau [Mon, 2 Jul 2012 02:33:54 +0000 (10:33 +0800)]
mii: Define MII_PROBEMASK_DEFAULT and MII_CAPMASK_DEFAULT

Avoid using magic number

11 years agobge/brgphy: Split PHY flags out of main flags
Sepherosa Ziehau [Mon, 2 Jul 2012 02:10:36 +0000 (10:10 +0800)]
bge/brgphy: Split PHY flags out of main flags

11 years ago<net/if_media.h>: Add 10Gb ethernet baudrate descriptions.
Sascha Wildner [Mon, 2 Jul 2012 02:02:46 +0000 (04:02 +0200)]
<net/if_media.h>: Add 10Gb ethernet baudrate descriptions.

11 years agokernel/net: On i386, make the interface baudrate 64 bits in a few places.
Sascha Wildner [Mon, 2 Jul 2012 02:02:31 +0000 (04:02 +0200)]
kernel/net: On i386, make the interface baudrate 64 bits in a few places.

For 10Gb ethernet.

For ifi_baudrate in struct if_data (which is public), NetBSD uses
uint64_t too, so no pkgsrc breakage is expected. However, a few
i386 binary packages we offer might be broken now on master.

Discussed-with: sephe

11 years agobge: Enable fix for read DMA FIFO overruns on certain controllers
Sepherosa Ziehau [Mon, 2 Jul 2012 01:49:15 +0000 (09:49 +0800)]
bge: Enable fix for read DMA FIFO overruns on certain controllers

Obtained-from: FreeBSD 213411

11 years agobge: NetExtreme/NetLink controllers require memory not across 4G boundary
Sepherosa Ziehau [Mon, 2 Jul 2012 01:28:13 +0000 (09:28 +0800)]
bge: NetExtreme/NetLink controllers require memory not across 4G boundary

Obtained-from: FreeBSD 226805

11 years agobge: Utilize new mii_probe()
Sepherosa Ziehau [Sun, 1 Jul 2012 23:26:11 +0000 (07:26 +0800)]
bge: Utilize new mii_probe()

Thus avoid local hacking about fixed PHY in miibus_{read,write}reg().

11 years agomii: Allow NIC drivers to pass more information to MII probe
Sepherosa Ziehau [Sun, 1 Jul 2012 23:17:30 +0000 (07:17 +0800)]
mii: Allow NIC drivers to pass more information to MII probe

- mii_capmask, which is used to mask out uninstended BMSR bits.
- At which PHYs that MII should perform probing and attching
  (mii_probe_args.mii_probemask).
- mii_flags, which will be used for future mii flow control support.

Th he above information could only be passed using new mii_probe(),
it should be used in the following way:

struct mii_probe_args mii_args;

mii_probe_args_init(&mii_args, ifmedia_upd, ifmedia_sts);
/*
 * Adjust mii_args if necessary
 */
error = mii_probe(dev, &mii_dev, &mii_args);

Inspired-by: FreeBSD 213878
11 years agomii: M_WAITOK should be enough
Sepherosa Ziehau [Sun, 1 Jul 2012 12:11:53 +0000 (20:11 +0800)]
mii: M_WAITOK should be enough

11 years agokernel/ddb: Remove an unused file.
Sascha Wildner [Sun, 1 Jul 2012 20:45:42 +0000 (22:45 +0200)]
kernel/ddb: Remove an unused file.

11 years agoAdd a DB_COMMAND(9) manual page (adapted from FreeBSD).
Sascha Wildner [Sun, 1 Jul 2012 20:41:44 +0000 (22:41 +0200)]
Add a DB_COMMAND(9) manual page (adapted from FreeBSD).

11 years agomakeobjops.awk: Fix comment, it's actually doxygen comments we skip here.
Sascha Wildner [Sun, 1 Jul 2012 12:03:55 +0000 (14:03 +0200)]
makeobjops.awk: Fix comment, it's actually doxygen comments we skip here.

11 years agomakeobjops.awk: Skip C comments (it helps us deal with newer .m files).
Sascha Wildner [Sun, 1 Jul 2012 11:54:19 +0000 (13:54 +0200)]
makeobjops.awk: Skip C comments (it helps us deal with newer .m files).

Reported-by: ftigeot
11 years agomii: Cleanup "return", no functional changes
Sepherosa Ziehau [Sun, 1 Jul 2012 11:27:10 +0000 (19:27 +0800)]
mii: Cleanup "return", no functional changes

11 years agomii: Hide miibus_{probe,attach,detach}
Sepherosa Ziehau [Sun, 1 Jul 2012 11:23:42 +0000 (19:23 +0800)]
mii: Hide miibus_{probe,attach,detach}

While im here, cleanup white space

11 years agoifmedia.4: Adjust for the last 802.11 upgrade.
Sascha Wildner [Sat, 30 Jun 2012 20:00:19 +0000 (22:00 +0200)]
ifmedia.4: Adjust for the last 802.11 upgrade.

11 years agoixgbe.4: Add a reference to ifmedia(4).
Sascha Wildner [Sat, 30 Jun 2012 19:42:02 +0000 (21:42 +0200)]
ixgbe.4: Add a reference to ifmedia(4).

11 years agoifmedia.4: Add some documentation about 10G settings (adapted from OpenBSD).
Sascha Wildner [Sat, 30 Jun 2012 19:41:04 +0000 (21:41 +0200)]
ifmedia.4: Add some documentation about 10G settings (adapted from OpenBSD).

11 years ago<net/if_media.h>: Add 10G descriptions (taken from FreeBSD).
Sascha Wildner [Sat, 30 Jun 2012 21:38:10 +0000 (23:38 +0200)]
<net/if_media.h>: Add 10G descriptions (taken from FreeBSD).

11 years agoifmedia.4: Sync with NetBSD.
Sascha Wildner [Sat, 30 Jun 2012 18:25:49 +0000 (20:25 +0200)]
ifmedia.4: Sync with NetBSD.

11 years agoixgbe: Import Intel PRO/10GbE driver from FreeBSD
François Tigeot [Sat, 30 Jun 2012 14:50:07 +0000 (16:50 +0200)]
ixgbe: Import Intel PRO/10GbE driver from FreeBSD

Local changes:

* Disable LRO and TSO hardware optimizations, commenting out the code
  with #if 0 directives

* Disable VLAN hardware acceleration code as well

* Disable MSI-X code, only use one queue per port for now

* Use code from Sascha Wildner to create a per-port sysctl tree

Tested-with: 82599EB

11 years agoFix more wrong sizeof() usages, part 4/x
Sascha Wildner [Sat, 30 Jun 2012 08:44:33 +0000 (10:44 +0200)]
Fix more wrong sizeof() usages, part 4/x

We want struct sizes here, not pointer sizes.

Found-with: Coccinelle (http://coccinelle.lip6.fr/)

11 years agoigb: Reduce MSI/legacy interrupt rate limit to 6000
Sepherosa Ziehau [Sat, 30 Jun 2012 03:25:54 +0000 (11:25 +0800)]
igb: Reduce MSI/legacy interrupt rate limit to 6000

Should work well enough as far as I have tested.

11 years agoigb: Make sure EITR interval is within range
Sepherosa Ziehau [Sat, 30 Jun 2012 03:24:10 +0000 (11:24 +0800)]
igb: Make sure EITR interval is within range

Suggested-by: dillon@
11 years agoigb: Add MSI-X support
Sepherosa Ziehau [Sun, 17 Jun 2012 08:03:11 +0000 (16:03 +0800)]
igb: Add MSI-X support

- As many RX rings will be enabled, if they are allowed by the number of
  available MSI-X vectors and number of CPUs.
- RX MSI-X vectors could be grouped to specific CPU set.  However, the
  first CPU of the CPU set must be aligned on RX MSI-X vector count; by
  default RX MSI-X vectors are grouped according to the device's software
  unit number.  Tunable hw.igbX.msix.rxoff could be used to regroup RX
  MSI-X vector to a specific set of CPUs.
- TX ring uses seperate MSI-X if possible.  TX MSI-X vector could be bound
  to a specific CPU; bydefault TX MSI-X vectors is bound to the CPU based
  on the device's software unit number.  Tunable hw.igbX.msix.txoff could
  be used to bind TX MSI-X to a specific CPU.
- Per MSI-X vector interrupt moderation sysctl hw.igbX.msiY_rate is added.
  The default interrupt rate for TX is 4000, which is enough to generate
  1.48Mpps small packets.  The default interrupt rate for RX is 6000.
- MSI-X must not be enabled on 82575 according to the specification update
  from Intel.

11 years agobge: Don't prevent bge_init if IFF_RUNNING is set
Sepherosa Ziehau [Fri, 29 Jun 2012 10:56:20 +0000 (18:56 +0800)]
bge: Don't prevent bge_init if IFF_RUNNING is set

This probably was old code which intended to guard against if_init()
triggered by SIOCSIFADDR in ether_ioctl().  It no longer makes sense.

Also don't call bge_init() if MTU is changed but device is not running
yet (FreeBSD 213587).

11 years agobge: Improve 5785 performance
Sepherosa Ziehau [Fri, 29 Jun 2012 10:36:30 +0000 (18:36 +0800)]
bge: Improve 5785 performance

By allowing write DMA to request larger DMA burst size

Obtained-from: OpenBSD via FreeBSD 213333

11 years agobge: Reduce the number of dropped frames when flow-control is enabled
Sepherosa Ziehau [Fri, 29 Jun 2012 10:31:10 +0000 (18:31 +0800)]
bge: Reduce the number of dropped frames when flow-control is enabled

Set the number of RX frames to receive after RX MBUF low watermark
has reached.  Previously it dropped incoming frames once
RX MBUF low watermark has reached.  The value used in MAC RX MBUF
low watermark is greater than or equal to 4 so receiving two more
RX frames should not be a problem.

Obtained-from: OpenBSD via FreeBSD 213255

11 years agobge: Disable UDP hardware checksum
Sepherosa Ziehau [Fri, 29 Jun 2012 10:26:36 +0000 (18:26 +0800)]
bge: Disable UDP hardware checksum

Broadcom NetExtreme controllers always generate 0 UDP checksum.

Obtained-from: FreeBSD 211596

11 years agobge: Avoid using magic number
Sepherosa Ziehau [Fri, 29 Jun 2012 10:22:44 +0000 (18:22 +0800)]
bge: Avoid using magic number

Obtained-from: FreeBSD 210152

11 years agobge: Properly enable Data Fifo Protection for certain chips
Sepherosa Ziehau [Fri, 29 Jun 2012 10:19:50 +0000 (18:19 +0800)]
bge: Properly enable Data Fifo Protection for certain chips

Obtained-from: FreeBSD 210083

11 years agobge: Zero out the status block during initialization
Sepherosa Ziehau [Fri, 29 Jun 2012 08:26:35 +0000 (16:26 +0800)]
bge: Zero out the status block during initialization

Obtained-from: FreeBSD 209741

11 years agobge: For dual mode PHY controllers, make sure to enable GMII
Sepherosa Ziehau [Fri, 29 Jun 2012 08:16:54 +0000 (16:16 +0800)]
bge: For dual mode PHY controllers, make sure to enable GMII

Obtained-from: OpenBSD via FreeBSD 202293

11 years agobge: Don't touch jumbo frame registers on chips which do not support them
Sepherosa Ziehau [Fri, 29 Jun 2012 08:00:09 +0000 (16:00 +0800)]
bge: Don't touch jumbo frame registers on chips which do not support them

Obtained-from: FreeBSD 200228

Unlike above FreeBSD commit, we don't change mini ring handling

11 years agobge: Improve TX performance on certain low end chips
Sepherosa Ziehau [Fri, 29 Jun 2012 07:39:10 +0000 (15:39 +0800)]
bge: Improve TX performance on certain low end chips

These chips, e.g. BCM5761, only allow one outstanding DMA read operation,
so on TX path, mbuf chain should be packed to reduce number of DMA reads
from chip to improve performance.

hw.bgeX.force_defrag is added for PCI-E chips to enable this mbuf chain
packing.  It is not enabled by default.

Obtained-from: FreeBSD 200088

11 years agobge: Reduce status block device update size
Sepherosa Ziehau [Fri, 29 Jun 2012 07:06:54 +0000 (15:06 +0800)]
bge: Reduce status block device update size

This reduced the amount of data that device needs to DMAed into
host mmeory update status updating.

Obtained-from: FreeBSD 199679

Changes made to the above FreeBSD commit:
- We don't reduce the amount of host memory allocated for status block
- Properly comment why BCM5700 AX/BX need to have full status block
  update setting according to the Broadcom datasheet

11 years agobge: x86_64 does not have alignment constraint either
Sepherosa Ziehau [Fri, 29 Jun 2012 01:48:30 +0000 (09:48 +0800)]
bge: x86_64 does not have alignment constraint either

11 years agotop - Display threads when asked to
Alex Hornung [Thu, 28 Jun 2012 11:11:09 +0000 (12:11 +0100)]
top - Display threads when asked to

11 years agoMerge branch 'master' of git://git.dragonflybsd.org/dragonfly
Alex Hornung [Thu, 28 Jun 2012 10:53:08 +0000 (11:53 +0100)]
Merge branch 'master' of git://git.dragonflybsd.org/dragonfly

11 years agobge: Proper configure PCI-X for BCM5703/5704 devices
Sepherosa Ziehau [Thu, 28 Jun 2012 06:55:18 +0000 (14:55 +0800)]
bge: Proper configure PCI-X for BCM5703/5704 devices

Set maximum read byte count to 2048.  Also disable relaxed ordering
as recommended by data sheet for PCI-X devices.  For PCI-X BCM5704,
set maximum outstanding split transactions to 0 as indicated by
datasheet.

Obtained-from: FreeBSD 204978

11 years agobge: For BCM5703, limit DMA read watermark
Sepherosa Ziehau [Thu, 28 Jun 2012 06:45:58 +0000 (14:45 +0800)]
bge: For BCM5703, limit DMA read watermark

For BCM5703 in PCI-X mode, DMA read watermark should be less than
or equal to maximum read byte count configuration. Enforce this
limitation in DMA read watermark configuration.

Obtained-from: FreeBSD 204978

11 years agobge: Enable hardware fixes for BCM5704 B0 as recommended by datasheet.
Sepherosa Ziehau [Thu, 28 Jun 2012 06:18:21 +0000 (14:18 +0800)]
bge: Enable hardware fixes for BCM5704 B0 as recommended by datasheet.

Obtained-from: FreeBSD 204975

11 years agobge: Revert small part of f47afe1, which setup PHY bugs
Sepherosa Ziehau [Thu, 28 Jun 2012 06:10:47 +0000 (14:10 +0800)]
bge: Revert small part of f47afe1, which setup PHY bugs

11 years agobge: In bge_stop, don't isolate PHY; it is unnecessary
Sepherosa Ziehau [Thu, 28 Jun 2012 05:54:54 +0000 (13:54 +0800)]
bge: In bge_stop, don't isolate PHY; it is unnecessary

11 years agobge: Add busdma constraints for old chips
Sepherosa Ziehau [Thu, 28 Jun 2012 05:41:15 +0000 (13:41 +0800)]
bge: Add busdma constraints for old chips

- Most pre BCM5755 controllers have a DMA bug when buffer address
  crosses a multiple of the 4GB boundary
- For BCM5714/BCM5715 controllers, limit the DMA address to be within
  40bit address space.

Obtained-from: FreeBSD 199670

11 years agobge: Add missing bit of commit f47afe1
Sepherosa Ziehau [Thu, 28 Jun 2012 04:45:32 +0000 (12:45 +0800)]
bge: Add missing bit of commit f47afe1

11 years agobge: Limit BCM5701 B5 to 32-bit mode
Sepherosa Ziehau [Thu, 28 Jun 2012 03:40:17 +0000 (11:40 +0800)]
bge: Limit BCM5701 B5 to 32-bit mode

This is a workaround for a bug which causes data corruption in
combination with certain bridges.

Obtained-from: FreeBSD 185812

11 years agotcp: Add XMITNOW which bypasses the Nagle algorithm temporarily
Sepherosa Ziehau [Fri, 15 Jun 2012 09:54:59 +0000 (17:54 +0800)]
tcp: Add XMITNOW which bypasses the Nagle algorithm temporarily

This flag acts differently from ACKNOW that no pure ACK will be sent.
It is currently used by the (extended) limited transmit and the SACK
based fast recovery.

This flag is intended to fix the following bug in the SACK based fast
recovery:
The NextSeg() requires that if the unACKed segments could not pass
IsLost(), previously unsent segment should be selected.  In the
application limited period, the size of the previously unsent segment
could be less than the MSS, thus it could not be sent immediately
according to the Nagle algorithm.  In our SACK based fast recovery
implementation, if the tcp_output() sends no segments, the current
recovery transmit process will stop immediately.  This could stop ACK
clock and cause timeout retransmit, which could be avoided, if the
Nagle algorithm is bypassed temporarily for the small unsent segment
selected by NextSeg().

When this flag is used with (extended) limited transmit, certain amount
of spurious early retranmits could be avoided.

11 years agolibrefuse: No puffs_fuse_unlink() function exists.
Sascha Wildner [Sun, 24 Jun 2012 17:21:00 +0000 (19:21 +0200)]
librefuse: No puffs_fuse_unlink() function exists.

11 years agolibpuffs: Comment out some info about a non-existant function.
Sascha Wildner [Sun, 24 Jun 2012 17:15:39 +0000 (19:15 +0200)]
libpuffs: Comment out some info about a non-existant function.

11 years agolibpuffs: Fix some function names in the manpages.
Sascha Wildner [Sun, 24 Jun 2012 17:14:59 +0000 (19:14 +0200)]
libpuffs: Fix some function names in the manpages.

11 years agofind(1): Revert back to using statfs.f_type again for fstype comparison.
Sascha Wildner [Sat, 23 Jun 2012 12:14:16 +0000 (14:14 +0200)]
find(1): Revert back to using statfs.f_type again for fstype comparison.

It was breaking the weekly locate database update. More investigation
is needed here.

While here, also bring back 00a0ead88e3b856b49bc34aa4c3d8b0d80940600
which was accidentally removed.

11 years agoMerge branch 'master' of git://git.dragonflybsd.org/dragonfly
Alex Hornung [Thu, 21 Jun 2012 07:34:54 +0000 (08:34 +0100)]
Merge branch 'master' of git://git.dragonflybsd.org/dragonfly

11 years agokernel: Clean up some Makefiles (custom flags, useless .PATH).
Sascha Wildner [Thu, 21 Jun 2012 07:16:32 +0000 (09:16 +0200)]
kernel: Clean up some Makefiles (custom flags, useless .PATH).

11 years agoFix more wrong sizeof() usages, part 3/x
Sascha Wildner [Thu, 21 Jun 2012 02:25:19 +0000 (04:25 +0200)]
Fix more wrong sizeof() usages, part 3/x

Some comments:

* The gzip fix speeds up uncompression of compress(1)'d files with gzip.
  A test here took 9s with the fix when it previously took 15s.

* Our OpenSSH is without J-PAKE support, hence the OpenSSH fix is only
  cosmetical.

Found-with: Coccinelle (http://coccinelle.lip6.fr/)

11 years agolibedit: Remove a leftover \
Sascha Wildner [Thu, 21 Jun 2012 01:37:28 +0000 (03:37 +0200)]
libedit: Remove a leftover \

11 years agolibedit: Remove documentation of wchar functions (which we don't have).
Sascha Wildner [Thu, 21 Jun 2012 01:18:09 +0000 (03:18 +0200)]
libedit: Remove documentation of wchar functions (which we don't have).

11 years agokernel: Remove a bogus .PATH from ntfs_iconv's Makefile.
Sascha Wildner [Wed, 20 Jun 2012 16:50:47 +0000 (18:50 +0200)]
kernel: Remove a bogus .PATH from ntfs_iconv's Makefile.

11 years agokernel: fix a checkloop panic caused by EOPNOTSUPP not being passed down correctly
Markus Pfeiffer [Wed, 20 Jun 2012 21:59:48 +0000 (21:59 +0000)]
kernel: fix a checkloop panic caused by EOPNOTSUPP not being passed down correctly

* When poll(2)ing /dev/tty dev_dkqfilter gets called twice,
  on the inner call, since EOPNOTSUPP is returned the outer
  call returns ENODEV leading to a checkloop panic.

* A new testcase in test/testcases/io/poll_1 will panic
  the system if started without this patch applied.

11 years agopuffs - don't lock dvp on nresolve
Alex Hornung [Tue, 19 Jun 2012 13:07:26 +0000 (14:07 +0100)]
puffs - don't lock dvp on nresolve

 * locking dvp on nresolve causes a deadlock with the puffsop thread
   when the dvp is the root vnode.

 * If a lookup/nresolve occurs at the same time as a flush via the
   puffsop, then puffsop will not be able to acquire a lock on the root
   vnode as the lookup routine already holds it. Similarly the lookup
   routine never gets woken up waiting for the message to arrive, since
   puffsop is stuck and can't reply.

11 years agorc.d - Add a message to initrandom
Antonio Huete Jimenez [Tue, 19 Jun 2012 23:28:23 +0000 (01:28 +0200)]
rc.d - Add a message to initrandom

Previously as no message was shown, it seemed the time was spent in
loading devfs rules. This makes things clearer.

11 years agontfs - Set CNP_PDIRUNLOCK flag if we unlock the parent dir.
Antonio Huete Jimenez [Tue, 19 Jun 2012 22:05:41 +0000 (00:05 +0200)]
ntfs - Set CNP_PDIRUNLOCK flag if we unlock the parent dir.

If we unlocked the parent dir, we must specify it via CNP_PDIRUNLOCK
flag to avoid further vn_unlock attempts.

DragonFly-bug: http://bugs.dragonflybsd.org/issues/2388

Reported by: swildner, Raimundo Santos

11 years agontfs - Add NTFS_DEBUG kernel option.
Antonio Huete Jimenez [Tue, 19 Jun 2012 20:56:37 +0000 (22:56 +0200)]
ntfs - Add NTFS_DEBUG kernel option.

Remove also CVS IDs from the files that still have it.

11 years agocommit test
Sascha Wildner [Tue, 19 Jun 2012 14:11:30 +0000 (16:11 +0200)]
commit test

11 years agopuffs - don't lock dvp on nresolve
Alex Hornung [Tue, 19 Jun 2012 13:07:26 +0000 (14:07 +0100)]
puffs - don't lock dvp on nresolve

 * locking dvp on nresolve causes a deadlock with the puffsop thread
   when the dvp is the root vnode.

 * If a lookup/nresolve occurs at the same time as a flush via the
   puffsop, then puffsop will not be able to acquire a lock on the root
   vnode as the lookup routine already holds it. Similarly the lookup
   routine never gets woken up waiting for the message to arrive, since
   puffsop is stuck and can't reply.

11 years agontfs - Fix build with NTFS_DEBUG
Antonio Huete Jimenez [Mon, 18 Jun 2012 22:24:35 +0000 (00:24 +0200)]
ntfs - Fix build with NTFS_DEBUG

11 years agouse rb-tree for directory lookups
Johannes Hofmann [Tue, 22 May 2012 21:37:55 +0000 (23:37 +0200)]
use rb-tree for directory lookups

* tmpfs directories are structured as lists of directory entries; this
  leads to linear lookup costs. Directories with many files become fairly
  expensive to operate on.

* This patch uses a rb-tree keyed on the name of the searched file to
  speed up lookups

* Besides this rb-tree implementation, a hash version was also tested.
  Both gave solid performance enhancements compared to the previous tmpfs
  implementation.
  The rb-tree version was the faster of the two and thus becomes the
  choosen one.

* See issue 2375 for details and performance numbers
  https://bugs.dragonflybsd.org/issues/2375

11 years agocryptdisks(8): Fix a wrong sizeof.
Sascha Wildner [Mon, 18 Jun 2012 06:35:20 +0000 (08:35 +0200)]
cryptdisks(8): Fix a wrong sizeof.

Use the size passed to the alloc_safe_mem() here.

Found-with: Coccinelle (http://coccinelle.lip6.fr/)

11 years agovkernel: revert two commits that break i386 vkernel
Markus Pfeiffer [Sun, 17 Jun 2012 19:38:49 +0000 (19:38 +0000)]
vkernel: revert two commits that break i386 vkernel

revert i386 parts of
  commit c55fa5eeab3eaf11e01222d6412b91dafdcd9e94
  commit 1a482e3fea833c34264b54d566ddd0f4276d8bcf
because it breaks build. This is still a kludge.

11 years agohammer(8): Fix a wrong sizeof.
Sascha Wildner [Sun, 17 Jun 2012 19:21:15 +0000 (21:21 +0200)]
hammer(8): Fix a wrong sizeof.

Use the size passed to the malloc() here.

Found-with: Coccinelle (http://coccinelle.lip6.fr/)

11 years agoRemove unneeded inclusions of <sys/cdefs.h> throughout the tree.
Sascha Wildner [Sun, 17 Jun 2012 14:57:24 +0000 (16:57 +0200)]
Remove unneeded inclusions of <sys/cdefs.h> throughout the tree.

11 years agokernel/ufs: Remove some unused variables.
Sascha Wildner [Sun, 17 Jun 2012 10:45:58 +0000 (12:45 +0200)]
kernel/ufs: Remove some unused variables.

11 years agoigb: Factor out igb_{alloc,free}_intr
Sepherosa Ziehau [Sun, 17 Jun 2012 07:30:02 +0000 (15:30 +0800)]
igb: Factor out igb_{alloc,free}_intr

11 years agoigb: Move interrupt allocation after RX/TX ring allocation
Sepherosa Ziehau [Sun, 17 Jun 2012 07:16:40 +0000 (15:16 +0800)]
igb: Move interrupt allocation after RX/TX ring allocation

11 years agoigb: White space
Sepherosa Ziehau [Sun, 17 Jun 2012 07:01:46 +0000 (15:01 +0800)]
igb: White space

11 years agoigb: Move RX/TX ring count configuration before interrupt allocation
Sepherosa Ziehau [Sun, 17 Jun 2012 06:34:23 +0000 (14:34 +0800)]
igb: Move RX/TX ring count configuration before interrupt allocation

This paves way for the MSI-X allocation

11 years agoFix more wrong sizeof() usages, part 2/x
Sascha Wildner [Sun, 17 Jun 2012 01:28:37 +0000 (03:28 +0200)]
Fix more wrong sizeof() usages, part 2/x

Take the size of the struct instead of the size of its address.

Found-with: Coccinelle (http://coccinelle.lip6.fr/)

11 years agosavecore(8): Use the buf's size and not char *'s size for reading the kernel.
Sascha Wildner [Sat, 16 Jun 2012 23:42:28 +0000 (01:42 +0200)]
savecore(8): Use the buf's size and not char *'s size for reading the kernel.

This speeds up the kernel saving part by a couple of seconds.

11 years agofind(1): Sync with FreeBSD.
Sascha Wildner [Sat, 16 Jun 2012 21:20:13 +0000 (23:20 +0200)]
find(1): Sync with FreeBSD.

The only things left out were inode creation time related, ACL related
and locale specific affirmation for -ok.

New primaries: -d, -gid, -ignore_readdir_race, -ilname -iwholename, lname,
-mount, -noignore_readdir_race, -noleaf, -quit, -samefile, -true, -uid and
-wholename.

Some of the new primaries are aliases of existing ones, and some others
exist just for GNU find compatibility and have no function.

For further information refer to the manual page.

11 years agoigb: In shared interrupt handler, use ICR to process TX ring or RX rings
Sepherosa Ziehau [Sat, 16 Jun 2012 12:59:30 +0000 (20:59 +0800)]
igb: In shared interrupt handler, use ICR to process TX ring or RX rings

11 years agoigb: Allow used RX rings less than allocated ones
Sepherosa Ziehau [Sat, 16 Jun 2012 11:24:38 +0000 (19:24 +0800)]
igb: Allow used RX rings less than allocated ones

If MSI-X interrupt is not used or polling is used, two RX rings are
enabled:
- Packets' RSS hash still could be extracted
- Avoid extra memory reading of RX ring, thus avoid unnecessary cache
  trashing

11 years agovkernel/vkernel64: fix a bug in cpu_regs.c
Markus Pfeiffer [Sat, 16 Jun 2012 11:20:58 +0000 (11:20 +0000)]
vkernel/vkernel64: fix a bug in cpu_regs.c

followup to the previous typo which was repeated in the handling
of old FreeBSD style arguments.

11 years agoFix more wrong sizeof() usages, part 1/x
Sascha Wildner [Sat, 16 Jun 2012 10:31:23 +0000 (12:31 +0200)]
Fix more wrong sizeof() usages, part 1/x

These cases should all be taking the size of the pointed to struct etc.,
instead of the pointer size.

Found-with: Coccinelle (http://coccinelle.lip6.fr/)

11 years agovkernel/vkernel64: fix a bug in cpu_regs.c
Markus Pfeiffer [Sat, 16 Jun 2012 10:52:43 +0000 (10:52 +0000)]
vkernel/vkernel64: fix a bug in cpu_regs.c

the sendsig function incorrectlty delivered tf_err in the
si_addr field of siginfo leading to weird behaviour.

11 years agobsd.prog.mk: Enhance the 'lint' target a bit.
Sascha Wildner [Fri, 15 Jun 2012 22:01:39 +0000 (00:01 +0200)]
bsd.prog.mk: Enhance the 'lint' target a bit.

* Remove piping the outputs of running ${LINT} to more(1)

* Don't stop when ${LINT} returns an error.

* Pass ${CFLAGS} beginning with '-I' to ${LINT} and ensure the
  directory is separated with a space.

These changes make it easier to use coccinelle and other checkers as
${LINT}.

11 years agotcp/sack: Take bwnd into consideration when calculate length of new segment
Sepherosa Ziehau [Fri, 15 Jun 2012 09:28:32 +0000 (17:28 +0800)]
tcp/sack: Take bwnd into consideration when calculate length of new segment

11 years agotcp_output: Always clear TF_ACKNOW before returning
Sepherosa Ziehau [Fri, 15 Jun 2012 09:17:48 +0000 (17:17 +0800)]
tcp_output: Always clear TF_ACKNOW before returning

11 years agotcp/sack: Discard HighRxt, RescueRxt and LostSeq along with SACK scoreboard
Sepherosa Ziehau [Fri, 15 Jun 2012 09:00:57 +0000 (17:00 +0800)]
tcp/sack: Discard HighRxt, RescueRxt and LostSeq along with SACK scoreboard

11 years agotimed(8): Add missing braces.
Sascha Wildner [Thu, 14 Jun 2012 17:29:07 +0000 (19:29 +0200)]
timed(8): Add missing braces.

11 years agos/__const/const/ in some header files.
Sascha Wildner [Thu, 14 Jun 2012 11:30:39 +0000 (13:30 +0200)]
s/__const/const/ in some header files.

11 years agotcp: Properly detect duplicated FIN
Sepherosa Ziehau [Tue, 5 Jun 2012 05:27:41 +0000 (13:27 +0800)]
tcp: Properly detect duplicated FIN

According to RFC5681, ACKs w/ FIN should not be taken as duplicated
ACKs.  We refine it a little bit that ACKs w/ FIN will be taken as
duplicated ACKs, only if FIN has been seen.

11 years agokernel: Remove an unused variable.
Sascha Wildner [Wed, 13 Jun 2012 21:31:18 +0000 (23:31 +0200)]
kernel: Remove an unused variable.

Reported-by: Davide Italiano
11 years agoatomic.9: Add a few words about our atomic_*_cpumask().
Sascha Wildner [Wed, 13 Jun 2012 21:13:15 +0000 (23:13 +0200)]
atomic.9: Add a few words about our atomic_*_cpumask().

11 years agoAdd an atomic(9) manual page (from FreeBSD with some stuff commented out).
Sascha Wildner [Wed, 13 Jun 2012 21:01:02 +0000 (23:01 +0200)]
Add an atomic(9) manual page (from FreeBSD with some stuff commented out).

11 years agokernel - Fix bulk transfer issue in USB/ohci
Matthew Dillon [Wed, 13 Jun 2012 19:24:07 +0000 (12:24 -0700)]
kernel - Fix bulk transfer issue in USB/ohci

* Fix a crash/panic in usb_transfer_complete() due to an incorrect
  xfer->actlen field.

* The field must be cleared at the beginning of a bulk transfer so
  the incremental completions can be added to it.

* Fixes ULPT when used w/OHCI.  ULPT still appears to have problems when
  used with EHCI.

11 years agoigb: Fix RSS redirect table setting
Sepherosa Ziehau [Wed, 13 Jun 2012 13:43:06 +0000 (21:43 +0800)]
igb: Fix RSS redirect table setting

Allow debug code to force RX ring count

11 years agoigb: Main serializer should be enough to protect link status
Sepherosa Ziehau [Wed, 13 Jun 2012 11:15:00 +0000 (19:15 +0800)]
igb: Main serializer should be enough to protect link status

11 years agolibrefuse: Comment out all functions we don't (yet) have and add MLINKS.
Sascha Wildner [Wed, 13 Jun 2012 10:37:34 +0000 (12:37 +0200)]
librefuse: Comment out all functions we don't (yet) have and add MLINKS.