summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_ppp.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove some more alignment constraints.mav2010-03-311-4/+5
|
* Make ng_ppp fulfill upper protocol stack layers alignment requirementsmav2010-03-311-0/+14
| | | | | | | on platforms with strict alignment constraints. This fixes kernel panics on arm and probably other architectures. PR: sparc64/80410
* Remove strict limitation on minimal multilink MRRU. RFC claims that MRRUmav2009-01-181-5/+6
| | | | | | | of 1500 must be supported, but allows smaller values to be negotiated. Enforce specified MRRU for outgoing frames. MFC after: 2 weeks
* Retire the MALLOC and FREE macros. They are an abomination unto style(9).des2008-10-231-2/+2
| | | | MFC after: 3 months
* Do not use bcmp() to compare two bytes with constants.mav2008-02-061-1/+2
|
* Improve multilink receive performance by netgraph item reuse.mav2008-01-261-5/+17
|
* Improve multilink xmit performance by netgraph item reuse.mav2008-01-261-3/+13
|
* Improve multilink receive performance with fragment headers preallocation.mav2008-01-261-22/+23
|
* Fix bundle xmit octets stats for packet-split operation mode.mav2008-01-231-4/+4
|
* Fix typo which brokes VJ decompressionmav2007-09-151-1/+1
| | | | | | when VJC negotiated in only one direction. Approved by: re (bmah), glebius (mentor)
* Add 64bit statistic counters to the ng_ppp node.mav2007-08-011-6/+55
| | | | | | | 64bit counters are needed to simplify traffic accounting and reduce system load at the big PPP concentrators. Approved by: re (rwatson), glebius (mentor)
* This patch improves fine-grained locking for the ng_ppp node.mav2007-08-011-68/+137
| | | | | | | | | Till now node's transmit path was completely unprotected and so wasn't thread safe in multilink mode. It's receive path was declared as WRITER as the simpliest protection method but it reduces performance when compression or encryption enabled. Approved by: re (rwatson), glebius (mentor)
* No need to update link queue stats when round-robin algorithm enabled.mav2007-06-041-9/+10
| | | | Approved by: glebius (mentor)
* Added m_tag_copy_chain() call to copy original outgoing packet tags to all ofmav2007-04-201-0/+1
| | | | | | | it's fragments. Reviewed by: archie Approved by: glebius (mentor)
* Optimized packet distribution plan for the equal links case. Do notmav2007-04-201-13/+20
| | | | | | | | split packet on fragments smaller then MP_MIN_FRAG_LEN to reduce total overhead. Reviewed by: archie Approved by: glebius (mentor)
* - Changed sequence numbers processing to avoid incorrect timeout waitingmav2007-04-201-66/+65
| | | | | | | | | | | | when one of links is inactive and have stale sequence number. To avoid this sequence numbers of all links are getting updated on every successful packet reassembling. - ng_ppp_bump_mseq function created to simplify code. - ng_ppp_frag_drop function separated from ng_ppp_frag_process to simplify code. Reviewed by: archie Approved by: glebius (mentor)
* - Fixed mistakes in latency and xmitBytes calculation mathmav2007-04-201-6/+22
| | | | | | | | | | | | which lead to ineffective multilink packet distribution plans. - Changed bytesInQueue calculation math to have more precise information about links utilization. - Taken rough account of the link overhead. Better way to do it could be to get exact overhead from user-level, but I have not done it to keep binary compatibility. Reviewed by: archie Approved by: glebius (mentor)
* - Create ng_ppp_bypass() function, that prepares a packetglebius2007-01-251-30/+66
| | | | | | | | | | | | | | with bypass header, to send it out to userland. - Use ng_ppp_bypass() in ng_ppp_proto_recv(). - Use ng_ppp_bypass() in ng_ppp_comp_recv() and in ng_ppp_crypt_recv() if compression or encryption is disabled, respectively. - Any LCP packet goes directly to ng_ppp_bypass(), instead of passing through PPP stack. - Any non-LCP packet on disabled link is discarded. This is behavior defined in RFC. Submitted by: Alexander Motin <mav alkar.net>
* A less draconian fix to the build.mjacob2007-01-181-3/+1
|
* Temporarily comment out the KASSERT that broke the kernel build.obrien2007-01-181-0/+2
|
* Revise the ng_ppp(4) node, so that code flow is more clear. All non-linkglebius2007-01-181-514/+805
| | | | | | | | hooks get their per hook rcvdata methods, and all functions are organized corresponding to protocol stack model. Submitted by: Alexander Motin <mav alkar.net> Reviewed by: archie, julian
* Before this commit, if the compression is enabled the, ng_ppp(4)glebius2006-12-281-48/+113
| | | | | | | | | | | | | | | | | | | | | | | | | node would send every outgoing frame to the "compress" hook. Packets received on the "compress" hook were expected to be compressed and PROT_COMPD tag was put on them unconditionally. After this commit an alternative compression mode can be set. In this mode the node doesn't put the PROT_COMPD, the compressor should put it itself. This is important for such kind of compressors, that can submit uncompressed frames. Before this commit, if the decompression is enabled, the ng_ppp(4) node would send and incoming frame to the "decompress" hook only if it has the PROT_COMPD proto tag on it. After this commit an alternative decompression mode can be set. In this mode the node sends all the incoming packets to the decompression hook. This is important for such kind of compressors that need uncompressed packets too, to keep their library in sync. These new features will be used in new version of mpd4, and in new compressor nodes. Submitted by: Alexander Motin <mav alkar.net>
* Refactor places where ng_package_data() failed.glebius2005-05-161-13/+13
| | | | Suggested & reviewed by: archie
* - Catch up with new interface to ng_package_data().glebius2005-05-161-5/+8
| | | | - Handle errors from ng_package_data().
* Utilize callout_pending() macroglebius2005-01-111-2/+2
|
* /* -> /*- for license, minor formatting changesimp2005-01-071-2/+3
|
* - Use ng_callout() instead of timeout(9).glebius2004-12-061-37/+14
| | | | | | | | | | - Do not put/remove node references, since this no longer needed. - Remove timerActive flag, use callout flags. - Schedule next callout after doing current one. Reviewed by: archie Approved by: julian (mentor)
* Disable protocol field compression on the inner PPP frame when also doingarchie2004-11-271-1/+1
| | | | | | | normal PPP compression, as a workaround for certain (arguably) broken Linux PPP implementations that can't handle this particular case. MFC after: 1 week
* Do not change link[n].conf.latency for internal usage but havebz2004-08-031-3/+5
| | | | | | | | | link[n].latency calculated from user supplied value. This prevents repeated NGM_PPP_SET_CONFIG/NGM_PPP_GET_CONFIG from failing because of link[n].conf.latency being out of range. Reviewed by: archie Approved by: pjd (mentor)
* Use qsort_r() instead of qsort() when sorting links by latencyglebius2004-07-161-20/+5
| | | | | | | This helps us to remove a global variable and a mutex protecting it. Reviewed by: rwatson Approved by: julian (mentor)
* Add ng_ppp_latencies_mtx, a global mutex to protect the latency list.rwatson2004-07-141-0/+11
| | | | | | Note that the table is a hack, and so is this mutex. Reviewed by: glebius
* Having moved metadata usage to mbuf tags, remove code that supportsjulian2004-06-261-51/+20
| | | | | | the old way of doing it. Submitted by: Gleb Smirnoff <glebius@cell.sick.ru>
* Switch to using C99 sparse initialisers for the type methods array.julian2004-05-291-12/+9
| | | | | | | | Should make no binary difference. Submitted by: Gleb Smirnoff <glebius@cell.sick.ru> Reviewed by: Harti Brandt <harti@freebsd.org> MFC after: 1 week
* Deprecate machine/limits.h in favor of new sys/limits.h.kan2003-04-291-2/+1
| | | | | | | Change all in-tree consumers to include <sys/limits.h> Discussed on: standards@ Partially submitted by: Craig Rodrigues <rodrigc@attbi.com>
* Fix a use-after-free bug that could cause multi-link fragment reassembly toarchie2003-03-051-2/+4
| | | | | | | fail for a long time (until the incoming sequence numbers wrapped around). Reported by: Matthew Impett <mimpett@Glue.umd.edu> MFC after: 3 days
* Back out M_* changes, per decision of the TRB.imp2003-02-191-2/+2
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-2/+2
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* o Untangle the confusion with the malloc flags {M_WAITOK, M_NOWAIT} andbmilekic2002-12-191-2/+2
| | | | | | | | | | the mbuf allocator flags {M_TRYWAIT, M_DONTWAIT}. o Fix a bpf_compat issue where malloc() was defined to just call bpf_alloc() and pass the 'canwait' flag(s) along. It's been changed to call bpf_alloc() but pass the corresponding M_TRYWAIT or M_DONTWAIT flag (and only one of those two). Submitted by: Hiten Pandya <hiten@unixdaemons.com> (hiten->commit_count++)
* Use intptr_t to fix various sizeof(int) != sizeof(void *) warnings.jhb2002-11-081-3/+3
|
* if you have taken the mbuf out of the message object, then if you passjulian2002-06-091-1/+3
| | | | the object to someone else, you need to put the mbuf back into it first..
* Fix GCC warnings caused by initializing a zero length array. In the process,archie2002-05-311-13/+13
| | | | | | | simply things a bit by getting rid of 'struct ng_parse_struct_info' which was useless because it only contained one field. MFC after: 2 weeks
* Fix bugs where the ng_ppp node could transmit PPP frames whose lengtharchie2002-03-151-4/+18
| | | | | | exceeded the peer's configured MRU or MRRU. MFC after: 1 week
* Fix another bug in handling of multi-link sequence numbers.archie2002-02-131-3/+4
| | | | MFC after: 1 week
* Update to C99, s/__FUNCTION__/__func__/,obrien2001-12-101-11/+11
| | | | also don't use ANSI string concatenation.
* Fix some memory leaksjulian2001-01-101-9/+15
| | | | Add memory leak detection assitance.
* Part 2 of the netgraph rewrite.julian2001-01-081-51/+51
| | | | | | This is mostly cosmetic changes, (though I caught a bug or two while makeing them) Reviewed by: archie@freebsd.org
* Rewrite of netgraph to start getting ready for SMP.julian2001-01-061-95/+139
| | | | | | | | This version is functional and is aproaching solid.. notice I said APROACHING. There are many node types I cannot test I have tested: echo hole ppp socket vjc iface tee bpf async tty The rest compile and "Look" right. More changes to follow. DEBUGGING is enabled in this code to help if people have problems.
* Divorce the kernel binary ABI version number from the messagejulian2000-12-181-1/+1
| | | | | | | | | format version number. (userland programs should not need to be recompiled when the netgraph kernel internal ABI is changed. Also fix modules that don;t handle the fact that a caller may not supply a return message pointer. (benign at the moment because the calling code checks, but that will change)
* Use "node->ID" for the node's ID, instead of "(long)node".archie2000-12-181-5/+1
| | | | Reported by: julian
* Reviewed by: Archie@freebsd.orgjulian2000-12-121-7/+9
| | | | | | | | | | | | | This clears out my outstanding netgraph changes. There is a netgraph change of design in the offing and this is to some extent a superset of soem of the new functionality and some of the old functionality that may be removed. This code works as before, but allows some new features that I want to work with and evaluate. It is the basis for a version of netgraph with integral locking for SMP use. This is running on my test machine with no new problems :-)
OpenPOWER on IntegriCloud