Sascha Wildner [Thu, 16 Oct 2008 23:08:30 +0000 (23:08 +0000)]
Change 'then' to 'than' in comparisons.
Found-by: LanguageTool
Matthew Dillon [Thu, 16 Oct 2008 17:24:16 +0000 (17:24 +0000)]
Add KQUEUE support to HAMMER.
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.
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.
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
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)
Sascha Wildner [Thu, 16 Oct 2008 08:15:18 +0000 (08:15 +0000)]
Xref utrace(2) from ktrace(2) instead of ktrace(1).
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).
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.
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>
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
Matthias Schmidt [Wed, 15 Oct 2008 12:48:34 +0000 (12:48 +0000)]
Fix another path
Aggelos Economopoulos [Wed, 15 Oct 2008 12:12:51 +0000 (12:12 +0000)]
Use cred from componentname, don't access curthread
Matthias Schmidt [Wed, 15 Oct 2008 11:39:49 +0000 (11:39 +0000)]
Fix path to the dhcpd.conf file.
Matthias Schmidt [Wed, 15 Oct 2008 09:56:22 +0000 (09:56 +0000)]
Add some DragonFly specific tips.
Sascha Wildner [Tue, 14 Oct 2008 21:25:14 +0000 (21:25 +0000)]
Remove unused variable.
Found-by: LLVM/Clang Static Analyzer
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
Sepherosa Ziehau [Tue, 14 Oct 2008 10:42:35 +0000 (10:42 +0000)]
0x28000000 is 8168D according to Realtek r8168-8.008.00 driver
Sascha Wildner [Mon, 13 Oct 2008 19:53:54 +0000 (19:53 +0000)]
Sync zoneinfo database with tzdata2008h from elsie.
africa: 8.16 -> 8.17
asia: 8.23 -> 8.24
southamerica: 8.29 -> 8.30
zone.tab: 8.18 -> 8.19
From Arthur David Olson's comments:
africa - Change Maurituis transition hours to 2:00 *standard* time.
asia - Change Syrian end of DST from October 1 to November 1.
southamerica - Add comment on new law 26350 (no data change yet).
zone.tab - Fix Niue's longitude.
Sepherosa Ziehau [Mon, 13 Oct 2008 14:10:42 +0000 (14:10 +0000)]
Add some PHY fixups before we do mii_phy_probe()
Obtained-from: Realtek BSD driver v176
Sepherosa Ziehau [Mon, 13 Oct 2008 13:04:41 +0000 (13:04 +0000)]
Bring in some PCI register settings from RealTek BSD driver v176. Disable
the PCI register configuration for "style 2 MAC", add comment about it.
Sepherosa Ziehau [Mon, 13 Oct 2008 11:35:02 +0000 (11:35 +0000)]
- Read ethernet address from IDRx registers.
Obtained-from: RealTek BSD driver v176
This eliminates the need to read/config EEPROM. Put EEPROM related
functions under RE_USE_EEPROM; disabled by default
- Maintain re_softc size no matter what kernel options we are using
- Remove RE_DISABLE_HWCSUM; we could do it by clearing RE_C_HWCUM
Sepherosa Ziehau [Mon, 13 Oct 2008 10:52:23 +0000 (10:52 +0000)]
re_softc.re_swcum_lim is applied to ethernet frame without trailing CRC, so
it should include the size of ether header.
Sepherosa Ziehau [Sun, 12 Oct 2008 11:17:08 +0000 (11:17 +0000)]
Avoid following possible race:
When we tell the hardware that the RX descriptor is ready to be reused, its
buffer content is not duplicated yet.
Reported-by: Jordan Gordeev <jgordeev@dir.bg>
Sepherosa Ziehau [Sun, 12 Oct 2008 10:19:31 +0000 (10:19 +0000)]
- Nuke re_type, add RE_C_8139CP to indicate the chip is 8139C+
- Change hardware revision mask from 0x7cc00000 to 0xfc800000
Obtained-from: Realtek BSD driver v176
- Convert MAC mode to MAC version and save MAC version in softc
Obtained-from: Realtek BSD driver v176
- Add hardware revision 0x34800000(8102E) and 0x28000000(chip name is unknown)
Obtained-from: Realtek BSD driver v176
Sepherosa Ziehau [Sun, 12 Oct 2008 04:08:59 +0000 (04:08 +0000)]
Rework re_probe()
Sepherosa Ziehau [Thu, 9 Oct 2008 14:30:48 +0000 (14:30 +0000)]
Rename some HWREV
Sepherosa Ziehau [Thu, 9 Oct 2008 13:45:16 +0000 (13:45 +0000)]
Update man page to reflect recent changes
Sepherosa Ziehau [Thu, 9 Oct 2008 12:46:40 +0000 (12:46 +0000)]
Increase default RX/TX descriptor count from 64 to 256
Sepherosa Ziehau [Thu, 9 Oct 2008 12:41:02 +0000 (12:41 +0000)]
Use hardware timer to simulate interrupt moderation. Old devices will no
longer be livelocked when they are receiving on GigE line. Newer devices
also gain well controlled interrupt rate.
If hardware supports interrupt moderation (e.g. 8168B, 8168C), you could
also use hardware based interrupt moderation, however, due to lack of
necessary information it does not work as reliably as simulated interrupt
moderation. It is _not_ recommended currently.
By default, PCI-E devices' simulated interrupt moderation timer is set to
75us, while PCI devices' is set to 125us.
Matthew Dillon [Thu, 9 Oct 2008 04:20:59 +0000 (04:20 +0000)]
Add code to verify the data CRC by default, in addition to the B-Tree
node CRCs.
Thomas Nikolajsen [Wed, 8 Oct 2008 21:01:54 +0000 (21:01 +0000)]
- sync usage() to man
- move snapshot command up, to reflect typical use
Sepherosa Ziehau [Wed, 8 Oct 2008 13:09:22 +0000 (13:09 +0000)]
LINKCHG interrupt is still needed
Thomas Nikolajsen [Tue, 7 Oct 2008 22:30:31 +0000 (22:30 +0000)]
- fix UP build
Thomas Nikolajsen [Tue, 7 Oct 2008 22:28:41 +0000 (22:28 +0000)]
- sync usage() to manual
- use `PFS #' in output, not `pfs_id' sometimes
Thomas Nikolajsen [Tue, 7 Oct 2008 22:23:12 +0000 (22:23 +0000)]
- null mount for PFS slave can't be set up before first mirroring operation,
as PFS slave path is unusable, as described in example
- add markup
Sepherosa Ziehau [Tue, 7 Oct 2008 12:49:05 +0000 (12:49 +0000)]
- According to Realtek's BSD driver v176, we could always write to MISSEDPKT
- Use pci_get_pciecap_ptr() to decide whether a given chip is PCI-E or not
- Rename re_flags to re_caps; we will need a real re_flags soon
Sepherosa Ziehau [Tue, 7 Oct 2008 11:57:18 +0000 (11:57 +0000)]
- It does not make sense to disable TX interrupt moderation
- Add field in softc to store RX related interrupt bits
This cleanup eases upcoming changes.
Sepherosa Ziehau [Tue, 7 Oct 2008 11:39:36 +0000 (11:39 +0000)]
- Nuke interrupt bits definition which don't apply to 8169
- Don't test TX desc unavailable bit in re_intr, since it is never enabled
Sascha Wildner [Tue, 7 Oct 2008 06:57:40 +0000 (06:57 +0000)]
Add missing .Lb
Sascha Wildner [Mon, 6 Oct 2008 21:21:30 +0000 (21:21 +0000)]
Add some xrefs.
Sascha Wildner [Mon, 6 Oct 2008 21:01:37 +0000 (21:01 +0000)]
POSIX conformance:
Add fmtmsg(3), posix_madvise(3), strfmon(3) and wordexp(3).
Taken-from: FreeBSD
Sascha Wildner [Mon, 6 Oct 2008 16:26:22 +0000 (16:26 +0000)]
Sync zoneinfo database with tzdata2008g from elsie.
southamerica: 8.27 -> 8.29
From 2008 on, DST in Brazil will be from the 3rd Sunday in October to the
3rd Sunday in February. If Carnival Sunday happens to be on the same day,
DST ends a week later.
Sepherosa Ziehau [Mon, 6 Oct 2008 14:51:10 +0000 (14:51 +0000)]
- Rearrange comment
- Reduce RX im timer from 125us to 50us
Sepherosa Ziehau [Mon, 6 Oct 2008 14:22:32 +0000 (14:22 +0000)]
Add RX interrupt moderation suport for PCI-E GigaE chips.
Interrupt moderation register position is obtained from Realtek's
BSD driver v176.
The meaning of the IM register bits is partially reverse engineered:
RX timer position and unit.
This kind of interrupt moderation does not work on PCI GigaE chips.
Sascha Wildner [Sun, 5 Oct 2008 18:26:41 +0000 (18:26 +0000)]
Fix bug: sprintf() was used where snprintf() was meant.
Sascha Wildner [Sun, 5 Oct 2008 10:45:28 +0000 (10:45 +0000)]
Nuke obsolete DEVICE_SYSCTLS option.
Sepherosa Ziehau [Sun, 5 Oct 2008 08:28:32 +0000 (08:28 +0000)]
re_freebufmem() may be re-entered, so set the mbuf tag to NULL after it is
destroyed.
Sepherosa Ziehau [Sun, 5 Oct 2008 07:57:45 +0000 (07:57 +0000)]
- Set hardware timer according to bus clock. Adjust hardware timer to 8000HZ
- For PCI-E device, increase "max read request size" from default value (512)
to 4096. With 512 TX descriptors, this change gives me additional +80-90Mbps
during netperf stream tests on an 8168C.
Sepherosa Ziehau [Sun, 5 Oct 2008 06:15:36 +0000 (06:15 +0000)]
Get bus clock, which will be used to fix broken TCTR setting (hardware timer,
interrupt moderation related)
Sepherosa Ziehau [Sun, 5 Oct 2008 05:00:58 +0000 (05:00 +0000)]
Set ifq maxlen according to number of TX descriptors
Sepherosa Ziehau [Sun, 5 Oct 2008 04:54:51 +0000 (04:54 +0000)]
Add tunable for RX/TX descriptor count
Sepherosa Ziehau [Sun, 5 Oct 2008 02:13:06 +0000 (02:13 +0000)]
Don't assume that RE_RX_DESC_CNT and RE_TX_DESC_CNT are always same
Sepherosa Ziehau [Sun, 5 Oct 2008 01:53:41 +0000 (01:53 +0000)]
Move some macros from if_rereg.h to if_revar.h; regroup them
Sepherosa Ziehau [Sun, 5 Oct 2008 01:43:09 +0000 (01:43 +0000)]
re_chain_data is never used
Sascha Wildner [Sat, 4 Oct 2008 22:38:42 +0000 (22:38 +0000)]
Whitespace adjustment.
Sascha Wildner [Sat, 4 Oct 2008 22:36:25 +0000 (22:36 +0000)]
Remove unnecessary .Pp
Sascha Wildner [Sat, 4 Oct 2008 22:09:17 +0000 (22:09 +0000)]
* Constify return type of gai_strerror() as per bwg2001-009
(see http://www.opengroup.org/platform/resolutions/bwg2001-many.html).
* Return EAI_OVERFLOW instead of EAI_MEMORY when the supplied buffer is
too short. This conforms to RFC 3493, POSIX and XPG6.
* Add a gai_strerror(3) manual page.
Taken-from: FreeBSD
Sascha Wildner [Sat, 4 Oct 2008 14:22:44 +0000 (14:22 +0000)]
Silence warning on UP build with KTR.
Sepherosa Ziehau [Sat, 4 Oct 2008 11:26:09 +0000 (11:26 +0000)]
- Add tunable (net.link.ether.inet.arp_mpsafe) to register ARP as MPSAFE netisr.
- Hold BGL on CARP in arp input path.
Sepherosa Ziehau [Sat, 4 Oct 2008 11:24:37 +0000 (11:24 +0000)]
On ethernet output path:
Hold BGL on IPX, ATALK, CARP and netgraph
Sepherosa Ziehau [Sat, 4 Oct 2008 11:21:10 +0000 (11:21 +0000)]
Recheck ifnet.if_bpf after we hold the BGL
Sepherosa Ziehau [Sat, 4 Oct 2008 10:36:21 +0000 (10:36 +0000)]
- For relative newer parts (8168B), setting MTPS (max transmit packet size)
according to MTU makes jumbo frame + TX csum offloading work. However,
for old ones (8169), setting MTPS does not have much effect.
- Reduce max jumbo frame size from 9018 to 7440 (according to DS)
- Fix MTU setting in re_ioctl
Hasso Tepper [Sat, 4 Oct 2008 09:57:14 +0000 (09:57 +0000)]
How buggy this little piece of code could be? Repair strnvis() buffersize
of 4*n+1, with termination gauranteed by the function.
Obtained-from: OpenBSD
Thomas Nikolajsen [Fri, 3 Oct 2008 21:26:28 +0000 (21:26 +0000)]
- adjust boot command description for booting from
root of boot-only file system
- improve markup
- fix exmaple of dummy s0 partition to use enough space for disklabel
Thomas Nikolajsen [Fri, 3 Oct 2008 20:09:12 +0000 (20:09 +0000)]
Start sentence on new line.
Sascha Wildner [Fri, 3 Oct 2008 19:56:11 +0000 (19:56 +0000)]
Silence remaining "'packed' attribute ignored for field of type..." warnings.
Verified-with: md5
Thomas Nikolajsen [Fri, 3 Oct 2008 18:55:57 +0000 (18:55 +0000)]
- fix description of time (cleanup): suffix is mandantory
- describe period use (cleanup)
- use `cyclefile' everywhere, not cycle file
Sepherosa Ziehau [Fri, 3 Oct 2008 14:14:10 +0000 (14:14 +0000)]
Free sysctl tree during detach
Sepherosa Ziehau [Fri, 3 Oct 2008 14:07:02 +0000 (14:07 +0000)]
Transmit csum offload does not work at all on certain hardware revision
once frame length exceeds certain threshold (different parts seems to
have different thresholds). Borrow code from ip_output to do software
csum, if transmit csum offloading is enabled and frame length exceeds
hardware's threshold.
8169, 8169S, 8169SB and 8168B are tested, while 8169S and 8169SB does not
seem to have this bug.
Hasso Tepper [Fri, 3 Oct 2008 12:30:07 +0000 (12:30 +0000)]
Don't allocate space for empty banners. Makes me able to connect various
network equipment again.
Obtained-from: OpenBSD CVS
Sepherosa Ziehau [Fri, 3 Oct 2008 11:35:25 +0000 (11:35 +0000)]
Print hardware revision during attach
Sascha Wildner [Fri, 3 Oct 2008 10:46:41 +0000 (10:46 +0000)]
ether_demux() is now ether_demux_oncpu().
Sascha Wildner [Fri, 3 Oct 2008 10:33:49 +0000 (10:33 +0000)]
Re-add some previously removed docs about devd(8) notifies.
Sascha Wildner [Fri, 3 Oct 2008 10:32:10 +0000 (10:32 +0000)]
Remove extra comma and bump .Dd
Sascha Wildner [Fri, 3 Oct 2008 10:30:43 +0000 (10:30 +0000)]
Bump .Dd
Sascha Wildner [Fri, 3 Oct 2008 10:27:42 +0000 (10:27 +0000)]
Adjust for recent devd(8) import.
Sepherosa Ziehau [Fri, 3 Oct 2008 10:12:35 +0000 (10:12 +0000)]
- Don't substract ETHER_ALIGN from the fragment length, we don't do
m_adj(ETHET_ALIGN) in re_newbuf()
- If one fragment of a multi-fragment packet recolletion fails, we
drop will consecutive fragments of this packet.
- All of the TX descs in TX ring could be used; there is no need to
reserve RE_TXDESC_SPARE TX descs
Sascha Wildner [Fri, 3 Oct 2008 09:25:18 +0000 (09:25 +0000)]
Prefix hex numbers with '0x' in debug messages.
Hasso Tepper [Fri, 3 Oct 2008 08:56:58 +0000 (08:56 +0000)]
Correctly handle Intel g33 chips and add support for g45 chips.
Obtained-from: FreeBSD
Sepherosa Ziehau [Fri, 3 Oct 2008 08:00:06 +0000 (08:00 +0000)]
Factor out re_free_rxchain()
Hasso Tepper [Fri, 3 Oct 2008 07:59:20 +0000 (07:59 +0000)]
If a neighbor solictation or neighbor advertisement isn't from the
unspecified address, make sure that the source address matches one of the
interfaces address prefixes.
CVE-2008-2476
Obtained-from: NetBSD with modifications
Sepherosa Ziehau [Fri, 3 Oct 2008 07:52:26 +0000 (07:52 +0000)]
Rework DMA stuffs' allocation/free
Sepherosa Ziehau [Fri, 3 Oct 2008 05:47:07 +0000 (05:47 +0000)]
If RX/TX ring initialization failed, then stop re(4) and return
Sepherosa Ziehau [Fri, 3 Oct 2008 05:09:18 +0000 (05:09 +0000)]
Rework re_newbuf() and re_encap()
Hasso Tepper [Fri, 3 Oct 2008 00:47:36 +0000 (00:47 +0000)]
devctl(4)/devd(8) support in acpi_thinkpad(4).
Hasso Tepper [Fri, 3 Oct 2008 00:26:21 +0000 (00:26 +0000)]
Welcome devctl(4) and devd(8).
Obtained-from: FreeBSD
Sascha Wildner [Thu, 2 Oct 2008 07:51:51 +0000 (07:51 +0000)]
Regenerate the pciconf(8) database from the following files:
Hart: Jan 22, 2008 (version 671)
Boemler: Oct 1, 2008
Mares: Sep 16, 2008
Sepherosa Ziehau [Thu, 2 Oct 2008 04:14:13 +0000 (04:14 +0000)]
- Instead of using magic number 4 define it as RE_TXDESC_SPARE
- Clear if_timer only if all TX descs are free
- Clear IFF_OACTIVE only if more than RE_TXDESC_SPARE TX descs ar free
Sascha Wildner [Wed, 1 Oct 2008 11:01:02 +0000 (11:01 +0000)]
Don't use .Fn for getcap. Reference it with .Xr instead.
Sascha Wildner [Wed, 1 Oct 2008 10:53:48 +0000 (10:53 +0000)]
Add KTR_ETHERNET.
Sepherosa Ziehau [Wed, 1 Oct 2008 09:16:18 +0000 (09:16 +0000)]
Split arprequest() into two parts, arpreq_alloc() and arpreq_send().
arprequest() simply calls these two functions sequencially.
Add arprequest_async(), which allocates the arp request using arpreq_alloc()
and then dispatch the real sending (arpreq_send()) to current CPU's netisr.
Callers of arprequest_async() do not need to worry about the ifp's serializer
state. This function also makes sure that the network output happens in
TDF_NETWORK kernel thread.
Let arp_ifinit(), arp_ifinit2() and arp_rtrequest() call arprequest_async().
Sepherosa Ziehau [Wed, 1 Oct 2008 07:29:16 +0000 (07:29 +0000)]
- Constify 'enaddr'
- Minor style change
Matthew Dillon [Tue, 30 Sep 2008 23:13:08 +0000 (23:13 +0000)]
HAMMER Utilities: Adjust 'show' defaults.
* 'hammer show' now defaults to full verboseness.
* -q may now be used to reduce verboseness.
Sascha Wildner [Tue, 30 Sep 2008 21:08:10 +0000 (21:08 +0000)]
Fix HISTORY.
Sascha Wildner [Tue, 30 Sep 2008 17:47:21 +0000 (17:47 +0000)]
Silence warnings.
Sascha Wildner [Tue, 30 Sep 2008 17:11:16 +0000 (17:11 +0000)]
Raise WARNS to 6.
Sascha Wildner [Tue, 30 Sep 2008 16:57:06 +0000 (16:57 +0000)]
Ansify (i.e., silence -Wold-style-definition) the rest of lib/
(minus contrib/). Also remove a couple of "register" keywords.
Sascha Wildner [Tue, 30 Sep 2008 13:26:17 +0000 (13:26 +0000)]
Use spaces instead of tabs like everywhere else.
Sascha Wildner [Tue, 30 Sep 2008 13:13:11 +0000 (13:13 +0000)]
Add MLINKS.