facebook / mvfst

An implementation of the QUIC transport protocol.
MIT License
1.5k stars 243 forks source link

Getting `error: ‘XDP_RING_NEED_WAKEUP’ was not declared in this scope` #336

Open MaoZiming opened 7 months ago

MaoZiming commented 7 months ago

After I run ./getdeps.sh, I got:

/home/maoziming/mvfst/quic/xsk/XskSender.cpp: In member function ‘facebook::xdpsocket::FlushResult facebook::xdpsocket::XskSender::flush()’:
/home/maoziming/mvfst/quic/xsk/XskSender.cpp:231:65: error: ‘struct xdp_ring_offset’ has no member named ‘flags’
   auto* txFlagsPtr = (uint32_t*)((char*)txMap_ + xskOffsets_.tx.flags);
                                                                 ^~~~~
/home/maoziming/mvfst/quic/xsk/XskSender.cpp:233:16: error: ‘XDP_RING_NEED_WAKEUP’ was not declared in this scope
   if ((flags & XDP_RING_NEED_WAKEUP) == 0) {
                ^~~~~~~~~~~~~~~~~~~~
[5/9] Linking CXX executable quic/state/stream/test/StreamStateMachineTest
ninja: build stopped: subcommand failed.
Command '['/home/maoziming/mvfst/_build/cmake-pNzDN3_ukf8D67iTaRoPsUjLvudo8Zitt6QyfUML6Fw/bin/cmake', '--build', '/tmp/fbcode_builder_getdeps-ZhomeZmaozimingZmvfstZbuildZfbcode_builder/build/mvfst', '--target', 'install', '--config', 'RelWithDebInfo', '-j', '8']' returned non-zero exit status 1.
!! Failed

I am on Debian GNU/Linux 10 (buster)

codeDing18 commented 3 months ago

I have the same problem.How did you solve it?

ViggoC commented 3 months ago

@MaoZiming @codeDing18 I guess it's related to linux kernel version, the flags is introduced in 5.4 https://github.com/torvalds/linux/commit/77cd0d7b3f257fd0e3096b4fdcff1a7d38e99e10

ycchildcoder commented 4 weeks ago

error: ‘struct xdp_ring_offset’ has no member named ‘flags’
i have the same problem too。

Is this error related to the kernel version?
i am using this kernel version: 4.18.0-193.6.3.el8_2.x86_64