tcp: avoid rcv wnd more than RX fifo can enqueue

Type: fix

Signed-off-by: Ryujiro Shibuya <ryujiro.shibuya@owmobility.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie358b731f8ecb1fcaebd6e79f5ce5c10802c2814
diff --git a/src/vppinfra/clib.h b/src/vppinfra/clib.h
index 6961d10..be21cad 100644
--- a/src/vppinfra/clib.h
+++ b/src/vppinfra/clib.h
@@ -254,6 +254,12 @@
 }
 
 always_inline uword
+round_down_pow2 (uword x, uword pow2)
+{
+  return (x) & ~(pow2 - 1);
+}
+
+always_inline uword
 round_pow2 (uword x, uword pow2)
 {
   return (x + pow2 - 1) & ~(pow2 - 1);