dragonfly.git
10 years agoClean up a bit.
Sascha Wildner [Sun, 2 Nov 2008 18:56:47 +0000 (18:56 +0000)]
Clean up a bit.

* Improve wording and shuffle some paragraphs.

* Reference ffs(5).

* Mention 'hammer cleanup'.

* Use uppercase names for labels like share/examples/rconfig/hammer.sh does.

* Add URL for the HAMMER paper and add reference to NYCBSDCon slides.

10 years agoBump .Dd to when it was updated in DragonFly.
Sascha Wildner [Sun, 2 Nov 2008 18:29:07 +0000 (18:29 +0000)]
Bump .Dd to when it was updated in DragonFly.

10 years agoRegenerate the pciconf(8) database from the following files:
Sascha Wildner [Sun, 2 Nov 2008 17:59:37 +0000 (17:59 +0000)]
Regenerate the pciconf(8) database from the following files:

Hart:    Jan 22, 2008 (version 671)
Boemler: Nov  1, 2008
Mares:   Oct 27, 2008

10 years agoThe priority mask used to compartmentalize the comparison to determine
Matthew Dillon [Sat, 1 Nov 2008 23:31:19 +0000 (23:31 +0000)]
The priority mask used to compartmentalize the comparison to determine
whether a preemption is needed was covering the entire process priority
space instead of just one bucket.

Reported-by: "Simon 'corecode' Schubert" <corecode@fs.ei.tum.de>
10 years agoFix comment.
Sascha Wildner [Sat, 1 Nov 2008 23:19:08 +0000 (23:19 +0000)]
Fix comment.

10 years agoFactor out _lwkt_pushmsg() and _lwkt_enqueue_reply(); these put message
Sepherosa Ziehau [Sat, 1 Nov 2008 12:30:23 +0000 (12:30 +0000)]
Factor out _lwkt_pushmsg() and _lwkt_enqueue_reply(); these put message
enqueuing and flags' adjusting into common place.

10 years agoAll of the thread port backend functions are static.
Sepherosa Ziehau [Sat, 1 Nov 2008 11:43:40 +0000 (11:43 +0000)]
All of the thread port backend functions are static.

10 years ago- Add comment for lwkt_initport_serialize()
Sepherosa Ziehau [Sat, 1 Nov 2008 11:17:52 +0000 (11:17 +0000)]
- Add comment for lwkt_initport_serialize()
- Adjust the comment of lwkt_getport() a little bit and put it to the
  proper place.

10 years agoUse the same indentation as the rest of the functions in this file.
Sepherosa Ziehau [Sat, 1 Nov 2008 10:38:21 +0000 (10:38 +0000)]
Use the same indentation as the rest of the functions in this file.

10 years agoUse the same indentation as the rest of the functions in this file.
Sepherosa Ziehau [Sat, 1 Nov 2008 10:29:31 +0000 (10:29 +0000)]
Use the same indentation as the rest of the functions in this file.

10 years agoInstall pr_ctlport for the rest of the protocols.
Sepherosa Ziehau [Sat, 1 Nov 2008 04:22:16 +0000 (04:22 +0000)]
Install pr_ctlport for the rest of the protocols.

Reported-by: tomas@
10 years agoSync with FreeBSD:
Peter Avalos [Sat, 1 Nov 2008 02:49:15 +0000 (02:49 +0000)]
Sync with FreeBSD:

Sync program's usage() with manpage's SYNOPSIS.

Added the EXIT STATUS section where appropriate.

Fixed handling of manpage subdirectories.

Fixed one memory leak.

Look into machine-specific manpage subdirectories too.

Obtained-from: FreeBSD

10 years agoPut unknown hardware ids print back into bootverbose, mainly to suppress it
Sepherosa Ziehau [Thu, 30 Oct 2008 11:27:40 +0000 (11:27 +0000)]
Put unknown hardware ids print back into bootverbose, mainly to suppress it
on a box with rl(4).

10 years agoUse atomic_fetchadd_int() to avoid N->0 race when freeing sfbuf. The
Sepherosa Ziehau [Thu, 30 Oct 2008 11:03:29 +0000 (11:03 +0000)]
Use atomic_fetchadd_int() to avoid N->0 race when freeing sfbuf.  The
serializer field is no longer needed.

Hint-from: dillon@
Reported-by: pavalos@
Tested-by: pavalos@
10 years agoDon't use listen socket's route cache, it is not MPSAFE currently. This could
Sepherosa Ziehau [Thu, 30 Oct 2008 10:50:18 +0000 (10:50 +0000)]
Don't use listen socket's route cache, it is not MPSAFE currently.  This could
happen if a listen socket received TCP segment with invalid flags combination.

10 years agoFix gcc34 warnings.
Sascha Wildner [Wed, 29 Oct 2008 22:14:25 +0000 (22:14 +0000)]
Fix gcc34 warnings.

10 years agoFix warnings which cropped up in the gcc34 build. While here, update
Sascha Wildner [Wed, 29 Oct 2008 22:03:12 +0000 (22:03 +0000)]
Fix warnings which cropped up in the gcc34 build. While here, update
the login_times(3) manual page.

Taken-from: FreeBSD

10 years agoRemove warning flags and raise WARNS where possible.
Sascha Wildner [Wed, 29 Oct 2008 18:18:05 +0000 (18:18 +0000)]
Remove warning flags and raise WARNS where possible.

10 years agoRemove remaining LIBC_SCCS related stuff.
Sascha Wildner [Tue, 28 Oct 2008 17:23:46 +0000 (17:23 +0000)]
Remove remaining LIBC_SCCS related stuff.

10 years agoWARNS= -> WARNS?=
Sascha Wildner [Tue, 28 Oct 2008 16:56:56 +0000 (16:56 +0000)]
WARNS= -> WARNS?=

10 years agoRemove some warning flags and raise WARNS where possible.
Sascha Wildner [Tue, 28 Oct 2008 16:54:09 +0000 (16:54 +0000)]
Remove some warning flags and raise WARNS where possible.

10 years agoRecollect TX/RX descriptors if we are going to switch back to TX/RX interrupts,
Sepherosa Ziehau [Tue, 28 Oct 2008 07:30:49 +0000 (07:30 +0000)]
Recollect TX/RX descriptors if we are going to switch back to TX/RX interrupts,
mainly to avoid the _possible_ race between turning on TX/RX interrupts and
asserting TX/RX interrupt by hardware.  Though nfe(4) does not seem to suffer
the problem, which I have seen on re(4), we still apply the same fix here;
better safe than sorry.

10 years agoTry recollecting RX/TX descriptors if we are going to switch back to TX/RX
Sepherosa Ziehau [Tue, 28 Oct 2008 07:23:28 +0000 (07:23 +0000)]
Try recollecting RX/TX descriptors if we are going to switch back to TX/RX
interrupts.  There seems to be a race between turning on TX/RX interrupt and
asserting TX/RX interrupt by the hardware.  This fixes the poor performance
that I have seen when using single threaded remote cpdup.

10 years agoIn ip_lengthcheck(), make sure that pkthdr.len is not less than "IP total
Sepherosa Ziehau [Tue, 28 Oct 2008 07:09:26 +0000 (07:09 +0000)]
In ip_lengthcheck(), make sure that pkthdr.len is not less than "IP total
length" in IP header.  Change the related testing in ip_input() and
ipflow_fastforward() into assertion.

10 years agoAdd comment about ip_lengthcheck()
Sepherosa Ziehau [Tue, 28 Oct 2008 04:35:12 +0000 (04:35 +0000)]
Add comment about ip_lengthcheck()

10 years ago- The assertion in ip_input, should test sizeof(struct ip) instead of sizeof(ip)
Sepherosa Ziehau [Tue, 28 Oct 2008 03:07:28 +0000 (03:07 +0000)]
- The assertion in ip_input, should test sizeof(struct ip) instead of sizeof(ip)
- Make sure that ip_input's precondition meets in ip_localforward
- Don't allow raw ip socket to send ip packet whose header length is less than
  the minimum
- Nuke unused code and minor style changes

Reviewed-by: nth@
10 years agoSync zoneinfo database with tzdata2008i from elsie.
Sascha Wildner [Mon, 27 Oct 2008 13:53:24 +0000 (13:53 +0000)]
Sync zoneinfo database with tzdata2008i from elsie.

southamerica:   8.30 -> 8.33
zone.tab:       8.19 -> 8.21

* Adjust for recent changes in Argentina (DST from Oct 19, 2008 to
  Mar 15, 2009, but several provinces are not participating).

* Reordering and new comments for several zones in zone.tab.

10 years agoMonir style and white space changes
Sepherosa Ziehau [Mon, 27 Oct 2008 10:51:09 +0000 (10:51 +0000)]
Monir style and white space changes

10 years ago- Move unlinking ipflow from table/list out of ipflow_free().
Sepherosa Ziehau [Mon, 27 Oct 2008 09:57:11 +0000 (09:57 +0000)]
- Move unlinking ipflow from table/list out of ipflow_free().
- Factor out ipflow_reset() to clear statistics of ipflow to be reused.
- Add flags field in ipflow.  Currently only one flag is defined to make
  sure that the state of the ipflow is correct (on/off the table/list).
- Reference count ipflow, so the ipflow used to do the ifnet.if_output()
  will not be reaped or changed behind our back.  Add commet about it.
- Don't change or reuse an ipflow if it is being actively used,
  i.e. ipf_refcnt > 1
- Fortify ipflow code by putting assertion in proper places.
- Pad ipflow structure explicitly.

10 years ago- All of the ipflow table/list read/write operations happen in protocol
Sepherosa Ziehau [Mon, 27 Oct 2008 04:38:29 +0000 (04:38 +0000)]
- All of the ipflow table/list read/write operations happen in protocol
  threads, so there is no need to use critical section.  We only need to
  protect per-cpu static timeout netmsgs with critical section, whose
  MSGF_DONE is checked in ipi.
- Mark per-cpu static timeout netmsgs MPSAFE.
- smp_active_mask should be taken into consideration, when broadcasting ipi.

10 years agoWe obviously do not want protocol threads to be block; blocking the current
Sepherosa Ziehau [Mon, 27 Oct 2008 04:16:25 +0000 (04:16 +0000)]
We obviously do not want protocol threads to be block; blocking the current
protocol thread may cause exact same ipflow being installed.

10 years agoBreak long line
Sepherosa Ziehau [Mon, 27 Oct 2008 04:03:53 +0000 (04:03 +0000)]
Break long line

10 years ago- In addition to the IP flow hash table, put the flows on a list. The table
Sepherosa Ziehau [Mon, 27 Oct 2008 03:55:29 +0000 (03:55 +0000)]
- In addition to the IP flow hash table, put the flows on a list.  The table
  is used for fast lookup, the list for traversal of all flows.
  Obtained-from: NetBSD ip_flow.c rev 1.5
- Use LIST_FOREACH macros.

10 years agoFix CVE-2008-3831. Affects the Intel G33 series and newer only.
Hasso Tepper [Mon, 27 Oct 2008 03:42:33 +0000 (03:42 +0000)]
Fix CVE-2008-3831. Affects the Intel G33 series and newer only.

Obtained-from: DRM git

10 years agopr_ctlinput is usually called when certains types of ICMP packets are received.
Sepherosa Ziehau [Mon, 27 Oct 2008 02:56:30 +0000 (02:56 +0000)]
pr_ctlinput is usually called when certains types of ICMP packets are received.
However, the processing of ICMP packets happens in netisr0, which means the
thread context, in which pr_ctlinput is called, is not correct.  To handle this
following two fixes are applied:
- Add pr_ctlport to protosw and ip6protosw, which could be used to locate
  correct msgport to call pr_ctlinput for specific protocol
- All necessary information needed by pr_ctlinput are gather into one netmsg,
  and this netmsg is delivered synchronously (some information is on the stack)

Note for new protocol implementation:
pr_ctlinput and pr_ctlport should be both NULL or both non-NULL.

Obtained-from: dillon@
Tested-by: pavalos@
10 years agoRemove stale header file.
Sascha Wildner [Sun, 26 Oct 2008 17:17:44 +0000 (17:17 +0000)]
Remove stale header file.

10 years agoUpdate ips_total
Sepherosa Ziehau [Sun, 26 Oct 2008 09:50:15 +0000 (09:50 +0000)]
Update ips_total

Obtained-from: NetBSD ip_flow.c rev 1.34

10 years ago- If a packet came in as link-level broadcast or link-level multicast, don't
Sepherosa Ziehau [Sun, 26 Oct 2008 09:37:50 +0000 (09:37 +0000)]
- If a packet came in as link-level broadcast or link-level multicast, don't
  attempt to fast-forward it out.
  Obtained-from: NetBSD ip_flow.c rev 1.14
- Fix comment

10 years ago- ip_mport() will make sure following things for us:
Sepherosa Ziehau [Sun, 26 Oct 2008 09:15:33 +0000 (09:15 +0000)]
- ip_mport() will make sure following things for us:
  o  IP header is in one mbuf
  o  IP length is not less then IP header length
- Truncate mbufs to the correct length before forwarding
  Obtained-from: NetBSD ip_flow.c rev 1.6

10 years agoPerform ipflow timeout, only if the CPU has active ipflows; saves us some
Sepherosa Ziehau [Sun, 26 Oct 2008 08:32:10 +0000 (08:32 +0000)]
Perform ipflow timeout, only if the CPU has active ipflows; saves us some
physical ipi sending time.

Inspired-by: NetBSD ipflow.c rev 1.2
10 years agoBring in following changes from NetBSD ip_flow.c
Sepherosa Ziehau [Sun, 26 Oct 2008 08:02:43 +0000 (08:02 +0000)]
Bring in following changes from NetBSD ip_flow.c
rev 1.2(part), 1.8, 1.9, 1.10, 1.11, 1.12, 1.18(w/ mod)

- IP checksum fix/twist
- Hardware checksum off loading fix

10 years ago- Move ipflow definition from ip_flow.h to ip_flow.c; it's implementation
Sepherosa Ziehau [Sun, 26 Oct 2008 07:11:28 +0000 (07:11 +0000)]
- Move ipflow definition from ip_flow.h to ip_flow.c; it's implementation
  detail.
- Move ipflow function declarations from in_var.h to ip_flow.h, include
  ip_flow.h in files which uses ipflow functions.

10 years ago- Return the real cluster limit used by the objcache
Sepherosa Ziehau [Sun, 26 Oct 2008 04:29:20 +0000 (04:29 +0000)]
- Return the real cluster limit used by the objcache
- For mbuf objcaches, raise backing kmalloc pools' limit according to the
  cluster limits.
Suggested-by: dillon@
Reviewed-by: aggelos@, nth@
10 years agoit's -> its
Sascha Wildner [Sun, 26 Oct 2008 00:05:24 +0000 (00:05 +0000)]
it's -> its

10 years ago- RX/TX coal parameters could be set at any time.
Sepherosa Ziehau [Sat, 25 Oct 2008 10:46:55 +0000 (10:46 +0000)]
- RX/TX coal parameters could be set at any time.
- Set default RX coal packets to 64, so RX coal timeout takes control during
  bulk data operations.  This greately reduces the interrupt rate while keeps
  bulk data performance.
- Set default TX coal packets to 64 and TX coal timeout to 65535us (maximum
  allowable value).  This greately reduce the interrupt rate while greately
  increases (almost doubles) small packet TX performance.
- Remove unused field in jme_softc

10 years agoUse atomic_fetchadd_int() to simplify the reference counting logic.
Sepherosa Ziehau [Fri, 24 Oct 2008 11:15:07 +0000 (11:15 +0000)]
Use atomic_fetchadd_int() to simplify the reference counting logic.

Reviewed-by: dillon@
10 years agoRemove more stuff: ports/, root_skels/ (which we maintain in nrelease/),
Sascha Wildner [Thu, 23 Oct 2008 16:56:23 +0000 (16:56 +0000)]
Remove more stuff: ports/, root_skels/ (which we maintain in nrelease/),
scripts/ and src/lib/lua.

10 years agoReduce differences with root_skels in contrib.
Sascha Wildner [Thu, 23 Oct 2008 16:45:37 +0000 (16:45 +0000)]
Reduce differences with root_skels in contrib.

10 years agoAdd a periodic(8) script to run 'hammer cleanup' (snapshot, prune
Sascha Wildner [Wed, 22 Oct 2008 20:15:55 +0000 (20:15 +0000)]
Add a periodic(8) script to run 'hammer cleanup' (snapshot, prune
and reblock all HAMMER filesystems) on a nightly basis. The exact
behavior (period, retention and run time) can be configured by
tweaking <filesystem>/snapshots/config as described in hammer(5).

10 years agoAdd 5906/5906M support. Based on my old patch with some additional work from
Sepherosa Ziehau [Wed, 22 Oct 2008 14:24:24 +0000 (14:24 +0000)]
Add 5906/5906M support.  Based on my old patch with some additional work from
FreeBSD.

Tested-by: Petr Janda <elekktretterr@exemail.com.au>
10 years agoRaise the kmalloc limit for the M_HAMMER_INO pool based on desiredvnodes
Matthew Dillon [Wed, 22 Oct 2008 01:43:51 +0000 (01:43 +0000)]
Raise the kmalloc limit for the M_HAMMER_INO pool based on desiredvnodes
to try to avoid kernel memory exhaustion panics.

Reported-by: Matthias Schmidt <matthias@dragonflybsd.org>, and others.
10 years agoAdd kmalloc_raise_limit() - allow a subsystem to raise the allocation
Matthew Dillon [Wed, 22 Oct 2008 01:42:17 +0000 (01:42 +0000)]
Add kmalloc_raise_limit() - allow a subsystem to raise the allocation
limit for a kmalloc pool.

10 years agoRemove trailing whitespace.
Sascha Wildner [Tue, 21 Oct 2008 14:35:33 +0000 (14:35 +0000)]
Remove trailing whitespace.

10 years ago* Remove 'exit 1' so the script continues running.
Sascha Wildner [Tue, 21 Oct 2008 14:02:48 +0000 (14:02 +0000)]
* Remove 'exit 1' so the script continues running.

* Add swap to fstab.

* Remove dntpd setup because the same stuff is in our default dntpd.conf
  already.

10 years agoAdd tunable net.inet.ip.mpsafe to register IP as MPSAFE netisr.
Sepherosa Ziehau [Tue, 21 Oct 2008 13:51:01 +0000 (13:51 +0000)]
Add tunable net.inet.ip.mpsafe to register IP as MPSAFE netisr.
Multicast/IPSEC still need BGL.

10 years ago- Move RX filter configuration from re_init() into re_setmulti()
Sepherosa Ziehau [Tue, 21 Oct 2008 12:31:01 +0000 (12:31 +0000)]
- Move RX filter configuration from re_init() into re_setmulti()
- IFF_BROADCAST will never be set/cleared
- Fix SIOCSIFFLAGS support; it was really annoying that each time when I ran
  tcpdump, the NIC reinitialized itself.

10 years agoUnbreak UP building
Sepherosa Ziehau [Mon, 20 Oct 2008 13:16:58 +0000 (13:16 +0000)]
Unbreak UP building

10 years agoIn route_init(), call netmsg_service_port_init(); mainly to register route
Sepherosa Ziehau [Mon, 20 Oct 2008 12:22:24 +0000 (12:22 +0000)]
In route_init(), call netmsg_service_port_init(); mainly to register route
thread's msgport for netmsg_service_sync(), since route threads also do
network output during arp input processing.

10 years agoFix typo.
Sascha Wildner [Mon, 20 Oct 2008 07:35:08 +0000 (07:35 +0000)]
Fix typo.

10 years agoSync libc/stdtime and zdump(8)/zic(8) with tzcode2008h from elsie.
Sascha Wildner [Sun, 19 Oct 2008 20:15:58 +0000 (20:15 +0000)]
Sync libc/stdtime and zdump(8)/zic(8) with tzcode2008h from elsie.

There shouldn't be any user visible changes. Some bugs are fixed, among
them an issue with Python's mktime() when TZ wasn't set (reported by
Aran Cox).

Another thing is that this code should behave nicely on architectures with
a 64 bits wide time_t.

10 years agoRegenerate the pciconf(8) database from the following files:
Sascha Wildner [Sun, 19 Oct 2008 11:31:05 +0000 (11:31 +0000)]
Regenerate the pciconf(8) database from the following files:

Hart:    Jan 22, 2008 (version 671)
Boemler: Oct 19, 2008
Mares:   Oct 17, 2008

10 years agoAdd pcie_set_max_readrq() to avoid code duplication between various network
Sepherosa Ziehau [Sun, 19 Oct 2008 09:13:58 +0000 (09:13 +0000)]
Add pcie_set_max_readrq() to avoid code duplication between various network
device drivers.

10 years agoAdd m_devpad() to avoid code duplication in various network device drivers
Sepherosa Ziehau [Sun, 19 Oct 2008 08:39:55 +0000 (08:39 +0000)]
Add m_devpad() to avoid code duplication in various network device drivers

10 years agoUpdate sensorsd(8) to the latest code.
Hasso Tepper [Sun, 19 Oct 2008 08:16:20 +0000 (08:16 +0000)]
Update sensorsd(8) to the latest code.

Obtained-from: OpenBSD

10 years agoReduce RX coal ticks to 100us (favors performance a little bit)
Sepherosa Ziehau [Sun, 19 Oct 2008 08:11:35 +0000 (08:11 +0000)]
Reduce RX coal ticks to 100us (favors performance a little bit)

10 years ago- In re_stop(), call re_reset(), which is supposed to stop TX/RX engines.
Sepherosa Ziehau [Sun, 19 Oct 2008 06:00:24 +0000 (06:00 +0000)]
- In re_stop(), call re_reset(), which is supposed to stop TX/RX engines.
- In re_reset(), don't touch 0x82 (a magic CSR), which seems to be 8110/8169
  specific.  Write 1 to it on attach path.
  According-to: RealTek r8169-6.007.00
- For certain chips (looks like all MAC2 chips), RE_CMD_RESET will not stop
  TX/RX engines, a seperate command (RE_CMD_STOPREQ) must be issued before
  RE_CMD_RESET.
  According-to: RealTek r8168-8.008.00

10 years ago- Pack boolean fields into re_softc.re_flags
Sepherosa Ziehau [Sun, 19 Oct 2008 04:40:16 +0000 (04:40 +0000)]
- Pack boolean fields into re_softc.re_flags
- Nuke some unused fields in re_softc

# This file should have been committed along with if_re.c rev1.93

10 years ago- Pack boolean fields into re_softc.re_flags
Sepherosa Ziehau [Sun, 19 Oct 2008 04:38:40 +0000 (04:38 +0000)]
- Pack boolean fields into re_softc.re_flags
- Nuke some unused fields in re_softc

10 years agoInstead of using lwkt_migratecpu(), use ifnet threads to do dom_rtattach()
Sepherosa Ziehau [Sun, 19 Oct 2008 03:25:31 +0000 (03:25 +0000)]
Instead of using lwkt_migratecpu(), use ifnet threads to do dom_rtattach()

10 years ago- Move PCIe chip detection into re_probe()
Sepherosa Ziehau [Sun, 19 Oct 2008 03:17:52 +0000 (03:17 +0000)]
- Move PCIe chip detection into re_probe()
- Panic if the passed in "max read request size" exceeds limit

10 years agoTry recollecting TX descriptors when we are short of them in re_start()
Sepherosa Ziehau [Sat, 18 Oct 2008 14:56:31 +0000 (14:56 +0000)]
Try recollecting TX descriptors when we are short of them in re_start()

10 years agoThere are 4 fields in re_hwrev
Sepherosa Ziehau [Sat, 18 Oct 2008 11:49:34 +0000 (11:49 +0000)]
There are 4 fields in re_hwrev

10 years agoReduce the threshold that control when "cut through mode" should be applied;
Sepherosa Ziehau [Sat, 18 Oct 2008 11:36:37 +0000 (11:36 +0000)]
Reduce the threshold that control when "cut through mode" should be applied;
mainly to fix jumbo frame RX support.

10 years ago- Don't claim 7422 MTU size is support by various 8111/8169 chips (PCI devices);
Sepherosa Ziehau [Sat, 18 Oct 2008 11:26:52 +0000 (11:26 +0000)]
- Don't claim 7422 MTU size is support by various 8111/8169 chips (PCI devices);
  6144 MTU size works reliably.
    Set MTU above 6144 (6 * 1024) on these chips and do following test:
    netperf -H host -l 30 -t UDP_STREAM -- -m (mtu-28)
    All kinds of wiredness will pop up on the test box.
- Set max supported MTU to 9216 for 8168D.
  Obtained-from: Realtek r8168-8.008.00
- Set max supported MTU to 6144 for non-8168D GigE chips.
- Cleanup jumbo frame/MTU size related macros.

# As usual, 8169(with 88E1000 PHY) does not seem to work well with any jumbo
# frame size

10 years agoFix hardware vlan tagging support by setting vlan information on all TX
Sepherosa Ziehau [Sat, 18 Oct 2008 04:44:41 +0000 (04:44 +0000)]
Fix hardware vlan tagging support by setting vlan information on all TX
descriptors for multi-segment packets.

# Even with this fix in place, 8169 still does not work reliably with vlan.
# Certain packets are never seen on the wire; maybe caused by the trailing
# ether frame CRC generated by the hardware?

10 years agoFix re_ioctl SIOCSIFCAP support, so that VLAN_HWTAGGING and VLAN_MTU could
Sepherosa Ziehau [Sat, 18 Oct 2008 03:00:29 +0000 (03:00 +0000)]
Fix re_ioctl SIOCSIFCAP support, so that VLAN_HWTAGGING and VLAN_MTU could
be turned off.

10 years agoTry to do a better job aborting active requests when a usb mass storage
Matthew Dillon [Sat, 18 Oct 2008 01:17:53 +0000 (01:17 +0000)]
Try to do a better job aborting active requests when a usb mass storage
device is pulled.

10 years agoAllow an alignment default of 0 to be treated as 1.
Matthew Dillon [Sat, 18 Oct 2008 01:15:33 +0000 (01:15 +0000)]
Allow an alignment default of 0 to be treated as 1.

Obtained-from: FreeBSD

10 years agoAdd vfs.nfs.flush_on_hlink and default to off.
Matthew Dillon [Sat, 18 Oct 2008 01:13:54 +0000 (01:13 +0000)]
Add vfs.nfs.flush_on_hlink and default to off.

10 years agoCorrect jumbo frame support for 8168C/CP/D.
Sepherosa Ziehau [Fri, 17 Oct 2008 14:12:23 +0000 (14:12 +0000)]
Correct jumbo frame support for 8168C/CP/D.

These newer chips use ancient design, which does _not_ support gathering RX.
An even worse aspect of the new chips' design is that it does not compat
with old ones: the buffer length field in the RX descriptor seems to be
completely ignored by the hardware.  This means host memory will be trashed
by hardware if driver uses gathering RX.

Allocate a jumbo buffer pool for these chips and configure "max RX packet
size" register according to MTU.

10 years agoFix some typos.
Sascha Wildner [Fri, 17 Oct 2008 12:41:38 +0000 (12:41 +0000)]
Fix some typos.

Found-by: LanguageTool
10 years agoChange 'then' to 'than' in comparisons.
Sascha Wildner [Fri, 17 Oct 2008 11:30:24 +0000 (11:30 +0000)]
Change 'then' to 'than' in comparisons.

Found-by: LanguageTool
10 years agoUse standard markup for one or more files.
Sascha Wildner [Fri, 17 Oct 2008 07:52:56 +0000 (07:52 +0000)]
Use standard markup for one or more files.

10 years agoChange 'then' to 'than' in comparisons.
Sascha Wildner [Thu, 16 Oct 2008 23:08:30 +0000 (23:08 +0000)]
Change 'then' to 'than' in comparisons.

Found-by: LanguageTool
10 years agoAdd KQUEUE support to HAMMER.
Matthew Dillon [Thu, 16 Oct 2008 17:24:16 +0000 (17:24 +0000)]
Add KQUEUE support to HAMMER.

10 years agoAdd a new utility called 'monitor' which uses kqueue to monitor a
Matthew Dillon [Thu, 16 Oct 2008 17:23:20 +0000 (17:23 +0000)]
Add a new utility called 'monitor' which uses kqueue to monitor a
list of files and directories specified on the command line.

10 years agoAdjust max read request size according to MTU; 512 seems to be the only
Sepherosa Ziehau [Thu, 16 Oct 2008 14:58:50 +0000 (14:58 +0000)]
Adjust max read request size according to MTU; 512 seems to be the only
value that works with jumbo frames without "watchdog timeout" during
UDP_STREAM netperf tests.

10 years agoAccording to wpaul's comment, 8139C+ only support 64 TX/RX descriptors
Sepherosa Ziehau [Thu, 16 Oct 2008 12:46:40 +0000 (12:46 +0000)]
According to wpaul's comment, 8139C+ only support 64 TX/RX descriptors

10 years agoAdd hardware csum offload support for MAC style 2 chips, which include
Sepherosa Ziehau [Thu, 16 Oct 2008 12:29:13 +0000 (12:29 +0000)]
Add hardware csum offload support for MAC style 2 chips, which include
8102E, 8102EL, 8168C, 8168CP and 8168D.

Obtained-from: RealTek r8101-1.009.00 r8168-8.008.00

Add RE_C_AUTOPAD capability to indicate hardware could correctly pad
short ether frames.  Turn it on for newer version of 8168B (0x38000000
and 0xb8000000) and MAC style 2 chips; manually padding short UDP packets
for newer version 8168B will result in incorrect UDP csum, while manually
padding short ICMP packets for MAC style 2 chips will result in both
incorrect IP header csum and incorrect IP length (o_O)

10 years agoXref utrace(2) from ktrace(2) instead of ktrace(1).
Sascha Wildner [Thu, 16 Oct 2008 08:15:18 +0000 (08:15 +0000)]
Xref utrace(2) from ktrace(2) instead of ktrace(1).

10 years agoAdd man page for utrace(2). With modifications from FreeBSD. Xref utrace(2)
Matthias Schmidt [Thu, 16 Oct 2008 07:58:43 +0000 (07:58 +0000)]
Add man page for utrace(2).  With modifications from FreeBSD.  Xref utrace(2)
in ktrace(1).

10 years ago* Silence -Wold-style-definition (i.e., ansify).
Sascha Wildner [Thu, 16 Oct 2008 01:52:34 +0000 (01:52 +0000)]
* Silence -Wold-style-definition (i.e., ansify).

* Remove 'register'.

* Remove P() and friends.

10 years agoChange hammer_str_to_tid() and its callers to restrict the format of
Matthew Dillon [Wed, 15 Oct 2008 22:38:37 +0000 (22:38 +0000)]
Change hammer_str_to_tid() and its callers to restrict the format of
strings after the '@@' portion of the filename.  Unknown formats are
simply passed through, so for example you can create a file called 'x@@b'
without it thinking it is 'x' with a @@b transaction id extension.

The formats allowed are:

    @@0x%016llx[:%05d]
    @@-1[:%05d]

Any other format is passed through and not treated specially.

Reported-by: "Steve O'Hara-Smith" <steve@sohara.org>
10 years agoAdd code to parse the utrace(2) entries generated by malloc(3) in a more
Hasso Tepper [Wed, 15 Oct 2008 16:04:11 +0000 (16:04 +0000)]
Add code to parse the utrace(2) entries generated by malloc(3) in a more
human-readable format.

Obtained-from: FreeBSD

10 years agoFix another path
Matthias Schmidt [Wed, 15 Oct 2008 12:48:34 +0000 (12:48 +0000)]
Fix another path

10 years agoUse cred from componentname, don't access curthread
Aggelos Economopoulos [Wed, 15 Oct 2008 12:12:51 +0000 (12:12 +0000)]
Use cred from componentname, don't access curthread

10 years agoFix path to the dhcpd.conf file.
Matthias Schmidt [Wed, 15 Oct 2008 11:39:49 +0000 (11:39 +0000)]
Fix path to the dhcpd.conf file.

10 years agoAdd some DragonFly specific tips.
Matthias Schmidt [Wed, 15 Oct 2008 09:56:22 +0000 (09:56 +0000)]
Add some DragonFly specific tips.

10 years agoRemove unused variable.
Sascha Wildner [Tue, 14 Oct 2008 21:25:14 +0000 (21:25 +0000)]
Remove unused variable.

Found-by: LLVM/Clang Static Analyzer
10 years ago- Adjust PCI latency timer on all types of chips
Sepherosa Ziehau [Tue, 14 Oct 2008 15:11:38 +0000 (15:11 +0000)]
- Adjust PCI latency timer on all types of chips
- Adjust PCI cache line size for 8110/8169 chips
- For certain revision of 8101E, reading MAC address from IDRx may not
  work; read from EEPROM instead
- Add comment that adjusting config1 and config5 may cause unrecoverible
  disaster

Obtained-from: RealTek Linux drivers