Home / Function/ setupFlags() — netty Function Reference

setupFlags() — netty Function Reference

Architecture documentation for the setupFlags() function in Native.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  24f8b1e0_7e28_2451_d646_864923caca80["setupFlags()"]
  6ddaf968_1eb9_8057_3938_2ad6d5ebbbeb["Native"]
  24f8b1e0_7e28_2451_d646_864923caca80 -->|defined in| 6ddaf968_1eb9_8057_3938_2ad6d5ebbbeb
  style 24f8b1e0_7e28_2451_d646_864923caca80 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport-classes-io_uring/src/main/java/io/netty/channel/uring/Native.java lines 364–391

    static int setupFlags(boolean useSingleIssuer) {
        int flags = Native.IORING_SETUP_R_DISABLED | Native.IORING_SETUP_CLAMP;
        if (IoUring.isSetupSubmitAllSupported()) {
            flags |= Native.IORING_SETUP_SUBMIT_ALL;
        }

        if (useSingleIssuer) {
            // See https://github.com/axboe/liburing/wiki/io_uring-and-networking-in-2023#task-work
            if (IoUring.isSetupSingleIssuerSupported()) {
                flags |= Native.IORING_SETUP_SINGLE_ISSUER;
            }
            // IORING_SETUP_DEFER_TASKRUN also requires IORING_SETUP_SINGLE_ISSUER.
            if (IoUring.isSetupDeferTaskrunSupported()) {
                flags |= Native.IORING_SETUP_DEFER_TASKRUN;
            }
        }
        // liburing uses IORING_SETUP_NO_SQARRAY by default these days, we should do the same by default if possible.
        // See https://github.com/axboe/liburing/releases/tag/liburing-2.6
        if (IoUring.isIoringSetupNoSqarraySupported()) {
            flags  |= Native.IORING_SETUP_NO_SQARRAY;
        }

        // Use IORING_SETUP_CQE_MIXED by default if supported so we can support any OP in the future.
        if (IoUring.isSetupCqeMixedSupported()) {
            flags |= Native.IORING_SETUP_CQE_MIXED;
        }
        return flags;
    }

Domain

Subdomains

Frequently Asked Questions

What does setupFlags() do?
setupFlags() is a function in the netty codebase, defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/Native.java.
Where is setupFlags() defined?
setupFlags() is defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/Native.java at line 364.

Analyze Your Own Codebase

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

Try Supermodel Free