summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/transport.c
diff options
context:
space:
mode:
authorSimon Zhang <yuwei1.zhang@intel.com>2019-09-02 22:54:00 +0800
committerFlorin Coras <florin.coras@gmail.com>2019-09-10 20:02:55 +0000
commit1146ff4bcd336d8efc19405f1d83914e6115a01f (patch)
tree314970d121e92fce05e1d122ddeeb5fccd9439a6 /src/vnet/session/transport.c
parentb97641c79f4aaf0069268c550f263167ddea2b34 (diff)
tcp: enable gso in tcp hoststack
Type: feature Change-Id: If68d07fbe8c6f7fffd2f93c7e854367082927e4f Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
Diffstat (limited to 'src/vnet/session/transport.c')
-rw-r--r--src/vnet/session/transport.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vnet/session/transport.c b/src/vnet/session/transport.c
index c1c908eae1a..6caa4d38cd7 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)
@@ -656,9 +656,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;
}