diff --git a/src/system/ether.1 b/src/system/ether.1 index c43abf51..68a69eee 100644 --- a/src/system/ether.1 +++ b/src/system/ether.1 @@ -251,6 +251,8 @@ ETHTXI: PUSH P,E PUSH P,I PUSH P,R + PUSH P,Q + PUSH P,T ; Search the ARP table for the destination address. MOVE C,PK.DST(A) @@ -304,7 +306,12 @@ ETHTX2: ;Not found in ARP table MOVEI R,ETHABF ;Data pointer MOVEI I,%NEAH"LENGTH ;Length in bytes - JRST ETHTX5 ;Send it! + PUSHJ P,ETHTX ;Send it! + JFCL ; Can't send - oh well, we'll try again later + JRST ETHTX5 + + ; As we've sent an ARP request instead of the packet we actually + ; wanted to send, don't call IPIODN. ETHTX3: ;Found MAC in ARP table ; Found the destination address in the ARP table. Send it! @@ -323,8 +330,16 @@ ETHTX3: ;Found MAC in ARP table MOVE R,PK.BUF(A) ;Data pointer LDB I,[IP$TOL(R)] ;Length in bytes, from the IP header -ETHTX5: PUSHJ P,ETHTX ;Send it! + PUSH P,A + PUSHJ P,ETHTX ;Send it! + JRST [ POP P,A ;Couldn't send - don't mark as done. + JRST ETHTX5] + POP P,A + PUSHJ P,IPIODN ;Tell IP we've sent this one. + +ETHTX5: POP P,T + POP P,Q POP P,R POP P,I POP P,E @@ -338,11 +353,12 @@ ETHTX5: PUSHJ P,ETHTX ;Send it! ;Unpacked header is in ETHHBF. R contains pointer to unpacked data. ;I contains data length in bytes. ;Clobbers A, B, C, TT, I. +;Skip-returns on success; normal return on failure. ; ;FIXME IFN UNAP,... ETHTX: BUG INFO,[ethtx ptr ],OCT,R,[ len ],OCT,I PUSHJ P,UNAFF ;Find a free transmit buffer - POPJ P, ;None left. Give up. + POPJ P, ;None left. Fail. ;BUG INFO,[ethtx buf ],OCT,B,[ desc ],OCT,D,[ len ],OCT,I MOVE TT,B ;Convert header @@ -362,6 +378,7 @@ ETHTX: BUG INFO,[ethtx ptr ],OCT,R,[ len ],OCT,I ADDI I,%NEH"LENGTH-%NEH"PAD ;Add length of header BUG INFO,[ethtx end desc ],OCT,D,[ len ],OCT,I + AOS (P) ;Success - skip return JRST UNATX ;Transmit it ;Check whether the interface is able to send a packet. @@ -648,6 +665,7 @@ UNABRK: 0 ;FIXME %UN0"TXI +;FIXME simh's code to assert RCBI is commented out... TRNE H,%UN0"RCBI SETOM UNARCB ;Just remember for when a buffer is freed @@ -675,8 +693,10 @@ UNARX1: HRRZ A,W ;Wrap index around HLLZS W HLRZ J,UNRXRP(W) ;Descriptor + HRRZ I,UNRXRP(W) ;XXX unibus MOVE Q,1(J) ;Is there a packet in this buffer? (OWN=0) + BUG INFO,[rx check buffer J=],OCT,J,[ unibus ],OCT,I,[ flags Q=],OCT,Q TLNE Q,%UNTD"OWN JRST [ SKIPGE UNRXRI ;No. First empty buffer we've found? HRRZM W,UNRXRI ; Yes, start here next time @@ -694,8 +714,11 @@ UNARX1: HRRZ A,W ;Wrap index around SUBI I,4 ;Ignore CRC at end PUSHJ P,ETHRX + BUG INFO,[rx after ethrx buffer J=],OCT,J,[ flags Q=],OCT,Q + UNARX3: TLO Q,%UNTD"OWN ;Set OWN=1 to mark as free MOVEM Q,1(J) + BUG INFO,[rx set own=1 for ],OCT,J SKIPE UNARCB ;Have we had an RCB interrupt? JRST [ SETZM UNARCB ;Yes. Tell the DEUNA there's a free buffer now. diff --git a/src/system/tcp.275 b/src/system/tcp.275 index f518d7c3..c9cc1fec 100755 --- a/src/system/tcp.275 +++ b/src/system/tcp.275 @@ -1094,6 +1094,13 @@ SUBTTL TCP Main Program Output TCPW: MOVEI A,CHRKT METER("TCP: syscal out") HLRZ I,(R) ; Get TCB index from IOCHNM wd + PUSH P,D + PUSH P,E + MOVE D,XBORTL(I) + UMOVE E,(C) ;XXX user's count + BUG INFO,[tcpw TCB index=],OCT,I,[ count=],OCT,E,[ rtq len=],OCT,D + POP P,E + POP P,D ; Verify state, do misc setup for writing, lock segment. CONO PI,NETOFF @@ -3239,6 +3246,10 @@ TSOSND: MOVSI T,(TC%ACK) ; Simple data segment ; IP$PTC - Protocol number (needn't set, assumes %PTCTC always) TSOSN: METER("TCP: Out segs") + PUSH P,A + MOVE A,TT + BUG INFO,[tsosn index=],OCT,I,[ sending bytes=],OCT,A + POP P,A AND T,[TH%CTL] ; Ensure non-flag bits are flushed. MOVE A,T ANDCAB A,XBSTAT(I) ; Turn off these request bits @@ -3314,6 +3325,10 @@ TSOSN2: LDB A,[PK$TDO (R)] ; Bytes of header ADD TT,XBSNXT(I) ; Get new SND.NXT TLZ TT,%MOD32 MOVEM TT,XBSNXT(I) + PUSH P,A + MOVE A,TT + BUG INFO,[tsosn new snd.nxt=],OCT,A + POP P,A SKIPN XBORTT(I) ; Retrans timeout already set? JRST [ MOVE A,TIME ADD A,TCPTMO ; Make it 5 sec for now. @@ -3326,7 +3341,11 @@ TSOSN2: LDB A,[PK$TDO (R)] ; Bytes of header CALL PKQPL(PK.TCP) ; Put on TCP retrans queue AOS XBORTL(I) ; Bump count of segs on queue -TSOSN8: CALL IPKSND ; Put on IP output queue +TSOSN8: PUSH P,A + MOVE A,XBORTL(I) + BUG INFO,[tsosn8 sending index=],OCT,I,[ rtq len=],OCT,A + POP P,A + CALL IPKSND ; Put on IP output queue RET SUBTTL TCP Retransmit and Timeout