Skip to content

Commit

Permalink
issue: 4209215 Configure TSO and LRO default to ON
Browse files Browse the repository at this point in the history
Changed TSO and LRO defaults ON  instead of auto for simplified configuration.

Signed-off-by: Bashar Abdelgafer <[email protected]>
  • Loading branch information
BasharRadya authored and root committed Dec 14, 2024
1 parent 5f5d01c commit 5da4add
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
11 changes: 3 additions & 8 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -486,11 +486,8 @@ prototype TCP and IP headers of the incoming send buffer to carve out segments
of required size. Copying the prototype header and options, then calculating
the sequence number and checksum fields creates TCP segment headers.
Expected benefits: Throughput increase and CPU unload.
Default value: auto
Default value: on

auto
Depends on ethtool setting and adapter ability.
See ethtool -k <eth0> | grep tcp-segmentation-offload
on
Enabled in case adapter supports it
off
Expand All @@ -513,11 +510,9 @@ high-bandwidth network connections by reducing central processing unit (CPU)
overhead. It works by aggregating multiple incoming packets from a single stream
into a larger buffer before they are passed higher up the networking stack,
thus reducing the number of packets that must be processed.
Default value: auto
Default value: on


auto
Depends on ethtool setting and adapter ability.
See ethtool -k <eth0> | grep large-receive-offload
on
Enabled in case adapter supports it
off
Expand Down
6 changes: 2 additions & 4 deletions src/core/dev/ring_simple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,7 @@ void ring_simple::create_resources()

/* Detect TSO capabilities */
memset(&m_tso, 0, sizeof(m_tso));
if ((safe_mce_sys().enable_tso == option_3::ON) ||
((safe_mce_sys().enable_tso == option_3::AUTO) && (1 == validate_tso(get_if_index())))) {
if ((safe_mce_sys().enable_tso == option_3::ON)) {
if (xlio_check_dev_attr_tso(m_p_ib_ctx->get_ibv_device_attr())) {
const xlio_ibv_tso_caps *caps =
&xlio_get_tso_caps(m_p_ib_ctx->get_ibv_device_attr_ex());
Expand All @@ -280,8 +279,7 @@ void ring_simple::create_resources()

/* Detect LRO capabilities */
memset(&m_lro, 0, sizeof(m_lro));
if ((safe_mce_sys().enable_lro == option_3::ON) ||
((safe_mce_sys().enable_lro == option_3::AUTO) && (1 == validate_lro(get_if_index())))) {
if (safe_mce_sys().enable_lro == option_3::ON) {
dpcp::adapter_hca_capabilities caps;

if (m_p_ib_ctx->get_dpcp_adapter() &&
Expand Down
4 changes: 2 additions & 2 deletions src/core/util/sys_vars.h
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ extern mce_sys_var &safe_mce_sys();
#define MCE_MIN_CQ_POLL_BATCH (1)
#define MCE_MAX_CQ_POLL_BATCH (32768)
#define MCE_DEFAULT_SOCKETXTREME (false)
#define MCE_DEFAULT_TSO (option_3::AUTO)
#define MCE_DEFAULT_TSO (option_3::ON)
#define MCE_DEFAULT_MAX_TSO_SIZE (256 * 1024)
#ifdef DEFINED_UTLS
#define MCE_DEFAULT_UTLS_RX (false)
Expand All @@ -879,7 +879,7 @@ extern mce_sys_var &safe_mce_sys();
#define MCE_DEFAULT_UTLS_LOW_WMARK_DEK_CACHE_SIZE (512)
#endif /* DEFINED_UTLS */

#define MCE_DEFAULT_LRO (option_3::AUTO)
#define MCE_DEFAULT_LRO (option_3::ON)
#define MCE_DEFAULT_DEFERRED_CLOSE (false)
#define MCE_DEFAULT_TCP_ABORT_ON_CLOSE (false)
#define MCE_DEFAULT_RX_POLL_ON_TX_TCP (false)
Expand Down

0 comments on commit 5da4add

Please sign in to comment.