summaryrefslogtreecommitdiffstats
path: root/sys/contrib/altq
Commit message (Collapse)AuthorAgeFilesLines
* Do not use the TSC where its known to be broken, this will cause the queuethompsa2006-03-021-1/+2
| | | | | | | | | speeds to perform below the desired bitrate and throughput will be erratic. This makes queueing work on the Geode SC1100, K5 model 0 and IDT WinChip C6 processors. MFC after: 3 days
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-08-091-1/+1
| | | | | | | | | | | | | | IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchronizing access to these flags, as they are in if_drv_flags. This helps prevent races between the network stack and device driver in maintaining the interface flags field. Many __FreeBSD__ and __FreeBSD_version checks maintained and continued; some less so. Reviewed by: pjd, bz MFC after: 7 days
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | struct ifnet or the layer 2 common structure it was embedded in have been replaced with a struct ifnet pointer to be filled by a call to the new function, if_alloc(). The layer 2 common structure is also allocated via if_alloc() based on the interface type. It is hung off the new struct ifnet member, if_l2com. This change removes the size of these structures from the kernel ABI and will allow us to better manage them as interfaces come and go. Other changes of note: - Struct arpcom is no longer referenced in normal interface code. Instead the Ethernet address is accessed via the IFP2ENADDR() macro. To enforce this ac_enaddr has been renamed to _ac_enaddr. - The second argument to ether_ifattach is now always the mac address from driver private storage rather than sometimes being ac_enaddr. Reviewed by: sobomax, sam
* Do not fail to initialize callouts (on SMP only) -- it leads to crashing.green2005-02-221-3/+4
|
* Don't use the static CALLOUT_INITIALIZER for __FreeBSD_version >= 600000. Itmlaier2005-02-212-1/+9
| | | | | | | | | | | was a bad idea, but since it is done like this in the vendor source we keep it around for older versions. As a safe guard against future misuse we don't even define CALLOUT_INITIALIZER anymore. This fixes ALTQ after callout_init_mtx() and takes altq_var.h off the vendor branch. Submitted by: Divacky Roman <xdivac02NOstud.fit.vutbrSPAMcz> (w/ changes)
* Disable "bulk dequeue" when enabling ALTQ so it does not irritate themlaier2004-06-151-0/+1
| | | | timing.
* Transform tbr_dequeue into a function pointer in order to build drivers withmlaier2004-06-152-3/+7
| | | | | | ALTQ enabled versions of IFQ_* macros by default, as requested by serveral others. This is a follow-up to the quick fix I committed yesterday which turned off the ALTQ checks for non-ALTQ kernels.
* #if out an old leftover in the KAME code. opt_cpu.h is no longer useful heremlaier2004-06-131-0/+2
| | | | | | and breaks build on some arch. Found-by: tinderbox
* Add an additional queue which will be "owned by the driver". This allows tomlaier2004-06-121-0/+7
| | | | | | | | | | | | | | | | | | | | rig a PREPEND macro for ALTQ as the POLL/DEQUEUE semantic is very bad in terms of locking. We make this a full functional queue to allow "bulk dequeue" which will further reduce the locking overhead (for non-altq enabled devices). Drivers will access this via the following macros, which will show up in <net/if_var.h> once we expose ALTQ to the build: IFQ_DRV_DEQUEUE(ifq, m) - takes a mbuf off the queue (driver queue first) IFQ_DRV_PREPEND(ifq, m) - pushes a mbuf back to the driver queue IFQ_DRV_PURGE(ifq) - drops all packets in both queues IFQ_DRV_IS_EMPTY(ifq) - checks for pending mbufs in either queue One has to make sure that the first three are protected by a driver mutex. At the moment most network drivers still require Giant, so this is not an issue. Even those that have thier own mutex usually hold it in if_start and the like, so this requirement is almost always satisfied. This evolved from a discussion with Andrew Gallatin.
* FreeBSD-ify ALTQ:mlaier2004-06-129-21/+164
| | | | | | | | | | | | | | | | | | - add locking - disable ALTQ3_COMPAT by default (do not remove the code to keep the diff towards KAME small) - put some more code under ALTQ3 conditional compilation as it should be - account for if_xname - some more minor compile fixes As people started wondering: The strange path layout "altq/altq" is there to avoid "-Isys/contrib" and make it "-Isys/contrib/altq" instead, as we will need at least <altq/altq.h> and <altq/if_altq.h> for kernel compilation. The "freebsd4_..." in the privious commit is just the best tag name in the KAME tree I could find to classify this in order to track its history. It does *not* mean that this will go to 4-STABLE or anything of that kind.
* Import parts of the ALTQ framework from latest KAME snapshot (which is up tomlaier2004-06-1221-0/+14567
HEAD at this point). This will not exactly live in a vendor branch, but have the vendor backing to make it easier to exchange diffs. This will be followed by a diff which takes most of the .c files off the vendor branch in order to: - add locking - disable ALTQ3_COMPAT code (which is outdated and "un-lockable") There is work in progress to refine the configuration API. Import this "as is" now to have more exposure time before 5-STABLE. This is only the import, it will be some more days until you will actually be able to compile ALTQ support into your kernel so don't hold your breath. HEADUPs will be posted on current@ and net@ before this is actually enabled. No-objection: re(scottl), core(rwatson)
OpenPOWER on IntegriCloud