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=-13.8 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,USER_AGENT_GIT 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 B9DF6C433FE for ; Thu, 16 Sep 2021 08:55:10 +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 35AC661164 for ; Thu, 16 Sep 2021 08:55:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 35AC661164 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 886B2831C7; Thu, 16 Sep 2021 10:54:32 +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="aM4fw3Ql"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3A77F83124; Thu, 16 Sep 2021 10:53:52 +0200 (CEST) Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) (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 EF7B28320D for ; Thu, 16 Sep 2021 10:53:23 +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-pf1-x432.google.com with SMTP id x7so5212083pfa.8 for ; Thu, 16 Sep 2021 01:53:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:user-agent:mime-version :content-transfer-encoding; bh=u4mH7sjL2U9Nz8ADoNQ3Cx3+liWRg/oF0QVEzZMh5rI=; b=aM4fw3QlYAZOOXxb4HDfFv5rqx1fs7B4w1Dn8sMIYiRJ3ZzI+o7PpYas8dyN1Xhxpo /QgjUMo2wuaeBbhdSpI4zSHAANhOu0huagX0QSEQgdRRvwZdJNYgKCyKxrpUpCFJxypA qUFcIzHFUGfvfZJEWgXwab8brgpAr4xH8s0lEfNEuVf84ogM1seXjVL2phmmVp1uE0x8 zwzKVhJd1Pk2KR6DGDXBIObWo3rAvfHKT4cyOkpB7NwTZymaKV+iIRMcqHVB0c8P63DV uWqL0zu2yh7hHvADNRxpJc29bxEDAmOBQXpXfjs7eU6M4SFQIjpOyabaFew6fCwTsTJa lUtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version:content-transfer-encoding; bh=u4mH7sjL2U9Nz8ADoNQ3Cx3+liWRg/oF0QVEzZMh5rI=; b=22pQUSx69y/1YpamvT7pCPaQZkp3xKyoxNGooj9FgGa0yZ88x5ttMGhNWkbUPYat+Y oKWGHAn/dMfUkWfpvPjaTVq9gkvu5h49l3nAKjhpjj5mIc5+1fLpgZNZ058581L10sVP LupEEdZ9BIyB1D9VRKS7XbmqwUyfD47zvP4BVl41i1tL9NYnB8xb5xPXKeAVjUqNAvI6 C7L+1JnLiU4rfqB1uYRTY96Jhsu6/KUeiv5UHQ7K4FL0Y5yylt8672Vsr/9kAfQiaae4 ivF58KIV6R1xj+pKtTBljArYeOcvynggKsopIUhd7XqYEDwasqBmmLar1NUOK+w5fiGH Qcdw== X-Gm-Message-State: AOAM531doH5WaERi33pZFR+nPJKYhoQu0by761bd4Ggde+tuEU4mZoBr skKzri8qYN1o/RlFCfV5fLh31g== X-Google-Smtp-Source: ABdhPJzae2H0H0EY4Ph9HYqMITaQi3mZR7JPSrPDu4paAJ4/kx0dEOZjslo4ZBzSxQpcwUnAzbGR8Q== X-Received: by 2002:a63:561a:: with SMTP id k26mr4047341pgb.144.1631782402113; Thu, 16 Sep 2021 01:53:22 -0700 (PDT) Received: from localhost.localdomain (122x208x150x49.ap122.ftth.ucom.ne.jp. [122.208.150.49]) by smtp.gmail.com with ESMTPSA id fh3sm7001552pjb.8.2021.09.16.01.53.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Sep 2021 01:53:21 -0700 (PDT) From: Masami Hiramatsu To: Heinrich Schuchardt Cc: Kazuhiko Sakamoto , Masami Hiramatsu , Jassi Brar , Ilias Apalodimas , u-boot@lists.denx.de Subject: [PATCH 0/3] efi_selftest: Update SIMPLE_NETWORK_PROTOCOL selftest Date: Thu, 16 Sep 2021 17:53:18 +0900 Message-Id: <163178239865.65790.17211919979018423637.stgit@localhost> X-Mailer: git-send-email 2.25.1 User-Agent: StGit/0.19 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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 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() != 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 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? Thank you, --- Masami Hiramatsu (3): efi_selftest: Use EFI_SIMPLE_NETWORK_PROTOCOL::GetStatus() for media check efi_selftest: Do not check EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT efi_selftest: Recieve the packets until the receive buffer is empty lib/efi_selftest/efi_selftest_snp.c | 90 +++++++++++++++++++---------------- 1 file changed, 49 insertions(+), 41 deletions(-) -- Masami Hiramatsu