Diagnostics for developers - #735
Open
MortenBroerup wants to merge 2 commits into
Open
MortenBroerup wants to merge 2 commits into
MortenBroerup wants to merge 2 commits into
Conversation
Update the Client API receive functions to return the response payload size on success, instead of returning 0. Functions affected: - gr_api_client_recv() - gr_api_client_send_recv() Update the Client API streaming macro accordingly: Use the "ret" variable to provide the response payload size to the iterating function. Macro affected: - gr_api_client_stream_foreach() The Client API event receive function returns the event header along with the event payload to the client via the "event" output parameter. Update this function to return the total size of the event (incl. the event header) on success, instead of 0. Also update this function to return the event (via the "event" output parameter) when the payload length is zero, instead of returning NULL. Note: Events without payload are currently not allowed in Grout, so the latter change makes no practical difference. But it makes the code cleaner, and prepares it for allowing empty events in Grout in the future. Function affected: - gr_api_client_event_recv() Update the gr_api_client_event_recv() caller in the cli accordingly, to check for the updated success return value, instead of checking for 0. Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
Add API and CLI for developer diagnostics. Add message/command to dump various DPDK objects. More messages/commands can be added later. Note: Intended for developers only, so the available object types and names are not enumerated for the CLI. Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
MortenBroerup
force-pushed
the
diagnos
branch
from
September 4, 2026 11:01
ecd75ca to
f69b069
Compare
Contributor
Author
|
@rjarry How are external consumers of the Client API notified about such an API change when the next version of Grout is released? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This series comprises of two patches:
1. Update the Client API to make the response payload size available to the client
The response payload size is already present in the response header, but the response header is not exposed to the client.
Without this Client API update, it would be necessary for variable size responses to include a length field in the response payload. Such a redundant length field can now be avoided, which makes the Grout code for both the api and the cli much cleaner for responses of this kind.
2. Add API and CLI for developer diagnostics
Initially, add message/command to dump various DPDK objects.
More messages/commands can be added later.
It is a resubmission of #725, with the CLI command changed from "diagnos" to "diagnostics".