Skip to content
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

EF_AF_XDP_ZEROCOPY for X2522 adapter #261

Open
boyracer2014 opened this issue Feb 3, 2025 · 1 comment
Open

EF_AF_XDP_ZEROCOPY for X2522 adapter #261

boyracer2014 opened this issue Feb 3, 2025 · 1 comment

Comments

@boyracer2014
Copy link

Trying out a few XDP things including Onload/XDP. I build this with the --no-sfc flag.

It works fine:

[root]# onload --profile=latency-best ~/tcp_pingpong -s -l 10.0.0.1
oo:tcp_pingpong[459999]: Using Onload 9ade120 2025-01-22 master [0]
oo:tcp_pingpong[459999]: Copyright (c) 2002-2025 Advanced Micro Devices, Inc.
^C

However, adding the EF_AF_XDP_ZEROCOPY flags brings

[root]# EF_AF_XDP_ZEROCOPY=1 onload --profile=latency-best ~/tcp_pingpong -s -l 10.0.0.1
oo:tcp_pingpong[459944]: netif_tcp_helper_alloc_u: ERROR: Failed to allocate stack (rc=-95)
See kernel messages in dmesg or /var/log/syslog for more details of this failure
^C

Any suggestions what to check ?

dmesg does not really report anything

[260611.705669] [onload] [5]: WARNING: huge pages are incompatible with AF_XDP. Disabling hugepage support.
[260611.723604] [sfc efhw] af_xdp_flush_rx_dma_channel: FIXME AF_XDP
[260611.727675] [sfc efhw] af_xdp_flush_tx_dma_channel: FIXME AF_XDP
@boyracer2014
Copy link
Author

fwiw, i am seeing the NOT activated from another program. Anything special on how to build the SFC driver for this in order to support it ?

if (xsk->index == 0) {
        struct xdp_options xdp_opts;
        socklen_t socklen = sizeof(xdp_opts);
        ret = getsockopt(xsk_socket__fd(xsk->socket), SOL_XDP,
            XDP_OPTIONS, &xdp_opts, &socklen);
        if (ret) {
            log("getsockopt(XDP_OPTIONS)", ret);
        } else if (xdp_opts.flags & XDP_OPTIONS_ZEROCOPY) {
            log_info("Zero copy is activated!");
        } else {
            log_info("Zero copy is NOT activated!");
        }
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant