dragonfly.git
11 years agoflex: Add local modifications and DragonFly READMEs
John Marino [Wed, 16 Jan 2013 01:47:11 +0000 (02:47 +0100)]
flex: Add local modifications and DragonFly READMEs

The quality of the latest flex 2.5.37 release is pretty poor.  The
man page displayed the wrong version, the code doesn't compile with
GCC 4.7, the new lerrs_fatal function missing a protocol and then
given the wrong type once when it was called.  Some of the errors
could have been fixed with higher WARNS settings but these patches
applied over the flex vendor branch should fix the bugs.

The standard DragonFly README files are added at the same time.

11 years agoMerge branch 'vendor/FLEX'
John Marino [Wed, 16 Jan 2013 01:39:56 +0000 (02:39 +0100)]
Merge branch 'vendor/FLEX'

11 years agoImport flex-2.5.37 to new vendor branch
John Marino [Wed, 16 Jan 2013 01:38:47 +0000 (02:38 +0100)]
Import flex-2.5.37 to new vendor branch

11 years agoam-utils: Patch for recent flex
John Marino [Wed, 16 Jan 2013 03:01:38 +0000 (04:01 +0100)]
am-utils: Patch for recent flex

To prepare for the import of the latest flex, am-utils needs a tweak.
This allows both the old flex and the new flex to build it.  It is the
only software that failed to build out of the box with the new flex.

11 years ago.gitignore: Remove build products from list
John Marino [Tue, 15 Jan 2013 17:17:07 +0000 (18:17 +0100)]
.gitignore: Remove build products from list

The following patterns were previously active.
They have been commented out because the system "make" will pick up build
products in the source tree causing strange build failures.  The benefit
of avoiding an accidental commit of a binary is quickly offset by the
liability of chasing build failures caused by "invisible" files.  This
has burned a few people already and even the source of bug reports.

*.[psS]o
!/contrib/nvi/docs/USD.doc/vi.ref/index.so
!/contrib/nvi/docs/USD.doc/vi.ref/ref.so
*.a
!/bin/csh/USD.doc/csh.a
*.o

11 years agogcc4x: Update README to remove format.c from patched list
John Marino [Tue, 15 Jan 2013 16:55:49 +0000 (17:55 +0100)]
gcc4x: Update README to remove format.c from patched list

This is the result of %D format being removed by swildner yesterday.

11 years agoRemove %D conversion from kprintf(9) and the GCCs.
Sascha Wildner [Fri, 21 Dec 2012 20:20:04 +0000 (21:20 +0100)]
Remove %D conversion from kprintf(9) and the GCCs.

It has been removed also from libstand's printf.

While useful, these non-standard conversions have the downside that
each compiler needs adjusting to support proper printf format warnings
for them.

We have now a kether_ntoa() function to serve the purpose of %D

11 years agokern - More work replacing %D
Antonio Huete Jimenez [Sun, 13 Jan 2013 12:25:22 +0000 (13:25 +0100)]
kern - More work replacing %D

Use hexncpy() for special cases where, for example,
a different separator might be needed.

11 years agolibkern - Add new function hexncpy.
Antonio Huete Jimenez [Sat, 12 Jan 2013 20:45:20 +0000 (21:45 +0100)]
libkern - Add new function hexncpy.

11 years agokern - Utilize new way of printing MAC addresses.
Antonio Huete Jimenez [Fri, 28 Dec 2012 19:50:28 +0000 (20:50 +0100)]
kern - Utilize new way of printing MAC addresses.

kether_aton() function is being used to return a buffer
with the human readable notation of an ethernet address.

11 years agokern - Add kether_ntoa, kether_aton functions.
Antonio Huete Jimenez [Fri, 28 Dec 2012 19:49:17 +0000 (20:49 +0100)]
kern - Add kether_ntoa, kether_aton functions.

- kether_aton() converts a human readable MAC string to an
  ethernet address.
- kether_ntoa() converts ethernet addresses into human readable
  MAC string.

Human readable notation is specified in IEEE 802.

11 years agoshare/mk/sys.mk: Remove X11BASE definition
John Marino [Mon, 14 Jan 2013 08:12:44 +0000 (09:12 +0100)]
share/mk/sys.mk: Remove X11BASE definition

X11BASE is defined in pkgsrc mk files; it is not necessary to predefine
it in DragonFly's sys.mk.  Doing so will break support for dports.

11 years agoAdd regression tests for m4.
Peter Avalos [Tue, 15 Jan 2013 06:26:10 +0000 (22:26 -0800)]
Add regression tests for m4.

Obtained-from:  FreeBSD

11 years agom4: Sync with FreeBSD.
Peter Avalos [Tue, 15 Jan 2013 05:59:24 +0000 (21:59 -0800)]
m4: Sync with FreeBSD.

This improves compat with GNU m4 and brings the code closer to NetBSD
and OpenBSD.

Obtained-from:  FreeBSD

11 years agokernel/usb4bsd: Fix sizeof().
Sascha Wildner [Mon, 14 Jan 2013 18:22:58 +0000 (19:22 +0100)]
kernel/usb4bsd: Fix sizeof().

11 years agotws(4): Add MSI support.
Sascha Wildner [Mon, 14 Jan 2013 00:25:46 +0000 (01:25 +0100)]
tws(4): Add MSI support.

11 years agosys/param.h: Bump __DragonFly_version due to fpsave area changes
John Marino [Sun, 13 Jan 2013 17:37:59 +0000 (18:37 +0100)]
sys/param.h: Bump __DragonFly_version due to fpsave area changes

11 years agoif: Optimize ifnet_serialize_array_ function a little bit
Sepherosa Ziehau [Sun, 13 Jan 2013 12:03:42 +0000 (20:03 +0800)]
if: Optimize ifnet_serialize_array_ function a little bit

IFNET_SERIALIZE_ALL is only used on init, stop and configuration path,
which is much less often then IFNET_SERIALIZE_TX; use __predict_false
for IFNET_SERIALIZE_ALL.

11 years agoif: Remove unused IFNET serializer enum, macros and functions.
Sepherosa Ziehau [Sun, 13 Jan 2013 11:36:03 +0000 (19:36 +0800)]
if: Remove unused IFNET serializer enum, macros and functions.

11 years agoif: Multiple TX queue support step 3 of 3; map CPUID to subqueue
Sepherosa Ziehau [Sun, 13 Jan 2013 10:42:45 +0000 (18:42 +0800)]
if: Multiple TX queue support step 3 of 3; map CPUID to subqueue

Add CPUID to subqueue mapping method to ifaltq.  Driver could provide
its own CPUID to subqueue mapping method through ifnet.if_mapsubq,
which is used when ALTQ's packet scheduler is not enabled.  ALTQ's
packet schedulers always map CPUID to the default subqueue.

11 years agoif: Remove unused if_start_nmsg from ifnet
Sepherosa Ziehau [Sun, 13 Jan 2013 09:24:01 +0000 (17:24 +0800)]
if: Remove unused if_start_nmsg from ifnet

While im here, adjust comment in ifnet a little bit

11 years agoif: Multiple TX queue support step 2 of many
Sepherosa Ziehau [Sun, 13 Jan 2013 09:10:32 +0000 (17:10 +0800)]
if: Multiple TX queue support step 2 of many

ifnet_{serialize,deserialize,tryserialize}_tx and hardware TX serializer
asserion macros now require subqueue, so the proper hardware TX queue's
serializer could be held, released and asserted.

11 years agoif: Free subqueue memory upon if_detach
Sepherosa Ziehau [Sun, 13 Jan 2013 04:24:11 +0000 (12:24 +0800)]
if: Free subqueue memory upon if_detach

11 years agoif: Multiple TX queue support step 1 of many; introduce ifaltq subqueue
Sepherosa Ziehau [Fri, 11 Jan 2013 05:31:30 +0000 (13:31 +0800)]
if: Multiple TX queue support step 1 of many; introduce ifaltq subqueue

Put the plain queue information, e.g. queue header and tail, serializer,
packet staging scoreboard and ifnet.if_start schedule netmsg etc. into
its own structure (subqueue).  ifaltq structure could have multiple of
subqueues based on the count that drivers can specify.

Subqueue's enqueue, dequeue, purging and states updating are protected
by the subqueue's serializer, so for hardwares supporting multiple TX
queues, contention on queuing operation could be greatly reduced.

The subqueue is passed to if_start to let the driver know which hardware
TX queue to work on.  Only the related driver's TX queue serializer will
be held, so for hardwares supporting multiple TX queues, contention on
driver's TX queue serializer could be greatly reduced.

Bunch of ifsq_ prefixed functions are added, which is used to perform
various operations on subqueues.  Commonly used ifq_ prefixed functions
are still kept mainly for the drivers which do not support multiple TX
queues (well, these functions also ease the netif/ convertion in this
step :).

All of the pseudo network devices under sys/net are converted to use the
new subqueue operation.  netproto/802_11 is converted too.  igb(4) is
converted to use the new subqueue operation, the rest of the network
drivers are only changed for the if_start interface modification.

For ALTQs which have packet scheduler enabled, only the first subqueue
is used (*).

(*) Whether we should utilize multiple TX queues if ALTQ's packet scheduler
is enabled is quite questionable.  Mainly because hardware's multiple TX
queue packet dequeue mechanism could have negative impact on ALTQ's packet
scheduler's decision.

11 years agoUpdated the tip URL for the mailing list archives.
Justin C. Sherrill [Sun, 13 Jan 2013 01:39:16 +0000 (20:39 -0500)]
Updated the tip URL for the mailing list archives.

11 years agokernel - Fix signal FP save/restore issues when AVX is enabled
Matthew Dillon [Sun, 13 Jan 2013 00:16:11 +0000 (16:16 -0800)]
kernel - Fix signal FP save/restore issues when AVX is enabled

* The kernel was not saving/restoring the full FP context when entering into
  or returning from a signal, leading to corrupt FP registers even when
  AVX is not used, when AVX is enabled in the kernel.

  ANY SIGNAL COULD CORRUPT THE FP STATE.

* Fixed by adjusting the on-user-stack fpsave area sizes and operation.

* This unfortunately changes a number of user visible structures.
  ucontext_t, mcontext_t, sigcontext, sigframe.

  It is POSSIBLE that most userland use cases will be unaffected, but I'm
  not holding my breath.

Major-Sleuthing-by: ftigeot
Testing-by: ftigeot, dillon
11 years agovirtio.4: virtio_pci has no own manpage. Also use .Nm for self-reference.
Sascha Wildner [Sat, 12 Jan 2013 09:56:40 +0000 (10:56 +0100)]
virtio.4: virtio_pci has no own manpage. Also use .Nm for self-reference.

11 years agohammer - Change depth limit warning kprintf to krateprintf
Matthew Dillon [Fri, 11 Jan 2013 22:08:37 +0000 (14:08 -0800)]
hammer - Change depth limit warning kprintf to krateprintf

* Limit a warning kprintf to 1hz.

11 years agokernel: Silence gcc47's -Wcast-qual warnings.
Sascha Wildner [Thu, 10 Jan 2013 22:26:13 +0000 (23:26 +0100)]
kernel: Silence gcc47's -Wcast-qual warnings.

11 years agokernel: Remove some unused variables in the rest of the kernel tree.
Sascha Wildner [Wed, 9 Jan 2013 13:19:36 +0000 (14:19 +0100)]
kernel: Remove some unused variables in the rest of the kernel tree.

11 years agokernel: Remove some unused variables in the serial drivers.
Sascha Wildner [Wed, 9 Jan 2013 13:17:37 +0000 (14:17 +0100)]
kernel: Remove some unused variables in the serial drivers.

11 years agokernel: Remove some more unused variables in the network drivers.
Sascha Wildner [Wed, 9 Jan 2013 12:51:21 +0000 (13:51 +0100)]
kernel: Remove some more unused variables in the network drivers.

11 years agokernel/net: Remove some unused variables.
Sascha Wildner [Wed, 9 Jan 2013 12:37:06 +0000 (13:37 +0100)]
kernel/net: Remove some unused variables.

11 years agokernel/sound: Remove some unused variables.
Sascha Wildner [Wed, 9 Jan 2013 12:29:51 +0000 (13:29 +0100)]
kernel/sound: Remove some unused variables.

11 years agokernel/netinet: Remove some unused variables.
Sascha Wildner [Wed, 9 Jan 2013 12:35:04 +0000 (13:35 +0100)]
kernel/netinet: Remove some unused variables.

11 years agokernel/vfs: Remove some unused variables.
Sascha Wildner [Tue, 8 Jan 2013 18:21:35 +0000 (19:21 +0100)]
kernel/vfs: Remove some unused variables.

11 years agokernel/bus: Remove some unused variables and put others in #ifdef...
Sascha Wildner [Tue, 8 Jan 2013 15:48:15 +0000 (16:48 +0100)]
kernel/bus: Remove some unused variables and put others in #ifdef...

11 years agokernel: Remove some unused variables in RAID and disk drivers.
Sascha Wildner [Mon, 7 Jan 2013 20:54:01 +0000 (21:54 +0100)]
kernel: Remove some unused variables in RAID and disk drivers.

11 years agokernel/nfs: Add a 'break' for readability and remove unneeded semicolon.
Sascha Wildner [Mon, 7 Jan 2013 16:47:39 +0000 (17:47 +0100)]
kernel/nfs: Add a 'break' for readability and remove unneeded semicolon.

11 years agokernel/netproto: Remove some unused variables.
Sascha Wildner [Mon, 7 Jan 2013 16:36:54 +0000 (17:36 +0100)]
kernel/netproto: Remove some unused variables.

11 years agokernel/802_11: Remove unused variables.
Sascha Wildner [Mon, 7 Jan 2013 10:32:26 +0000 (11:32 +0100)]
kernel/802_11: Remove unused variables.

11 years agokernel/tcp_{input,output}: Remove some unused variables.
Sascha Wildner [Mon, 7 Jan 2013 09:43:31 +0000 (10:43 +0100)]
kernel/tcp_{input,output}: Remove some unused variables.

11 years agokernel/linprocs: Remove some unused variables.
Sascha Wildner [Mon, 7 Jan 2013 09:41:48 +0000 (10:41 +0100)]
kernel/linprocs: Remove some unused variables.

11 years agokernel/aac: sge64 is only used on x86_64.
Sascha Wildner [Mon, 7 Jan 2013 09:41:12 +0000 (10:41 +0100)]
kernel/aac: sge64 is only used on x86_64.

11 years agokernel: Replace the remaining __amd64__ with __x86_64__ for consistency.
Sascha Wildner [Mon, 7 Jan 2013 09:35:29 +0000 (10:35 +0100)]
kernel: Replace the remaining __amd64__ with __x86_64__ for consistency.

11 years agokernel/hammer: Remove unused variables and add __debugvar.
Sascha Wildner [Mon, 7 Jan 2013 08:48:18 +0000 (09:48 +0100)]
kernel/hammer: Remove unused variables and add __debugvar.

11 years agoAdd manual pages for virtio (taken from FreeBSD with modifications).
Sascha Wildner [Sun, 6 Jan 2013 22:10:04 +0000 (23:10 +0100)]
Add manual pages for virtio (taken from FreeBSD with modifications).

11 years agokernel/virtio: Make it compilable into the kernel.
Sascha Wildner [Sun, 6 Jan 2013 22:10:02 +0000 (23:10 +0100)]
kernel/virtio: Make it compilable into the kernel.

Submitted-by: vsrinivas
11 years agoBuild fixes.
Venkatesh Srinivas [Sat, 5 Jan 2013 17:40:37 +0000 (12:40 -0500)]
Build fixes.

11 years agokernel -- Tie virtio, virtio-blk into build.
Venkatesh Srinivas [Sat, 5 Jan 2013 16:41:38 +0000 (11:41 -0500)]
kernel -- Tie virtio, virtio-blk into build.

11 years agokernel/virtio: Some cleanup (Makefiles and gcc47 warnings).
Sascha Wildner [Wed, 2 Jan 2013 16:39:08 +0000 (17:39 +0100)]
kernel/virtio: Some cleanup (Makefiles and gcc47 warnings).

11 years agoRename vtblk_intr_task to vtblk_complete.
Venkatesh Srinivas [Tue, 25 Dec 2012 22:08:42 +0000 (17:08 -0500)]
Rename vtblk_intr_task to vtblk_complete.

11 years agokernel -- Import virtio & virtio-block drivers.
Venkatesh Srinivas [Mon, 24 Dec 2012 18:41:27 +0000 (13:41 -0500)]
kernel -- Import virtio & virtio-block drivers.

virtio-blk provides a paravirtualized storage controller, with one
disk per virtio device.

This driver is based on Tim Bisson's port of FreeBSD's virtio and
virtio-blk devices. Differences from Tim's port:

* Import all FreeBSD updates from 4/16 on.
* Remove indirect descriptor support from virtio device.
* Mark devices as D_MPSAFE; removes mplock around disk routines, they
  are all correctly self-synchronized.
* Implement devstat support.
* Move I/O completion routine to threaded taskqueue.
* Do not hold target spinlock around virtqueue notify.
* Move objcache caches to kmalloc.

11 years agoif: Move if_start_nmsg into ifaltq; prepare multiple TX queue support
Sepherosa Ziehau [Sun, 6 Jan 2013 12:01:27 +0000 (20:01 +0800)]
if: Move if_start_nmsg into ifaltq; prepare multiple TX queue support

While im here, also rename some functions to be consistent in naming
convention.

11 years agopktgen: Allow pktgenctl to specify # of packets to be queued onto TX queue
Sepherosa Ziehau [Sun, 6 Jan 2013 09:21:34 +0000 (17:21 +0800)]
pktgen: Allow pktgenctl to specify # of packets to be queued onto TX queue

11 years agoif: Move if_cpuid into ifaltq; prepare multiple TX queues support
Sepherosa Ziehau [Sat, 5 Jan 2013 13:55:26 +0000 (21:55 +0800)]
if: Move if_cpuid into ifaltq; prepare multiple TX queues support

if_cpuid and if_npoll_cpuid are merged and moved into ifaltq as
altq_cpuid, which indicates the owner CPU of the tx queue.  Since
we already have code in if_start_dispatch() to catching tx queue
owner CPU changes, this merging is quite safe.

11 years agokernel/netinet6: Remove some unused variables.
Sascha Wildner [Sat, 5 Jan 2013 12:27:50 +0000 (13:27 +0100)]
kernel/netinet6: Remove some unused variables.

11 years agokernel: Remove some unused variables in kern/, opencrypto/ and platform/.
Sascha Wildner [Sat, 5 Jan 2013 12:08:39 +0000 (13:08 +0100)]
kernel: Remove some unused variables in kern/, opencrypto/ and platform/.

11 years agokernel/disk: Remove some unused variables and add __debugvar.
Sascha Wildner [Sat, 5 Jan 2013 11:44:01 +0000 (12:44 +0100)]
kernel/disk: Remove some unused variables and add __debugvar.

11 years agokernel/dm: Remove some unused variables.
Sascha Wildner [Sat, 5 Jan 2013 11:21:47 +0000 (12:21 +0100)]
kernel/dm: Remove some unused variables.

Also start using a previously unused variable in dm_target_crypt.

11 years agoigb: Save TX interrupt CPUID into tx_ring struct
Sepherosa Ziehau [Sat, 5 Jan 2013 09:41:50 +0000 (17:41 +0800)]
igb: Save TX interrupt CPUID into tx_ring struct

This will be used to unify the ifnet.if_cpuid and ifnet.if_npoll_cpuid

11 years agojme: Always save TX interrupt CPUID
Sepherosa Ziehau [Sat, 5 Jan 2013 09:26:29 +0000 (17:26 +0800)]
jme: Always save TX interrupt CPUID

This will be used to unify the ifnet.if_cpuid and ifnet.if_npoll_cpuid

11 years agokernel/posix scheduling: Style, indentation, etc.
Sascha Wildner [Sat, 5 Jan 2013 03:32:05 +0000 (04:32 +0100)]
kernel/posix scheduling: Style, indentation, etc.

11 years agokernel: COMPAT_DF12 is valid for vkernel (32 bit) too.
Sascha Wildner [Sat, 5 Jan 2013 02:26:36 +0000 (03:26 +0100)]
kernel: COMPAT_DF12 is valid for vkernel (32 bit) too.

11 years agolibc - Add poor man's cache coloring optimization to nmalloc module.
Matthew Dillon [Fri, 4 Jan 2013 22:24:12 +0000 (14:24 -0800)]
libc - Add poor man's cache coloring optimization to nmalloc module.

* A series of large allocations in excess of 32KB will be offset by 4K from
  each other.  This fixes performance issues on SandyBridge and later cpus
  related to large matrix operations.

  This eats an extra 4K of VM for such allocations but does not eat any
  additional real memory.

* Greatly improves large FP matrix benchmarks.  Real-world effects are more
  questionable.

* The Sandybridge and later cpus use a virtually indexed, physically tagged
  L1 cache, and tend to be sensitive to substantially different memory
  addresses winding up on the same cache line.  Matrix operations (primarily
  benchmarks) can cause these sorts of effects.

Reported-by: alexh
11 years agolibc - Revert to nmalloc for now
Matthew Dillon [Fri, 4 Jan 2013 22:22:53 +0000 (14:22 -0800)]
libc - Revert to nmalloc for now

* Disable dmalloc on 64-bit systems, use nmalloc for everything for now.
  dmalloc appears to have some severe fragmentation and/or leak issues
  in long running programs (aka xulrunner) which are worse than nmalloc.

11 years agokernel: Remove some unused variables in gpio/spic/cardbus/ndis.
Sascha Wildner [Fri, 4 Jan 2013 02:23:10 +0000 (03:23 +0100)]
kernel: Remove some unused variables in gpio/spic/cardbus/ndis.

11 years agokernel: Remove some unused variables in netgraph/netgraph7.
Sascha Wildner [Fri, 4 Jan 2013 01:51:31 +0000 (02:51 +0100)]
kernel: Remove some unused variables in netgraph/netgraph7.

11 years agoStop removing bsd.port.*.mk via 'make upgrade'.
Sascha Wildner [Thu, 3 Jan 2013 23:24:20 +0000 (00:24 +0100)]
Stop removing bsd.port.*.mk via 'make upgrade'.

11 years agokernel: Remove some unused variables in bktr(4) and cxm(4).
Sascha Wildner [Thu, 3 Jan 2013 21:44:56 +0000 (22:44 +0100)]
kernel: Remove some unused variables in bktr(4) and cxm(4).

11 years agokernel: Remove unused variables in ACPI code (and add a __debugvar).
Sascha Wildner [Thu, 3 Jan 2013 21:23:37 +0000 (22:23 +0100)]
kernel: Remove unused variables in ACPI code (and add a __debugvar).

11 years agokernel: Move sys/dev/acpica5 to sys/dev/acpica.
Sascha Wildner [Thu, 3 Jan 2013 20:27:34 +0000 (21:27 +0100)]
kernel: Move sys/dev/acpica5 to sys/dev/acpica.

The 5 used to indicate that it was imported from FreeBSD 5 but that
doesn't matter anymore.

In-discussion-with: sephe

11 years agokernel: Remove some unused variables in network drivers.
Sascha Wildner [Thu, 3 Jan 2013 19:38:45 +0000 (20:38 +0100)]
kernel: Remove some unused variables in network drivers.

11 years agokprintf(9): Implement optional 'precision' for numbers.
Sascha Wildner [Thu, 3 Jan 2013 18:14:38 +0000 (19:14 +0100)]
kprintf(9): Implement optional 'precision' for numbers.

Previously, it was parsed but ignored. Some third-party modules
(e.g., APCICA) prefer this format over zero padding flag '0'.

Before this commit:

ACPI Warning: 32/64X FACS address mismatch in FADT - 0x3F611E40/0x       03F611D40, using 32 (20110527/tbfadt-589)

After this commit:

ACPI Warning: 32/64X FACS address mismatch in FADT - 0x3F611E40/0x000000003F611D40, using 32 (20110527/tbfadt-589)

Taken-from: FreeBSD (r209836 and r209949)

11 years agokernel: The NPX_DEBUG kernel option is pc32 specific, too.
Sascha Wildner [Thu, 3 Jan 2013 16:56:33 +0000 (17:56 +0100)]
kernel: The NPX_DEBUG kernel option is pc32 specific, too.

11 years agokernel: The COMPAT_DF12 kernel option is pc32 specific.
Sascha Wildner [Thu, 3 Jan 2013 16:46:42 +0000 (17:46 +0100)]
kernel: The COMPAT_DF12 kernel option is pc32 specific.

11 years agoif: if_start_need_schedule -> ifq_ifstart_need_schedule
Sepherosa Ziehau [Thu, 3 Jan 2013 12:14:19 +0000 (20:14 +0800)]
if: if_start_need_schedule -> ifq_ifstart_need_schedule

Consistent function naming as other related functions

11 years agoif: Add if_devstart_sched to schedule ifnet.if_start call
Sepherosa Ziehau [Thu, 3 Jan 2013 12:03:50 +0000 (20:03 +0800)]
if: Add if_devstart_sched to schedule ifnet.if_start call

Mainly to hide ifnet.if_start_nmsg from drivers, avoid code duplication
and ease upcoming multiple tx queues work.

11 years agoif: if_start_schedule -> ifq_ifstart_schedule
Sepherosa Ziehau [Thu, 3 Jan 2013 11:57:38 +0000 (19:57 +0800)]
if: if_start_schedule -> ifq_ifstart_schedule

The argument is changed to ifaltq; this eases further changes to
add multiple tx queues support.

11 years agoifq: Add ifq_get_stage to loacte proper altq_stage data
Sepherosa Ziehau [Thu, 3 Jan 2013 10:04:57 +0000 (18:04 +0800)]
ifq: Add ifq_get_stage to loacte proper altq_stage data

11 years agoifq: Add ifq_{is,set,clr}_started to access/modify altq_started
Sepherosa Ziehau [Thu, 3 Jan 2013 09:21:34 +0000 (17:21 +0800)]
ifq: Add ifq_{is,set,clr}_started to access/modify altq_started

11 years agoifq: Update comment in net/ifq_var.h
Sepherosa Ziehau [Thu, 3 Jan 2013 08:40:57 +0000 (16:40 +0800)]
ifq: Update comment in net/ifq_var.h

11 years agoif: Update IF_ macros comment
Sepherosa Ziehau [Thu, 3 Jan 2013 08:15:29 +0000 (16:15 +0800)]
if: Update IF_ macros comment

11 years agonet: Don't use IF_{EN,DE}QUEUE on ifnet.if_snd
Sepherosa Ziehau [Thu, 3 Jan 2013 07:23:06 +0000 (15:23 +0800)]
net: Don't use IF_{EN,DE}QUEUE on ifnet.if_snd

11 years agowi: Don't use IF_ macros on ifnet.if_snd
Sepherosa Ziehau [Thu, 3 Jan 2013 04:30:05 +0000 (12:30 +0800)]
wi: Don't use IF_ macros on ifnet.if_snd

11 years agode: Don't use IF_ macros on ifnet.if_snd
Sepherosa Ziehau [Thu, 3 Jan 2013 04:29:07 +0000 (12:29 +0800)]
de: Don't use IF_ macros on ifnet.if_snd

11 years agoral: Don't use IF_ macros on ifnet.if_snd
Sepherosa Ziehau [Thu, 3 Jan 2013 03:52:31 +0000 (11:52 +0800)]
ral: Don't use IF_ macros on ifnet.if_snd

11 years agoiwi: Dont' use IF_ macros on ifnet.if_snd
Sepherosa Ziehau [Thu, 3 Jan 2013 03:50:49 +0000 (11:50 +0800)]
iwi: Dont' use IF_ macros on ifnet.if_snd

11 years agonet: Don't use IF_DROP on ifnet.if_snd
Sepherosa Ziehau [Thu, 3 Jan 2013 03:37:14 +0000 (11:37 +0800)]
net: Don't use IF_DROP on ifnet.if_snd

11 years agoef: Don't use IF_ queue macros on ifnet.if_snd
Sepherosa Ziehau [Thu, 3 Jan 2013 03:29:34 +0000 (11:29 +0800)]
ef: Don't use IF_ queue macros on ifnet.if_snd

11 years agotun: Don't use IF_DROP on ifnet.if_snd
Sepherosa Ziehau [Thu, 3 Jan 2013 03:26:04 +0000 (11:26 +0800)]
tun: Don't use IF_DROP on ifnet.if_snd

11 years agonpx: Always embed saveymm in savefpu and remove dependency on opt_cpu.h
Sepherosa Ziehau [Thu, 3 Jan 2013 03:21:22 +0000 (11:21 +0800)]
npx: Always embed saveymm in savefpu and remove dependency on opt_cpu.h

- pcb and mdglobaldata size will not change depending on CPU_DISABLE_AVX
- Modules' makefiles need not to be modified (well, almost all modules)

11 years agox86_64/options: Indentation
Sepherosa Ziehau [Thu, 3 Jan 2013 03:21:04 +0000 (11:21 +0800)]
x86_64/options: Indentation

11 years agoif: Remove deprecated if_handoff and related macros
Sepherosa Ziehau [Thu, 3 Jan 2013 02:52:15 +0000 (10:52 +0800)]
if: Remove deprecated if_handoff and related macros

11 years agoppp: Don't use IF_HANDOFF, use IF_ENQUEUE instead.
Sepherosa Ziehau [Thu, 3 Jan 2013 02:51:40 +0000 (10:51 +0800)]
ppp: Don't use IF_HANDOFF, use IF_ENQUEUE instead.

This nukes the last reference of the IF_HANDOFF

11 years agonetgraph7/fec: Don't use IF_ macros on ifnet.if_snd
Sepherosa Ziehau [Thu, 3 Jan 2013 01:46:50 +0000 (09:46 +0800)]
netgraph7/fec: Don't use IF_ macros on ifnet.if_snd

11 years agoif: Remove IFF_POLLING from kernel space.
Sepherosa Ziehau [Thu, 3 Jan 2013 01:29:44 +0000 (09:29 +0800)]
if: Remove IFF_POLLING from kernel space.

User space macro is kept for compatibility.  Adjust comment a little bit.

11 years agox86_64 - support for AVX instructions
Alex Hornung [Sat, 29 Dec 2012 23:52:54 +0000 (23:52 +0000)]
x86_64 - support for AVX instructions

 * CPU will be checked for XSAVE and AVX support on boot. If both are
   found, they will be enabled.

 * If enabled, the kernel will use the XSAVE and XRSTOR instructions to
   save and restore FPU, SSE and AVX registers.

Originally-Submitted-by: Adam Sakareassen (with modifications)
11 years agoif: Move IFF_OACTIVE bit into ifaltq; prepare multiple TX queues support
Sepherosa Ziehau [Fri, 28 Dec 2012 09:31:10 +0000 (17:31 +0800)]
if: Move IFF_OACTIVE bit into ifaltq; prepare multiple TX queues support

ifaltq.altq_hw_oactive is now used to record that NIC's TX queue is full.
IFF_OACTIVE is removed from kernel.  User space IFF_OACTIVE is kept for
compability.

ifaltq.altq_hw_oactive should not be accessed directly.  Following set of
functions are provided and should be used:
ifq_is_oactive(ifnet.if_snd)  - Whether NIC's TX queue is full or not
ifq_set_oactive(ifnet.if_snd) - NIC's TX queue is full
ifq_clr_oactive(ifnet.if_snd) - NIC's TX queue is no longer full

11 years agoRemove some emacs variable settings.
Sascha Wildner [Wed, 2 Jan 2013 11:32:52 +0000 (12:32 +0100)]
Remove some emacs variable settings.