.. | .. |
---|
27 | 27 | |
---|
28 | 28 | struct crypt_queue { |
---|
29 | 29 | struct ptr_ring ring; |
---|
30 | | - union { |
---|
31 | | - struct { |
---|
32 | | - struct multicore_worker __percpu *worker; |
---|
33 | | - int last_cpu; |
---|
34 | | - }; |
---|
35 | | - struct work_struct work; |
---|
36 | | - }; |
---|
| 30 | + struct multicore_worker __percpu *worker; |
---|
| 31 | + int last_cpu; |
---|
| 32 | +}; |
---|
| 33 | + |
---|
| 34 | +struct prev_queue { |
---|
| 35 | + struct sk_buff *head, *tail, *peeked; |
---|
| 36 | + struct { struct sk_buff *next, *prev; } empty; // Match first 2 members of struct sk_buff. |
---|
| 37 | + atomic_t count; |
---|
37 | 38 | }; |
---|
38 | 39 | |
---|
39 | 40 | struct wg_device { |
---|
40 | 41 | struct net_device *dev; |
---|
41 | | - struct crypt_queue encrypt_queue, decrypt_queue; |
---|
| 42 | + struct crypt_queue encrypt_queue, decrypt_queue, handshake_queue; |
---|
42 | 43 | struct sock __rcu *sock4, *sock6; |
---|
43 | 44 | struct net __rcu *creating_net; |
---|
44 | 45 | struct noise_static_identity static_identity; |
---|
45 | | - struct workqueue_struct *handshake_receive_wq, *handshake_send_wq; |
---|
46 | | - struct workqueue_struct *packet_crypt_wq; |
---|
47 | | - struct sk_buff_head incoming_handshakes; |
---|
48 | | - int incoming_handshake_cpu; |
---|
49 | | - struct multicore_worker __percpu *incoming_handshakes_worker; |
---|
| 46 | + struct workqueue_struct *packet_crypt_wq,*handshake_receive_wq, *handshake_send_wq; |
---|
50 | 47 | struct cookie_checker cookie_checker; |
---|
51 | 48 | struct pubkey_hashtable *peer_hashtable; |
---|
52 | 49 | struct index_hashtable *index_hashtable; |
---|
53 | 50 | struct allowedips peer_allowedips; |
---|
54 | 51 | struct mutex device_update_lock, socket_update_lock; |
---|
55 | 52 | struct list_head device_list, peer_list; |
---|
| 53 | + atomic_t handshake_queue_len; |
---|
56 | 54 | unsigned int num_peers, device_update_gen; |
---|
57 | 55 | u32 fwmark; |
---|
58 | 56 | u16 incoming_port; |
---|