summaryrefslogtreecommitdiffstats
path: root/include/net/geneve.h
diff options
context:
space:
mode:
authorJesse Gross <jesse@nicira.com>2015-01-02 18:26:03 -0800
committerDavid S. Miller <davem@davemloft.net>2015-01-04 22:21:33 -0500
commit829a3ada9cc7d4c30fa61f8033403fb6c8f8092a (patch)
tree89e2c3f0b5fe649dda54e9745f2ec413c6217a49 /include/net/geneve.h
parent61f3cade763dca46127146a52d829e30b8f48921 (diff)
downloadop-kernel-dev-829a3ada9cc7d4c30fa61f8033403fb6c8f8092a.zip
op-kernel-dev-829a3ada9cc7d4c30fa61f8033403fb6c8f8092a.tar.gz
geneve: Simplify locking.
The existing Geneve locking scheme was pulled over directly from VXLAN. However, VXLAN has a number of built in mechanisms which make the locking more complex and are unlikely to be necessary with Geneve. This simplifies the locking to use a basic scheme of a mutex when doing updates plus RCU on receive. In addition to making the code easier to read, this also avoids the possibility of a race when creating or destroying sockets since UDP sockets and the list of Geneve sockets are protected by different locks. After this change, the entire operation is atomic. Signed-off-by: Jesse Gross <jesse@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/geneve.h')
-rw-r--r--include/net/geneve.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/geneve.h b/include/net/geneve.h
index 56c7e1a..b40f4af 100644
--- a/include/net/geneve.h
+++ b/include/net/geneve.h
@@ -73,7 +73,7 @@ struct geneve_sock {
void *rcv_data;
struct socket *sock;
struct rcu_head rcu;
- atomic_t refcnt;
+ int refcnt;
struct udp_offload udp_offloads;
};
OpenPOWER on IntegriCloud