-
Notifications
You must be signed in to change notification settings - Fork 29
issue: 4633470 fix generate_docs.py +update README #440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Fixes a bug in the documentation generation script where non-dict properties caused processing failures, and updates the README with improved documentation for memory parameters and threading options.
Key changes:
- Add type checking and error handling to prevent crashes in generate_docs.py
- Update README with memory size suffix documentation and threading behavior options
- Improve documentation clarity for worker threads configuration
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| generate_docs.py | Adds type checking for properties and error handling to prevent crashes when processing non-dict schema properties |
| README | Updates memory parameter documentation to include size suffixes and clarifies threading behavior options |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
99e4e65 to
30e2175
Compare
|
bot:retest |
|
lets add newline in every description (to have consistent readme) |
30e2175 to
bec5538
Compare
|
Can we add new line for the "Maps to .... Environment variable" line? would be much more readable |
bec5538 to
f782ade
Compare
|
following your comment |
|
bot:retest |
|
@dpressle , can you check why CI do not run? |
99d2e06 to
6215792
Compare
|
bot:retest |
6215792 to
48072b4
Compare
|
@BasharRadya , please check if approved |
README
Outdated
| Enable/Disable Striding Receive Queues. | ||
| Maps to **XLIO_STRQ** environment variable. | ||
| Each WQE in a Striding RQ may receive several packets. | ||
| Thus, the WQE buffer size is controlled by XLIO_STRQ_NUM_STRIDES x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You start a new line after every "." punctuation, are you sure that this is the right thing to do?
your example, "Thus" should be in the same paragraph/line as the previous sentence because it's a logical continuation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undid the change - not related to the bug
README
Outdated
| auto | ||
| Depends on ethtool setting and adapter ability. | ||
| See ethtool -k <eth0> | grep large-receive-offload | ||
| Depends on ethtool setting and adapter ability. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is more readable with the TAP before the sentence, WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undid the change - not related to the bug
README
Outdated
| Default value is 16000 | ||
| Number of Work Request Elements allocated in all RQs. | ||
| Maps to **XLIO_RX_WRE** environment variable. | ||
| Default value is 32 KB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note that this might be different value if its striding RQ, look at the OLD XLIO_RX_WRE
"XLIO_RX_WRE
Number of Work Request Elements allocated in all RQs.
Default value is 128 for XLIO_STRQ=1 (default) or 32768 for XLIO_STRQ=0."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undid the change - not related to the bug
BasharRadya
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
t
README
Outdated
| XLIO_STRQ_STRIDE_SIZE_BYTES. | ||
| Values: on, off | ||
| Default: on (Enabled) | ||
| Default value is 1 (Enabled) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why write default twice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undid the change - not related to the bug
| Maps to **XLIO_STRQ_STRIDE_SIZE_BYTES** environment variable. | ||
| Must be power of two and in range [64 - 8192]. | ||
| Default: 64 | ||
| Default value is 64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why write default twice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undid the change - not related to the bug
| Maps to **XLIO_SERVICE_NOTIFY_DIR** environment variable. | ||
| Default value is /tmp/xlio/ | ||
| Note: when used xliod must be run with --notify-dir directing the same folder. | ||
| Default value is /tmp/xlio |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why default twice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undid the change - not related to the bug
| @@ -1445,27 +1445,27 @@ | |||
| "type": "string", | |||
| "default": "", | |||
| "title": "Statistics file path", | |||
| "description": "Redirect socket statistics to a specific user defined file. Maps to XLIO_STATS_FILE environment variable. Library will dump each socket's statistics into a file when closing the socket.\nExample: XLIO_STATS_FILE=/tmp/stats" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please keep the example "Example: XLIO_STATS_FILE=/tmp/stats"
| }, | ||
| "byte_threshold": { | ||
| "type": "integer", | ||
| "default": 0, | ||
| "minimum": 0, | ||
| "title": "Data threshold for flush", | ||
| "description": "Triggers TCP nodelay only if unsent data is larger than this value. The value is in bytes. Default 0 means no threshold - immediate sending. Maps to XLIO_TCP_NODELAY_TRESHOLD environment variable." | ||
| "description": "Triggers TCP nodelay only if unsent data is larger than this value.\nThe value is in bytes.\n0 means no threshold - immediate sending.\nMaps to XLIO_TCP_NODELAY_TRESHOLD environment variable." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
effective only if nodelay=true
README
Outdated
| Default value is 1 KB | ||
| Maximum size of the Data Encryption Key cache for TLS offload operations. | ||
| Maps to **XLIO_HIGH_WMARK_DEK_CACHE_SIZE** environment variable. | ||
| Default value is 1KB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Search KB or smethn else maybe need to add
"Supports suffixes: B, KB, MB, GB." or other supported suffixes
| When enabled (value > 0), even if the socket receive ready packet queue is | ||
| not empty it will still check the CQ for ready completions for processing. | ||
| This CQ polling rate is controlled in nano-second resolution to prevent CPU consumption because of over CQ polling. | ||
| This will enable a more 'real time' monitoring of the sockets ready packet queue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"When disabled (0) " & "Disable with 0." is kinda duplication
README
Outdated
| Monitor of the applications socket usage of current, | ||
| max and dropped bytes and packet counters can be done with xlio_stats. | ||
| Maps to **XLIO_RX_BYTES_MIN** environment variable. | ||
| Default value is 64KB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets check if this param and other params that uses KB really supports this type of suffixes
| latency is improved dramatically. | ||
| This comes on account of CPU utilization. | ||
| Value range is -1, 0 to 100,000,000. | ||
| Where value of -1 is used for infinite polling and 0 is used for no polling (interrupt driven). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i prefer this syntax
"Where value of -1 is used for infinite polling
Where value of 0 is used for no polling (interrupt driven)"
| Default value is 64 | ||
|
|
||
| performance.rings.tx.max_inline_size | ||
| Maximum data size sent inline. Setting to 0 disables inlining. Maps to **XLIO_TX_MAX_INLINE** environment variable. Max send inline data set for QP. Data copied into the INLINE space is at least 32 bytes of headers and the rest can be user datagram payload. XLIO_TX_MAX_INLINE=0 disables INLINEing on the Tx transmit path. In older releases this parameter was called: XLIO_MAX_INLINE. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets remove this line "Maximum data size sent inline. Setting to 0 disables inlining."
its redundant
README
Outdated
|
|
||
| performance.rings.tx.max_on_device_memory | ||
| Maximum On Device Memory buffer size for each TX ring. 0 means unlimited. Maps to **XLIO_RING_DEV_MEM_TX** environment variable. | ||
| Maximum On Device Memory buffer size for each TX ring. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets stick with the original?
XLIO can use the On Device Memory to store the egress packet if it does not fit into
the BF inline buffer. This improves application egress latency by reducing PCI transactions.
Using XLIO_RING_DEV_MEM_TX, the user can set the amount of On Device Memory buffer allocated
for each TX ring.
The total size of the On Device Memory is limited to 256k for a single port HCA and to
128k for dual port HCA.
Default value is 0
README
Outdated
| Number of Work Request Elements allocated in all transmit QPs. | ||
| Maps to **XLIO_TX_WRE** environment variable. | ||
| The number of QPs can change according to the number of network offloaded interfaces. | ||
| Default value is 32KB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check if we can take KB here
Lets convert the legacy config params usage in the examples to the new config params (e.g. Interrupt ModerationThe basic idea behind interrupt moderation is that the HW will not generate The adaptive interrupt moderation change this packet count and time period
|
e751519 to
4dc59b4
Compare
|
TODO remaining |
4dc59b4 to
789d41c
Compare
|
@BasharRadya - ready. please take a look. Thanks <3 |
b4c9dad to
5d7331e
Compare
| Default value is 256 KB | ||
| Maps to **XLIO_MAX_TSO_SIZE** environment variable. | ||
| Maximum size in bytes of a TCP segment that can be transmitted with TSO. | ||
| Default value is 262144 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be much more convenient it to add KB format support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currently we either support B, KB, MB and GB or nothing - for this relatively small value I'd rather not make code change
| }, | ||
| "spare_buffers": { | ||
| "type": "integer", | ||
| "default": 32768, | ||
| "title": "Spare RX buffers", | ||
| "description": "Number of spare receive buffer a ring holds to allow for filling up QP while full receive buffers are being processed inside XLIO. Maps to XLIO_QP_COMPENSATION_LEVEL environment variable.\nDefault value is XLIO_RX_WRE / 2" | ||
| "description": "Maps to XLIO_QP_COMPENSATION_LEVEL environment variable.\nNumber of spare receive buffer a ring holds to allow for filling up QP while\nfull receive buffers are being processed inside XLIO.\nDefault value is 128 for XLIO_STRQ=1 (default) or 32768 for XLIO_STRQ=0." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why use XLIO_STRQ instead of new config path
| if value >= DocConstants.MB and value % DocConstants.MB == 0: | ||
| return f"{value // DocConstants.MB} MB" | ||
| elif value >= DocConstants.KB and value % DocConstants.KB == 0: | ||
| return f"{value // DocConstants.KB} KB" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but some support KB "Supports suffixes: B, KB, MB, GB"..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, this just prettifies numbers - the prettifying to KB seemed redundant. (2048 -> 2KB)
README
Outdated
| socket is a UDP unicast socket and no multicast addresses were added to it. | ||
| Once the first ADD_MEMBERSHIP is called the RX poll duration setting takes effect. | ||
| Value range is similar to the RX poll duration: | ||
| - -1 means infinite, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"." instead of ","
| Number of TX buffers fetched by a UDP socket at once. Maps to **TX_BUFS_BATCH_UDP** environment variable. | ||
| Default value is 16 | ||
| Number of TX buffers fetched by a UDP socket at once. | ||
| Maps to **TX_BUFS_BATCH_UDP** environment variable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Maps" is not immediately after the title.
check all other params please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my mistake, thanks
5d7331e to
8ee1a65
Compare
|
fixed comments @BasharRadya :) |
Fix bug in generate_docs.py where non-dict properties caused processing failures. Add proper type checking and error handling to prevent crashes when encountering unexpected property types in the JSON schema. Changes in generate_docs.py: - Add type check to skip non-dict properties - Wrap property processing in try-catch block - Add error reporting with property path context Regenerate README documentation with the fixed script: - Document memory size suffix support (B, KB, MB, GB) for memory params - Simplify worker threads documentation for better clarity - Fix inconsistent default value formatting - Tidying spaces, indents - Standardizing the mapping to legacy in the description. This ensures robust documentation generation and provides users with complete information about memory size formatting and threading options. Signed-off-by: Tomer Cabouly <[email protected]>
8ee1a65 to
c58b13c
Compare
|
Looks good, will approve once CI passes. |
|
bot:retest |
Description
Fix bug in generate_docs.py where non-dict properties caused processing failures. Add proper type checking and error handling to prevent crashes when encountering unexpected property types in the JSON schema.
Changes in generate_docs.py:
Regenerate README documentation with the fixed script:
This ensures robust documentation generation and provides users with complete information about memory size formatting and threading options.
What
fix generate_docs.py and update README documentation
Why ?
Fixes 4633470. enables #395
How ?
It is optional but for complex PRs please provide information about the design,
architecture, approach, etc.
Change type
What kind of change does this PR introduce?
Check list