From: Petr Machata <petrm@nvidia•com>
To: Jian Yang <jianyang.kernel@gmail•com>
Cc: <davem@davemloft•net>, <kuba@kernel•org>,
<netdev@vger•kernel.org>, Mahesh Bandewar <maheshb@google•com>,
Jian Yang <jianyang@google•com>
Subject: Re: [PATCH net-next v3] net-loopback: set lo dev initial state to UP
Date: Tue, 9 Feb 2021 12:54:59 +0100 [thread overview]
Message-ID: <87czx978x8.fsf@nvidia.com> (raw)
In-Reply-To: <20210201233445.2044327-1-jianyang.kernel@gmail.com>
Jian Yang <jianyang.kernel@gmail•com> writes:
> From: Jian Yang <jianyang@google•com>
>
> Traditionally loopback devices come up with initial state as DOWN for
> any new network-namespace. This would mean that anyone needing this
> device would have to bring this UP by issuing something like 'ip link
> set lo up'. This can be avoided if the initial state is set as UP.
This will break user scripts, and it fact breaks kernel's very own
selftest. We currently have this internally:
diff --git a/tools/testing/selftests/net/fib_nexthops.sh b/tools/testing/selftests/net/fib_nexthops.sh
index 4c7d33618437..bf8ed24ab3ba 100755
--- a/tools/testing/selftests/net/fib_nexthops.sh
+++ b/tools/testing/selftests/net/fib_nexthops.sh
@@ -121,8 +121,6 @@ create_ns()
set -e
ip netns add ${n}
ip netns set ${n} $((nsid++))
- ip -netns ${n} addr add 127.0.0.1/8 dev lo
- ip -netns ${n} link set lo up
ip netns exec ${n} sysctl -qw net.ipv4.ip_forward=1
ip netns exec ${n} sysctl -qw net.ipv4.fib_multipath_use_neigh=1
--
2.26.2
This now fails because the ip commands are run within a "set -e" block,
and kernel rejects addition of a duplicate address.
next prev parent reply other threads:[~2021-02-09 11:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-01 23:34 [PATCH net-next v3] net-loopback: set lo dev initial state to UP Jian Yang
2021-02-05 3:00 ` patchwork-bot+netdevbpf
2021-02-09 11:54 ` Petr Machata [this message]
2021-02-09 16:23 ` Jakub Kicinski
2021-02-09 17:19 ` Petr Machata
2021-02-09 18:49 ` Mahesh Bandewar (महेश बंडेवार)
2021-02-09 19:04 ` Jakub Kicinski
2021-02-09 19:18 ` Mahesh Bandewar (महेश बंडेवार)
2021-02-09 19:43 ` Jakub Kicinski
2021-02-09 19:06 ` Ido Schimmel
2021-02-09 19:19 ` Mahesh Bandewar (महेश बंडेवार)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87czx978x8.fsf@nvidia.com \
--to=petrm@nvidia$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=jianyang.kernel@gmail$(echo .)com \
--cc=jianyang@google$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=maheshb@google$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox