| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
|
|
| |
class is a reserved word in C++
Submitted by: Markus Brueffer < markus AT brueffer DOT de >
MFC after: 3 days
|
|
|
|
| |
before the check.
|
|
|
|
|
|
|
| |
- Initialize error to 0 in ng_netflow_flow_add() (a nop change).
- Update cache statistics holding workqueue mutex.
MFC after: 3 days
|
|
|
|
|
|
|
|
|
| |
read sys/kern/kern_synch.c, msleep ():
KASSERT(timo != 0 || mtx_owned(&Giant) || mtx != NULL,
("sleeping without a mutex"));
MFC after: 3 days
|
|
|
|
|
| |
Approved by: julian
MFC after: 3 days
|
|
|
|
|
| |
Approved by: julian
MFC after: 3 days
|
|
|
|
| |
Requested by: ru
|
|
|
|
| |
- remove duplicate include sys/sysctl.h
|
| |
|
|
|
|
|
|
|
|
| |
- Schedule next timeout *after* finishing job of the current one.
- Remove spl(9) calls.
Tested by: ru
Reviewed by: julian
|
|
|
|
|
|
|
|
| |
implementation.
Tested by: Savchuk Taras
Reviewed by: archie
Approved by: julian (mentor)
|
|
|
|
|
|
|
| |
- remove spl(9) calls
Tested by: Ilya Pizik
Approved by: julian (mentor)
|
|
|
|
|
|
|
|
|
|
| |
- 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)
|
|
|
|
| |
Approved by: julian (mentor)
|
|
|
|
|
|
|
|
|
|
| |
- Always check that index number passed from userland
is <= NG_NETFLOW_MAXIFACES. [1]
- Increase NG_NETFLOW_MAXIFACES up to 512. [2]
Noticed by: Roman Palagin [1]
Requested by: Yuri Y. Bushmelev [2]
MFC after: 1 week
|
|
|
|
|
|
|
| |
This is done to keep both versions in RELENG_5 and support both APIs.
Reviewed by: scottl
Approved by: julian (mentor), implicitly
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
call net_add_domain(). Calling this function too early (or late) breaks
assertations about the global domains list.
Actually it should be forbidden to call net_add_domain() outside of
SI_SUB_PROTO_DOMAIN completely as there are many places where we traverse
the domains list unprotected, but for now we allow late calls (mostly to
support netgraph). In order to really fix this we have to lock the domains
list in all places or find another way to ensure that we can safely walk the
list while another thread might be adding a new domain.
Spotted by: se
Reviewed by: julian, glebius
PR: kern/73321 (partly)
|
|
|
|
|
|
|
| |
normal PPP compression, as a workaround for certain (arguably) broken
Linux PPP implementations that can't handle this particular case.
MFC after: 1 week
|
|
|
|
|
|
|
| |
LINK_IS_UP/LINK_IS_DOWN messages.
Approved by: julian (mentor), implicitly
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
| |
It means, that node listens to flow control messages from downstreams
and removes link from list of active links whenever a LINK_IS_DOWN message
is received. If LINK_IS_UP message is received, then links is put
back into list of active links.
Approved by: julian (mentor), implicitly
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
| |
o Implement some netgraph flow control:
- Whenever status of HDLC heartbeat from pear is timed out,
send NGM_LINK_IS_DOWN message.
- If HDLC link changes status from down to up, send
NGM_LINK_IS_UP message.
Approved by: julian (mentor), implicitly
MFC after: 1 week
|
|
|
|
| |
Approved by: julian (mentor)
|
|
|
|
|
|
| |
item leak, I've introduced with previous change.
Approved by: julian (mentor)
|
| |
|
|
|
|
| |
Approved by: marks
|
|
|
|
|
|
| |
default elements in net_init_domain().
This makes it possible to grep these structures and see any bogosities.
|
|
|
|
|
|
|
|
|
|
| |
out c->c_func, we can't take it after callout_stop(). To take it before
we need to acquire callout_lock, to avoid race. This commit narrows
down area where lock is held, but hack is still present.
This should be redesigned.
Approved by: julian (mentor)
|
|
|
|
|
|
| |
the callout instead of the timeout interface.
Submitted by: glebius
|
|
|
|
| |
Submitted by: glebius
|
|
|
|
|
|
|
| |
- Remove callout-hacking from ng_untimeout().
Approved by: julian (mentor)
MFC after: 1 month
|
|
|
|
| |
Approved by: julian (mentor)
|
|
|
|
|
| |
field created for line disciplne drivers private use. Also add NET_NEEDS_GIANT
warning. For whatever reason ng_tty(4) was fixed but ng_h4(4) was not :(
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- tabs after defines
- tabs instead of many spaces
- sort local variables by size
o remove spl(9) calls
Approved by: julian (mentor)
|
|
|
|
|
|
|
|
| |
macros with 'do {} while (0)' to avoid error in case macro is
not defined.
Prodded by: julian, archie
Pointy hat to: glebius
|
|
|
|
|
| |
Requested by: maxim
Approved by: julian (mentor)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(sorele()/sotryfree()):
- This permits the caller to acquire the accept mutex before the socket
mutex, avoiding sofree() having to drop the socket mutex and re-order,
which could lead to races permitting more than one thread to enter
sofree() after a socket is ready to be free'd.
- This also covers clearing of the so_pcb weak socket reference from
the protocol to the socket, preventing races in clearing and
evaluation of the reference such that sofree() might be called more
than once on the same socket.
This appears to close a race I was able to easily trigger by repeatedly
opening and resetting TCP connections to a host, in which the
tcp_close() code called as a result of the RST raced with the close()
of the accepted socket in the user process resulting in simultaneous
attempts to de-allocate the same socket. The new locking increases
the overhead for operations that may potentially free the socket, so we
will want to revise the synchronization strategy here as we normalize
the reference counting model for sockets. The use of the accept mutex
in freeing of sockets that are not listen sockets is primarily
motivated by the potential need to remove the socket from the
incomplete connection queue on its parent (listen) socket, so cleaning
up the reference model here may allow us to substantially weaken the
synchronization requirements.
RELENG_5_3 candidate.
MFC after: 3 days
Reviewed by: dwhite
Discussed with: gnn, dwhite, green
Reported by: Marc UBM Bocklet <ubm at u-boot-man dot de>
Reported by: Vlad <marchenko at gmail dot com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
List of functional changes:
- Make a single device per single node with a single hook.
This gives us parrallelizm, which can't be achieved on a single
node with many devices/hooks. This also gives us flexibility - we
can play with a particular device node, not affecting others.
- Remove read queue as it is. Use struct ifqueue instead. This change
removes a lot of extra memcpy()ing, m_devget()ting and m_copymem()ming.
In ng_device_receivedata() we enqueue an mbuf and wake readers.
In ngdread() we take one mbuf from qeueue and uiomove() it to
userspace. If no mbuf is present we optionally block. [1]
- In ngdwrite() we create an mbuf from uio using m_uiotombuf().
This is faster then uiomove() into buffer, and then m_copydata(),
and this is much better than huge m_pullup().
- Perform locking of device
- Perform locking of connection list.
- Clear out _rcvmsg method, since it does nothing good yet.
- Implement NGM_DEVICE_GET_DEVNAME message.
- #if 0 ioctl method, while nothing is done here yet.
- Return immediately from ngdwrite() if uio_resid == 0.
List of tidyness changes:
- Introduce device2priv(), to remove cut'n'paste.
- Use MALLOC/FREE, instead of malloc/free.
- Use unit2minor().
- Use UID_ROOT/GID_WHEEL instead of 0/0.
- Define NGD_DEVICE_DEVNAME, use it.
- Use more nice macros for debugging. [2]
- Return Exxx, not -1.
style(9) changes:
- No "#endif" after short block.
- Break long lines.
- Remove extra spaces, add needed spaces.
[1] Obtained from: if_tun.c
[2] Obtained from: ng_pppoe.c
Reviewed by: marks
Approved by: julian (mentor)
MFC after: 1 month
|
|
|
|
|
|
|
|
|
|
| |
The original idea was to use it for firmware upgrading and similar
operations. In real life almost all Bluetooth USB devices do not
need firmware download. If device does require firmware download
then ugen(4) (or specialized driver like ubtbcmfw(8)) should be
used instead.
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- push all bridge logic from if_ethersubr.c into bridge.c
make bridge_in() return mbuf pointer (or NULL).
- call only bridge_in() from ether_input(), after ng_ether_input()
was optinally called.
- call bridge_in() from ng_ether_rcv_upper().
Long description: http://lists.freebsd.org/mailman/htdig/freebsd-net/2004-May/003881.html
Reported by: Jian-Wei Wang <jwwang at FreeBSD.csie.NCTU.edu.tw>
Tested by: myself, Sergey Lyubka
Reviewed by: sam
Approved by: julian (mentor)
MFC after: 2 months
|
| |
|
|
|
|
|
|
| |
reserved for the device drivers:
Add a t_lsc field for line discipline private use.
|
|
|
|
|
|
| |
- Change my email to glebius@FreeBSD.org
Requested by: ru [1]
|
|
|
|
|
| |
Supported by: Bestcom ISP, Rinet ISP
Approved by: julian (mentor)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
loss links, and 1 second appeared to be too small for high latency links.
If we will receive more complaints, we should make this parameter configurable.
PR: kern/69536
Approved by: archie, julian (mentor)
MFC after: 3 days
|
|
|
|
|
|
| |
and optionally use &thread0 if it's NULL.
Spotted by: julian
|
|
|
|
|
|
|
|
| |
We now no longer hold Giant in send(), so it isn't inheritted by the
linker, which calls into VFS.
Reported by: glebius
Discussed with: glebius, bz
|
|
|
|
|
|
|
| |
operation using NET_NEEDS_GIANT(). This will result in a boot-time
restoration of Giant-enabled network operation, or run-time warning on
dynamic load (applicable only to the Netgraph component). Additional
components will likely need to be marked with this in the future.
|