Commit Graph

147764 Commits

Author SHA1 Message Date
Marko Zec
0733f6a615 Remove an #undef MIN that slipped under the radar and led me to
hastily introduce an #define MIN() a few lines below in r191816.

Approved by:	julian (mentor)
Discussed with:	bz
2009-06-01 20:59:40 +00:00
Dmitry Chagin
f83427b833 Add forgotten in previous commit flags argument.
Approved by:	kib (mentor)
MFC after:	1 month
2009-06-01 20:54:41 +00:00
Dmitry Chagin
f8cd0af232 Implement accept4 syscall.
Approved by:	kib (mentor)
MFC after:	1 month
2009-06-01 20:48:39 +00:00
Dmitry Chagin
93e694c9df Implement a variation of the accept_common() which takes
a flags argument.

Do not preserve td_retval before kern_fcntl(F_SETFL) as it does not
changed.

Approved by:	kib (mentor)
MFC after:	1 month
2009-06-01 20:44:58 +00:00
Dmitry Chagin
c8f37d612d Split linux_accept() syscall onto linux_accept_common() which should
be used by linuxulator and linux_accept() itself.

Approved by:	kib (mentor)
MFC after:	1 month
2009-06-01 20:42:27 +00:00
John Baldwin
b36cfff75d Add a simple API to manage scatter/gather lists of phyiscal addresses.
Each list describes a logical memory object that is backed by one or more
physical address ranges.  To minimize locking, the sglist objects
themselves are immutable once they are shared.

These objects may be used in the future to facilitate I/O requests using
physically-addressed buffers.  For the immediate future I plan to use them
to implement a new type of VM object and pager.

Reviewed by:	jeff, scottl
MFC after:	1 month
2009-06-01 20:35:39 +00:00
Rick Macklem
61a2fc1fbb Change the "-4" option flag to "-e" since it does not refer to IPv4
and to make it consistent with the flag used by nfsd and mountd.

Approved by:	kib (mentor)
2009-06-01 20:34:00 +00:00
John Baldwin
287078dd8e Add an internal pci_printf() routine similar to device_printf() except
that it prefixes the output with 'pci<domain>:<bus>:<device>:<function>: '.
2009-06-01 20:30:00 +00:00
John Baldwin
35db1e6dd2 Adjust some comments. 2009-06-01 20:27:14 +00:00
Robert Watson
820c518125 Add a flags field to struct ucred, and export that via kinfo_proc,
consuming one of its spare fields.  The cr_flags field is currently
unused, but will be used for features, including capability mode and
pay-as-you-go audit.

Discussed with:	jhb, sson
2009-06-01 20:26:51 +00:00
Andrew Gallatin
4d9a5852aa Set an rx jumbo cluster to the correct size before
using bus_dmamap_load_mbuf_sg() on it. This
prevents data corruption when the mxge MTU is
between 4076 and 8172 on machines with 4KB
pages and MXGE_VIRT_JUMBOS is in use (which it
isn't, in -current or -stable)
2009-06-01 19:16:57 +00:00
Xin LI
a3f2e28dea Revert the WARNS change for now, need some time to fix the real problem. 2009-06-01 19:06:08 +00:00
Joel Dahl
82474c294c - Remove obsolete and confusing comment about renaming "sound" to "snd".
We will look at renaming stuff for 9.0, but it's far from certain that we
   will do it this way.
-  Sort sysctl's alphabetically.  I'll add a bunch of new sysctl's once
   ariff's next mega-patch goes in, and having everything sorted makes my
   job easier.
2009-06-01 18:58:46 +00:00
Xin LI
7ff1b9822d Mark as WARNS=6. 2009-06-01 18:43:33 +00:00
Xin LI
b18a2ef17f Code cleanups to make this WARNS=6 clean.
PR:		bin/96128
2009-06-01 18:42:16 +00:00
Robert Watson
d363c61766 Revert a recent netisr2 change: when billing packets to the current
CPU, don't lock the workstream, as its mutexes may not have been
initialized if there are fewer workstreams than CPUs.

Run into by:	hps, ps
2009-06-01 18:38:36 +00:00
Sam Leffler
05c3c3717a tools for mwl driver 2009-06-01 18:27:16 +00:00
Bjoern A. Zeeb
ab1a4d4834 Decrement __FreeBSD_version again to 96 as we are runing out of digits
and want to be conservative - so not more than one version bump per day.

Discussed with:	jhb, kensmith
2009-06-01 18:07:38 +00:00
Sam Leffler
cf4c5a5331 driver for Marvell 88W8363 Wireless LAN controller 2009-06-01 18:07:01 +00:00
Sam Leffler
a43cee7009 pad data structures to enable integration of future features w/o abi breakage 2009-06-01 16:36:28 +00:00
Warner Losh
07db17ce56 Move the unlock to after the ifdef (maybe the right fix is to remove
the ifdef) since it calls bwi_start_locked, which expects to the lock
to be held...
2009-06-01 16:29:03 +00:00
Warner Losh
7389f7db05 Make sure that we drain the LED blinking callout on detach.
Submitted by:	Paul B. Mahol
2009-06-01 16:27:13 +00:00
Warner Losh
1771d2075a Add a comment about what may be happening when we get certain
messages.  No change to actual code.
2009-06-01 16:22:01 +00:00
Robert Watson
33dd50646e Regenerate generated syscall files following changes to struct sysent in
r193234.
2009-06-01 16:14:38 +00:00
Robert Watson
46c10f272c Add 'sy_flags', a currently unused per-syscall entry flags field that will
see future use in 9-CURRENT and 8-STABLE for features such as the
capability-mode enable flag and pay-as-you-audit.

Discussed with:	jhb, sson
2009-06-01 16:13:06 +00:00
Robert Watson
529cb8e371 Update UPDATING for NETISR2 merge, fix a typo in another UPDATING entry. 2009-06-01 16:00:36 +00:00
Bjoern A. Zeeb
c2c2a7c11e Convert the two dimensional array to be malloced and introduce
an accessor function to get the correct rnh pointer back.

Update netstat to get the correct pointer using kvm_read()
as well.

This not only fixes the ABI problem depending on the kernel
option but also permits the tunable to overwrite the kernel
option at boot time up to MAXFIBS, enlarging the number of
FIBs without having to recompile. So people could just use
GENERIC now.

Reviewed by:	julian, rwatson, zec
X-MFC:		not possible
2009-06-01 15:49:42 +00:00
Bruce M Simpson
b01c90a31a Merge fixes from p4:
* Tighten v1 query input processing.
 * Borrow changes from MLDv2 for how general queries are processed.
   * Do address field validation upfront before accepting input.
   * Do NOT switch protocol version if old querier present timer active.
 * Always clear IGMPv3 state in igmp_v3_cancel_link_timers().
 * Update comments.

Tested by:	deeptech71 at gmail dot com
2009-06-01 15:30:18 +00:00
Robert Watson
ed54411c19 Garbage collect NETISR_POLL and NETISR_POLLMORE, which are no longer
required for options DEVICE_POLLING.

De-fragment the NETISR_ constant space and lower NETISR_MAXPROT from
32 to 16 -- when sizing queue arrays using this compile-time constant,
significant amounts of memory are saved.

Warn on the console when tunable values for netisr are automatically
adjusted during boot due to exceeding limits, invalid values, or as a
result of DEVICE_POLLING.
2009-06-01 15:03:58 +00:00
John Baldwin
4fdf20550c Add a missing parameter when displaying GPT partitions with an unknown
UUID.

Submitted by:	Pawel Worach  pawel.worach | gmail
MFC after:	1 week
2009-06-01 14:20:13 +00:00
Alexander Motin
ba98ce6bad Comment out old Realtek ALC883 quirk, that was disabling phantop power on
mic inputs. I have no idea what for it was made that time, but now I have
several reports that it should be removed to make microphones work. If
this quirk is still required for some systems then they should be identified
and specified explicitly.
2009-06-01 13:13:47 +00:00
Ralf S. Engelschall
f001f89625 use explicit 'unsigned int' instead of just the implicit-style 'unsigned' to make linting tools (e.g. FlexeLint) happy, too 2009-06-01 11:38:38 +00:00
Ralf S. Engelschall
35f2d3b6b1 align coding style with style(9) to avoid misunderstandings 2009-06-01 11:11:46 +00:00
Ralf S. Engelschall
26286b8acf correctly test for __GNUC__ macro (non-GCC compilers do not have it defined at all) 2009-06-01 11:02:09 +00:00
Ralf S. Engelschall
ac08b88250 be more type correct and align local ckmalloc() with its underlying malloc(3) by using a "size_t" instead of an "int" argument 2009-06-01 10:50:17 +00:00
Robert Watson
d4b5cae49b Reimplement the netisr framework in order to support parallel netisr
threads:

- Support up to one netisr thread per CPU, each processings its own
  workstream, or set of per-protocol queues.  Threads may be bound
  to specific CPUs, or allowed to migrate, based on a global policy.

  In the future it would be desirable to support topology-centric
  policies, such as "one netisr per package".

- Allow each protocol to advertise an ordering policy, which can
  currently be one of:

  NETISR_POLICY_SOURCE: packets must maintain ordering with respect to
    an implicit or explicit source (such as an interface or socket).

  NETISR_POLICY_FLOW: make use of mbuf flow identifiers to place work,
    as well as allowing protocols to provide a flow generation function
    for mbufs without flow identifers (m2flow).  Falls back on
    NETISR_POLICY_SOURCE if now flow ID is available.

  NETISR_POLICY_CPU: allow protocols to inspect and assign a CPU for
    each packet handled by netisr (m2cpuid).

- Provide utility functions for querying the number of workstreams
  being used, as well as a mapping function from workstream to CPU ID,
  which protocols may use in work placement decisions.

- Add explicit interfaces to get and set per-protocol queue limits, and
  get and clear drop counters, which query data or apply changes across
  all workstreams.

- Add a more extensible netisr registration interface, in which
  protocols declare 'struct netisr_handler' structures for each
  registered NETISR_ type.  These include name, handler function,
  optional mbuf to flow ID function, optional mbuf to CPU ID function,
  queue limit, and ordering policy.  Padding is present to allow these
  to be expanded in the future.  If no queue limit is declared, then
  a default is used.

- Queue limits are now per-workstream, and raised from the previous
  IFQ_MAXLEN default of 50 to 256.

- All protocols are updated to use the new registration interface, and
  with the exception of netnatm, default queue limits.  Most protocols
  register as NETISR_POLICY_SOURCE, except IPv4 and IPv6, which use
  NETISR_POLICY_FLOW, and will therefore take advantage of driver-
  generated flow IDs if present.

- Formalize a non-packet based interface between interface polling and
  the netisr, rather than having polling pretend to be two protocols.
  Provide two explicit hooks in the netisr worker for start and end
  events for runs: netisr_poll() and netisr_pollmore(), as well as a
  function, netisr_sched_poll(), to allow the polling code to schedule
  netisr execution.  DEVICE_POLLING still embeds single-netisr
  assumptions in its implementation, so for now if it is compiled into
  the kernel, a single and un-bound netisr thread is enforced
  regardless of tunable configuration.

In the default configuration, the new netisr implementation maintains
the same basic assumptions as the previous implementation: a single,
un-bound worker thread processes all deferred work, and direct dispatch
is enabled by default wherever possible.

Performance measurement shows a marginal performance improvement over
the old implementation due to the use of batched dequeue.

An rmlock is used to synchronize use and registration/unregistration
using the framework; currently, synchronized use is disabled
(replicating current netisr policy) due to a measurable 3%-6% hit in
ping-pong micro-benchmarking.  It will be enabled once further rmlock
optimization has taken place.  However, in practice, netisrs are
rarely registered or unregistered at runtime.

A new man page for netisr will follow, but since one doesn't currently
exist, it hasn't been updated.

This change is not appropriate for MFC, although the polling shutdown
handler should be merged to 7-STABLE.

Bump __FreeBSD_version.

Reviewed by:	bz
2009-06-01 10:41:38 +00:00
Pawel Jakub Dawidek
79d6b3f34a Document IP_BINDANY IP socket option.
Reviewed by:	brueffer
2009-06-01 10:30:52 +00:00
Pawel Jakub Dawidek
f44270e764 - Rename IP_NONLOCALOK IP socket option to IP_BINDANY, to be more consistent
with OpenBSD (and BSD/OS originally). We can't easly do it SOL_SOCKET option
  as there is no more space for more SOL_SOCKET options, but this option also
  fits better as an IP socket option, it seems.
- Implement this functionality also for IPv6 and RAW IP sockets.
- Always compile it in (don't use additional kernel options).
- Remove sysctl to turn this functionality on and off.
- Introduce new privilege - PRIV_NETINET_BINDANY, which allows to use this
  functionality (currently only unjail root can use it).

Discussed with:	julian, adrian, jhb, rwatson, kmacy
2009-06-01 10:30:00 +00:00
Pawel Jakub Dawidek
2430d82448 Document EINVAL for bind(2).
Reviewed by:	rwatson
Obtained from:	SuSv3
2009-06-01 09:32:12 +00:00
Ulf Lilleengen
95bac762d7 - Add missing data argument to printf.
Submitted by:	Pawel Worach <pawel.worach -AT- gmail.com>
MFC after:	1 week
2009-06-01 09:25:32 +00:00
Edward Tomasz Napierala
f0fa0e7faa Use the "flag" word consistently.
Submitted by:	Ben Kaduk <minimarmot at gmail.com>
2009-06-01 07:48:27 +00:00
Xin LI
db7da92301 According to Intel documentation (307013), 3Gbps mode is supported on
Desktop chipsets only for ICH7 series, so mark all ICH7M as ATA_SA150
instead of ATA_SA300.
2009-06-01 07:05:52 +00:00
Juli Mallett
f5a8c1294c o) Remove some references to long-unsupported old-style config(8) directives.
o) Borrow da(4) language about autoconfiguration for ch(4).
2009-06-01 06:52:03 +00:00
Juli Mallett
ba33818dce o) Restructure tcpdrop(8) to provide a facility to try to drop all established
connections.  Including a flag to instead output a sequence of tcpdrop(8)
   invocations that would accomplish the same thing, which is convenient for
   scripting.
o) Make tcpdrop complain if the addresses given to it are entirely in different
   address families, rather than failing silently.
o) When cross-referencing httpd(8), do not explicitly specify the apache2 port,
   since the example in question is generic.
2009-06-01 06:49:09 +00:00
Doug Barton
8df4f1e7be Local hack to get the build going again while ISC works on a more
permanent solution for 9.6.1-release.

"My suggestion is to remove the whole attribute construct.
It only suppresses a warning when a function is unused. In this case
the function is defined as inline, so it's not causing a warning when
not used."

Submitted by:	marcel
2009-06-01 06:31:04 +00:00
Alan Cox
6864a18c41 Eliminate a comment describing code that was deleted over eight years ago.
Move another comment to its proper place.  Fix a typo in a third comment.
2009-06-01 06:12:08 +00:00
Doug Barton
9cdd13b268 Eliminate the warning that "Values of network_interfaces other than
AUTO are deprecated.' There is no good reason to deprecate them, and
setting this to different values can be useful for custom solutions
and/or one-off configuration problems.
2009-06-01 05:37:13 +00:00
Doug Barton
a3f6188b53 Make the pf and ipfw firewalls start before netif, just like ipfilter
already does. This eliminates a logical inconsistency, and a small
window where the system is open after the network comes up.
2009-06-01 05:35:03 +00:00
Doug Barton
a3e42d03b9 Substitute ypset for ypbind in REQUIRE lines. If you use ypset it has to
happen right after ypbind, and before anything that uses NIS. The only
change in rcorder accomplished by this patch is make that happen.

PR:		conf/117555
Submitted by:	John Marshall <john@rwsrv05.mby.riverwillow.net.au>
2009-06-01 04:55:13 +00:00
Weongyo Jeong
18b223fed4 connect urtw(4) to the amd64/i386 build that it's not tested on the big
endian machines yet.
2009-06-01 02:37:06 +00:00