From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B65B7C433EF for ; Fri, 17 Sep 2021 03:54:39 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E348B610C7 for ; Fri, 17 Sep 2021 03:54:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E348B610C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A85F682EE0; Fri, 17 Sep 2021 05:54:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.b="a0qv5aoK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 12D8D82F34; Fri, 17 Sep 2021 05:54:35 +0200 (CEST) Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 44F6F80C83 for ; Fri, 17 Sep 2021 05:54:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1631850867; bh=70B8pAasmYKEoiOjqGufKZakaXNnhXa9Mj1n9KfueDM=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=a0qv5aoKjkAMFJgJItSGM521tNp+VWTBkqE93oYyBJ7RUov4T3gnkaosVo04PdOCC db9TuHPBk6ky2tA0MDAvaPMLCUaVNVGr+tbu3hXt5IGUBQEUYZLupEL7nvkbJAeIR7 V7uhO1SYGrBlBY1Ey34JgGltHfdSu4ihDvVwqaqc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.178.189] ([46.253.247.86]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MBDnI-1mbZs43sYo-00CmG1; Fri, 17 Sep 2021 05:54:27 +0200 Subject: Re: [PATCH 0/3] efi_selftest: Update SIMPLE_NETWORK_PROTOCOL selftest To: Masami Hiramatsu Cc: Kazuhiko Sakamoto , Jassi Brar , Ilias Apalodimas , u-boot@lists.denx.de References: <163178239865.65790.17211919979018423637.stgit@localhost> From: Heinrich Schuchardt Message-ID: <27fcd286-0a28-dc50-9c3f-77d32bcddff1@gmx.de> Date: Fri, 17 Sep 2021 05:54:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <163178239865.65790.17211919979018423637.stgit@localhost> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:pqFzaPDOFn57hX8fNC/DkFI+e2i4bYnOXaOOruBOn+LcDvKzEN0 ZVM6Askpb+wGWT51wukMSd5mAo3qQBFL2DYomGJG3nItcFG18GzG0RWvKPzQqm7KSdAE1U0 /8dhG7KylWpuXU0DSqJMgpVoQCtG2F/L5uA1s5M1X1QDT2Mm2SdnollKp+pJ17BvItc9q2H nkNDv3/7ljMD4/jGNA4EA== X-UI-Out-Filterresults: notjunk:1;V03:K0:ZTW022qPZHQ=:mzPCQtgRGgkEmXxpx+gDgN CMDSaQo8b7xBTSollwfVUw+6fMdnSN3+m+OMbJceSNq2/WtZUw9P/hlcU6gCJzp8cR355E3Vl BiTRnlGjx3bOslKBlNFvWmzsVUn9TtpFgXw7JNcCSnAjgZSnV36Yx3j1nDGWCBGaXoUzvuLpZ 263re/JbZlWPwAfPxs35fZ8a/4HQf8RMUmYkLKJkrgGVn8dQ+PLzikHBmEEdFFF7ZD0jEsu8s 4eBSdd40juVgNnV7s+7296orDHvIeht6tRIcykfhdFDECx8Ss69l7qtSlVijSsE7tuoVrCQC0 0C8CwvyfpeUwvADtZFKzpmhMbPEJxQ9AElWfisaDB25Pl+GvfgEaNEihZeWr0iuQK3+GnA2ZK T4byXrxl14xHbOtVZz1FjjYhOdoX5Zk78xdNJZikTh2tx3WbtlFwOgH5bw8yyG33IG8Rz99Bo EEV4XuKHrrzSXoUy6XwToCBkD1qfmZaNYsMqNHwih5OBUsR+KGgRPQz64PxazTyb0jHKKzsQ6 NIsjQhihTEiuRRGhhqzxW1Adhljny5VPknNBtmhQ2+sElcML8OBxMH9Yl6sKZKROEXb5yBJXC IzwQwWZp7peD0wSdcc1SoJKH/MYCBzJ8nokqydZhEddF0qsOcMagEpc5ZnLdpPjFT9M2W9jkP KIUWjJvzn2OdTRjhNveRoJA7MPcImzzZ4uHq+zlkqczDWTKQ5Tx/5UhNp5jPhpSIoVIeNadzS 2t694GyBIEeJfko85CjVfnmtFW6QBB7TdzHx4mgQ67+fqZhWCHq91ChoSYvm82M8/mK+elpoV 8TmovJ22fQrSewMtEgLCBjFl39dYLLrwUl7pgHRVlh4jMfSvHC8MwD0kloQSEKgg59YicfzYA OFcAaQ5MsJP51aH9crvAGNxjkKl9lUSFgrQrjxcj1PNmDFyp9aTHfXL1DDINWgVKtjPVzxnn2 B1/p3okwcTjP7YVOp4Nx6ZdDa8mAszgWLBarIwCsF++YN5XinFY9XvPVgQIYssIdRfrTYd5UH LtzIBJbbqQRdyJLdT5dmKvNhfVqQBg3tfy32GNNsmHrfCsnf8zpJMKrlF7BhjeoCMWGFzfI74 9ggYPx7U4Zufrw= X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 9/16/21 10:53 AM, Masami Hiramatsu wrote: > Hello Heinrich, > > Here is a series of patches to update the SIMPLE_NETWORK_PROTOCOL > according to the explanation in the previous thread [1]. > > [1] https://lists.denx.de/pipermail/u-boot/2021-September/460711.html > > So basically this seires modifies the SNP testcase as I said > in the previous mail [1]. > > ---- > net->get_status(); > if (!net->mode.MediaPresent) { > error(no link up!) > return; > } > > submit_dhcp_discover() > for (;;) { > wait_for_event(net) > while (net->receive() !=3D EFI_NOT_READY) { > // check dhcp reply > } > } > ---- > > I removed EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT check because > that is just expectation what the received packet avaiability > is meaning that the EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT flag > bit is set. Of course U-Boot EFI SNP implementation does it, > but that is not ensured in the UEFI spec. The spec said that SN_GetStatus() in edk2-platforms Drivers/ASIX/Bus/Usb/UsbNetworking/Ax88179/SimpleNetwork.c always returns *InterruptStatus =3D 0. > the get_status() should update the MediaPresent flag (which > means the network link up or down). So I added the get_status() > test case before starting the network test so that it can > test the link status. > > BTW, actually the mode->media_present is not supported yet. > Is there any way to get the network link status? The driver interface struct eth_ops has no method for determining media presence. We have to assume that it is always present. Best regards Heinrich > > Thank you, > > --- > > Masami Hiramatsu (3): > efi_selftest: Use EFI_SIMPLE_NETWORK_PROTOCOL::GetStatus() for me= dia check > efi_selftest: Do not check EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT > efi_selftest: Recieve the packets until the receive buffer is emp= ty > > > lib/efi_selftest/efi_selftest_snp.c | 90 +++++++++++++++++++--------= -------- > 1 file changed, 49 insertions(+), 41 deletions(-) > > -- > Masami Hiramatsu >