summaryrefslogtreecommitdiffstats
path: root/sys/net/if_ppp.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* M_LEADINGSPACE() and M_TRAILINGSPACE() are just wrappers forclaudio2018-11-091-4/+3
| | | | | | m_leadingspace() and m_trailingspace(). Convert all callers to call directly the functions and remove the defines. OK krw@, mpi@
* Remove almost unused `flags' argument of suser().mpi2018-02-191-7/+7
| | | | | | | The account flag `ASU' will no longer be set but that makes suser() mpsafe since it no longer mess with a per-process field. No objection from millert@, ok tedu@, bluhm@
* Creating a cloned interface could return ENOMEM due to temporarybluhm2018-01-091-5/+2
| | | | | | memory shortage. As it is invoked from a system call, it should not fail and wait instead. OK visa@ mpi@
* Remove NET_LOCK()'s argument.mpi2017-08-111-14/+11
| | | | Tested by Hrvoje Popovski, ok bluhm@
* Introduce ipv{4,6}_input(), two wrappers around IP queues.mpi2017-05-301-5/+3
| | | | | | | This will help transitionning to an un-KERNEL_LOCK()ed IP forwarding path. Disucssed with bluhm@, ok claudio@
* Protect the global list of softc with the NET_LOCK().mpi2017-05-271-6/+9
| | | | ok sashan@
* Replace remaining splsoftassert(IPL_SOFTNET) by NET_ASSERT_LOCKED().mpi2017-05-161-2/+2
| | | | ok visa@
* No need to clear IFF_UP after calling if_down().mpi2017-03-081-2/+2
|
* Remove non longer needed splsoftnet()/splx() dances.mpi2017-03-031-22/+6
|
* Grab the NET_LOCK() in pppdealloc(), prevent an assert reported by stsp@.mpi2017-01-011-3/+4
| | | | ok visa@, bluhm@
* Kill outdated comment talking about sofnet.mpi2016-11-161-6/+2
|
* Remove redundant comments that say a function must be called atbluhm2016-10-061-4/+3
| | | | | splsoftnet() if the function does a splsoftassert(IPL_SOFTNET) anyway.
* No modules thus no need for extra space for additional ppp compressions.jca2016-06-221-3/+2
| | | | ok deraadt@ mikeb@
* remove the function pointer from mbufs. this memory is shared with datatedu2016-05-231-2/+2
| | | | | | | via unions, and we don't want to make it easy to control the target. instead an integer index into an array of acceptable functions is used. drivers using custom functions must register them to receive an index. ok deraadt
* We're always ready! So send IFQ_SET_READY() to the bitbucket.mpi2016-04-131-2/+1
|
* correctly indent a line to make the intent clearjsg2015-11-201-2/+2
| | | | ok dlg@
* use time_uptime instead of time_second.dlg2015-11-111-7/+7
| | | | this avoids wall clock jumps skewing the idle times.
* replace sc_npqueue and sc_npqtail with a simple mbuf_list.dlg2015-11-061-22/+11
|
* apply some knf.dlg2015-11-051-1001/+1051
| | | | | ok many no objections from anyone
* use mq_purge to free a queue of mbufs.dlg2015-11-041-3/+2
|
* get rid of the "fastq", which is where this driver puts ip packetsdlg2015-11-021-52/+5
| | | | | | | | | with IPTOS_LOWDELAY set. this complicates efforts to clean up the send queue, and is probably better done by queues in pf than unconditionally in a single driver. ok sthen@
* Introduce if_rtrequest() the successor of ifa_rtrequest().mpi2015-10-251-2/+2
| | | | | | | | | L2 resolution depends on the protocol (encoded in the route entry) and an ``ifp''. Not having to care about an ``ifa'' makes our life easier in our MP effort. Fewer dependencies between data structures implies fewer headaches. Discussed with bluhm@, ok claudio@
* the pattr argument to IFQ_ENQUEUE is unused, so let's get rid of it.dlg2015-10-121-3/+3
| | | | | | also the comment above IFQ_ENQUEUE that says the pattr argument is unused. ok mpi@
* Revert if_oqdrops accounting changes done in kernel, per request from mpi@.uebayasi2015-10-051-9/+5
| | | | | | | | | | | | | (Especially adding IF_DROP() after IFQ_ENQUEUE() was completely wrong because IFQ_ENQUEUE() already does it. Oops.) After this revert, the situation becomes: - if_snd.ifq_drops is incremented in either IFQ_ENQUEUE() or IF_DROP(), but it is not shown to userland, and - if_data.ifi_oqdrops is shown to userland, but it is not incremented by anyone.
* Count IFQ_ENQUEUE() failure as output drop.uebayasi2015-10-051-5/+9
| | | | | | mpi@ prefers checking IFQ_ENQUEUE() error, and this matches that. OK dlg@
* m_freem() can handle NULL, do not check for this condition beforehands.deraadt2015-07-151-5/+4
| | | | ok stsp mpi
* MFREE(9) is dead, long live m_freem(9)!mpi2015-07-081-2/+2
| | | | ok bluhm@, claudio@, dlg@
* Store a unique ID, an interface index, rather than a pointer to thempi2015-06-161-2/+2
| | | | | | | | | | | | | | | receiving interface in the packet header of every mbuf. The interface pointer should now be retrieved when necessary with if_get(). If a NULL pointer is returned by if_get(), the interface has probably been destroy/removed and the mbuf should be freed. Such mechanism will simplify garbage collection of mbufs and limit problems with dangling ifp pointers. Tested by jmatthew@ and krw@, discussed with many. ok mikeb@, bluhm@, dlg@
* there's been a long standing issue in ppp on a tty/serial line where it allocates mbufs at IPL_SOFTTTY, which is above the IPL_NET the mbuf layer protects itself at.dlg2015-06-031-51/+112
| | | | | | | | | | | | | | | recent improvements to diagnostics in pools and mbufs now panic instead of letting these things silently corrupt. this reworks the ppp handling in the tty layer so it has its own private pool to allocate packet memory out of. these packets get built and then queued for softnet to process. softnet dequeues the packet and attaches it to mbufs as external storage before handing it on to the rest of the stack. this was reported on bugs@ and tested by both Walter Daugherity and Martin van den Nieuwelaar ok deraadt@ mpi@
* test mbuf pointers against NULL not 0jsg2015-05-131-2/+2
| | | | ok krw@ miod@
* replace the use of ifqueues for most input queues serviced by netisrdlg2015-04-101-25/+20
| | | | | | | | | | | | | | | | | with niqueues. this change is so big because there's a lot of code that takes pointers to different input queues (eg, ether_input picks between ipv4, ipv6, pppoe, arp, and mpls input queues) and falls through to code to enqueue packets against the pointer. if i changed only one of the input queues id have to add sepearate code paths, one for ifqueues and one for niqueues in each of these places by flipping all these input queues at once i can keep the currently common code common. testing by mpi@ sthen@ and rafael zalamena ok mpi@ sthen@ claudio@ henning@
* remove the congestion handling from struct ifqueue.dlg2015-03-181-3/+2
| | | | | | | | | | | | | | | | | its only used for the ip and ip6 network stack input queues, so it seems unfair that every instance of ifqueue has to carry a pointer around for this specific use case. this moves the congestion marker to a kernel global. if we detect that we're congested, we assume the whole system is busy and punish all input queues. marking a system as congested is done by setting the global to the current value of ticks. as the system moves away from that value, it moves away from being congested until the comparison fails. written at s2k15 ok henning@ beck@ bluhm@ claudio@
* unifdef INET in net code as a precursor to removing the pretend option.tedu2014-12-191-13/+1
| | | | | long live the one true internet. ok henning mikeb
* yet more mallocarray() changes.doug2014-12-131-3/+4
| | | | ok tedu@ deraadt@
* Explicitly include <net/if_var.h> instead of pulling it in <net/if.h>.mpi2014-12-051-1/+2
| | | | ok mikeb@, krw@, bluhm@, tedu@
* Yet more #include de-duplication.krw2014-11-201-4/+1
| | | | ok deraadt@ tedu@
* Fewer <netinet/in_systm.h> !mpi2014-07-221-2/+1
|
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-8/+8
| | | | after discussions with beck deraadt kettenis.
* Use a custom ifa_rtrequest function for point-to-point interfacesmpi2014-05-051-1/+2
| | | | | | | | | | instead of relying on hacks in nd6_rtrequest() to add a route to loopback for each address configured on such interfaces. While here document that abusing lo0 for local traffic is not safe for interfaces in a non-default rdomain. Tested by claudio@, jca@ and sthen@, ok sthen@
* remove altq special casing.henning2014-04-191-11/+3
| | | | | big WTF regarding the fastq use there while verifying w/ claudio, but that's for the ppp maintainer and unrelated
* "struct pkthdr" holds a routing table ID, not a routing domain one.mpi2014-04-141-5/+5
| | | | | | | | | | | | | | Avoid the confusion by using an appropriate name for the variable. Note that since routing domain IDs are a subset of the set of routing table IDs, the following idiom is correct: rtableid = rdomain But to get the routing domain ID corresponding to a given routing table ID, you must call rtable_l2(9). claudio@ likes it, ok mikeb@
* Remove the number of in_var.h inclusions by moving some functions andmpi2013-10-231-2/+1
| | | | | | global variables to in.h. ok mikeb@, deraadt@
* Uniformize drivers doing nothing with their multicast filters to makempi2013-10-191-14/+1
| | | | | | them ignore the SIOC{ADD,DEL}MULTI ioctls. ok reyk@, claudio@
* do not include machine/cpu.h from a .c file; it is the responsibility ofderaadt2013-03-281-2/+1
| | | | | .h files to pull it in, if needed ok tedu
* Remove various read-only *maxlen variables and use IFQ_MAXLEN directly.mpi2013-03-261-5/+5
| | | | ok beck@, mikeb@
* Delete needless check for NULL. From Michael W. Bombardieri.yasuoka2012-11-291-2/+2
| | | | no binary changes on i386.
* do not steal mbuf types (leads to a panic if M_ZEROIZE gets set onmarkus2012-11-261-3/+3
| | | | readonly mbufs) but use M_PROTO1 and M_LINK0 instead; ok mikeb@
* More p_pid to p_p->ps_pid updates. OK deraadt@, guenther@claudio2012-03-281-2/+2
|
* Ansify ppp... function definitions.bluhm2012-01-201-50/+21
| | | | from Michael W. Bombardieri
* use IF_LEN/IFQ_LEN to access and ifqueue's length field. ryan okhenning2011-07-071-2/+2
| | | | | with this nothing in the tree fiddles if ifqueue internals any more, of course except if.c and if.h (and some altq)