Commit Graph

909 Commits

Author SHA1 Message Date
Robert Watson
d07af9d904 Add options NETGRAPH_FEC to hook up ng_fec.c to the LINT build. 2004-06-27 02:36:33 +00:00
Robert Watson
9d56413324 Add options NETGRAPH_EIFACE, which causes ng_eiface.c to be built into
the kernel, similar to NETGRAPH_IFACE for ng_iface.c.  It appears to
have been omitted when added to the kernel.
2004-06-27 02:25:38 +00:00
Warner Losh
09c399ec0e MFp4:
Reduce the need for hard coded *devs in various makefiles by declaring
them before-depend.

Other bugs in the handling of *devs remain, but this is the start of
the cleanup.  These will be address in future commits.

Cleanup Motivator: bde
2004-06-26 05:58:43 +00:00
Nate Lawson
684c1c1ddb Hook acpi_quirks up to the build for kernel and modules. 2004-06-24 06:29:22 +00:00
Paul Saab
6d90faf3d8 Add support for TCP Selective Acknowledgements. The work for this
originated on RELENG_4 and was ported to -CURRENT.

The scoreboarding code was obtained from OpenBSD, and many
of the remaining changes were inspired by OpenBSD, but not
taken directly from there.

You can enable/disable sack using net.inet.tcp.do_sack. You can
also limit the number of sack holes that all senders can have in
the scoreboard with net.inet.tcp.sackhole_limit.

Reviewed by:	gnn
Obtained from:	Yahoo! (Mohan Srinivasan, Jayanth Vijayaraghavan)
2004-06-23 21:04:37 +00:00
Brooks Davis
f889d2ef8d Major overhaul of pseudo-interface cloning. Highlights include:
- Split the code out into if_clone.[ch].
 - Locked struct if_clone. [1]
 - Add a per-cloner match function rather then simply matching names of
   the form <name><unit> and <name>.
 - Use the match function to allow creation of <interface>.<tag>
   vlan interfaces.  The old way is preserved unchanged!
 - Also the match function to allow creation of stf(4) interfaces named
   stf0, stf, or 6to4.  This is the only major user visible change in
   that "ifconfig stf" creates the interface stf rather then stf0 and
   does not print "stf0" to stdout.
 - Allow destroy functions to fail so they can refuse to delete
   interfaces.  Currently, we forbid the deletion of interfaces which
   were created in the init function, particularly lo0, pflog0, and
   pfsync0.  In the case of lo0 this was a panic implementation so it
   does not count as a user visiable change. :-)
 - Since most interfaces do not need the new functionality, an family of
   wrapper functions, ifc_simple_*(), were created to wrap old style
   cloner functions.
 - The IF_CLONE_INITIALIZER macro is replaced with a new incompatible
   IFC_CLONE_INITIALIZER and ifc_simple consumers use IFC_SIMPLE_DECLARE
   instead.

Submitted by:   Maurycy Pawlowski-Wieronski <maurycy at fouk.org> [1]
Reviewed by:    andre, mlaier
Discussed on:	net
2004-06-22 20:13:25 +00:00
Max Laier
7c1fe95333 Commit pf version 3.5 and link additional files to the kernel build.
Version 3.5 brings:
 - Atomic commits of ruleset changes (reduce the chance of ending up in an
   inconsistent state).
 - A 30% reduction in the size of state table entries.
 - Source-tracking (limit number of clients and states per client).
 - Sticky-address (the flexibility of round-robin with the benefits of
   source-hash).
 - Significant improvements to interface handling.
 - and many more ...
2004-06-16 23:24:02 +00:00
Max Laier
02b199f158 Link ALTQ to the build and break with ABI for struct ifnet. Please recompile
your (network) modules as well as any userland that might make sense of
sizeof(struct ifnet).
This does not change the queueing yet. These changes will follow in a
seperate commit. Same with the driver changes, which need case by case
evaluation.

__FreeBSD_version bump will follow.

Tested-by:	(i386)LINT
2004-06-13 17:29:10 +00:00
Doug Rabson
b8b3323469 Add a new driver to support IP over firewire. This driver is intended to
conform to the rfc2734 and rfc3146 standard for IP over firewire and
should eventually supercede the fwe driver. Right now the broadcast
channel number is hardwired and we don't support MCAP for multicast
channel allocation - more infrastructure is required in the firewire
code itself to fix these problems.
2004-06-13 10:54:36 +00:00
Scott Long
12c6be05d1 Add the esp(4) files. Two of them are sbus-specific and therefore only
apply to sparc64.
2004-06-10 05:21:44 +00:00
Warner Losh
6732641e0a Step 1 in moving EISA devices to kobj/newbus. Use kobj methods for
all of the interface between the driver and the bus.  This will enable
us to stop special casing eisa bus attachments in modules and treat them
like we treat all other busses.

In the longer run, we need to eliminate much (all?) of these interfaces
and switch to using the standard bus_alloc_resource(), but that's not
done right now.

# I've not updated the modules to include eisa, etc, just yet

Tested on: Compaq Proliant 3000/333 purchased for eisa work
2004-06-09 16:08:20 +00:00
Julian Elischer
345ad86692 Split kern_thread.c into 2 parts. kern_kse.c and kern_thread.c
Kern_kse has already been committed.
This separates out the KSE threading ABI from  generic thread support.
2004-06-07 19:00:57 +00:00
Seigo Tanimura
a5dc42def9 Axe the old midi drivers and framework. matk has developed a new
module-friendly midi subsystem to be merged soon.
2004-06-01 06:22:59 +00:00
Bosko Milekic
099a0e588c Bring in mbuma to replace mballoc.
mbuma is an Mbuf & Cluster allocator built on top of a number of
extensions to the UMA framework, all included herein.

Extensions to UMA worth noting:
  - Better layering between slab <-> zone caches; introduce
    Keg structure which splits off slab cache away from the
    zone structure and allows multiple zones to be stacked
    on top of a single Keg (single type of slab cache);
    perhaps we should look into defining a subset API on
    top of the Keg for special use by malloc(9),
    for example.
  - UMA_ZONE_REFCNT zones can now be added, and reference
    counters automagically allocated for them within the end
    of the associated slab structures.  uma_find_refcnt()
    does a kextract to fetch the slab struct reference from
    the underlying page, and lookup the corresponding refcnt.

mbuma things worth noting:
  - integrates mbuf & cluster allocations with extended UMA
    and provides caches for commonly-allocated items; defines
    several zones (two primary, one secondary) and two kegs.
  - change up certain code paths that always used to do:
    m_get() + m_clget() to instead just use m_getcl() and
    try to take advantage of the newly defined secondary
    Packet zone.
  - netstat(1) and systat(1) quickly hacked up to do basic
    stat reporting but additional stats work needs to be
    done once some other details within UMA have been taken
    care of and it becomes clearer to how stats will work
    within the modified framework.

From the user perspective, one implication is that the
NMBCLUSTERS compile-time option is no longer used.  The
maximum number of clusters is still capped off according
to maxusers, but it can be made unlimited by setting
the kern.ipc.nmbclusters boot-time tunable to zero.
Work should be done to write an appropriate sysctl
handler allowing dynamic tuning of kern.ipc.nmbclusters
at runtime.

Additional things worth noting/known issues (READ):
   - One report of 'ips' (ServeRAID) driver acting really
     slow in conjunction with mbuma.  Need more data.
     Latest report is that ips is equally sucking with
     and without mbuma.
   - Giant leak in NFS code sometimes occurs, can't
     reproduce but currently analyzing; brueffer is
     able to reproduce but THIS IS NOT an mbuma-specific
     problem and currently occurs even WITHOUT mbuma.
   - Issues in network locking: there is at least one
     code path in the rip code where one or more locks
     are acquired and we end up in m_prepend() with
     M_WAITOK, which causes WITNESS to whine from within
     UMA.  Current temporary solution: force all UMA
     allocations to be M_NOWAIT from within UMA for now
     to avoid deadlocks unless WITNESS is defined and we
     can determine with certainty that we're not holding
     any locks when we're M_WAITOK.
   - I've seen at least one weird socketbuffer empty-but-
     mbuf-still-attached panic.  I don't believe this
     to be related to mbuma but please keep your eyes
     open, turn on debugging, and capture crash dumps.

This change removes more code than it adds.

A paper is available detailing the change and considering
various performance issues, it was presented at BSDCan2004:
http://www.unixdaemons.com/~bmilekic/netbuf_bmilekic.pdf
Please read the paper for Future Work and implementation
details, as well as credits.

Testing and Debugging:
    rwatson,
    brueffer,
    Ketrien I. Saihr-Kesenchedra,
    ...
Reviewed by: Lots of people (for different parts)
2004-05-31 21:46:06 +00:00
Tony Ackerman
e03f8cdc4f First release of ixgb driver for the Intel(R) PRO/10GbE Family of Adapters. This driver has
been developed for use with FreeBSD, version 4.8 and later.

Submitted by:	Hema Joyce
Reviewed by: 	Prafulla Deuskar
Approved by: 	Prafulla Deuskar
MFC after:	1 week
2004-05-28 00:23:00 +00:00
Warner Losh
dba6dd177b Move to generating pccarddevs.h on the fly, both for the kernel and
the modules.

Also generate usbdevs.h automatically now, but a non-kernel file is
stopping that at the moment.
2004-05-26 00:53:10 +00:00
Warner Losh
79af3d91df Fix disorder introduce in 1.862 by sorting emu10k before miidevs.h,
rather than after.

bde inspired words: disorder
2004-05-26 00:38:52 +00:00
Warner Losh
c4e54758fe devlist2h.awk is too generic a name for what it does. It really
converts miidevs to a .h file, so rename to reflect that.

The usb and pccard versions have also been renamed and will be hooked
into the build system shortly (I've made the conversion in my p4
tree).
2004-05-26 00:19:39 +00:00
Pawel Jakub Dawidek
7dc92b13d0 - Connect geom(8) and its libraries to the build.
- Connect geom_stripe and geom_nop modules to the build.
- Connect STRIPE and NOP classes to the LINT build.
- Disconnect gconcat(8) from the build.

Supported by:	Wheel - Open Technologies - http://www.wheel.pl
2004-05-20 10:37:13 +00:00
Pawel Jakub Dawidek
7226443d39 Allow geom_concat and geom_gate to be compiled in kernel. 2004-05-03 21:18:56 +00:00
Bruce Evans
e0871faf17 Switch to using the moved cy driver (adjust pathnames and remove "count"
parameter).

Keep using it only in the i386 NOTES for now.  It is fairly MI, but it
doesn't use bus-space and has a couple of i386 i/o instructions in pci
intitialization.
2004-05-02 05:21:29 +00:00
Thomas Moestl
e501d96926 Remove the sio EBus attachment, which never worked with an unpatched
driver because sio(4) uses ISA-specific functions. uart(4) has full
support for the respective hardware and should be used instead.
2004-04-30 17:25:47 +00:00
Roman Kurakin
0a6818e29c Connect ng_sppp to the build process. 2004-04-24 22:03:02 +00:00
Maksim Yevmenkin
666ea1b65f Make sure Bluetooth stuff can be statically compiled into kernel
Submitted by:	ps
Reviewed by:	imp (mentor), ru
2004-04-23 19:48:43 +00:00
Nate Lawson
bcc0344c04 Remove an extra line that crept in. 2004-04-20 15:42:16 +00:00
Nate Lawson
6e3b5e7e30 Remove the commented out line for fore_load.c now that it's been removed. 2004-04-20 15:39:04 +00:00
Nate Lawson
5e679b57b6 Remove nowerror lines now that acpica is warns clean. 2004-04-14 18:13:16 +00:00
Warner Losh
9dc313a3f7 Add glue for new sx driver. 2004-04-11 20:01:18 +00:00
Marcel Moolenaar
6292a18603 Unbreak alpha kernel build and unbreak any non-i386 runtime brokenness.
The VIA Nehemias is so obviously specific to i386 that it should not
be compiled on non-i386 platforms. The obviousness is in the fact that
all functions in nehemias.c are purely i386 inline assembly, guarded
by #ifdef __i386__
2004-04-10 19:43:15 +00:00
Mark Murray
e7806b4c0e Reorganise the entropy device so that high-yield entropy sources
can more easily be used INSTEAD OF the hard-working Yarrow.
The only hardware source used at this point is the one inside
the VIA C3 Nehemiah (Stepping 3 and above) CPU. More sources will
be added in due course. Contributions welcome!
2004-04-09 15:47:10 +00:00
Max Laier
10d1d31e8f Readd -Werror flag to compilation pf.c after the compiler warnings have been
shut up.

Tested by:	LINT(i386)
Approved by:	bms(mentor)
2004-04-08 18:17:13 +00:00
Poul-Henning Kamp
18a810fa8d Make led.c/led(4) standard so acpi_asus can use it too. 2004-04-03 18:42:05 +00:00
Dag-Erling Smørgrav
9a02a2f5ed Fix style issues in twa lines added in rev 1.878. 2004-04-01 17:55:50 +00:00
Dag-Erling Smørgrav
7cfcb873b5 Comment out the au88x0 line which was inadvertantly included in the
previous commit.
2004-04-01 17:53:04 +00:00
Dag-Erling Smørgrav
7eb17244fa Move twa from files.i386 to files. This unbreaks LINT on !i386.
Pointy hat to:	vkashyap, ps
2004-04-01 10:02:50 +00:00
Marcel Moolenaar
2ae4f1fd16 Introduce the hw.uart.console and hw.uart.dbgport environment variables
to select a serial console and debug port (resp). On ia64 these replace
the use of hints completely and take precedence over hints on alpha,
amd64 and i386. On sparc64 these variables are not yet recognised.

The reasons for introducing these variables are:
1.  Hints have side-effects. They reserve the unit number for use by
    isa or acpi devices and therefore cannot be used to select a pci
    device. Also, the use of a unit number to select a device prior
    to bus enumeration is nonsense. The new variables have no side-
    effects and are not based on unit numbers.
2.  Hints don't have the expression power to allow the sysadmin to
    select UARTs that are not legacy PC devices and need the support
    of compile-time constants to give the sysadmin some level of
    flexibility.

The hw.uart.console and hw.uart.dbgport variables specify a list of
attributes. An attribute is a tag-value pair, seperated by a colon.
Attributes are seperated by a comma. Where possible, tags are the
same as those in /etc/remote (only br and pa in practice). Details
can be found in the manpage (not part of this commit).

Not tested on: amd64, pc98
2004-03-20 02:14:02 +00:00
Robert Watson
909d5c6308 Isolate PCB-specific ethertalk DDP functions in ddp_pcb.c, removing them
from ddp_usrreq.c.  Functions moved are:

  at_pcballoc()
  at_pcbconnect()
  at_pcbdetach()
  at_pcbdisconnect()
  at_pcbsetaddr()
  at_sockaddr()

Also moved are ddp_ports and ddpcb, global variables associated with DDP
pcbs.  This makes PCB implementation more parallel to inet, inet6, and
ipx.
2004-03-19 07:21:22 +00:00
Scott Long
846ca5d04f Remove RAIDFrame. It hasn't worked since GEOM replaced the old disk
mini-layer.  I don't have time to bing it forward into the GEOM world, and
no one else has stepped forward to claim it.  It'll be in the Attic for safe
keeping for now.
2004-03-16 12:23:43 +00:00
Tom Rhodes
06d6e4fcfe This are the build infrastructure changes to allow to use the
Intel C/C++ compiler (lang/icc) to build the kernel.

The icc CPUTYPE CFLAGS use icc v7 syntax, icc v8 moans about them, but
doesn't abort. They also produce CPU specific code (new instructions
of the CPU, not only CPU specific scheduling), so if you get coredumps
with signal 4 (SIGILL, illegal instruction) you've used the wrong
CPUTYPE.

Incarnations of this patch survive gcc compiles and my make universe.
I use it on my desktop.

To use it update share/mk, add
	/usr/local/intel/compiler70/ia32/bin	(icc v7, works)
or
	/usr/local/intel_cc_80/bin		(icc v8, doesn't work)
to your PATH, make sure you have a new kernel compile directory
(e.g. MYKERNEL_icc) and run
	CFLAGS="-O2 -ip" CC=icc make depend
	CFLAGS="-O2 -ip" CC=icc make
in it.

Don't compile with -ipo, the build infrastructure uses ld directly to
link the kernel and the modules, but -ipo needs the link step to be
performed with Intel's linker.

Problems with icc v8:
 - panic: npx0 cannot be emulated on an SMP system
 - UP: first start of /bin/sh results in a FP exception

Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.

Reviewed by:	silence on -arch
Submitted by:	netchild
2004-03-12 21:36:12 +00:00
Benno Rice
bde778e9f2 Add a netgraph node to handle ATM LLC encapsulation. This currently handles
ethernet (tested) and FDDI (not tested).  The main use for this is on ADSL (or
other ATM) connections where bridged ethernet is used, PPPoE being a prime
example.

There is no manual page as yet, I will write one shortly.

Reviewed by:	harti
2004-03-08 10:54:35 +00:00
David E. O'Brien
5af0827e0f mga_state & r128_state need an inline-limit larger than amd64's default
in order to compile.  AMD64's default could be reduced below 8k, if
dev/aic7xxx/aic79xx.c got this same treatment.
2004-03-03 09:33:03 +00:00
Nate Lawson
7592c288eb Add the ACPI standard video extensions driver. I've done some style cleanup
but a bit more reamins to be done.  For now, it is usable.

PR:
Submitted by:	Taku YAMAMOTO <taku@cent.saitama-u.ac.jp>
Reviewed by:
Approved by:
Obtained from:
MFC after:
2004-03-01 08:12:55 +00:00
Bernd Walter
7de8778318 add driver for BWCT console management serials 2004-03-01 02:34:49 +00:00
Marcel Moolenaar
b55a929477 uteval.c gained a warning (cast discards qualifiers from pointer target
type) after vendor import of ACPICA 20040220. Add nowerror.
2004-02-28 23:04:45 +00:00
Poul-Henning Kamp
3e2c971172 Add a generic watchdog facility which through a single device entry
in /dev controls all available watchdog implementations.
2004-02-28 20:06:59 +00:00
MIHIRA Sanpei Yoshiro
cdd40f3bd6 add support DM9601(DAVICOM USB to Ethernet MAC Controller with Integrated 10/100 PHY)
- Corega FEther USB-TXC

PR:		kern/62932
Submitted by:	HASHI Hiroaki <hashiz@tomba.cskk-sv.co.jp>
Obtained from:	NetBSD
2004-02-28 00:12:47 +00:00
John Baldwin
44f3b09204 Switch the sleep/wakeup and condition variable implementations to use the
sleep queue interface:
- Sleep queues attempt to merge some of the benefits of both sleep queues
  and condition variables.  Having sleep qeueus in a hash table avoids
  having to allocate a queue head for each wait channel.  Thus, struct cv
  has shrunk down to just a single char * pointer now.  However, the
  hash table does not hold threads directly, but queue heads.  This means
  that once you have located a queue in the hash bucket, you no longer have
  to walk the rest of the hash chain looking for threads.  Instead, you have
  a list of all the threads sleeping on that wait channel.
- Outside of the sleepq code and the sleep/cv code the kernel no longer
  differentiates between cv's and sleep/wakeup.  For example, calls to
  abortsleep() and cv_abort() are replaced with a call to sleepq_abort().
  Thus, the TDF_CVWAITQ flag is removed.  Also, calls to unsleep() and
  cv_waitq_remove() have been replaced with calls to sleepq_remove().
- The sched_sleep() function no longer accepts a priority argument as
  sleep's no longer inherently bump the priority.  Instead, this is soley
  a propery of msleep() which explicitly calls sched_prio() before
  blocking.
- The TDF_ONSLEEPQ flag has been dropped as it was never used.  The
  associated TDF_SET_ONSLEEPQ and TDF_CLR_ON_SLEEPQ macros have also been
  dropped and replaced with a single explicit clearing of td_wchan.
  TD_SET_ONSLEEPQ() would really have only made sense if it had taken
  the wait channel and message as arguments anyway.  Now that that only
  happens in one place, a macro would be overkill.
2004-02-27 18:52:44 +00:00
Max Laier
cc5934f5af Tweak existing header and other build infrastructure to be able to build
pf/pflog/pfsync as modules. Do not list them in NOTES or modules/Makefile
(i.e. do not connect it to any (automatic) builds - yet).

Approved by: bms(mentor)
2004-02-26 03:53:54 +00:00
Robert Watson
c66b4d8d26 Move inet and inet6 related MAC Framework entry points from mac_net.c
to a new mac_inet.c.  This code is now conditionally compiled based
on inet support being compiled into the kernel.

Move socket related MAC Framework entry points from mac_net.c to a new
mac_socket.c.

To do this, some additional _enforce MIB variables are now non-static.
In addition, mbuf_to_label() is now mac_mbuf_to_label() and non-static.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, McAfee Research
2004-02-26 03:51:04 +00:00
Bruce M Simpson
1cfd4b5326 Initial import of RFC 2385 (TCP-MD5) digest support.
This is the first of two commits; bringing in the kernel support first.
This can be enabled by compiling a kernel with options TCP_SIGNATURE
and FAST_IPSEC.

For the uninitiated, this is a TCP option which provides for a means of
authenticating TCP sessions which came into being before IPSEC. It is
still relevant today, however, as it is used by many commercial router
vendors, particularly with BGP, and as such has become a requirement for
interconnect at many major Internet points of presence.

Several parts of the TCP and IP headers, including the segment payload,
are digested with MD5, including a shared secret. The PF_KEY interface
is used to manage the secrets using security associations in the SADB.

There is a limitation here in that as there is no way to map a TCP flow
per-port back to an SPI without polluting tcpcb or using the SPD; the
code to do the latter is unstable at this time. Therefore this code only
supports per-host keying granularity.

Whilst FAST_IPSEC is mutually exclusive with KAME IPSEC (and thus IPv6),
TCP_SIGNATURE applies only to IPv4. For the vast majority of prospective
users of this feature, this will not pose any problem.

This implementation is output-only; that is, the option is honoured when
responding to a host initiating a TCP session, but no effort is made
[yet] to authenticate inbound traffic. This is, however, sufficient to
interwork with Cisco equipment.

Tested with a Cisco 2501 running IOS 12.0(27), and Quagga 0.96.4 with
local patches. Patches for tcpdump to validate TCP-MD5 sessions are also
available from me upon request.

Sponsored by:	sentex.net
2004-02-11 04:26:04 +00:00