Home / Function/ calculateRecvIoPrio() — netty Function Reference

calculateRecvIoPrio() — netty Function Reference

Architecture documentation for the calculateRecvIoPrio() function in AbstractIoUringStreamChannel.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  7684e1d1_c90a_3647_fca5_52c1485dbb4e["calculateRecvIoPrio()"]
  2ef046a1_16aa_1708_4ba7_113c9fa2862e["IoUringStreamUnsafe"]
  7684e1d1_c90a_3647_fca5_52c1485dbb4e -->|defined in| 2ef046a1_16aa_1708_4ba7_113c9fa2862e
  59498236_2b4d_5c66_9f07_08c2b7375a6b["scheduleRead0()"]
  59498236_2b4d_5c66_9f07_08c2b7375a6b -->|calls| 7684e1d1_c90a_3647_fca5_52c1485dbb4e
  fa8d19bc_1143_f4c3_84c4_ef07823cb9be["scheduleReadProviderBuffer()"]
  fa8d19bc_1143_f4c3_84c4_ef07823cb9be -->|calls| 7684e1d1_c90a_3647_fca5_52c1485dbb4e
  style 7684e1d1_c90a_3647_fca5_52c1485dbb4e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport-classes-io_uring/src/main/java/io/netty/channel/uring/AbstractIoUringStreamChannel.java lines 318–329

        private short calculateRecvIoPrio(boolean first, boolean socketIsEmpty) {
            // Depending on if socketIsEmpty is true we will arm the poll upfront and skip the initial transfer
            // attempt.
            // See https://github.com/axboe/liburing/wiki/io_uring-and-networking-in-2023#socket-state
            if (first) {
                // IORING_RECVSEND_POLL_FIRST and IORING_CQE_F_SOCK_NONEMPTY were added in the same release (5.19).
                // We need to check if it's supported as otherwise providing these would result in an -EINVAL.
                return socketIsEmpty && IoUring.isCqeFSockNonEmptySupported() ?
                        Native.IORING_RECVSEND_POLL_FIRST : 0;
            }
            return 0;
        }

Domain

Subdomains

Frequently Asked Questions

What does calculateRecvIoPrio() do?
calculateRecvIoPrio() is a function in the netty codebase, defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/AbstractIoUringStreamChannel.java.
Where is calculateRecvIoPrio() defined?
calculateRecvIoPrio() is defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/AbstractIoUringStreamChannel.java at line 318.
What calls calculateRecvIoPrio()?
calculateRecvIoPrio() is called by 2 function(s): scheduleRead0, scheduleReadProviderBuffer.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free