From: Steffen Klassert <steffen.klassert@secunet.com>
To: David Miller <davem@davemloft.net>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
Steffen Klassert <steffen.klassert@secunet.com>,
<netdev@vger.kernel.org>
Subject: [PATCH 14/17] xfrm: policy: don't acquire policy lock in xfrm_spd_getinfo
Date: Thu, 8 Sep 2016 07:54:49 +0200 [thread overview]
Message-ID: <1473314092-11319-15-git-send-email-steffen.klassert@secunet.com> (raw)
In-Reply-To: <1473314092-11319-1-git-send-email-steffen.klassert@secunet.com>
From: Florian Westphal <fw@strlen.de>
It doesn't seem that important.
We now get inconsistent view of the counters, but those are stale anyway
right after we drop the lock.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
net/xfrm/xfrm_policy.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 3d27b9a..35b85a9 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -560,7 +560,6 @@ static inline int xfrm_byidx_should_resize(struct net *net, int total)
void xfrm_spd_getinfo(struct net *net, struct xfrmk_spdinfo *si)
{
- read_lock_bh(&net->xfrm.xfrm_policy_lock);
si->incnt = net->xfrm.policy_count[XFRM_POLICY_IN];
si->outcnt = net->xfrm.policy_count[XFRM_POLICY_OUT];
si->fwdcnt = net->xfrm.policy_count[XFRM_POLICY_FWD];
@@ -569,7 +568,6 @@ void xfrm_spd_getinfo(struct net *net, struct xfrmk_spdinfo *si)
si->fwdscnt = net->xfrm.policy_count[XFRM_POLICY_FWD+XFRM_POLICY_MAX];
si->spdhcnt = net->xfrm.policy_idx_hmask;
si->spdhmcnt = xfrm_policy_hashmax;
- read_unlock_bh(&net->xfrm.xfrm_policy_lock);
}
EXPORT_SYMBOL(xfrm_spd_getinfo);
--
1.9.1
next prev parent reply other threads:[~2016-09-08 6:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-08 5:54 pull request (net-next): ipsec-next 2016-09-08 Steffen Klassert
2016-09-08 5:54 ` [PATCH 01/17] xfrm: constify xfrm_replay structures Steffen Klassert
2016-09-08 5:54 ` [PATCH 02/17] xfrm: state: use hlist_for_each_entry_rcu helper Steffen Klassert
2016-09-08 5:54 ` [PATCH 03/17] xfrm: state: use atomic_inc_not_zero to increment refcount Steffen Klassert
2016-09-08 5:54 ` [PATCH 04/17] xfrm: state: delay freeing until rcu grace period has elapsed Steffen Klassert
2016-09-08 5:54 ` [PATCH 05/17] xfrm: state: add sequence count to detect hash resizes Steffen Klassert
2016-09-08 5:54 ` [PATCH 06/17] xfrm: state: use rcu_deref and assign_pointer helpers Steffen Klassert
2016-09-08 5:54 ` [PATCH 07/17] xfrm: state: don't use lock anymore unless acquire operation is needed Steffen Klassert
2016-09-08 5:54 ` [PATCH 08/17] xfrm: policy: use rcu versions for iteration and list add/del Steffen Klassert
2016-09-08 5:54 ` [PATCH 09/17] xfrm: policy: prepare policy_bydst hash for rcu lookups Steffen Klassert
2016-09-08 5:54 ` [PATCH 10/17] xfrm: policy: add sequence count to sync with hash resize Steffen Klassert
2016-09-08 5:54 ` [PATCH 11/17] xfrm: policy: use atomic_inc_not_zero in rcu section Steffen Klassert
2016-09-08 5:54 ` [PATCH 12/17] xfrm: policy: make xfrm_policy_lookup_bytype lockless Steffen Klassert
2016-09-08 5:54 ` [PATCH 13/17] xfrm: policy: only use rcu in xfrm_sk_policy_lookup Steffen Klassert
2016-09-08 5:54 ` Steffen Klassert [this message]
2016-09-08 5:54 ` [PATCH 15/17] xfrm: policy: convert policy_lock to spinlock Steffen Klassert
2016-09-08 5:54 ` [PATCH 16/17] xfrm: Fix xfrm_policy_lock imbalance Steffen Klassert
2016-09-08 5:54 ` [PATCH 17/17] xfrm: state: remove per-netns gc task Steffen Klassert
2016-09-08 20:10 ` pull request (net-next): ipsec-next 2016-09-08 David Miller
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=1473314092-11319-15-git-send-email-steffen.klassert@secunet.com \
--to=steffen.klassert@secunet.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.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 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).