Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)
[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]
Version: - FREEBSD - FREEBSD-12-STABLE - FREEBSD-12-0 - FREEBSD-11-STABLE - FREEBSD-11-2 - FREEBSD-11-1 - FREEBSD-11-0 - FREEBSD-10-STABLE - FREEBSD-10-4 - FREEBSD-10-3 - FREEBSD-10-2 - FREEBSD-10-1 - FREEBSD-10-0 - FREEBSD-9-STABLE - FREEBSD-9-3 - FREEBSD-9-2 - FREEBSD-9-1 - FREEBSD-9-0 - FREEBSD-8-STABLE - FREEBSD-8-4 - FREEBSD-8-3 - FREEBSD-8-2 - FREEBSD-8-1 - FREEBSD-8-0 - FREEBSD-7-STABLE - FREEBSD-7-4 - FREEBSD-7-3 - FREEBSD-7-2 - FREEBSD-7-1 - FREEBSD-7-0 - FREEBSD-6-STABLE - FREEBSD-6-4 - FREEBSD-6-3 - FREEBSD-6-2 - FREEBSD-6-1 - FREEBSD-6-0 - FREEBSD-5-STABLE - FREEBSD-5-5 - FREEBSD-5-4 - FREEBSD-5-3 - FREEBSD-5-2 - FREEBSD-5-1 - FREEBSD-5-0 - FREEBSD-4-STABLE - FREEBSD-3-STABLE - FREEBSD22 - linux-2.6 - linux-2.4.22 - MK83 - MK84 - PLAN9 - DFBSD - NETBSD - NETBSD5 - NETBSD4 - NETBSD3 - NETBSD20 - OPENBSD - xnu-517 - xnu-792 - xnu-792.6.70 - xnu-1228 - xnu-1456.1.26 - xnu-1699.24.8 - xnu-2050.18.24 - OPENSOLARIS - minix-3-1-1
SearchContext: - none - 3 - 10
1 $FreeBSD: releng/7.3/sys/netgraph/NOTES 70700 2001-01-06 00:46:47Z julian $ 2 Development ideas.. 3 4 Archie's suggestions... :-) 5 6 - There should be a new malloc type: M_NETGRAPH 7 [DONE] 8 - all mallocs/frees now changed to use this.. JRE 9 - might further split them out some time. 10 11 - Use MALLOC and FREE macros instead of direct function calls 12 [DONE] 13 - They allow conditional compilation which keeps 14 statistics & counters on various memory allocation 15 (or so it seems) 16 - Now tend to have NG_FREE_XX() macros. they 17 allow better debugging 18 19 - In struct ng_mesg: at least make "header" into "hdr", if not 20 getting rid of it altogether. It doesn't seem necessary and 21 makes all my C code lines too long. 22 23 - I understand.. one thought however.. consider.. 24 if char data were not legal, so that data needed to be 25 used instead, then the only way to get the size of the header 26 would be sizeof(msg.header) as sizeof(msg) would include the dummy 27 following bytes. this is a portability issue and I hope 28 it will be ported eventually :) 29 30 - Baloney! you can use sizeof(msg) - 1 then.. or just 31 make it a macro, then its always portable: 32 33 #ifdef __GNU_C__ 34 #define NG_MSG_HDR_SIZE (sizeof(struct ng_message)) 35 #else 36 #define NG_MSG_HDR_SIZE (sizeof(struct ng_message) - 1) 37 #endif 38 39 - inertia rules :-b 40 41 42 - Have a user level program to print out and manipulate nodes, etc. 43 - [DONE] 44 see ngctl, nghook 45 46 - "Netgraph global" flags to turn on tracing, etc. 47 48 - ngctl needs to be rewritten using libnetgraph. Also it needs a 49 command to list all existing nodes (in case you don't know the 50 name of what you're looking for). 51 [DONE] 52 53 - Need a way to get a list of ALL nodes. 54 [DONE] 55 - see NGM_LISTNODES 56 57 - Enhance "netstat" to display all netgraph nodes -- or at least 58 all netgraph socket nodes. 59 [DONE] 60 61 - BUG FIX: bind() on a socket should neither require nor allow a 62 colon character at the end of the name. Note ngctl allows you 63 to do it either way! 64 [DONE] (I think) 65 - bind on a control socket has been disabled 66 it was a bad idea. 67 68 - Need to implement passing meta information through socket nodes 69 using sendmsg() and recvmsg(). 70 71 - Stuff needing to be added to manual: 72 73 - Awareness of SPL level, use ng_queue*() functions when necessary. 74 - Malloc all memory with type M_NETGRAPH. -DONE 75 - Write code so it can be an LKM or built into the kernel.. this means 76 be careful with things like #ifdef INET. 77 - All nodes assume that all data mbufs have the M_PKTHDR flag set! 78 The ng_send_data() and related functions should have an 79 #ifdef DIAGNOSTICS check to check this assumption for every mbuf. 80 -DONE with INVARIANTS. Framework should test this more. 81 - More generally, netgraph code should make liberal use of the 82 #ifdef DIAGNOSTICS definition. 83 -INVARIANTS. 84 - Since data and messages are sent functionally, programmers need 85 to watch out for infinite feedback loops. Should ng_base.c detect 86 this automatically? 87 - I've been thinking about this. each node could have a 'colour' 88 which is set to the colour of the packet as you pass through. 89 hitting a node already of your colour would abort. Each packet 90 has another (incremented) colour. 91 -new 'item' type can hold a hopcount... 92 93 NEW in 2001 94 All piggyback responses have gone away. 95 use the node ID in the return address field for quick response delivery. 96 97 Every node has a queue, plus there is a list of nodes that have queued work. 98 Extensive use of Mutexes. Getting in shape for SMP. 99 100 Messages and data are deliverd in a new form. An Item now has 101 all information needed to queue such a request and deliver it later, so 102 it is now the basis of all data transfer since any transfer may need to 103 be queued.
Cache object: 7b2c133bddd4533943ce7239767ff0fc
This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.