mitre decbit changes
authorKeith Sklower <sklower@ucbvax.Berkeley.EDU>
Wed, 17 Jan 1990 14:18:00 +0000 (06:18 -0800)
committerKeith Sklower <sklower@ucbvax.Berkeley.EDU>
Wed, 17 Jan 1990 14:18:00 +0000 (06:18 -0800)
SCCS-vsn: sys/netiso/tp_param.h 7.5
SCCS-vsn: sys/netiso/tp.trans 7.4

usr/src/sys/netiso/tp.trans
usr/src/sys/netiso/tp_param.h

index 74ce2ab..7dd5a30 100644 (file)
@@ -50,7 +50,7 @@ SOFTWARE.
 *INCLUDE
 
 {
 *INCLUDE
 
 {
-/*     @(#)tp.trans    7.3 (Berkeley) %G% */
+/*     @(#)tp.trans    7.4 (Berkeley) %G% */
 #include "param.h"
 #include "socket.h"
 #include "socketvar.h"
 #include "param.h"
 #include "socket.h"
 #include "socketvar.h"
index 9628e87..d46064c 100644 (file)
@@ -29,7 +29,7 @@ SOFTWARE.
  *
  * $Header: tp_param.h,v 5.3 88/11/18 17:28:18 nhall Exp $
  * $Source: /usr/argo/sys/netiso/RCS/tp_param.h,v $
  *
  * $Header: tp_param.h,v 5.3 88/11/18 17:28:18 nhall Exp $
  * $Source: /usr/argo/sys/netiso/RCS/tp_param.h,v $
- *     @(#)tp_param.h  7.4 (Berkeley) %G% *
+ *     @(#)tp_param.h  7.5 (Berkeley) %G% *
  *
  */
 
  *
  */
 
@@ -298,12 +298,20 @@ bcopy((caddr_t)&(((struct tp_vbp *)(src))->tpv_val),(caddr_t)&(dst),sizeof(type)
 #define LOCAL_CREDIT(tpcb) tp_local_credit(tpcb)
 #else
 #define LOCAL_CREDIT( tpcb ) {\
 #define LOCAL_CREDIT(tpcb) tp_local_credit(tpcb)
 #else
 #define LOCAL_CREDIT( tpcb ) {\
-       register struct sockbuf *xxsb = &((tpcb)->tp_sock->so_rcv);\
-       register int xxi = ((xxsb)->sb_hiwat-(xxsb)->sb_cc);\
-       register int maxcredit = ((tpcb)->tp_xtd_format?0xffff:0xf);\
-       maxcredit = ((tpcb)->tp_decbit?1:maxcredit);\
-       xxi = (xxi<0) ? 0 : ((xxi)>>(tpcb)->tp_tpdusize);\
-       (tpcb)->tp_lcredit = MIN( xxi ,maxcredit );\
+    register struct sockbuf *xxsb = &((tpcb)->tp_sock->so_rcv);\
+    register int xxi = ((xxsb)->sb_hiwat-(xxsb)->sb_cc);\
+    register int maxcredit = ((tpcb)->tp_xtd_format?0xffff:0xf);\
+    xxi = (xxi<0) ? 0 : ((xxi)>>(tpcb)->tp_tpdusize);\
+    xxi = MIN(xxi, maxcredit); \
+    if (!(tpcb->tp_cebit_off)) { \
+        (tpcb)->tp_lcredit = ROUND((tpcb)->tp_win_recv); \
+        if (xxi < (tpcb)->tp_lcredit) { \
+            (tpcb)->tp_lcredit = xxi; \
+        } \
+    } \
+    else { \
+        (tpcb)->tp_lcredit = xxi; \
+    } \
 }
 #endif ARGO_DEBUG
 
 }
 #endif ARGO_DEBUG