From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (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 2FEC4211B5A25 for ; Wed, 16 Jan 2019 08:51:28 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3C127811AC; Wed, 16 Jan 2019 16:51:28 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-124-55.rdu2.redhat.com [10.10.124.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9339360C73; Wed, 16 Jan 2019 16:51:27 +0000 (UTC) To: Karin Willers Cc: edk2-devel@lists.01.org References: <8f102d0f-3856-f01f-9302-16f6b86103da@redhat.com> <7db27fc01100d84d543cd5caa8fabbe2@webmail-alfa3035.alfahosting-server.de> From: Laszlo Ersek Message-ID: Date: Wed, 16 Jan 2019 17:51:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <7db27fc01100d84d543cd5caa8fabbe2@webmail-alfa3035.alfahosting-server.de> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 16 Jan 2019 16:51:28 +0000 (UTC) Subject: Re: EDK II Network Stack Issue X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 16:51:29 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit On 01/16/19 13:57, Karin Willers wrote: > On 2019-01-10 13:40, Karin Willers wrote: >> On 2019-01-07 20:27, Laszlo Ersek wrote: >>> On 01/04/19 15:02, Karin Willers wrote: >>>> G'Day! >>>> >>>> I'm trying to get networking under edk2 up and running. I tried >>>> AppPkg/Applications/Sockets/RawIp4Tx >>>> under OVMF. The raw packet is sent out on the network, but the >>>> application never returns from the >>>> socket close routine. >>>> >>>> I'm currently using UDK2017 with the latest security patches >>>> (downloaded >>>> December 18 2018). The network >>>> driver under OVMF is the e1000 driver. >>>> >>>> The effect that the socket close never returns is also visible when >>>> running RawIp4Tx on real hardware, >>>> so I think the behavior has nothing to do with OVMF or the UEFI itself. >>>> >>>> Does anyone see similar effects? Any hints on setting up networking >>>> under edk2 correctly? >>> >>> The socket (= libc-level networking) APIs are not the most robust ones >>> in edk2, in my -- admittedly limited -- experience. I'd suggest using >>> applications and shell commands that use UEFI protocols instead, for >>> networking. (I understand that could be a challenge if you are porting a >>> standard C program to UEFI.) >>> >>> Thanks >>> Laszlo >> >> The reason for this undertaking initially was to compile a Python.efi >> that >> supports sockets. We wanted that to be able to run the Chipsec suite with >> external network test partners under UEFI. The Chipsec guys do provide >> pre-compiled Pyhon executables, but these do not include the network >> stack. >> >> I think, I have to debug the issue myself ... >> >> Greetings,  Karin > > Could please someone shed some light on how to enable debug prints using > UefiDebugLibConOut > in EfiSocketLib/Socket.c. Enabling debug prints is, IMHO, not very > intuitive in edk2 ... Can you build your platform and/or application with the --log and --report-file options, and share the outputs? The following could all matter: - what you pass to "build" with "-b" (NOOPT/DEBUG/RELEASE), - gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask, - gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel, - gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel, - what lib instance you resolve the DebugLib class to, - whether you apply the above just to your application, or all other DXE components in your platform. Thanks Laszlo