aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* resolver: use nni_aio_startGarrett D'Amore2024-12-26
|
* tcp: use nni_aio_startGarrett D'Amore2024-12-26
|
* device: use nni_aio_startGarrett D'Amore2024-12-26
|
* websocket: use nni_aio_startGarrett D'Amore2024-12-26
|
* http: use nni_aio_startGarrett D'Amore2024-12-26
|
* inproc: use nni_aio_startGarrett D'Amore2024-12-26
|
* sockfd: convert to use nni_aio_startGarrett D'Amore2024-12-26
|
* aio: introduce nni_aio_reset to reset the aio before submitting more workGarrett D'Amore2024-12-26
| | | | | | This allows some use cases to reset things like the counts and outputs, before submitting more jobs. Providers should call this near the top of their functions; this is done without any locks so it should be very fast.
* msg queue: use nni_aio_startGarrett D'Amore2024-12-26
|
* aio: introduce NNG_ESTOPPEDGarrett D'Amore2024-12-26
| | | | | | | | | | | This error code results when an AIO is stopped permanently, as a result of nni_aio_close or nni_aio_stop. The associated AIO object cannot be used again. This discrimantes against a file being closed, or a temporary cancellation which might allow the aio to be reused. Consumers must check for this error status in their callbacks, and not resubmit an operation that failed with this error. Doing so, will result in an infinite loop of submit / errors.
* nni_aio_start: introduce nni_aio_start to replace aio_begin, schedule, and deferGarrett D'Amore2024-12-26
| | | | Also make nni_aio_sleep use it.
* taskq: skip the lock/unlock if there is no callbackGarrett D'Amore2024-12-26
| | | | | This should help some cases of synchronous callers that don't use a callback at all.
* posix resolver: use nni_aio_deferGarrett D'Amore2024-12-24
|
* msgq: use nni_aio_deferGarrett D'Amore2024-12-23
|
* websocket test: workaround EADDRINUSE during testsGarrett D'Amore2024-12-22
| | | | | These failures are responsible for false SEGFAULTS during testing, as we wind up failing to listen and then proceeding anyway.
* aio: introduce nni_aio_deferGarrett D'Amore2024-12-22
| | | | | | | | This will replace nni_aio_schedule, and it includes finishing the task if needed. It does so without dropping the lock and so is more efficient and race free. This includes some conversion of some subsystems to it.
* posix tcp: use common refcnt implementationGarrett D'Amore2024-12-22
|
* port events poller (illumos/Solaris): use atomic events maskGarrett D'Amore2024-12-22
|
* epoll: use atomic event maskGarrett D'Amore2024-12-22
|
* pollers: use atomic bit masking operations to eliminate lockssGarrett D'Amore2024-12-22
| | | | This is done for kqueue and poll. Others coming soon.
* ipc dialer: use common refcnt logicGarrett D'Amore2024-12-22
|
* test: fix valgrind complaint about unitialized test data in ipc testGarrett D'Amore2024-12-22
|
* dialer: configure default redial cool-down times (fixes #1964)Garrett D'Amore2024-12-22
| | | | | | | The missing default of zero leads to a hard spin and exhaustion of the open files (since reaping can take too long). The workaround is to configure these explicitly.
* poll: sign extension bug + incorrect use leads to tiny max files on macOSGarrett D'Amore2024-12-22
|
* http: limit handler uri to 1KGarrett D'Amore2024-12-22
| | | | | | | | | | | This is just the part of the tree that will be matched when looking up a handler. Requests may come in with very much longer URIs, and be matched to the handler as a "subdirectory". This approach makes it possible to avoid a dynamic allocation on the handler, at the cost of pre-allocating 1KB with the handler object. This size can be overridden using a NNG_HTTP_MAX_URI at compile time.
* http server test: fix leak in testGarrett D'Amore2024-12-22
|
* http: nng_http_handler_set_data is now void return (API break)Garrett D'Amore2024-12-22
|
* nng_http_server_collect_body now void return (API break)Garrett D'Amore2024-12-22
|
* http: handler set tree no longer returns a value (API break)Garrett D'Amore2024-12-22
|
* HTTP: nng_http_handler_set_method no longer failsGarrett D'Amore2024-12-22
|
* HTTP handler: limit host names to 256 bytes (RFC 1035 specifies 253.)Garrett D'Amore2024-12-22
| | | | This also makes `nng_http_handler_set_host` never fail (API break).
* http: setting response status never fails (breaking API change)Garrett D'Amore2024-12-22
|
* http: method on request structure is now staticGarrett D'Amore2024-12-22
| | | | | This saves yet another allocation. It also no longer returns a value making this a breaking change.
* http handler: avoid method allocationGarrett D'Amore2024-12-22
| | | | | | | | | We limit HTTP method lengths to 32.. there are no currently defined HTTP methods that need more than 19 bytes (including trailing zero.) Generally most servers will not have vast numbers of handlers, so the cost of allocating some storage up front to avoid the dynamic allocation is worth while.
* HTTP: intern the version and avoid allocationv2.0.0-alpha.1Garrett D'Amore2024-12-22
| | | | | | There are only a few possible reasonable values, and we can intern them to avoid any allocations for it. (We will probably do the same for the HTTP method shortly as well.)
* posix IPv6: BSD platforms us netinet6/in6.hGarrett D'Amore2024-12-21
|
* posix udp: AF_INET6 fixupGarrett D'Amore2024-12-21
|
* posix udp: More explicit checks for bogus address familyGarrett D'Amore2024-12-21
| | | | | This triggered an error on FreeBSD because apparently FreeBSD will return a different value when seeing an AF_UNIX socket with UDP.
* files test: check to skip permissions before testingGarrett D'Amore2024-12-21
|
* posix udp: stop the PFD explicitly before finalizingGarrett D'Amore2024-12-21
|
* nuts: add 20 millisecond delay before nng_finiGarrett D'Amore2024-12-21
| | | | | | This is to allow finalizers to run for the HTTP framework. This is a bug workaround for now, and should be fixed in the HTTP framework later by using reference counts correctly.
* poll: fix poll based pollerGarrett D'Amore2024-12-21
|
* epoll: fixes for races and early wakeupsGarrett D'Amore2024-12-21
|
* posix: fix for IPC and TCP dialingGarrett D'Amore2024-12-21
| | | | | The dialer aio needs to be set before starting the dial operation, as the operation may complete right away.
* posix pollers: inline the pfd and make callbacks constantGarrett D'Amore2024-12-20
| | | | | | | This change moves the posix pollers to inline the PFD and makes the callbacks constant, so that we can dispense with tests, failures, and locks. It is anticipated that this will reduce lock based pressure on the bus and increase performance modestly.
* poll: performance improvements, simplificationsGarrett D'Amore2024-12-19
| | | | | | | | | | | We preallocate the arrays used for pollfds, based on what the system can tolerate (tunable with NNG_MAX_OPEN), and we change the code for inserting and removing pollfds from the list so that it can run without acquiring the locks during the main loop, only when adding or removing files. The poll() implementation is very nearly lock free in the hot code path, and soon will be.
* posix pollers: expose pfd structures (for sizes) and fix poller selectionGarrett D'Amore2024-12-19
| | | | | | | | | | | | | The poller selection in the previous poller changes for select were not quite functional. Also, while testing poll() based poller, there were problems where it simply did not work correctly, so this addresses those, and it seems to work now. The pfd structures are exposed as we intend to allow inlining them to eliminate the separate allocation and potential for failure during initialization. We also want to have plans afoot to eliminate a lot of the extra locking done done on each I/O iteration, and this is setting the foundation for that.
* http: don't assume 200 status unless we actually exchange dataGarrett D'Amore2024-12-19
| | | | This should simplify debugging in some circumstances.
* kqueue: eliminate extra locking on each I/OGarrett D'Amore2024-12-18
| | | | | This should reduce lock pressure during I/O for FreeBSD and macOS, and should provide a small performance benefit.
* POSIX poller: add support for select, and for choosing the pollerGarrett D'Amore2024-12-17
| | | | | Some platforms or configurations may not have more modern options like kqueue or epoll, or may be constrained by policy.