mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Safonov <dima@arista.com>
To: David Ahern <dsahern@kernel.org>, linux-kernel@vger.kernel.org
Cc: Dmitry Safonov <0x7f454c46@gmail.com>,
	Mobashshera Rasool <mobash.rasool.linux@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net/ip6mr: Fix build with !CONFIG_IPV6_PIMSM_V2
Date: Fri, 25 Feb 2022 14:54:40 +0000	[thread overview]
Message-ID: <7c7c0736-710d-192f-9688-d20dfa48d134@arista.com> (raw)
In-Reply-To: <ed3e1f08-045c-1a9e-9319-5789faddc473@kernel.org>

On 2/25/22 03:00, David Ahern wrote:
> On 2/23/22 5:17 AM, Dmitry Safonov wrote:
>> diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
>> index a9775c830194..4e74bc61a3db 100644
>> --- a/net/ipv6/ip6mr.c
>> +++ b/net/ipv6/ip6mr.c
>> @@ -1653,7 +1653,6 @@ int ip6_mroute_setsockopt(struct sock *sk, int optname, sockptr_t optval,
>>  	mifi_t mifi;
>>  	struct net *net = sock_net(sk);
>>  	struct mr_table *mrt;
>> -	bool do_wrmifwhole;
>>  
>>  	if (sk->sk_type != SOCK_RAW ||
>>  	    inet_sk(sk)->inet_num != IPPROTO_ICMPV6)
>> @@ -1761,6 +1760,7 @@ int ip6_mroute_setsockopt(struct sock *sk, int optname, sockptr_t optval,
>>  #ifdef CONFIG_IPV6_PIMSM_V2
>>  	case MRT6_PIM:
>>  	{
>> +		bool do_wrmifwhole;
>>  		int v;
>>  
>>  		if (optlen != sizeof(v))
>>
>> base-commit: 922ea87ff6f2b63f413c6afa2c25b287dce76639
> 
> you could do one better and move it under the
> 'if (v != mrt->mroute_do_pim) {'
> 
> so that the do_wrmifwhole check is only done when needed

I've tried to keep it simple and just to fix the build as I don't know
which tests to run.
Anyway, I sent v2:
https://lore.kernel.org/all/20220225145206.561409-1-dima@arista.com/T/#u

Is it what you meant?

Thanks,
          Dmitry

      reply	other threads:[~2022-02-25 14:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-23 12:17 Dmitry Safonov
2022-02-25  3:00 ` David Ahern
2022-02-25 14:54   ` Dmitry Safonov [this message]

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=7c7c0736-710d-192f-9688-d20dfa48d134@arista.com \
    --to=dima@arista.com \
    --cc=0x7f454c46@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mobash.rasool.linux@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.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

all inboxes | Powered by JetHome®