maskit commented on code in PR #9905:
URL: https://github.com/apache/trafficserver/pull/9905#discussion_r1245486241
##########
iocore/net/UnixUDPNet.cc:
##########
@@ -1452,13 +1709,22 @@ net_signal_hook_callback(EThread *thread)
#endif
}
-UDPNetHandler::UDPNetHandler(bool enable_gso) : udpOutQueue(enable_gso)
+UDPNetHandler::UDPNetHandler(Cfg &&cfg) : udpOutQueue(cfg.enable_gso),
_cfg{std::move(cfg)}
{
nextCheck = Thread::get_hrtime_updated() + HRTIME_MSECONDS(1000);
lastCheck = 0;
SET_HANDLER(&UDPNetHandler::startNetEvent);
}
+bool
+UDPNetHandler::is_gro_enabled() const
+{
+#ifndef SOL_UDP
+ return false;
+#endif
+ return this->_cfg.enable_gro;
Review Comment:
It may be ok, but some analyzer may say this line is unreachable. I'd have
this line in an else clause.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]