aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* docs: remove docs formatting targetGarrett D'Amore2024-12-08
| | | | | We're moving to mdbook and that doesn't need the CMake support nor needs asciidoctor.
* udp transport: convert to using inline pipes and endpointsGarrett D'Amore2024-12-08
| | | | | This allows us to eliminate some extra reference counting and reaping related complexity.
* socket transport: convert to using inline pipe and endpoint allocationsGarrett D'Amore2024-12-08
| | | | | | | This eliminates the need for separate reap operations, and it also eliminates a few failure modes, further simplifying the code. This is the first transport to get this treatment. The others will follow.
* pipes and endpoints: support for inline allocations of transport dataGarrett D'Amore2024-12-08
| | | | | | | | | | | | | | | | | | | | | | This is a new transport API, which should make it easier for transports to rely upon lifetime guarantees made by the common SP framework, thus eliminating the need for transport specific reference counters, reap lists, and similar. The transport declares the size of the object in the ops vector (for pipe, dialer, or listener), and the framework supplies one allocated using the associated allocator. For now these add the pipe object to the socket and endpoint using linked linked lists. The plan is to transition those to reference counts which should be lighter weight and free form locking issues. The pipe teardown has been moved more fully to the reaper, to avoid some of the deadlocks that can occur as nni_pipe_close can be called from almost any context. For now the old API is retained as well, but the intention is to convert all the transports and then remove it.
* socket transport: No need for a cool down for this transport.Garrett D'Amore2024-12-07
| | | | | | If an error occurs, the application gets to know about it. There cannot be external factors that cause us to spin for memory, since this is not accessible via the network.
* tests: add sockfd test for multiple acceptsGarrett D'Amore2024-12-07
| | | | While here initialize the message to avoid valgrind complaints.
* aio: task_abort was a mistakeGarrett D'Amore2024-12-07
| | | | | | | | | The use of task_abort to prematurely fail an aio at scheduling time was a mistake, because it could have led to duplicate calls to nng_aio_finish(). We do need to ensure that we leave an indicator so that nni_aio_schedule can return the abort status to caller, in the case that abort is called between the nni_aio_begin and nni_aio_schedule calls.
* device: fixes for socket holds and leaking aio dataGarrett D'Amore2024-12-07
| | | | | | The aio structures need to be finalized, and the sockets should be held until the device is totally finalized to prevent any possible use after free.
* nuts: try to avoid address in use for most testsGarrett D'Amore2024-12-07
| | | | | | We get test failures somewhat frequently due to port conflicts. This attempts to make more of the tests use the trick of binding to port 0, and letting us use the random port instead.
* websocket: inline the aiosGarrett D'Amore2024-12-07
| | | | This covers both the ttransport and the supplemental layers.
* performance: reference counters can use relaxed order when incrementingGarrett D'Amore2024-12-07
|
* ctx: Simplify handling for closed contexts.Garrett D'Amore2024-12-07
| | | | | | Once a context has started the process of close, further attempts to close it will return NNG_ECLOSED. What was I thinking to ever do anything else?
* aio: make sure aio is initialized before certain operationsGarrett D'Amore2024-12-07
| | | | | | | | Operations that might be performed during teardown, such as reaping, waiting, closing, freeing, should only be done if the aio has properly been initialized. This is important for certain simple cases where inline aio objects are used, and initialization of an outer object can fail before the enclosed aio is initialized.
* udp: hang on close after sending too largeGarrett D'Amore2024-12-07
|
* inproc: add pipe stop.Garrett D'Amore2024-12-07
| | | | | This is not needed for this, but it is the only transport that does not have it, and adding it simplifies logic in the common code.
* Pipe protocol data is never null.Garrett D'Amore2024-12-07
|
* reap: thread exits prematurely after reinitializationGarrett D'Amore2024-12-07
|
* aio: stop has to wait for expirations to finishGarrett D'Amore2024-12-07
|
* fini: add drain mechanism for aio, reap, and task subsystemsGarrett D'Amore2024-12-07
| | | | | Make sure *everything* is drained before proceeding all the way to deallocation.
* aio: separate stop / shutdown from fini (deallocate)Garrett D'Amore2024-12-07
| | | | | | | | | | | | | | Probably other subsystems should get the same treatment. We need to basically start the process of shutting down so that subsystems know to cease operation before we rip memory out from underneath them. This ensures that no new operations can be started as well, once we have begun the process of teardown. We also enhanced the completion of sleep to avoid some extra locking contention, since the expiration *is* the completion. Includes a test for this case.
* aio: do not reschedule or start operations when expire queue is exitingGarrett D'Amore2024-12-07
| | | | | We do not want to let operations restart if we're in the process of shutting down. This ensures that they get a reasonable hard failure.
* Add forgotten license boilerplateAleksei Solovev2024-12-07
|
* fixes #1408 Reference count as a first class typeGarrett D'Amore2024-12-07
| | | | | | | | | | This starts by using this for the nni_pipe, but we will use it for the other primary objects as well. This should simplify the tear down and hopefully eliminate some races. It does mean that pipe destruction goes through an additional context switch, for now at least. This shouldn't be on the hot data path anyway.
* fixes #1959 Occasional SIGSEGV in nng_recv_aio() on a respondent socketAleksei Solovev2024-12-07
|
* tests: convert http server test to NUTSGarrett D'Amore2024-12-06
|
* url: add nng_url_resolve_portGarrett D'Amore2024-12-06
| | | | | | This API exists to support tests and similar cases where port 0 is used to choose a dynamic port. Once the port is bound, and an actual value is known, it can be patched in using this API.
* sockfd: check the result of nni_aio_scheduleGarrett D'Amore2024-12-03
| | | | This fixes a possible failure condition on teardown.
* windows ipc: check the return value of nni_aio_scheduleGarrett D'Amore2024-12-03
| | | | | This hopefully addresses a long standing bug with Windows IPC sometimes hanging on shut down.
* tests: void instead of empty parameter listGarrett D'Amore2024-12-01
|
* http server: sprintf is considered deprecatedGarrett D'Amore2024-12-01
| | | | | | | | | | Because it is typically associated with insecure code, use of sprintf is discouraged. Note that our usage was actually quite careful and not insecure, but its mere presence raises concern especially by parties who are unwilling or unable to assess the actual code for correctness. A better choice here would be strlcat, but strlcat is not universally available.
* http server: fix race condition for server->closedGarrett D'Amore2024-12-01
|
* tests: convert files test to NUTSGarrett D'Amore2024-12-01
|
* tests: convert ipcsupp tests to NUTSGarrett D'Amore2024-11-30
|
* tests: convert tcpsupp test to NUTSGarrett D'Amore2024-11-30
| | | | Also renamed this to tcp_stream_test.
* tests: convert scalability test to NUTSGarrett D'Amore2024-11-30
|
* tests: convert nonblock test to NUTSGarrett D'Amore2024-11-30
|
* tests: convert synch test to NUTS.Garrett D'Amore2024-11-30
| | | | | While here we added a test for nng_cv_wake1 to demonstrate it does not fall afoul of the thundering herd.
* tests: fix sign bug in comparing timesGarrett D'Amore2024-11-30
|
* tests: Allow more time for larger messagesGarrett D'Amore2024-11-30
|
* tests: incompletely initialized address in has_ipv6 checkGarrett D'Amore2024-11-30
|
* tests: fix type mismatch on htonlGarrett D'Amore2024-11-30
|
* tests: convert ws transport test to NUTSGarrett D'Amore2024-11-30
|
* tests: time collection overhead might be zero for coarse timers (Windows)Garrett D'Amore2024-11-30
|
* tests: convert TCPv6 transport test to NUTS (and consolidate with v4)Garrett D'Amore2024-11-30
|
* tests: better reporting of timing overheadGarrett D'Amore2024-11-30
|
* tests: add a couple more transport specific testsGarrett D'Amore2024-11-30
|
* tests: tcp test converted to NUTSGarrett D'Amore2024-11-30
| | | | | TCPv6 not done yet since that needs special work to be conditionalized. Also tcpsupp remains to be converted.
* tests: inproc converted to NUTSGarrett D'Amore2024-11-30
| | | | | | | | This actually represents a conversion of the transport tests implemented in Convey terms to NUTS. As part of this, have implemented a simple round trip performance test, using PAIR. The rest of the transport tests will shortly be converted to this as well.
* tests: Convert device test to NUTSGarrett D'Amore2024-11-30
| | | | | This also adds more tests for additional test cases (aio, and more validations of incompatible device configurations).
* tests: req stress test converted to NUTSGarrett D'Amore2024-11-30
|