All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: Richard Gobert <richardbgobert@gmail.com>
Cc: Kuniyuki Iwashima <kuniyu@google.com>,
	andrew+netdev@lunn.ch, daniel@iogearbox.net, davem@davemloft.net,
	donald.hunter@gmail.com, dsahern@kernel.org, edumazet@google.com,
	horms@kernel.org, jacob.e.keller@intel.com, kuba@kernel.org,
	linux-kernel@vger.kernel.org, martin.lau@kernel.org,
	menglong8.dong@gmail.com, netdev@vger.kernel.org,
	pabeni@redhat.com, petrm@nvidia.com, razor@blackwall.org,
	shuah@kernel.org
Subject: Re: [PATCH net-next v5 2/5] net: vxlan: add netlink option to bind vxlan sockets to local addresses
Date: Wed, 13 Aug 2025 19:04:37 +0300	[thread overview]
Message-ID: <aJy3la53tn3mS3Jc@shredder> (raw)
In-Reply-To: <799c2171-7b41-4202-9ea4-e28952f81a65@gmail.com>

On Wed, Aug 13, 2025 at 05:46:44PM +0200, Richard Gobert wrote:
> Kuniyuki Iwashima wrote:
> > From: Richard Gobert <richardbgobert@gmail.com>
> >> @@ -4044,15 +4045,37 @@ static int vxlan_nl2conf(struct nlattr *tb[], struct nlattr *data[],
> >>  		conf->vni = vni;
> >>  	}
> >>  
> >> +	if (data[IFLA_VXLAN_LOCALBIND]) {
> >> +		if (changelink) {
> >> +			NL_SET_ERR_MSG_ATTR(extack, tb[IFLA_VXLAN_LOCALBIND], "Cannot rebind locally");
> >> +			return -EOPNOTSUPP;
> >> +		}
> > 
> > Are these two "if" necessary ?
> 
> Creating a vxlan interface without localbind then adding localbind won't
> result in the socket being rebound. I might implement this in the future,
> but for simplicity, I didn't implement this yet.

I think Kuniyuki meant that you can just call vxlan_nl2flag() without
those two "if"s because the function is a NO-OP when the attribute is
not present and it will also fail the changelink operation.

> 
> > 
> > 
> >> +
> >> +		err = vxlan_nl2flag(conf, data, IFLA_VXLAN_LOCALBIND,
> >> +				    VXLAN_F_LOCALBIND, changelink,
> >> +				    false, extack);
> >> +		if (err)
> >> +			return err;
> >> +	}
> >> +

  reply	other threads:[~2025-08-13 16:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-12 12:51 [PATCH net-next v5 0/5] net: add local address bind support to vxlan and geneve Richard Gobert
2025-08-12 12:51 ` [PATCH net-next v5 1/5] net: udp: add freebind option to udp_sock_create Richard Gobert
2025-08-13  9:25   ` Ido Schimmel
2025-08-13 15:10     ` Richard Gobert
2025-08-12 12:51 ` [PATCH net-next v5 2/5] net: vxlan: add netlink option to bind vxlan sockets to local addresses Richard Gobert
2025-08-13  6:28   ` Kuniyuki Iwashima
2025-08-13 15:46     ` Richard Gobert
2025-08-13 16:04       ` Ido Schimmel [this message]
2025-08-13 17:55         ` Kuniyuki Iwashima
2025-08-13  9:26   ` Ido Schimmel
2025-08-12 12:51 ` [PATCH net-next v5 3/5] net: vxlan: bind vxlan sockets to their local address if configured Richard Gobert
2025-08-13  7:07   ` Kuniyuki Iwashima
2025-08-13 15:41     ` Richard Gobert
2025-08-13  9:26   ` Ido Schimmel
2025-08-13 15:18     ` Richard Gobert
2025-08-12 12:51 ` [PATCH net-next v5 4/5] net: geneve: enable binding geneve sockets to local addresses Richard Gobert
2025-08-12 12:51 ` [PATCH net-next v5 5/5] selftests/net: add vxlan localbind selftest Richard Gobert
2025-08-13 11:44   ` Ido Schimmel
2025-08-13 15:49     ` Richard Gobert
2025-08-13 14:34   ` Jakub Kicinski
2025-08-13 15:52     ` Richard Gobert
2025-08-13  9:25 ` [PATCH net-next v5 0/5] net: add local address bind support to vxlan and geneve Ido Schimmel
2025-08-13 15:29   ` Richard Gobert

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=aJy3la53tn3mS3Jc@shredder \
    --to=idosch@nvidia.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@kernel.org \
    --cc=menglong8.dong@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=razor@blackwall.org \
    --cc=richardbgobert@gmail.com \
    --cc=shuah@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 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.