From: David Ahern <dsahern@kernel.org>
To: stephen@networkplumber.org
Cc: netdev@vger.kernel.org, David Ahern <dsahern@gmail.com>
Subject: [PATCH iproute2-next v2 2/3] ip link: Drop cache entry on any changes
Date: Wed, 13 Feb 2019 16:22:48 -0800 [thread overview]
Message-ID: <20190214002249.31866-3-dsahern@kernel.org> (raw)
In-Reply-To: <20190214002249.31866-1-dsahern@kernel.org>
From: David Ahern <dsahern@gmail.com>
Remove any entry from the link cache when the link is modified.
Signed-off-by: David Ahern <dsahern@gmail.com>
---
ip/iplink.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ip/iplink.c b/ip/iplink.c
index b5519201fef7..393cefdc89df 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -1083,6 +1083,9 @@ static int iplink_modify(int cmd, unsigned int flags, int argc, char **argv)
if (rtnl_talk(&rth, &req.n, NULL) < 0)
return -2;
+ /* remove device from cache; next use can refresh with new data */
+ ll_drop_by_index(req.i.ifi_index);
+
return 0;
}
--
2.11.0
next prev parent reply other threads:[~2019-02-14 0:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-14 0:22 [PATCH iproute2-next v2 0/3] Improve batch and dump times by caching link lookups David Ahern
2019-02-14 0:22 ` [PATCH iproute2-next v2 1/3] ll_map: Add function to remove link cache entry by index David Ahern
2019-02-14 0:22 ` David Ahern [this message]
2019-02-14 0:22 ` [PATCH iproute2-next v2 3/3] Improve batch and dump times by caching link lookups David Ahern
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=20190214002249.31866-3-dsahern@kernel.org \
--to=dsahern@kernel.org \
--cc=dsahern@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.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.