From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=ting.ye@intel.com; receiver=edk2-devel@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4BB0E21B00DC1 for ; Tue, 14 Nov 2017 23:11:31 -0800 (PST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Nov 2017 23:15:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,398,1505804400"; d="scan'208";a="173701722" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga005.jf.intel.com with ESMTP; 14 Nov 2017 23:15:38 -0800 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 14 Nov 2017 23:15:38 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 14 Nov 2017 23:15:37 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.213]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.152]) with mapi id 14.03.0319.002; Wed, 15 Nov 2017 15:15:36 +0800 From: "Ye, Ting" To: "Fu, Siyuan" , "edk2-devel@lists.01.org" CC: "Wu, Jiaxin" Thread-Topic: [Patch] MdeModulePkg/SNP: remove redundant DEBUG print in SNP Transmit.c Thread-Index: AQHTXb/mSThunOG/6ku7jZwEBQaVHqMVB3xQ Date: Wed, 15 Nov 2017 07:15:35 +0000 Message-ID: References: <20171115031443.17784-1-siyuan.fu@intel.com> In-Reply-To: <20171115031443.17784-1-siyuan.fu@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] MdeModulePkg/SNP: remove redundant DEBUG print in SNP Transmit.c X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2017 07:11:31 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ye Ting =20 -----Original Message----- From: Fu, Siyuan=20 Sent: Wednesday, November 15, 2017 11:15 AM To: edk2-devel@lists.01.org Cc: Wu, Jiaxin ; Ye, Ting Subject: [Patch] MdeModulePkg/SNP: remove redundant DEBUG print in SNP Tran= smit.c This patch is to remove some redundant DEBUG output in SNP transmit functio= n. In case of return EFI_NOT_READY in PxeTransmit, the SNP driver is indicate = the caller that the transmit queue is full, it's a very common situation dr= uing transmit, not a critical error. So the patch move the DEBUG lever to E= FI_D_NET. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan Cc: Wu Jiaxin Cc: Ye Ting --- MdeModulePkg/Universal/Network/SnpDxe/Transmit.c | 22 +++++++++++++-------= -- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/MdeModulePkg/Universal/Network/SnpDxe/Transmit.c b/MdeModulePk= g/Universal/Network/SnpDxe/Transmit.c index 73461bc..2c7083e 100644 --- a/MdeModulePkg/Universal/Network/SnpDxe/Transmit.c +++ b/MdeModulePkg/Universal/Network/SnpDxe/Transmit.c @@ -1,7 +1,7 @@ /** @file Implementation of transmitting a packet. =20 -Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made availab= le under the terms and conditions of the BSD License which accompanies thi= s distribution. The full text of the license may be found at @@ -186,7 +186= ,6 @@ PxeTransmit ( (*Snp->IssueUndi32Command) ((UINT64) (UINTN) &Snp->Cdb); =20 DEBUG ((EFI_D_NET, "\nexit Snp->undi.transmit() ")); - DEBUG ((EFI_D_NET, "\nSnp->Cdb.StatCode =3D=3D %r", Snp->Cdb.StatCode)); =20 // // we will unmap the buffers in get_status call, not here @@ -199,19 +19= 8,24 @@ PxeTransmit ( case PXE_STATCODE_QUEUE_FULL: case PXE_STATCODE_BUSY: Status =3D EFI_NOT_READY; + DEBUG ( + (EFI_D_NET, + "\nSnp->undi.transmit() %xh:%xh\n", + Snp->Cdb.StatFlags, + Snp->Cdb.StatCode) + ); break; =20 default: + DEBUG ( + (EFI_D_ERROR, + "\nSnp->undi.transmit() %xh:%xh\n", + Snp->Cdb.StatFlags, + Snp->Cdb.StatCode) + ); Status =3D EFI_DEVICE_ERROR; } =20 - DEBUG ( - (EFI_D_ERROR, - "\nSnp->undi.transmit() %xh:%xh\n", - Snp->Cdb.StatFlags, - Snp->Cdb.StatCode) - ); - return Status; } =20 -- 1.9.5.msysgit.1