forked from openvswitch/ovs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vxlan-udp-recv function lookup vxlan_sock struct on every packet recv by using udp-port number. we can use sk->sk_user_data to store vxlan_sock and avoid lookup. This commit also allows us to get rid of socket hash table. Signed-off-by: Pravin B Shelar <[email protected]> Acked-by: Jesse Gross <[email protected]>
- Loading branch information
1 parent
b4fa9d4
commit 862504c
Showing
3 changed files
with
20 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef __NET_SOCK_WRAPPER_H | ||
#define __NET_SOCK_WRAPPER_H 1 | ||
|
||
#include_next <net/sock.h> | ||
|
||
#ifndef __sk_user_data | ||
#define __sk_user_data(sk) ((*((void __rcu **)&(sk)->sk_user_data))) | ||
|
||
#define rcu_dereference_sk_user_data(sk) rcu_dereference(__sk_user_data((sk))) | ||
#define rcu_assign_sk_user_data(sk, ptr) rcu_assign_pointer(__sk_user_data((sk)), ptr) | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters