diff options
author | Simon Zhang <yuwei1.zhang@intel.com> | 2019-09-02 22:54:00 +0800 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2019-09-29 16:32:26 +0000 |
commit | 6f3621d772d0dafa745081b32a8769b4c42af059 (patch) | |
tree | 5d10459d038e89a1d591f126b3ec33cd840b7854 /src/vnet/session | |
parent | 56f1938ee26993c9777f42c1d7589999ac266cbe (diff) |
tcp: enable gso in tcp hoststack
Type: feature
Change-Id: If68d07fbe8c6f7fffd2f93c7e854367082927e4f
Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
(cherry picked from commit 1146ff4bcd336d8efc19405f1d83914e6115a01f)
Diffstat (limited to 'src/vnet/session')
-rw-r--r-- | src/vnet/session/transport.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vnet/session/transport.c b/src/vnet/session/transport.c index aa8deac5400..1b7928162b6 100644 --- a/src/vnet/session/transport.c +++ b/src/vnet/session/transport.c @@ -49,7 +49,7 @@ static double transport_pacer_period; #define TRANSPORT_PACER_MIN_MSS 1460 #define TRANSPORT_PACER_MIN_BURST TRANSPORT_PACER_MIN_MSS -#define TRANSPORT_PACER_MAX_BURST (32 * TRANSPORT_PACER_MIN_MSS) +#define TRANSPORT_PACER_MAX_BURST (43 * TRANSPORT_PACER_MIN_MSS) u8 * format_transport_proto (u8 * s, va_list * args) @@ -703,9 +703,10 @@ transport_connection_snd_space (transport_connection_t * tc, u64 time_now, { time_now >>= SPACER_CPU_TICKS_PER_PERIOD_SHIFT; max_paced_burst = spacer_max_burst (&tc->pacer, time_now); - max_paced_burst = (max_paced_burst < mss) ? 0 : max_paced_burst; + max_paced_burst = + (max_paced_burst < TRANSPORT_PACER_MIN_BURST) ? 0 : max_paced_burst; snd_space = clib_min (snd_space, max_paced_burst); - snd_space = snd_space - snd_space % mss; + return snd_space >= mss ? snd_space - snd_space % mss : snd_space; } return snd_space; } |