| Commit message (Collapse) | Author | Age |
| |
|
|
|
| |
This is not quite complete, but it sets the stage for other
protocols (such as zmq or mqtt) to be added to the project.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
This refactors the pipeline protocol to use lightweight mq
instead of the more expensive message queue structure. It
also provides nicer backpressure and buffering support.
The test suite was updated and converted to NUTS as well.
This won't completely close the gap, but it should help quite
a bit.
|
| |
|
|
|
|
|
| |
This hopefully addresses the problem of both missed poll
events (meaning we don't flag the descriptor as pollable),
and spurious poll events (which might have happened when a
message was delivered synchronously.)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This is based on testutil/acutest, but is cleaner and fixes some
short-comings. We will be adding more support for additional
common paradigms to better facilitate transport tests.
While here we added some more test cases, and fixed a possible
symbol collision in the the stats framework (due to Linux use
of a macro definition of "si_value" in a standard OS header).
Test coverage may regress slightly as we are no longer using
some of the legacy APIs.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are a few major areas in this change.
* CMake options are now located in a common cmake/NNGOptions.cmake
file. This should make it easier for folks to figure out what
the options are, and how they are used.
* Tests are now scoped with their directory name, which should
avoid possible name collisions with test names.
* A number of tests have been either moved or incorporated into
the newer testutil/acutest framework. We are moving away from
my old c-convey framework to something easier to debug.
* We use CMake directories a bit more extensively leading to a much
cleaner CMake structure. It's not complete, but a big step in the
right direction, and a preview of future work.
* Tests are now run with verbose flags, so we get more test results
in the CI/CD logs.
|
| |
|
|
|
|
| |
This should reduce the amount of copying, and the overall size
used by pipes and other objects quite a bit. (On my system, the
sizeof nni_pipe shrank by 400 bytes, for example.)
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
fixes #1288 id allocation can overallocate
fixes #1126 consider removing lock from idhash
This substantially refactors the id hash code, giving a cleaner API,
and eliminating a extra locking as well as some wasteful allocations.
The ZeroTier code has it's own copy, that is 64-bit friendly, as the
rest of the consumers need only a simpler 32-bit API.
|
| |
|
|
|
| |
This also affects the respondent protocol. Examination of the other
protocols did not turn up any evidence of the same issue.
|
| |
|
|
|
| |
This uses a maximum 64-byte header and should avoid allocations and
cache misses, leading to a small performance boost overall.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This should make survey a little faster (which may be of benefit).
But it will also enable us to eliminate one of the checks in the
message queue code (#814), making everything else go faster.
|
| | |
|
| |
|
|
|
| |
This bumps the coverage for survey up. While here fixed a few nits
in req test, and removed the now pointless legacy survey and respond tests.
|
| |
|
|
|
|
|
|
|
|
|
| |
fixes #1160 Consider limiting maximum hop count to 15
fixes #1098 Maximum maxTTL should be compile time defined
This doesn't expose the max-MaxTTL in the CMakeList.txt -- there
is really no reason anyone should be changing it. This does not
yet inline the message header into the nni_msg_t, but it is my
intention to do so soon, and eliminate most of the conditional cases
for failure on inserting into the header.
|
| | |
|
| |
|
|
|
|
|
| |
This only addresses the newly rewitten compat_tcp test, but it
sets the groundwork for the other tests, so that when they are
updated to the new acutest.h they can use the new marry code to
establish connections cleanly and safely.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This introduces reference counting on messages to reduce the data copies.
This should have a marked improvement when moving large messages through
the system, or when publishing to many subscribers. For some transports,
when using large messages, the copy time can be the dominant factor.
Note that when a message is actually shared, inproc will still perform
an extra copy in order to ensure that it can modify the headers.
This will unfortunately always be the case with REQ, as the REQ protocol
keeps a copy of the original message so it can retry.
|
| |
|
|
|
|
|
|
|
|
|
| |
This allows --reqrep0, --pair0, --pair1, and --bus0 to be used with
the inproc_lat, and also inproc_thr (though only with pair options for
that for now). It also introduced --url for both programs to support
testing over different transports.
Also, we no longer pass out the header for REQ reply -- that is
an error, and led to some unfortunate failures when reusing the
message.
|
| |
|
|
|
|
|
| |
We've also finished fleshing out the statistics for pairv1, addressed a
possible race around the TTL, and added additional test cases to validate
things. We also have tightened up the send logic to ensure we do not
send a bad message on the wire (drop the malformed message on the send side).
|
| |
|
|
|
|
|
|
| |
This correctly moves the entire protocol header for XREQ and XRESPONDENT
protocols to the message header (not the body). This is where it should
always have been. There is some small chance that applications which were
coded to parse the header from the body will break. We don't think there
are any such applications in use.
|
| |
|
|
|
|
|
| |
Specifically, we don't need to read the atomic value each loop
iteration. We can just get it when a message is first received,
and then use that value. This should make receiving through proxies
a little more efficient.
|
| | |
|
| |
|
|
|
| |
Also, add a test to cover the RESPOND protocol. This gets about
95% of the coverage.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
The new tests are more exhaustive, and cover everything. We also
added a case for testing that posting messages that we didn't
subscribe too doesn't raise the pollable flag.
|
| |
|
|
|
|
|
| |
This gets near 100% coverage of the PUB/SUB protocols.
The remaining uncovered bits will need to have a mock protocol that
runs slower, so that we can inject both back pressure, and also so
that we can inject "erroroneous" messages.
|
| |
|
|
|
|
|
|
| |
This also fixes a possible bug if mixing poll file descriptors and
contexts on the same socket. Most folks are unlikely to ever run
into this bug.
At this point the REQ/REP coverage is nearly complete (over 95%).
|
| |
|
|
|
|
|
|
|
|
| |
The TTL in these cases should have been atomic. To facilitate
things we actually introduce an atomic int for convenience. We
also introduce a convenience nni_msg_must_append_u32() and
nni_msg_header_must_append_u32(), so that we can eliminate some
failure tests that cannot ever happen. Combined with a new test
for xreq, we have 100% coverage for xreq and more coverage for
the other REQ/REP protocols.
|
| | |
|
| |
|
|
|
| |
This only does it for rep, but it also has changes that should increase
the overall test coverage for the REP protocol
|
| |
|
|
|
| |
This also introduces an nni_atomic_cas64 to help with lock-free designs.
Some mechanical renaming was done in some of the protocols for spelling.
|
| |
|
|
| |
fixes #1103 respondent could inline backtrace
|
| | |
|
| | |
|
| |
|
|
|
| |
We've also added some TEST_NNG_SEND_STR and TEST_NNG_RECV_STR to
help with convenience when writing test code.
|
| | |
|
| |
|
|
|
|
|
| |
fixes #1080 Desire better way to access statistics for NNG objects
We've also added a test that uses some of this, in order to verify
that the req protocol rejects invalid peers.
|
| |
|
|
|
|
|
|
| |
fixes #1063 Include sanitizer runs in CI
fixes #1068 Wssfile test sometimes fails with wrong error code
While here, addressed a number of clang-tidy items, and some light
cleanup of code we were already in.
|
| |
|
|
|
|
| |
This includes changes to support setting the sanitizer *correctly*
(the old code CMake stuff didn't quite get it right), and addresses
a number of failures in the test code found by the address sanitizer.
|
| | |
|