All of lore.kernel.org
 help / color / mirror / Atom feed
From: roopa <roopa@cumulusnetworks.com>
To: Alexander Duyck <alexander.duyck@gmail.com>
Cc: Scott Feldman <sfeldma@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net] ipv4: include NLM_F_APPEND flag in append route notifications
Date: Wed, 17 Jun 2015 09:20:42 -0700	[thread overview]
Message-ID: <55819E5A.8020801@cumulusnetworks.com> (raw)
In-Reply-To: <558193C1.70001@gmail.com>

On 6/17/15, 8:35 AM, Alexander Duyck wrote:
>
>> @@ -1189,8 +1190,9 @@ int fib_table_insert(struct fib_table *tb, struct
>> fib_config *cfg)
>>                          fib_release_info(fi_drop);
>>                          if (state & FA_S_ACCESSED)
>> rt_cache_flush(cfg->fc_nlinfo.nl_net);
>> +                       nlflags |= NLM_F_REPLACE;
>>                          rtmsg_fib(RTM_NEWROUTE, htonl(key), new_fa, 
>> plen,
>> -                               tb->tb_id, &cfg->fc_nlinfo, 
>> NLM_F_REPLACE);
>> +                               tb->tb_id, &cfg->fc_nlinfo, nlflags);
>>
>>                          goto succeeded;
>>
>
> Why even bother modifying this part?  Is this actually needed at all, 
> are there some other flags you plan to drop into nlflags as well that 
> would be passed as a part of this message?

agreed, for the same reason my initial patch did not touch this part. 
Nope, no other flags. I was trying to meet scotts concerns.
>
>> @@ -1201,7 +1203,9 @@ int fib_table_insert(struct fib_table *tb, struct
>> fib_config *cfg)
>>                  if (fa_match)
>>                          goto out;
>>
>> -               if (!(cfg->fc_nlflags & NLM_F_APPEND))
>> +               if (cfg->fc_nlflags & NLM_F_APPEND)
>> +                       nlflags |= NLM_F_APPEND;
>> +               else
>>                          fa = fa_first;
>>          }
>>          err = -ENOENT;
>
> I'm not sure I see the point of using the |=.   Why not just use a = 
> and save yourself an instruction or two since you don't really need 
> the OR operator in this case.
>
ack,

I would prefer keeping my initial patch which was pretty non-intrusive.

thanks,
Roopa

  reply	other threads:[~2015-06-17 16:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-16 16:11 [PATCH net] ipv4: include NLM_F_APPEND flag in append route notifications Roopa Prabhu
2015-06-16 16:14 ` roopa
2015-06-17  7:50 ` Scott Feldman
2015-06-17 14:50   ` roopa
2015-06-17 15:35     ` Alexander Duyck
2015-06-17 16:20       ` roopa [this message]
2015-06-17 17:31         ` Alexander Duyck
2015-06-17 18:07           ` roopa

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=55819E5A.8020801@cumulusnetworks.com \
    --to=roopa@cumulusnetworks.com \
    --cc=alexander.duyck@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=sfeldma@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.