MdeModulePkg:TcpDriver need to use EFI_D_NET for DEBUG maessage.

Tcp driver need to use EFI_D_NET to log DEBUG message,
So it becomes easy to separate/filter out debug messages
from network stack versus generic EFI_D_INFO debugs.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Subramanian Sriram <sriram-s@hpe.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
This commit is contained in:
Zhang Lubo 2016-09-23 12:01:28 +08:00 committed by Jiaxin Wu
parent f3612a8d58
commit dea6914dac
5 changed files with 47 additions and 47 deletions

View File

@ -1,7 +1,7 @@
/** @file
Implementation of the Socket.
Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -413,7 +413,7 @@ SockWakeListenToken (
RemoveEntryList (&Sock->ConnectionList);
Parent->ConnCnt--;
DEBUG ((EFI_D_INFO, "SockWakeListenToken: accept a socket, now conncnt is %d", Parent->ConnCnt));
DEBUG ((EFI_D_NET, "SockWakeListenToken: accept a socket, now conncnt is %d", Parent->ConnCnt));
Sock->Parent = NULL;
}
@ -664,7 +664,7 @@ SockCreate (
Parent->ConnCnt++;
DEBUG (
(EFI_D_INFO,
(EFI_D_NET,
"SockCreate: Create a new socket and add to parent, now conncnt is %d\n",
Parent->ConnCnt)
);
@ -753,7 +753,7 @@ SockDestroy (
(Sock->Parent->ConnCnt)--;
DEBUG (
(EFI_D_INFO,
(EFI_D_NET,
"SockDestroy: Delete a unaccepted socket from parent"
"now conncnt is %d\n",
Sock->Parent->ConnCnt)

View File

@ -453,7 +453,7 @@ SockAccept (
Socket->Parent->ConnCnt--;
DEBUG (
(EFI_D_INFO,
(EFI_D_NET,
"SockAccept: Accept a socket, now conncount is %d",
Socket->Parent->ConnCnt)
);

View File

@ -75,7 +75,7 @@ TcpFastRecover (
TcpRetransmit (Tcb, Tcb->SndUna);
Tcb->CWnd = Tcb->Ssthresh + 3 * Tcb->SndMss;
DEBUG ((EFI_D_INFO, "TcpFastRecover: enter fast retransmission"
DEBUG ((EFI_D_NET, "TcpFastRecover: enter fast retransmission"
" for TCB %p, recover point is %d\n", Tcb, Tcb->Recover));
return;
}
@ -94,7 +94,7 @@ TcpFastRecover (
// by TcpToSendData
//
Tcb->CWnd += Tcb->SndMss;
DEBUG ((EFI_D_INFO, "TcpFastRecover: received another"
DEBUG ((EFI_D_NET, "TcpFastRecover: received another"
" duplicated ACK (%d) for TCB %p\n", Seg->Ack, Tcb));
} else {
@ -114,7 +114,7 @@ TcpFastRecover (
Tcb->CWnd = MIN (Tcb->Ssthresh, FlightSize + Tcb->SndMss);
Tcb->CongestState = TCP_CONGEST_OPEN;
DEBUG ((EFI_D_INFO, "TcpFastRecover: received a full ACK(%d)"
DEBUG ((EFI_D_NET, "TcpFastRecover: received a full ACK(%d)"
" for TCB %p, exit fast recovery\n", Seg->Ack, Tcb));
} else {
@ -139,7 +139,7 @@ TcpFastRecover (
Tcb->CWnd -= Acked;
DEBUG ((EFI_D_INFO, "TcpFastRecover: received a partial"
DEBUG ((EFI_D_NET, "TcpFastRecover: received a partial"
" ACK(%d) for TCB %p\n", Seg->Ack, Tcb));
}
@ -174,7 +174,7 @@ TcpFastLossRecover (
Tcb->LossTimes = 0;
Tcb->CongestState = TCP_CONGEST_OPEN;
DEBUG ((EFI_D_INFO, "TcpFastLossRecover: received a "
DEBUG ((EFI_D_NET, "TcpFastLossRecover: received a "
"full ACK(%d) for TCB %p\n", Seg->Ack, Tcb));
} else {
@ -184,7 +184,7 @@ TcpFastLossRecover (
// fast retransmit the first unacknowledge field.
//
TcpRetransmit (Tcb, Seg->Ack);
DEBUG ((EFI_D_INFO, "TcpFastLossRecover: received a "
DEBUG ((EFI_D_NET, "TcpFastLossRecover: received a "
"partial ACK(%d) for TCB %p\n", Seg->Ack, Tcb));
}
}
@ -243,7 +243,7 @@ TcpComputeRtt (
}
DEBUG ((EFI_D_INFO, "TcpComputeRtt: new RTT for TCB %p"
DEBUG ((EFI_D_NET, "TcpComputeRtt: new RTT for TCB %p"
" computed SRTT: %d RTTVAR: %d RTO: %d\n",
Tcb, Tcb->SRtt, Tcb->RttVar, Tcb->Rto));
@ -429,7 +429,7 @@ TcpDeliverData (
return -1;
}
DEBUG ((EFI_D_INFO, "TcpDeliverData: processing FIN "
DEBUG ((EFI_D_NET, "TcpDeliverData: processing FIN "
"from peer of TCB %p\n", Tcb));
switch (Tcb->State) {
@ -713,7 +713,7 @@ TcpInput (
ASSERT (Head != NULL);
if (Nbuf->TotalSize < sizeof (TCP_HEAD)) {
DEBUG ((EFI_D_INFO, "TcpInput: received a malformed packet\n"));
DEBUG ((EFI_D_NET, "TcpInput: received a malformed packet\n"));
goto DISCARD;
}
@ -722,7 +722,7 @@ TcpInput (
if ((Head->HeadLen < 5) || (Len < 0) ||
(TcpChecksum (Nbuf, NetPseudoHeadChecksum (Src, Dst, 6, 0)) != 0)) {
DEBUG ((EFI_D_INFO, "TcpInput: received a malformed packet\n"));
DEBUG ((EFI_D_NET, "TcpInput: received a malformed packet\n"));
goto DISCARD;
}
@ -743,7 +743,7 @@ TcpInput (
);
if ((Tcb == NULL) || (Tcb->State == TCP_CLOSED)) {
DEBUG ((EFI_D_INFO, "TcpInput: send reset because no TCB found\n"));
DEBUG ((EFI_D_NET, "TcpInput: send reset because no TCB found\n"));
Tcb = NULL;
goto SEND_RESET;
@ -810,7 +810,7 @@ TcpInput (
goto DISCARD;
}
DEBUG ((EFI_D_INFO, "TcpInput: create a child for TCB %p"
DEBUG ((EFI_D_NET, "TcpInput: create a child for TCB %p"
" in listening\n", Tcb));
//
@ -902,7 +902,7 @@ TcpInput (
TCP_SET_FLG (Tcb->CtrlFlag, TCP_CTRL_ACK_NOW);
DEBUG ((EFI_D_INFO, "TcpInput: connection established"
DEBUG ((EFI_D_NET, "TcpInput: connection established"
" for TCB %p in SYN_SENT\n", Tcb));
goto StepSix;
@ -1037,7 +1037,7 @@ TcpInput (
TcpClearTimer (Tcb, TCP_TIMER_CONNECT);
TcpDeliverData (Tcb);
DEBUG ((EFI_D_INFO, "TcpInput: connection established "
DEBUG ((EFI_D_NET, "TcpInput: connection established "
" for TCB %p in SYN_RCVD\n", Tcb));
//
@ -1209,7 +1209,7 @@ NO_UPDATE:
if (TCP_FLG_ON (Tcb->CtrlFlag, TCP_CTRL_FIN_SENT) &&
(Tcb->SndUna == Tcb->SndNxt)) {
DEBUG ((EFI_D_INFO, "TcpInput: local FIN is ACKed by"
DEBUG ((EFI_D_NET, "TcpInput: local FIN is ACKed by"
" peer for connected TCB %p\n", Tcb));
TCP_SET_FLG (Tcb->CtrlFlag, TCP_CTRL_FIN_ACKED);
@ -1299,7 +1299,7 @@ StepSix:
!TCP_FIN_RCVD (Tcb->State))
{
DEBUG ((EFI_D_INFO, "TcpInput: received urgent data "
DEBUG ((EFI_D_NET, "TcpInput: received urgent data "
"from peer for connected TCB %p\n", Tcb));
Urg = Seg->Seq + Seg->Urg;

View File

@ -1,7 +1,7 @@
/** @file
Misc support routines for tcp.
Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -504,7 +504,7 @@ TcpSetState (
ASSERT (State < (sizeof (mTcpStateName) / sizeof (CHAR16 *)));
DEBUG (
(EFI_D_INFO,
(EFI_D_NET,
"Tcb (%p) state %s --> %s\n",
Tcb,
mTcpStateName[Tcb->State],
@ -815,13 +815,13 @@ TcpOnAppConsume (
if (TcpOld < Tcb->RcvMss) {
DEBUG ((EFI_D_INFO, "TcpOnAppConsume: send a window"
DEBUG ((EFI_D_NET, "TcpOnAppConsume: send a window"
" update for a window closed Tcb %p\n", Tcb));
TcpSendAck (Tcb);
} else if (Tcb->DelayedAck == 0) {
DEBUG ((EFI_D_INFO, "TcpOnAppConsume: scheduled a delayed"
DEBUG ((EFI_D_NET, "TcpOnAppConsume: scheduled a delayed"
" ACK to update window for Tcb %p\n", Tcb));
Tcb->DelayedAck = 1;

View File

@ -805,7 +805,7 @@ SEND_AGAIN:
TCP_SEQ_LT (End + 1, Tcb->SndWnd + Tcb->SndWl2)) {
DEBUG (
(EFI_D_INFO,
(EFI_D_NET,
"TcpToSendData: send FIN "
"to peer for TCB %p in state %s\n",
Tcb,
@ -883,7 +883,7 @@ SEND_AGAIN:
if ((Tcb->CongestState == TCP_CONGEST_OPEN) &&
!TCP_FLG_ON (Tcb->CtrlFlag, TCP_CTRL_RTT_ON)) {
DEBUG ((EFI_D_INFO, "TcpToSendData: set RTT measure "
DEBUG ((EFI_D_NET, "TcpToSendData: set RTT measure "
"sequence %d for TCB %p\n", Seq, Tcb));
TCP_SET_FLG (Tcb->CtrlFlag, TCP_CTRL_RTT_ON);
@ -1011,7 +1011,7 @@ TcpToSendAck (
return;
}
DEBUG ((EFI_D_INFO, "TcpToSendAck: scheduled a delayed"
DEBUG ((EFI_D_NET, "TcpToSendAck: scheduled a delayed"
" ACK for TCB %p\n", Tcb));
//