| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updated quagga thread handling to use qtimers when using the new
qpnexus -- so all timers are qtimers in the new scheme.
Updated work queue handling so that each work queue item is a single
malloced structure, not three. (Only bgpd and zebra use the work
queue system.)
When using qpnexus the background thread queue is no longer a timer
queue, but simply a list of pending background threads. When a
background thread is waiting on a timer, it is in the qtimer pile,
same like any other thread.
When using qpnexus, the only remaining quagga thread queues are the
event and ready queues.
Revised the qpnexus loop so that only when there is nothing else to
do will it consider the background threads.
Revised write I/O in the BGP Engine so that all writing is via the
connection's write buffer. Revised the write I/O in the Routeing
Engine, so that it passes groups of updates in a single mqueue
message. This all reduces the number of TCP packets sent (because
BGP messages are collected together in the connection's write buffer)
and reduces the number of mqueue messages involved.
(No need for TCP_CORK.)
Code and comments review for the new code.
modified: bgpd/bgp_advertise.c
modified: bgpd/bgp_common.h
modified: bgpd/bgp_connection.c
modified: bgpd/bgp_connection.h
modified: bgpd/bgp_engine.h
modified: bgpd/bgp_fsm.c
modified: bgpd/bgp_main.c
modified: bgpd/bgp_msg_read.c
modified: bgpd/bgp_msg_write.c
modified: bgpd/bgp_network.c
modified: bgpd/bgp_packet.c
modified: bgpd/bgp_packet.h
modified: bgpd/bgp_peer.c
modified: bgpd/bgp_peer_index.h
modified: bgpd/bgp_route.c
modified: bgpd/bgp_route_refresh.h
modified: bgpd/bgp_session.c
modified: bgpd/bgp_session.h
modified: bgpd/bgpd.c
new file: bgpd/bgpd.cx
modified: lib/mqueue.h
modified: lib/qpnexus.c
modified: lib/qpnexus.h
modified: lib/qpselect.c
modified: lib/qtimers.c
modified: lib/qtimers.h
modified: lib/sigevent.c
modified: lib/stream.c
modified: lib/stream.h
modified: lib/thread.c
modified: lib/thread.h
modified: lib/workqueue.c
modified: lib/workqueue.h
modified: tests/heavy-wq.c
modified: zebra/zebra_rib.c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the BGP Engine the OPEN message needs to be processed into the open_recv
structure in the *connection*. The OPEN that arrives must be checked
for acceptability before it is acknowledged. Later the connection may be
discarded in collision resolution, or the connection may become the
Established connection, and the open_recv structure is passed to the
session and hence to the Peering Engine.
modified: bgpd/bgp.h
modified: bgpd/bgp_common.c
modified: bgpd/bgp_common.h
modified: bgpd/bgp_connection.c
modified: bgpd/bgp_connection.h
modified: bgpd/bgp_fsm.c
modified: bgpd/bgp_msg_read.c
modified: bgpd/bgp_msg_read.h
modified: bgpd/bgp_msg_write.c
modified: bgpd/bgp_notification.c
modified: bgpd/bgp_notification.h
modified: bgpd/bgp_open.h
modified: bgpd/bgp_open_state.c
modified: bgpd/bgp_open_state.h
modified: bgpd/bgp_packet.c
modified: bgpd/bgp_session.h
modified: lib/distribute.c
modified: lib/if_rmap.c
modified: lib/qafi_safi.h
modified: lib/stream.c
modified: lib/stream.h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
modified: .gitignore
modified: bgpd/Makefile.am
modified: bgpd/bgp.h
modified: bgpd/bgp_common.h
modified: bgpd/bgp_connection.c
modified: bgpd/bgp_connection.h
modified: bgpd/bgp_fsm.c
modified: bgpd/bgp_msg_write.c
modified: bgpd/bgp_msg_write.h
modified: bgpd/bgp_notification.c
modified: bgpd/bgp_notification.h
modified: bgpd/bgp_open_state.c
modified: bgpd/bgp_open_state.h
modified: bgpd/bgp_packet.h
new file: bgpd/bgp_route_refresh.c
new file: bgpd/bgp_route_refresh.h
modified: bgpd/bgp_session.c
modified: bgpd/bgp_session.h
modified: lib/Makefile.am
new file: lib/confirm.h
modified: lib/memtypes.c
modified: lib/stream.c
modified: lib/stream.h
modified: lib/zassert.h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On branch bgp_engine
modified: .gitignore
modified: bgpd/Makefile.am
new file: bgpd/bgp.h
new file: bgpd/bgp_common.c
new file: bgpd/bgp_common.h
new file: bgpd/bgp_connection.c
new file: bgpd/bgp_connection.h
modified: bgpd/bgp_debug.c
new file: bgpd/bgp_engine.c
new file: bgpd/bgp_engine.h
modified: bgpd/bgp_fsm.c
modified: bgpd/bgp_fsm.h
modified: bgpd/bgp_network.c
modified: bgpd/bgp_network.h
new file: bgpd/bgp_notification.c
new file: bgpd/bgp_notification.h
modified: bgpd/bgp_open.c
new file: bgpd/bgp_open_state.c
new file: bgpd/bgp_open_state.h
modified: bgpd/bgp_packet.c
new file: bgpd/bgp_peer.c
new file: bgpd/bgp_peer.h
modified: bgpd/bgp_route.c
new file: bgpd/bgp_session.c
new file: bgpd/bgp_session.h
modified: bgpd/bgp_vty.c
modified: bgpd/bgp_zebra.c
modified: bgpd/bgpd.c
modified: bgpd/bgpd.h
modified: lib/Makefile.am
modified: lib/memtypes.c
modified: lib/mqueue.c
modified: lib/mqueue.h
new file: lib/qafi_safi.h
modified: lib/qpselect.c
modified: lib/qpselect.h
modified: lib/qpthreads.c
modified: lib/qpthreads.h
modified: lib/sockopt.c
modified: lib/sockunion.c
modified: lib/sockunion.h
modified: lib/stream.c
modified: lib/stream.h
modified: lib/symtab.h
modified: lib/zebra.h
|
|
|
|
|
|
|
| |
2008-06-07 Paul Jakma <paul@jakma.org>
* stream.{c,h}: (stream_{put,write}) add const qualifier to source
argument. Change u_char to void *.
|
|
|
|
|
|
|
|
|
|
|
| |
2008-01-30 Peter Szilagyi <sp615@hszk.bme.hu>
* lib/stream.h: Remove named 'new' parameter in prototype
for c++ header compatibility.
* ospfd/ospf_opaque.h: ditto
* ospfd/ospfd.h: Renamed struct export to _export for c++
header compatibility.
* ospf6d/ospf6_area.h: ditto
|
|
|
|
|
|
|
|
|
|
|
|
| |
2006-01-10 Paul Jakma <paul.jakma@sun.com>
* stream.c: (stream_new) Allocate stream data as seperate object.
(stream_free) free the data.
(stream_resize) new function, resize stream to new size.
(stream_{get,put}q*) new functions to get/put quad word size
types.
* stream.h: (struct stream) make data seperate from the stream.
Export new stream_resize and quad-word get/put functions.
|
|
|
|
|
|
|
|
|
| |
2005-11-26 Paul Jakma <paul.jakma@sun.com>
* buffer.c: (struct buffer_data) change gcc zero array
declaration to C99 incomplete array.
* stream.h: (struct stream) same
* ospf_api.c: (struct opaque_lsa) same
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* (general) extern and static'ification of functions in code and
header.
Cleanup any definitions with unspecified arguments.
Add casts for callback assignments where the callback is defined,
typically, as passing void *, but the function being assigned has
some other pointer type defined as its argument, as gcc complains
about casts from void * to X* via function arguments.
Fix some old K&R style function argument definitions.
Add noreturn gcc attribute to some functions, as appropriate.
Add unused gcc attribute to some functions (eg ones meant to help
while debugging)
Add guard defines to headers which were missing them.
* command.c: (install_node) add const qualifier, still doesnt shut
up the warning though, because of the double pointer.
(cmp_node) ditto
* keychain.c: (key_str2time) Add GET_LONG_RANGE() macro, derived
fromn vty.h ones to fix some of the (long) < 0 warnings.
* thread.c: (various) use thread_empty
(cpu_record_hash_key) should cast to uintptr_t, a stdint.h type
* vty.h: Add VTY_GET_IPV4_ADDRESS and VTY_GET_IPV4_PREFIX so they
removed from ospfd/ospf_vty.h
* zebra.h: Move definition of ZEBRA_PORT to here, to remove
dependence of lib on zebra/zserv.h
|
|
|
|
|
|
|
|
|
|
|
| |
* stream.h: Add comment about the special zero-ing ability of
stream_put.
(stream_recvmsg, stream_write) should return ssize_t and size_t
respectively. Should both be extern linkage.
(stream_recvfrom) Stream aware wrapper around recvfrom, in style
of stream_read_try.
* stream.c: (stream_recvfrom) new function, wrapper around recvfrom.
(stream_recvmsg, stream_write) ssize_t and size_t return values
|
|
|
|
|
|
|
| |
* stream.c: (stream_read_try) Log a warning message if a fatal
I/O error occurs.
(stream_fifo_new) Fix prototype.
* stream.h: Fix prototype for stream_fifo_new (need void arg).
|
|
|
|
|
|
|
|
|
|
| |
* stream.h: Declare new function stream_read_try suitable for use
with non-blocking file descriptors. Indicate that stream_read
and stream_read_unblock are deprecated.
* stream.c: (stream_read_try) New function for use with non-blocking
I/O.
(stream_recvmsg) Should return -1 if the stream is too small to
contain the data.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* stream.h: Unsigned long updated to size_t
* stream.c: ditto
* stream.h: Add stream_copy, stream_dup, stream_recvmsg.
Add comment describing struct stream abstraction, and various
other comments.
Deprecate several unsafe/ambigious macros.
Add STREAM_WRITEABLE and STREAM_READABLE.
Add (stream_getl_from) for symmetry.
Update stream_forward_{endp,getp} to use size_t offset.
Make stream data a 0 length array, rather than a seperate malloc.
* stream.c: Add consistency checks. Update to follow stream.h
changes.
(stream_new) Alloc stream+data in one go.
(stream_copy) new function, copy a stream.
(stream_dup) new function, dup a stream.
(stream_recvmsg) new function, recvmsg data into a stream.
(stream_empty) no need to check getp == 0.
|
|
|
|
|
| |
* stream.h: Unsigned long updated to size_t
* stream.c: ditto
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* (global) Update code to match stream.h changes.
stream_get_putp effectively replaced with stream_get_endp.
stream_forward renamed to stream_forward_getp.
stream_forward_endp introduced to replace some previous
setting/manual twiddling of putp by daemons.
* lib/stream.h: Remove putp. Update reference to putp with endp.
Add stream_forward_endp, which daemons were doing manually.
Rename stream_forward to stream_forward_getp.
lib/stream.c: Remove/update references to putp.
introduce stream_forward_endp.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* filter.c: (access_list_remark_cmd) buffer_putstr doesnt need cast
to u_char. (ipv6_access_list_remark_cmd) ditto.
if.c: ditto
* network.c: (readn/writen) pointer arg should be type u_char.
* plist.c: needs to include stream.h, not declare stream functions
internally.
(various) Add static qualifier to internal functions.
(prefix_list_type_str) extraneous breaks in switch statement.
(ip_prefix_list_description_cmd) buffer_putstr doesnt need cast
* stream.h: depends on plist.h and export stream_put_prefix
* vty.c: (vty_<telnet option build functions>) should use
unsigned char, telnet options are 0 -> 255.
* zclient.c: various u_char<->char type cleanups.
* zebra.h: Having to define CMSG_* can apply to more than just
BSDI_NRL.
* ripd.c: (rip_distribute_update_all) distribute list hook
function pointer prototype requires struct prefix_list * arg.
(rip_distribute_update_all_wrapper) update to pass required arg,
NULL.
|
|
|