netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hangbin Liu <liuhangbin@gmail.com>
To: Sabrina Dubroca <sd@queasysnail.net>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	David Ahern <dsahern@kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Vasiliy Kovalev <kovalev@altlinux.org>,
	Guillaume Nault <gnault@redhat.com>,
	Simon Horman <horms@kernel.org>,
	David Lebrun <david.lebrun@uclouvain.be>
Subject: Re: [PATCH net-next] ipv6: sr: restruct ifdefines
Date: Tue, 28 May 2024 21:00:13 +0800	[thread overview]
Message-ID: <ZlXVXblc20QmZXlf@Laptop-X1> (raw)
In-Reply-To: <ZlWsWDFWDCcEa4r9@hog>

On Tue, May 28, 2024 at 12:05:12PM +0200, Sabrina Dubroca wrote:
> Hi Hangbin,
> 
> 2024-05-28, 11:25:30 +0800, Hangbin Liu wrote:
> > There are too many ifdef in IPv6 segment routing code that may cause logic
> > problems. like commit 160e9d275218 ("ipv6: sr: fix invalid unregister error
> > path"). To avoid this, the init functions are redefined for both cases. The
> > code could be more clear after all fidefs are removed.
> > 
> > Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
> 
> I think this was suggested by Simon?

Yes, and David Ahern also suggested this. And I thought you also mentioned it?
I was afraid there are too many suggested-by tags here :) I can add them
in next version patch.

> 
> 
> > @@ -520,7 +514,6 @@ int __init seg6_init(void)
> >  	if (err)
> >  		goto out_unregister_pernet;
> >  
> 
> (With a bit more context around this:)
> 
> > -#ifdef CONFIG_IPV6_SEG6_LWTUNNEL
> >  	err = seg6_iptunnel_init();
> >  	if (err)
> >  		goto out_unregister_genl;
> >  
> >  	err = seg6_local_init();
> >  	if (err) {
> >  		seg6_iptunnel_exit();
> 
> With those changes, we don't need this weird partial uninit anymore,
> we can just create a new label above the other seg6_iptunnel_exit()
> call and jump there directly.

Yes.

Thanks
Hangbin

  reply	other threads:[~2024-05-28 13:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-28  3:25 [PATCH net-next] ipv6: sr: restruct ifdefines Hangbin Liu
2024-05-28 10:05 ` Sabrina Dubroca
2024-05-28 13:00   ` Hangbin Liu [this message]
2024-05-28 15:29     ` Sabrina Dubroca

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=ZlXVXblc20QmZXlf@Laptop-X1 \
    --to=liuhangbin@gmail.com \
    --cc=davem@davemloft.net \
    --cc=david.lebrun@uclouvain.be \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=gnault@redhat.com \
    --cc=horms@kernel.org \
    --cc=kovalev@altlinux.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sd@queasysnail.net \
    /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).