Commit Graph

124871 Commits

Author SHA1 Message Date
Andrew Gallatin
6d914a32ff Much to my surprise, IFQ_DRV_DEQUEUE() can return a null mbuf even if
!IFQ_DRV_IS_EMPTY().  Taking this into account,  I re-structured the
transmit routine so as to avoid adding another if/then in the
critical path.

Thanks to brueffer for showing my how to test with altq/pf.
2006-06-14 19:32:00 +00:00
Christian Brueffer
dea060ff55 - new sentence -> new line
- s/freebsd/FreeBSD/ for consistency
- eol and eof whitespace removed
2006-06-14 18:26:34 +00:00
Andrew Gallatin
76bb9c5edb Replace a sc->ifp->if_snd.ifq_drv_maxlen with IFQ_SET_MAXLEN(),
and call IFQ_SET_READY().

Submitted by: brueffer
2006-06-14 17:52:30 +00:00
Alan Cox
d2d9e24a89 Correct an error in the previous revision that could lead to a panic:
Found mapped cache page.  Specifically, if cnt.v_free_count dips below
cnt.v_free_reserved after p_start has been set to a non-NULL value,
then vm_map_pmap_enter() would break out of the loop and incorrectly
call pmap_enter_object() for the remaining address range.  To correct
this error, this revision truncates the address range so that
pmap_enter_object() will not map any cache pages.

In collaboration with: tegge@
Reported by: kris@
2006-06-14 17:48:45 +00:00
Andrew Gallatin
89d098f8dd Remove the initial myri10ge driver, now that it has been
renamed mxge.
2006-06-14 17:07:21 +00:00
Hiroki Sato
7a0a1d152b - Document FreeBSD-SA-06:17.sendmail.
- Split an item of sendmail import since 8.13.7 is not merged yet.
2006-06-14 16:53:35 +00:00
Gregory Neil Shapiro
a11b2b13d6 Record sendmail 8.13.7 import 2006-06-14 16:34:39 +00:00
Gregory Neil Shapiro
6945f452cb Update FreeBSD info regarding sendmail 8.13.7 import 2006-06-14 16:33:59 +00:00
Gregory Neil Shapiro
355d91e30e Resolve conflicts from sendmail 8.13.7 import 2006-06-14 16:25:31 +00:00
Andrew Gallatin
5e7d85418b Update the mxge driver.
- Update the firmware to the latest released firmware
  (1.4.3), which corresponds to the firmware in the
  latest shipping drivers from Myricom.  This firmware
  fixes several bugs in the firmware's PCI-e implementation,
  and it also changes the driver/firmware interface:

  o TSO was added, and changed the format of the transmit
    descriptors.
  o The firmware no longer counts transmits descriptors,
    but frames.  So the driver needs to keep a count
    of the number of frames sent.
  o The weird interrupt strategy changed to a normal receive
    return ring.  This ring is much bigger, and we may be
    able to support DEVICE_POLLING.
  o Myricom's header files changed the name of firmware
    related #define's and enums (s/_MCP_/FW_).

- Stopped spamming the console with lots of printfs unless
  mxge_verbose (or bootverbose) is set.

- Made additional information available via sysctl, including
  the results of a PCI-e DMA benchmark run at device reset.

- Decreased the excessively long timeouts when sending commands
  from 2 seconds to 20ms.

Sponsored by: Myricom Inc.
2006-06-14 16:23:17 +00:00
Gregory Neil Shapiro
81623278a5 This commit was generated by cvs2svn to compensate for changes in r159609,
which included commits to RCS files with non-trunk default branches.
2006-06-14 16:23:02 +00:00
Gregory Neil Shapiro
af9557fdd1 Import sendmail 8.13.7
Security: FreeBSD-SA-06:17.sendmail
2006-06-14 16:23:02 +00:00
Christian Brueffer
3b0452235f Change the myri10ge dev entity and all consumers to mxge. 2006-06-14 15:32:50 +00:00
Maxim Konovalov
c11d5762c2 o Revert a previous delta as strlcpy(3) operates with NUL-terminated
strings and cp is not.  Fix logic in the original code and eliminate
core dumps on lines without '\n'.
2006-06-14 15:09:52 +00:00
Maxim Konovalov
fee8a46e77 o Replace (an incorrect) string copy gymnastics with strlcpy(3).
PR:		bin/98905
Submitted by:	Fabian Keil
MFC after:	1 week
2006-06-14 11:45:01 +00:00
Max Laier
c0e9fdd321 Fix byteorder of syncpeer and make it actually work.
Submitted by:	glebius
MFC after:	1 week
2006-06-14 11:11:54 +00:00
Joel Dahl
e1e45d4a05 Fix spelling. 2006-06-14 08:32:25 +00:00
David Xu
c2c1ab1858 Clear ke_runq before calling maybe_preempt, this avoids a
KASSERT(ke->ke_runq == NULL) panic when the sched_add is recursively
called by maybe_preempt.

Reported by: Wojciech A. Koszek < dunstan at freebsd dot czest dot pl >
2006-06-14 03:46:03 +00:00
Xin LI
6ad26d8376 Unexpand an instance of TAILQ_EMPTY() 2006-06-14 03:14:26 +00:00
Marcel Moolenaar
a04f78eacc Unbreak build on platforms that don't have uart_sab82532 and uart_z8530
for uart(4) by default, but have scc(4).
2006-06-14 03:03:08 +00:00
Marcel Moolenaar
e1684acf38 Unbreak 64-bit architectures. The 3rd argument to kern_kldload() is
a pointer to an integer and td->td_retval[0] is of type register_t.
On 64-bit architectures register_t is wider than an integer.
2006-06-14 03:01:06 +00:00
Christian S.J. Peron
7eae78a419 If bpf(4) has not been compiled into the kernel, initialize the bpf interface
pointer to a zeroed, statically allocated bpf_if structure. This way the
LIST_EMPTY() macro will always return true. This allows us to remove the
additional unconditional memory reference for each packet in the fast path.

Discussed with:	sam
2006-06-14 02:23:28 +00:00
Xin LI
415e46824c Add a manpage for the CORE scheduler. 2006-06-14 02:16:51 +00:00
David Xu
2c7cae8042 Fox a typo in sched_is_timeshare. 2006-06-13 23:45:59 +00:00
David Xu
e15abbf251 Pass boolean value to __predict_false. Try to keep KSE slot count
correct for migrating thread, the count is a bit mess.
2006-06-13 23:01:50 +00:00
John Baldwin
edd32c2da2 Use kern_kldload() and kern_kldunload() to load and unload modules when
we intend for the user to be able to unload them later via kldunload(2)
instead of calling linker_load_module() and then directly adjusting the
ref count on the linker file structure.  This makes the resulting
consumer code simpler and cleaner and better hides the linker internals
making it possible to sanely lock the linker.
2006-06-13 21:36:23 +00:00
John Baldwin
b21c9288ce A couple of minor style tweaks. 2006-06-13 21:34:12 +00:00
John Baldwin
d53885879d - Add a kern_kldload() that is most of the previous kldload() and push
Giant down in it.
- Push Giant down in kern_kldunload() and reorganize it slightly to avoid
  using gotos.  Also, expose this function to the rest of the kernel.
2006-06-13 21:28:18 +00:00
John Baldwin
6b3d277ad4 - Push down Giant some in kldstat().
- Use a 'struct kld_file_stat' on the stack to read data under the lock
  and then do one copyout() w/o holding the lock at the end to push the
  data out to userland.
2006-06-13 21:11:12 +00:00
John Baldwin
b904477c68 Unexpand TAILQ_FOREACH() and TAILQ_FOREACH_SAFE(). 2006-06-13 20:49:07 +00:00
John Baldwin
3a600aeabc Remove some more pointless goto's and don't check to see if
malloc(M_WAITOK) returns NULL.
2006-06-13 20:27:23 +00:00
John Baldwin
2fa6cc80d7 Handle the simple case of just dropping a reference near the start of
linker_file_unload() instead of in the middle of a bunch of code for
the case of dropping the last reference to improve readability and sanity.
While I'm here, remove pointless goto's that were just jumping to a
return statement.
2006-06-13 19:45:08 +00:00
Marius Strobl
ab098c4184 - Complete breaking out the definition of bus_space_{tag,handle}_t by
moving the typedef of bus_space_tag_t from sys/sparc64/include/bus.h
  to sys/sparc64/include/_bus.h. This brings sparc64 in sync with the
  other platforms and fixes the compilation of drivers which include
  <sys/rman.h> before <machine/bus.h> after sys/sys/rman.h rev. 1.34.
- Remove the definition of bus_type_t from sys/sparc64/include/_bus.h
  as it's unused since sys/sparc64/include/bus.h rev. 1.6 and
  sys/sparc64/sparc64/bus_machdep.c rev. 1.3.
- Remove some pointless comments.
2006-06-13 19:18:09 +00:00
Alexander Leidinger
4946fe7c4d regen after MFP4 (soc2006/rdivacky_linuxolator) of syscalls.master
P4-Changes:	similar to 98673 and 98675 but regenerated locally
Sponsored by:	Google SoC 2006
Submitted by:	rdivacky
2006-06-13 18:48:30 +00:00
Alexander Leidinger
c8b579c182 MFP4 (soc2006/rdivacky_linuxolator)
Update of syscall.master:
	o	Adding of several new dummy syscalls (268-310)
	o	Synchronization of amd64 syscall.master with i386 one
	o	Auditing added to amd64 syscall.master
	o	Change auditing type for lstat syscall (bugfix). [1]

P4-Changes:	98672, 98674
Noticed by:	rwatson [1]
Sponsored by:	Google SoC 2006
Submitted by:	rdivacky
2006-06-13 18:43:55 +00:00
Marius Strobl
6010b27c33 Correct transposed digits in device names which were added in the
previous revision.
2006-06-13 18:40:39 +00:00
Bruce A. Mah
3885d669d1 FreeBSD/sparc64 supports the Ultra1 (with a serial console) on (at
least) 6.1-RELEASE, so move it to the "supported" list.

Submitted by:	Gheorghe Ardelean ardelean at ww.uni-erlangen.de
2006-06-13 17:49:33 +00:00
David Malone
e4ad3d8dd8 Make traceroute decode all the ICMP unreachable messages defined
in http://www.iana.org/assignments/icmp-parameters. Thankfully
IANA's list aggrees with <netinet/ip_icmp.h>.

I've tried to do this in a way which is mostly consistent with
tcptraceroute and Debian's version of traceroute. However, sometimes
a letter is used twice by these versions, so I've gone with:

                                LBL     tcptr   Debian          (chosen)
ICMP_UNREACH_NET                !N      !N      !N              !N
ICMP_UNREACH_HOST               !H      !H      !H              !H
ICMP_UNREACH_PROTOCOL           !P      !P      !P              !P
ICMP_UNREACH_PORT               !       !p      !               !
ICMP_UNREACH_NEEDFRAG           !F-%d   !F      !F-<%d>         !F-<%d>
ICMP_UNREACH_SRCFAIL            !S      !S      !S              !S
ICMP_UNREACH_NET_UNKNOWN        !<%d>   !U      !<%d>           !U
ICMP_UNREACH_HOST_UNKNOWN       !<%d>   !U      !<%d>           !W
ICMP_UNREACH_ISOLATED           !<%d>   !I      !I              !I
ICMP_UNREACH_NET_PROHIB         !<%d>   !A      !A              !A
ICMP_UNREACH_HOST_PROHIB        !<%d>   !C      !C              !Z
ICMP_UNREACH_TOSNET             !<%d>   !T      !T              !Q
ICMP_UNREACH_TOSHOST            !<%d>   !T      !T              !T
ICMP_UNREACH_FILTER_PROHIB      !X      !A      !A              !X
ICMP_UNREACH_HOST_PRECEDENCE    !V      !<%d>   !V              !V
ICMP_UNREACH_PRECEDENCE_CUTOFF  !C      !<%d>   !C              !C

Graham Wilson is planning to use the same codes in Debian's version.

MFC after:	3 weeks
2006-06-13 14:59:07 +00:00
Maxim Konovalov
70df31f4de o There are two methods to get a process credentials over the unix
sockets:

1) A sender sends SCM_CREDS message to a reciever, struct cmsgcred;
2) A reciever sets LOCAL_CREDS socket option and gets sender
credentials in control message, struct sockcred.

Both methods use the same control message type SCM_CREDS with the
same control message level SOL_SOCKET, so they are indistinguishable
for the receiver.  A difference in struct cmsgcred and struct sockcred
layouts may lead to unwanted effects.

Now for sockets with LOCAL_CREDS option remove all previous linked
SCM_CREDS control messages and then add a control message with
struct sockcred so the process specifically asked for the peer
credentials by LOCAL_CREDS option always gets struct sockcred.

PR:		kern/90800
Submitted by:	Andrey Simonenko
Regres. tests:	tools/regression/sockets/unix_cmsg/
MFC after:	1 month
2006-06-13 14:33:35 +00:00
Doug Ambrisko
c3a252361a Fix missing \n and when there are no arg's that means just print out
the description so we don't have to do any more queries.  Disable the
event query code until it figured out since but it is similar to the
AEN detail so we should be able to get that working.
2006-06-13 14:27:52 +00:00
Christian Brueffer
7458d45fd3 s/MYRI10GE/MXGE/ and a typo fixed. 2006-06-13 14:23:13 +00:00
Andrew Gallatin
6d87a65da4 - Complete the myri10ge -> mxge name change by doing a mechanical
s/myri10ge/mxge/g replacement in the myri10ge files.  A few contuation
  lines were joined because of the regained columns.
- Hook the mxge driver back to the build.
2006-06-13 13:53:52 +00:00
David Xu
b41f1452d9 Add scheduler CORE, the work I have done half a year ago, recent,
I picked it up again. The scheduler is forked from ULE, but the
algorithm to detect an interactive process is almost completely
different with ULE, it comes from Linux paper "Understanding the
Linux 2.6.8.1 CPU Scheduler", although I still use same word
"score" as a priority boost in ULE scheduler.

Briefly, the scheduler has following characteristic:
1. Timesharing process's nice value is seriously respected,
   timeslice and interaction detecting algorithm are based
   on nice value.
2. per-cpu scheduling queue and load balancing.
3. O(1) scheduling.
4. Some cpu affinity code in wakeup path.
5. Support POSIX SCHED_FIFO and SCHED_RR.
Unlike scheduler 4BSD and ULE which using fuzzy RQ_PPQ, the scheduler
uses 256 priority queues. Unlike ULE which using pull and push, the
scheduelr uses pull method, the main reason is to let relative idle
cpu do the work, but current the whole scheduler is protected by the
big sched_lock, so the benefit is not visible, it really can be worse
than nothing because all other cpu are locked out when we are doing
balancing work, which the 4BSD scheduelr does not have this problem.
The scheduler does not support hyperthreading very well, in fact,
the scheduler does not make the difference between physical CPU and
logical CPU, this should be improved in feature. The scheduler has
priority inversion problem on MP machine, it is not good for
realtime scheduling, it can cause realtime process starving.
As a result, it seems the MySQL super-smack runs better on my
Pentium-D machine when using libthr, despite on UP or SMP kernel.
2006-06-13 13:12:56 +00:00
Maxim Konovalov
05922cdfcc o Sort .Xrs. 2006-06-13 12:49:14 +00:00
Poul-Henning Kamp
dfe969585d Add xref to statfs(2) 2006-06-13 12:23:22 +00:00
Dag-Erling Smørgrav
9aa2cb8613 Respect FETCH_BIND_ADDRESS when opening the data connection.
PR:		misc/98872
2006-06-13 10:21:03 +00:00
Dag-Erling Smørgrav
c23fb8a4d3 Fix a bug introduced in rev 1.92, where, when changing from one directory
to another, the first CWD after a string of CDUPs would incorrectly include
a slash before the directory name.

Reported by:	obrien
PR:		bin/83278
2006-06-13 10:19:59 +00:00
Olivier Houchard
de5f056a10 Handle MFS_IMAGE in the ${FULLKERNEL} target, so that we can build kernel
with MFS root without debugging.
2006-06-13 00:57:10 +00:00
Greg Lehey
7748dfd4c0 Burying UNIX--a quote by Rob Pike,
Seen on The UNIX Heritage Society mailing list.
2006-06-12 23:28:52 +00:00
Olivier Houchard
ee8ecea34b MFp4:
- Try hard to calculate a safe sp, so that the stack doesn't get smashed
while uncompressing or relocating the kernel.
- Bring in code needed to calculate the cacheline size etc, needed for
arm9_idcache_wbinv_all.
2006-06-12 22:58:50 +00:00