From patchwork Thu Sep 16 08:53:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masami Hiramatsu X-Patchwork-Id: 512917 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp1009875jao; Thu, 16 Sep 2021 01:55:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfLWP0NlnrretKGCcWigpAAwGmk8xldFQmjSkbDA+pEohGLT6KHZfpefQumOUnXNJo/nwd X-Received: by 2002:a17:906:850a:: with SMTP id i10mr5200609ejx.256.1631782510959; Thu, 16 Sep 2021 01:55:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631782510; cv=none; d=google.com; s=arc-20160816; b=xwjCUJ6lstcPBrdPLFgZFF4Ih3BGD16VokCLy0uS3bmodjxRW11jt/TWqxq6v2vOzL b+2/wNv0eTitUO23NYEZ0Wc5B2JlHrqxkUfP92AxQsXs8ptXQ4NEWfADIcEDiAJsGg9x QaTiJ+FMcW7WoUe7kd49kvu47wrEjM8ernBTluYnMJVEa8BWH2vdhj+CjgWMVZsQeILf ZJUGnb8brQWKSmfjTesimj1Y0dzp+If++x3m3KEHIH/GI7VY+I+qZVpoBl/OXqe/HX5o FfGNqoP5hWLD13L0sQg7kazQe6YEZCRKgTYwepEiyqLkOcKRQbWidVvQ7xoxSzSSxSHH pJvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:user-agent:message-id:date:subject:cc:to:from :dkim-signature; bh=u4mH7sjL2U9Nz8ADoNQ3Cx3+liWRg/oF0QVEzZMh5rI=; b=qqs2sVr9Bw4d4RCeLlwl/QdvENbCkZSjsnzEf2Lh4YMQu7OTll8mHMwbKXIvb1Ip1P HfeCLaL5NQGOD1uusLwT7C5jlmna30/GsGH81YFoz2c5VA7HLrM+cnp+ccAfUaE7iXLA ue2STADb9AfAPcsiOtWtSjO2Pr5pD3VVkbjUv72h3okuCbhL/eKyECDkkfsAn173yafk KAol4X/K+rgHj7dT4JBlRihAwf32rK6wvAU8xZgGTE+PlucPVrcTG1Hdr279CaHh6BgH AbBNY5MtS9teI4gi5RVIRgborXf6dSWOU0iAmfWI/KQXaAAnU/jDDOzDG/2cvbQTBHfD h7RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aM4fw3Ql; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id s27si2808117edy.251.2021.09.16.01.55.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Sep 2021 01:55:10 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aM4fw3Ql; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 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-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 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