mirror of
https://github.com/openvswitch/ovs
synced 2025-10-25 15:07:05 +00:00
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 <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
14 lines
375 B
C
14 lines
375 B
C
#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
|