Gleb Smirnoff
547d34736b
Major overhaul.
...
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
2004-10-18 20:13:57 +00:00
..
2004-08-30 03:35:17 +00:00
2004-08-03 21:27:43 +00:00
2004-08-22 15:14:44 +00:00
2004-06-29 20:50:24 +00:00
2004-05-26 00:53:10 +00:00
2004-08-17 02:32:30 +00:00
2002-12-13 22:59:18 +00:00
2002-10-18 21:29:14 +00:00
2004-05-26 00:53:10 +00:00
2002-09-11 18:03:03 +00:00
2003-03-25 05:19:18 +00:00
2004-06-25 19:22:05 +00:00
2003-01-24 01:32:20 +00:00
2004-03-18 09:45:17 +00:00
2004-04-22 02:22:18 +00:00
2003-06-23 17:02:43 +00:00
2003-06-30 05:25:36 +00:00
2004-06-27 12:33:20 +00:00
2004-09-08 08:44:14 +00:00
2004-10-09 07:31:03 +00:00
2004-05-26 00:53:10 +00:00
2004-06-27 12:33:20 +00:00
2003-09-09 18:17:23 +00:00
2003-01-19 02:59:34 +00:00
2003-03-29 15:20:45 +00:00
2003-08-12 09:45:34 +00:00
2004-08-27 19:57:33 +00:00
2004-08-29 11:10:09 +00:00
2003-02-03 14:46:26 +00:00
2003-02-03 14:46:26 +00:00
2004-08-16 15:24:03 +00:00
2003-09-26 20:26:25 +00:00
2003-09-26 20:26:25 +00:00
2002-10-27 12:09:51 +00:00
2004-09-01 06:51:43 +00:00
2004-09-01 06:51:43 +00:00
2004-09-01 07:12:24 +00:00
2003-12-15 21:49:41 +00:00
2002-10-04 20:35:02 +00:00
2004-09-04 03:32:15 +00:00
2004-09-01 07:12:24 +00:00
2004-06-27 12:33:20 +00:00
2004-09-01 07:12:24 +00:00
2004-10-13 05:41:09 +00:00
2004-10-13 05:41:09 +00:00
2004-07-09 02:38:25 +00:00
2003-03-29 15:47:13 +00:00
2004-01-13 11:28:51 +00:00
2004-05-26 00:53:10 +00:00
2003-03-29 13:42:20 +00:00
2004-06-09 08:27:05 +00:00
2003-08-06 16:01:32 +00:00
2004-06-27 12:33:20 +00:00
2004-08-12 17:41:33 +00:00
2004-05-26 00:53:10 +00:00
2004-05-26 00:53:10 +00:00
2002-05-16 19:08:03 +00:00
2004-02-13 10:11:01 +00:00
2004-09-04 06:37:58 +00:00
2004-05-26 00:53:10 +00:00
2004-07-12 13:13:17 +00:00
2003-01-08 20:40:29 +00:00
2004-09-08 17:27:31 +00:00
2004-02-13 10:11:01 +00:00
2004-02-13 10:11:01 +00:00
2002-11-06 13:41:40 +00:00
2003-03-11 23:20:43 +00:00
2004-08-14 22:40:16 +00:00
2004-03-15 11:27:39 +00:00
2002-08-12 07:20:15 +00:00
2004-05-11 18:21:38 +00:00
2004-01-11 07:01:30 +00:00
2002-09-30 05:12:39 +00:00
2003-03-29 13:40:41 +00:00
2004-01-19 14:00:26 +00:00
2002-08-12 15:27:17 +00:00
2003-11-14 20:58:00 +00:00
2004-05-26 00:53:10 +00:00
2004-09-01 07:12:24 +00:00
2002-10-20 22:57:22 +00:00
2004-09-01 07:12:24 +00:00
2003-03-08 21:54:32 +00:00
2004-08-01 11:40:54 +00:00
2004-08-14 15:32:40 +00:00
2004-06-08 23:52:22 +00:00
2004-08-26 14:35:05 +00:00
2003-05-11 06:36:49 +00:00
2004-08-12 17:41:33 +00:00
2004-06-09 08:27:05 +00:00
2004-05-26 00:53:10 +00:00
2004-06-27 12:33:20 +00:00
2003-09-26 20:26:25 +00:00
2003-07-15 08:59:38 +00:00
2002-12-14 00:01:51 +00:00
2004-09-04 06:37:58 +00:00
2003-11-19 05:08:27 +00:00
2004-02-13 10:11:01 +00:00
2002-10-22 17:10:15 +00:00
2002-08-01 17:41:27 +00:00
2002-10-22 17:10:15 +00:00
2002-11-26 17:35:44 +00:00
2002-10-22 17:10:15 +00:00
2002-10-22 17:10:15 +00:00
2002-10-24 02:04:03 +00:00
2003-03-02 23:01:42 +00:00
2002-08-01 17:41:27 +00:00
2003-11-11 21:23:54 +00:00
2002-10-22 17:10:15 +00:00
2003-03-29 16:13:11 +00:00
2004-08-09 06:45:20 +00:00
2004-09-28 07:26:00 +00:00
2003-09-11 03:53:46 +00:00
2002-10-31 19:39:23 +00:00
2004-09-04 06:37:58 +00:00
2003-09-26 20:26:25 +00:00
2002-04-16 20:40:06 +00:00
2004-01-19 14:00:26 +00:00
2004-05-26 00:53:10 +00:00
2004-03-07 02:49:06 +00:00
2004-10-18 20:13:57 +00:00
2004-09-04 06:37:58 +00:00
2004-09-04 06:37:58 +00:00
2002-11-04 15:13:36 +00:00
2003-03-05 08:16:29 +00:00
2004-05-26 00:53:10 +00:00
2003-09-26 20:26:25 +00:00
2003-09-26 20:26:25 +00:00
2004-01-19 14:00:26 +00:00
2004-05-26 00:53:10 +00:00
2003-03-15 23:24:17 +00:00
2004-02-13 10:11:01 +00:00
2004-09-04 06:37:58 +00:00
2004-02-13 10:11:01 +00:00
2004-05-26 00:53:10 +00:00
2004-05-26 00:53:10 +00:00
2004-02-13 10:11:01 +00:00
2004-09-01 07:39:12 +00:00
2002-11-06 13:47:00 +00:00
2003-11-19 05:08:27 +00:00
2003-11-19 05:08:27 +00:00
2003-11-19 05:08:27 +00:00
2002-10-26 14:38:24 +00:00
2002-08-01 01:33:12 +00:00
2003-08-30 08:01:05 +00:00
2004-04-11 15:40:18 +00:00
2004-05-26 00:53:10 +00:00
2003-03-05 08:16:29 +00:00
2003-01-15 19:55:17 +00:00
2003-09-08 03:24:29 +00:00
2003-03-11 19:26:16 +00:00
2004-06-27 12:33:20 +00:00
2003-07-21 21:47:47 +00:00
2003-04-13 06:27:13 +00:00
2002-11-05 09:37:32 +00:00
2002-09-19 00:43:32 +00:00
2004-05-26 00:53:10 +00:00
2004-09-04 06:37:58 +00:00
2004-05-26 00:53:10 +00:00
2004-07-16 04:00:08 +00:00
2003-03-29 10:01:03 +00:00
2004-08-06 20:37:08 +00:00
2002-06-17 05:40:49 +00:00
2004-06-25 19:22:05 +00:00
2004-05-26 00:53:10 +00:00
2003-11-19 05:08:27 +00:00
2002-08-12 01:36:20 +00:00
2004-01-19 12:36:08 +00:00
2002-11-06 13:41:40 +00:00
2002-06-26 03:37:47 +00:00
2002-10-13 18:44:26 +00:00
2004-04-10 02:41:22 +00:00
2003-01-19 02:59:34 +00:00
2004-08-14 23:54:27 +00:00
2004-06-27 12:33:20 +00:00
2003-03-11 23:20:43 +00:00
2004-06-27 12:33:20 +00:00
2004-06-27 12:33:20 +00:00
2004-09-05 09:43:47 +00:00
2004-06-27 12:33:20 +00:00
2004-06-27 12:33:20 +00:00
2004-01-13 11:28:51 +00:00
2003-11-07 09:38:05 +00:00
2004-06-27 12:33:20 +00:00
2003-06-23 19:41:00 +00:00
2004-06-27 12:33:20 +00:00
2004-06-27 12:33:20 +00:00
2004-06-27 12:33:20 +00:00
2004-06-27 12:33:20 +00:00
2004-06-27 12:33:20 +00:00
2004-06-27 12:33:20 +00:00
2004-06-27 12:33:20 +00:00
2004-06-27 12:33:20 +00:00
2004-06-27 12:33:20 +00:00
2004-06-27 12:33:20 +00:00
2004-06-27 12:33:20 +00:00
2004-07-12 21:59:06 +00:00
2004-06-27 12:33:20 +00:00
2003-06-12 14:28:32 +00:00
2004-06-27 12:33:20 +00:00
2004-06-27 12:33:20 +00:00
2004-09-10 20:57:46 +00:00
2003-06-12 23:30:57 +00:00
2004-06-09 21:52:12 +00:00
2004-05-26 00:53:10 +00:00
2004-04-10 19:41:15 +00:00
2004-05-26 00:53:10 +00:00
2004-06-20 17:42:35 +00:00
2004-10-09 07:31:03 +00:00
2002-11-06 13:47:00 +00:00