All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yun Lu <luyun_611@163.com>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: davem@davemloft.net, edumazet@google.com, netdev@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH] selftests/net: enable lo.accept_local in psock_snd test
Date: Mon, 23 May 2022 17:19:41 +0800	[thread overview]
Message-ID: <3f494c7a-6648-a696-b215-f597e680c5d9@163.com> (raw)
In-Reply-To: <CA+FuTSdoZeAncRVAYrb66Kp6bEueWrgyy7A8qP0kmr9pxfHMoA@mail.gmail.com>

On 2022/5/20 下午9:52, Willem de Bruijn wrote:

> On Fri, May 20, 2022 at 2:40 AM Yun Lu <luyun_611@163.com> wrote:
>> From: luyun <luyun@kylinos.cn>
>>
>> The psock_snd test sends and recievs packets over loopback, but the
>> parameter lo.accept_local is disabled by default, this test will
>> fail with Resource temporarily unavailable:
>> sudo ./psock_snd.sh
>> dgram
>> tx: 128
>> rx: 142
>> ./psock_snd: recv: Resource temporarily unavailable
> I cannot reproduce this failure.
>
> Passes on a machine with accept_local 0.
>
> accept_local is defined as
>
> "
> accept_local - BOOLEAN
>      Accept packets with local source addresses. In combination
>      with suitable routing, this can be used to direct packets
>      between two local interfaces over the wire and have them
>      accepted properly.
> "
I did this test on my system(Centos 8.3 X86_64):

[root@localhost net]# sysctl net.ipv4.conf.lo.accept_local
net.ipv4.conf.lo.accept_local = 0
[root@localhost net]# ./psock_snd -d
tx: 128
rx: 142
./psock_snd: recv: Resource temporarily unavailable
[root@localhost net]# sysctl -w net.ipv4.conf.lo.accept_local=1
net.ipv4.conf.lo.accept_local = 1
[root@localhost net]# ./psock_snd -d
tx: 128
rx: 142
rx: 100
OK

This failure does seem to be related to accept_local.

Also, it's reported on Ubuntu:
https://bugs.launchpad.net/ubuntu-kernel-tests/+bug/1812618


  reply	other threads:[~2022-05-23  9:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20  6:38 [PATCH] selftests/net: enable lo.accept_local in psock_snd test Yun Lu
2022-05-20 13:52 ` Willem de Bruijn
2022-05-23  9:19   ` Yun Lu [this message]
2022-05-23 13:32     ` Willem de Bruijn
2022-05-24 10:03       ` Yun Lu
2022-05-24 13:33         ` Willem de Bruijn
2022-05-25  1:48           ` Yun Lu

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=3f494c7a-6648-a696-b215-f597e680c5d9@163.com \
    --to=luyun_611@163.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=willemdebruijn.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.