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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A7F13C77B6E for ; Wed, 12 Apr 2023 16:10:59 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id ED5C585F40; Wed, 12 Apr 2023 18:10:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com 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; unprotected) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="ZCHDp+OT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 47C4B85F2B; Wed, 12 Apr 2023 18:10:54 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by phobos.denx.de (Postfix) with ESMTP id 6B32985DA9 for ; Wed, 12 Apr 2023 18:10:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=emohandesi@linux.microsoft.com Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 0E6D421779CF; Wed, 12 Apr 2023 09:10:50 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0E6D421779CF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1681315850; bh=A2zoYVT0n/6vzylYiTVSa46OM842w/Sy/Zk3dLAM8lE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZCHDp+OTf56jEAGYn8gem7L7k4vClZ+Y57t/5Iz2hvx4IRxcyr1dGBRx854O20/ny mlXAJIZOwB8McitFeZ8oXgqhkRbHo+WNGaq68c9aPsA4Y85/8UQEP0/qPxq3+YtJ1r MqDTaVjxpdDOdu3MHCze/LNxF0hfxpk4hyQysotI= From: emohandesi@linux.microsoft.com To: u-boot@lists.denx.de Cc: sjg@chromium.org, mario.six@gdsys.cc, joe.hershberger@ni.com, rfried.dev@gmail.com, xypron.glpk@gmx.de, ilias.apalodimas@linaro.org, masahisa.kojima@linaro.org, tobias@waldekranz.com, john@metanate.com, v.v.mitrofanov@yadro.com, saproj@gmail.com Subject: [PATCH v3 0/3] Add IPv6 Network Discovery Date: Wed, 12 Apr 2023 09:10:02 -0700 Message-Id: <1681315805-15504-1-git-send-email-emohandesi@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1677776290-11067-1-git-send-email-emohandesi@linux.microsoft.com> References: <1677776290-11067-1-git-send-email-emohandesi@linux.microsoft.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean From: Ehsan Mohandesi This series adds IPv6 network discovery to U-Boot. When an IPv6 command is run in U-Boot, it sends a router solicitation (RS) message to the network. The router on the network responds with a router advertisement (RA) message. Then U-Boot processes the RA message and sets the gatewayip6 and net_prefix_length environment variables. It is based on RFC 4861, but not everything in the RFC is supported here. https://www.rfc-editor.org/rfc/rfc4861 Changes in v3: - Removed the extra revert commit that was mistakenly added in v2. Changes in v2: - Improved IPv6 network discovery code. - Added IPv6 network discovery feature test (Python test). - Added unit tests (C code). Ehsan Mohandesi (3): net: ipv6: Add support for default gateway discovery. test/py: IPv6 network discovery test test: eth: IPv6 network discovery unit test cmd/Kconfig | 6 + configs/sandbox64_defconfig | 2 + configs/sandbox_defconfig | 2 + configs/sandbox_flattree_defconfig | 2 + include/ndisc.h | 35 ++++++ include/net.h | 3 +- include/net6.h | 40 ++++++ net/ndisc.c | 243 +++++++++++++++++++++++++++++++++++-- net/net.c | 23 +++- net/net6.c | 1 + test/dm/eth.c | 88 ++++++++++++++ test/py/tests/test_net.py | 31 ++++- 12 files changed, 463 insertions(+), 13 deletions(-) -- 1.8.3.1