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 D29D1C77B61 for ; Sat, 22 Apr 2023 00:08:35 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4CC608603C; Sat, 22 Apr 2023 02:08:33 +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="Pc8M2UAx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3AA5F863D7; Sat, 22 Apr 2023 02:08:31 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by phobos.denx.de (Postfix) with ESMTP id 9587085FE2 for ; Sat, 22 Apr 2023 02:08:28 +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 22EF421C2537; Fri, 21 Apr 2023 17:08:27 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 22EF421C2537 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1682122107; bh=dWU8V76wbe9ICSUI/LkxAM3iwHczkDksuMaPQHJDxkw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pc8M2UAxYBqfr/aJzgjSc7mUxiEB7vgBKdOnzKjgyCuC17mh6wQCk9gpbVKVWj0gg X7Oc4odHwXaoeVHRNNB/SzpZ9lJGHWwEC69An6DFm8mtLv6unxddJpg69luvcwRGFN g+M+T+Zlhd42A5bcrbxlqMgk09K9ywvdt7ZVlmWg= 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, pali@kernel.org, tobias@waldekranz.com, john@metanate.com, v.v.mitrofanov@yadro.com, saproj@gmail.com Subject: [PATCH v4 0/3] Add IPv6 Network Discovery Date: Fri, 21 Apr 2023 17:08:20 -0700 Message-Id: <1682122103-21466-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 v4: - Removed the changes that were mistakenly pulled from the local workspace. 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 | 2 +- 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, 462 insertions(+), 13 deletions(-) -- 1.8.3.1