Skip to content

Commit

Permalink
src/main: improve documentation around queue count check skip
Browse files Browse the repository at this point in the history
  • Loading branch information
Geertiebear committed Oct 25, 2024
1 parent 563dbf7 commit edd2373
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <curses.h>
#include <expected_helpers.h>
#include <fcntl.h>
#include <ncurses.h>
Expand Down Expand Up @@ -469,7 +470,11 @@ tl::expected<void, std::string> VerifyQueues(FixedName<IFNAMSIZ> dev_name, const
auto channel_count = net_info::get_channel_count(dev_name);
if (!channel_count.has_value()) {
return tl::unexpected(
fmt::format("{}, channel_count error: {}\n", error_str, channel_count.error()));
fmt::format("{}, channel_count error: {}\n An invalid argument or inappropriate ioctl "
"for device error can indicate "
"insufficient multiqueue support. In this case you can opt to disable the queue check "
"using --skip-queue-count-check.",
error_str, channel_count.error()));
}

uint32_t combined_channels = channel_count.value().combined_count;
Expand Down Expand Up @@ -606,6 +611,11 @@ int main(int argc, char** argv) {
fmt::print("{} {}", error_str, res.error());
return -1;
}
} else if (user_config.skip_queue_count_check) {
spdlog::warn("Queue count check is disabled! This means sanicdns NOT verify if the amount of queues match the amount of workers. "
"In case you have more queues than workers, please use RSS to make sure redudant queues are unused like so:\n"
"sudo ethtool -x [interface] equal [num workers]. Not doing this WILL result in SEVERELY degraded performance!");
rte_delay_ms(2000);
}

auto dpdk_args = init_eal_args(user_config, ethernet_config);
Expand Down
2 changes: 1 addition & 1 deletion src/net_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ tl::expected<ethtool_channels, std::string> net_info::get_channel_count(FixedNam

if (ioctl(fd, SIOCETHTOOL, &ifr) != 0) {
close(fd);
return tl::unexpected("Error receiving from ethtool socket");
return tl::unexpected(fmt::format("Error receiving from ethtool socket: {}", strerror(errno)));
}

close(fd);
Expand Down

0 comments on commit edd2373

Please sign in to comment.