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=-10.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 23D86C433F5 for ; Fri, 17 Sep 2021 04:47:35 +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 11B1860F93 for ; Fri, 17 Sep 2021 04:47:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 11B1860F93 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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 C501B82E03; Fri, 17 Sep 2021 06:47:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="J8wWd8TE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BDC4882F34; Fri, 17 Sep 2021 06:47:28 +0200 (CEST) Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0A8AB82DB3 for ; Fri, 17 Sep 2021 06:47:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=masami.hiramatsu@linaro.org Received: by mail-il1-x135.google.com with SMTP id v16so9023017ilg.3 for ; Thu, 16 Sep 2021 21:47:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=v9RaMPGZ/qLeTs62StllaHPqMJTkoS9pWQKAgFrMO5I=; b=J8wWd8TENpkpx0z02I4QlwP4FH2gddYR+uk7vP0f8pMP8fxwSbIpSiNUVzaHI0x4S2 q2udQcyWdz2m2ugoeQMD/GsKC1RddWs539bNCPlsBr6gMWZO0kdj/xxTma6LEEVNGtRv krGA2QMFjtgh90O5u5EFGyqBHWGSbiOkq5Lv2/60jwN+7tZn70BljbqLrfVyahO5JQOh DgG9A9AjxDnEAABSCZFn/vD81ge6fLdzbD2CQPEK/hW/PmK02V6QDYGLlcbNwab9vB7B XPbkXF8RKP0/5os/t9NTQVryHmSERoEdihFdyLXCK3aNj1ucu7iPCepjwmznQVHMCCr7 3Lyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=v9RaMPGZ/qLeTs62StllaHPqMJTkoS9pWQKAgFrMO5I=; b=FD74k6GAIRyieSLvgNgZcqQG2hF5Th4BSFeUUTDaCap0e1EQDPEIVcIcHzbuSqFYFS WmkfCNFMQ3wpbK9zEBYYJROL5jMFpGtGayAeheZiJA8vzwNpy2lhQ8TH0MsWIfQqueU+ MAFFHY3evU6hSHuB9d8kmRHs2SICA/QkQjKLlSgRnFeEsKj7eYcWFESTcQqB/QlbaTpl dP/LLwiilqBuQK0iXfbcxuizRw2LcUSBylUex+zDp9IhW0kTS1Z2u1pDb25JFVGF48qq gKo5xBoXivVcAtrp1yZePu6FUctXT3sRarg+v2NPkqEqt4q4h4e+PjJMitO51nCVRqYl ys6g== X-Gm-Message-State: AOAM530vpdN5KOYpQxnf6W8nmE4W87L2vQOf3asUZ7SRTsimMPDakwBq GEnqHG/A2E5sgEhrxiQ01XJ+31zzCrrLUZSQC/C/7A== X-Google-Smtp-Source: ABdhPJxeWfTw/kW5/jnP8IdwxptzUxsuN9APLnFhdlVR0zlzw+DT1PWoaYLu0clSxyZVazksPfg80HxrEaXGS302eeA= X-Received: by 2002:a92:6c0c:: with SMTP id h12mr6368917ilc.32.1631854043446; Thu, 16 Sep 2021 21:47:23 -0700 (PDT) MIME-Version: 1.0 References: <163178239865.65790.17211919979018423637.stgit@localhost> <27fcd286-0a28-dc50-9c3f-77d32bcddff1@gmx.de> In-Reply-To: <27fcd286-0a28-dc50-9c3f-77d32bcddff1@gmx.de> From: Masami Hiramatsu Date: Fri, 17 Sep 2021 13:47:12 +0900 Message-ID: Subject: Re: [PATCH 0/3] efi_selftest: Update SIMPLE_NETWORK_PROTOCOL selftest To: Heinrich Schuchardt Cc: Kazuhiko Sakamoto , Jassi Brar , Ilias Apalodimas , U-Boot Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Hi Heinrich, 2021=E5=B9=B49=E6=9C=8817=E6=97=A5(=E9=87=91) 12:54 Heinrich Schuchardt : > > 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. Yes, it seems to depend on driver implementation. > > > 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. Hmm, OK. So we can not implement it... Thank you, > > Best regards > > Heinrich > > > > > Thank you, > > > > --- > > > > Masami Hiramatsu (3): > > efi_selftest: Use EFI_SIMPLE_NETWORK_PROTOCOL::GetStatus() for m= edia check > > efi_selftest: Do not check EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT > > efi_selftest: Recieve the packets until the receive buffer is em= pty > > > > > > lib/efi_selftest/efi_selftest_snp.c | 90 +++++++++++++++++++-------= --------- > > 1 file changed, 49 insertions(+), 41 deletions(-) > > > > -- > > Masami Hiramatsu > > > --=20 Masami Hiramatsu