Skip to content

Commit

Permalink
dnsdist: Fix code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
rgacogne committed Jul 8, 2024
1 parent 251201d commit 9d0e129
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pdns/xsk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void checkUmemIntegrity(const char* function, int line, std::shared_ptr<LockGuar
{
auto umems = s_umems.lock();
if (validStatuses.count(umems->at({vect.get(), offset}).status) == 0) {
std::cerr << "UMEM integrity check failed at " << function << ": " << line << ": status of "<<(void*)vect.get()<<", "<<offset<<" is " << static_cast<int>(umems->at({vect.get(), offset}).status) << ", expected: ";
std::cerr << "UMEM integrity check failed at " << function << ": " << line << ": status of " << (void*)vect.get() << ", " << offset << " is " << static_cast<int>(umems->at({vect.get(), offset}).status) << ", expected: ";
for (const auto status : validStatuses) {
std::cerr << static_cast<int>(status) << " ";
}
Expand Down Expand Up @@ -918,7 +918,7 @@ void XskPacket::rewrite() noexcept
/* needed to get the correct checksum */
setIPv4Header(ipHeader);
setUDPHeader(udpHeader);
//udpHeader.check = tcp_udp_v4_checksum(&ipHeader);
// udpHeader.check = tcp_udp_v4_checksum(&ipHeader);
rewriteIpv4Header(&ipHeader, getFrameLen());
setIPv4Header(ipHeader);
setUDPHeader(udpHeader);
Expand Down
6 changes: 5 additions & 1 deletion pdns/xsk.hh
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,11 @@ bool operator<(const XskPacket& lhs, const XskPacket& rhs) noexcept;
class XskWorker
{
public:
enum class Type : uint8_t { OutgoingOnly, Bidirectional};
enum class Type : uint8_t
{
OutgoingOnly,
Bidirectional
};

private:
using XskPacketRing = boost::lockfree::spsc_queue<XskPacket, boost::lockfree::capacity<XSK_RING_CONS__DEFAULT_NUM_DESCS * 2>>;
Expand Down

0 comments on commit 9d0e129

Please sign in to comment.