linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: "Pali Rohár" <pali@kernel.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: How to find out name or id of newly created interface
Date: Mon, 2 Aug 2021 16:21:05 +0200	[thread overview]
Message-ID: <YQf/UVmFEF2ihyKY@lunn.ch> (raw)
In-Reply-To: <20210801143840.j6bfvt3zsfb2x7q5@pali>

> Hello! This has additional issue that I have to choose some free ifindex
> number and it introduce another race condition that other userspace
> process may choose same ifindex number. So create request in this case
> fails if other userspace process is faster... So it has same race
> condition as specifying interface name.

O.K. if you don't want to deal with retries, you are going to have to
modify the return value. The nice thing is, its netlink. So you can
add additional attributes, and not break backwards compatibility. User
space should ignore all attributes it does not expect.

But i suspect the architecture of the code is not going to make it
easy.

	Andrew

  reply	other threads:[~2021-08-02 14:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-31 20:30 How to find out name or id of newly created interface Pali Rohár
2021-08-01 14:31 ` Andrew Lunn
2021-08-01 14:38   ` Pali Rohár
2021-08-02 14:21     ` Andrew Lunn [this message]
2021-08-02 17:25       ` Pali Rohár
2021-08-02 10:02 ` Guillaume Nault
2021-08-02 10:58   ` Pali Rohár
2021-08-02 13:43     ` Guillaume Nault
2021-08-02 17:23       ` Pali Rohár

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=YQf/UVmFEF2ihyKY@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pali@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).