|
| 1 | +rxrpc: Implement a mechanism to send an event notification to a connection |
| 2 | + |
| 3 | +jira LE-1907 |
| 4 | +Rebuild_History Non-Buildable kernel-rt-5.14.0-284.30.1.rt14.315.el9_2 |
| 5 | +commit-author David Howells <dhowells@redhat.com> |
| 6 | +commit f2cce89a074e6d2991dddc94f6b6ebe1576b8459 |
| 7 | +Empty-Commit: Cherry-Pick Conflicts during history rebuild. |
| 8 | +Will be included in final tarball splat. Ref for failed cherry-pick at: |
| 9 | +ciq/ciq_backports/kernel-rt-5.14.0-284.30.1.rt14.315.el9_2/f2cce89a.failed |
| 10 | + |
| 11 | +Provide a means by which an event notification can be sent to a connection |
| 12 | +through such that the I/O thread can pick it up and handle it rather than |
| 13 | +doing it in a separate workqueue. |
| 14 | + |
| 15 | +This is then used to move the deferred final ACK of a call into the I/O |
| 16 | +thread rather than a separate work queue as part of the drive to do all |
| 17 | +transmission from the I/O thread. |
| 18 | + |
| 19 | + Signed-off-by: David Howells <dhowells@redhat.com> |
| 20 | +cc: Marc Dionne <marc.dionne@auristor.com> |
| 21 | +cc: linux-afs@lists.infradead.org |
| 22 | +(cherry picked from commit f2cce89a074e6d2991dddc94f6b6ebe1576b8459) |
| 23 | + Signed-off-by: Jonathan Maple <jmaple@ciq.com> |
| 24 | + |
| 25 | +# Conflicts: |
| 26 | +# include/trace/events/rxrpc.h |
| 27 | +# net/rxrpc/ar-internal.h |
| 28 | +# net/rxrpc/conn_object.c |
| 29 | +# net/rxrpc/io_thread.c |
| 30 | +# net/rxrpc/local_object.c |
| 31 | +diff --cc include/trace/events/rxrpc.h |
| 32 | +index 2a52121d73a0,b969756f97fc..000000000000 |
| 33 | +--- a/include/trace/events/rxrpc.h |
| 34 | ++++ b/include/trace/events/rxrpc.h |
| 35 | +@@@ -16,44 -16,122 +16,73 @@@ |
| 36 | + /* |
| 37 | + * Declare tracing information enums and their string mappings for display. |
| 38 | + */ |
| 39 | + -#define rxrpc_call_poke_traces \ |
| 40 | + - EM(rxrpc_call_poke_abort, "Abort") \ |
| 41 | + - EM(rxrpc_call_poke_complete, "Compl") \ |
| 42 | + - EM(rxrpc_call_poke_error, "Error") \ |
| 43 | + - EM(rxrpc_call_poke_idle, "Idle") \ |
| 44 | + - EM(rxrpc_call_poke_start, "Start") \ |
| 45 | + - EM(rxrpc_call_poke_timer, "Timer") \ |
| 46 | + - E_(rxrpc_call_poke_timer_now, "Timer-now") |
| 47 | + - |
| 48 | + #define rxrpc_skb_traces \ |
| 49 | + - EM(rxrpc_skb_eaten_by_unshare, "ETN unshare ") \ |
| 50 | + - EM(rxrpc_skb_eaten_by_unshare_nomem, "ETN unshar-nm") \ |
| 51 | + - EM(rxrpc_skb_get_conn_work, "GET conn-work") \ |
| 52 | + - EM(rxrpc_skb_get_local_work, "GET locl-work") \ |
| 53 | + - EM(rxrpc_skb_get_reject_work, "GET rej-work ") \ |
| 54 | + - EM(rxrpc_skb_get_to_recvmsg, "GET to-recv ") \ |
| 55 | + - EM(rxrpc_skb_get_to_recvmsg_oos, "GET to-recv-o") \ |
| 56 | + - EM(rxrpc_skb_new_encap_rcv, "NEW encap-rcv") \ |
| 57 | + - EM(rxrpc_skb_new_error_report, "NEW error-rpt") \ |
| 58 | + - EM(rxrpc_skb_new_jumbo_subpacket, "NEW jumbo-sub") \ |
| 59 | + - EM(rxrpc_skb_new_unshared, "NEW unshared ") \ |
| 60 | + - EM(rxrpc_skb_put_conn_work, "PUT conn-work") \ |
| 61 | + - EM(rxrpc_skb_put_error_report, "PUT error-rep") \ |
| 62 | + - EM(rxrpc_skb_put_input, "PUT input ") \ |
| 63 | + - EM(rxrpc_skb_put_jumbo_subpacket, "PUT jumbo-sub") \ |
| 64 | + - EM(rxrpc_skb_put_purge, "PUT purge ") \ |
| 65 | + - EM(rxrpc_skb_put_rotate, "PUT rotate ") \ |
| 66 | + - EM(rxrpc_skb_put_unknown, "PUT unknown ") \ |
| 67 | + - EM(rxrpc_skb_see_conn_work, "SEE conn-work") \ |
| 68 | + - EM(rxrpc_skb_see_recvmsg, "SEE recvmsg ") \ |
| 69 | + - EM(rxrpc_skb_see_reject, "SEE reject ") \ |
| 70 | + - EM(rxrpc_skb_see_rotate, "SEE rotate ") \ |
| 71 | + - E_(rxrpc_skb_see_version, "SEE version ") |
| 72 | + + EM(rxrpc_skb_ack, "ACK") \ |
| 73 | + + EM(rxrpc_skb_cleaned, "CLN") \ |
| 74 | + + EM(rxrpc_skb_cloned_jumbo, "CLJ") \ |
| 75 | + + EM(rxrpc_skb_freed, "FRE") \ |
| 76 | + + EM(rxrpc_skb_got, "GOT") \ |
| 77 | + + EM(rxrpc_skb_lost, "*L*") \ |
| 78 | + + EM(rxrpc_skb_new, "NEW") \ |
| 79 | + + EM(rxrpc_skb_purged, "PUR") \ |
| 80 | + + EM(rxrpc_skb_received, "RCV") \ |
| 81 | + + EM(rxrpc_skb_rotated, "ROT") \ |
| 82 | + + EM(rxrpc_skb_seen, "SEE") \ |
| 83 | + + EM(rxrpc_skb_unshared, "UNS") \ |
| 84 | + + E_(rxrpc_skb_unshared_nomem, "US0") |
| 85 | + |
| 86 | + #define rxrpc_local_traces \ |
| 87 | + - EM(rxrpc_local_free, "FREE ") \ |
| 88 | + - EM(rxrpc_local_get_call, "GET call ") \ |
| 89 | + - EM(rxrpc_local_get_client_conn, "GET conn-cln") \ |
| 90 | + - EM(rxrpc_local_get_for_use, "GET for-use ") \ |
| 91 | + - EM(rxrpc_local_get_peer, "GET peer ") \ |
| 92 | + - EM(rxrpc_local_get_prealloc_conn, "GET conn-pre") \ |
| 93 | + - EM(rxrpc_local_new, "NEW ") \ |
| 94 | + - EM(rxrpc_local_put_bind, "PUT bind ") \ |
| 95 | + - EM(rxrpc_local_put_call, "PUT call ") \ |
| 96 | + - EM(rxrpc_local_put_for_use, "PUT for-use ") \ |
| 97 | + - EM(rxrpc_local_put_kill_conn, "PUT conn-kil") \ |
| 98 | + - EM(rxrpc_local_put_peer, "PUT peer ") \ |
| 99 | + - EM(rxrpc_local_put_prealloc_conn, "PUT conn-pre") \ |
| 100 | + - EM(rxrpc_local_put_release_sock, "PUT rel-sock") \ |
| 101 | + - EM(rxrpc_local_stop, "STOP ") \ |
| 102 | + - EM(rxrpc_local_stopped, "STOPPED ") \ |
| 103 | + - EM(rxrpc_local_unuse_bind, "UNU bind ") \ |
| 104 | + - EM(rxrpc_local_unuse_conn_work, "UNU conn-wrk") \ |
| 105 | + - EM(rxrpc_local_unuse_peer_keepalive, "UNU peer-kpa") \ |
| 106 | + - EM(rxrpc_local_unuse_release_sock, "UNU rel-sock") \ |
| 107 | + - EM(rxrpc_local_use_conn_work, "USE conn-wrk") \ |
| 108 | + - EM(rxrpc_local_use_lookup, "USE lookup ") \ |
| 109 | + - E_(rxrpc_local_use_peer_keepalive, "USE peer-kpa") |
| 110 | + + EM(rxrpc_local_got, "GOT") \ |
| 111 | + + EM(rxrpc_local_new, "NEW") \ |
| 112 | + + EM(rxrpc_local_processing, "PRO") \ |
| 113 | + + EM(rxrpc_local_put, "PUT") \ |
| 114 | + + EM(rxrpc_local_queued, "QUE") \ |
| 115 | + + E_(rxrpc_local_tx_ack, "TAK") |
| 116 | + |
| 117 | + #define rxrpc_peer_traces \ |
| 118 | + - EM(rxrpc_peer_free, "FREE ") \ |
| 119 | + - EM(rxrpc_peer_get_accept, "GET accept ") \ |
| 120 | + - EM(rxrpc_peer_get_activate_call, "GET act-call") \ |
| 121 | + - EM(rxrpc_peer_get_bundle, "GET bundle ") \ |
| 122 | + - EM(rxrpc_peer_get_client_conn, "GET cln-conn") \ |
| 123 | + - EM(rxrpc_peer_get_input, "GET input ") \ |
| 124 | + - EM(rxrpc_peer_get_input_error, "GET inpt-err") \ |
| 125 | + - EM(rxrpc_peer_get_keepalive, "GET keepaliv") \ |
| 126 | + - EM(rxrpc_peer_get_lookup_client, "GET look-cln") \ |
| 127 | + - EM(rxrpc_peer_get_service_conn, "GET srv-conn") \ |
| 128 | + - EM(rxrpc_peer_new_client, "NEW client ") \ |
| 129 | + - EM(rxrpc_peer_new_prealloc, "NEW prealloc") \ |
| 130 | + - EM(rxrpc_peer_put_bundle, "PUT bundle ") \ |
| 131 | + - EM(rxrpc_peer_put_call, "PUT call ") \ |
| 132 | + - EM(rxrpc_peer_put_conn, "PUT conn ") \ |
| 133 | + - EM(rxrpc_peer_put_discard_tmp, "PUT disc-tmp") \ |
| 134 | + - EM(rxrpc_peer_put_input, "PUT input ") \ |
| 135 | + - EM(rxrpc_peer_put_input_error, "PUT inpt-err") \ |
| 136 | + - E_(rxrpc_peer_put_keepalive, "PUT keepaliv") |
| 137 | + - |
| 138 | + -#define rxrpc_bundle_traces \ |
| 139 | + - EM(rxrpc_bundle_free, "FREE ") \ |
| 140 | + - EM(rxrpc_bundle_get_client_call, "GET clt-call") \ |
| 141 | + - EM(rxrpc_bundle_get_client_conn, "GET clt-conn") \ |
| 142 | + - EM(rxrpc_bundle_get_service_conn, "GET svc-conn") \ |
| 143 | + - EM(rxrpc_bundle_put_conn, "PUT conn ") \ |
| 144 | + - EM(rxrpc_bundle_put_discard, "PUT discard ") \ |
| 145 | + - E_(rxrpc_bundle_new, "NEW ") |
| 146 | + + EM(rxrpc_peer_got, "GOT") \ |
| 147 | + + EM(rxrpc_peer_new, "NEW") \ |
| 148 | + + EM(rxrpc_peer_processing, "PRO") \ |
| 149 | + + E_(rxrpc_peer_put, "PUT") |
| 150 | + |
| 151 | + #define rxrpc_conn_traces \ |
| 152 | +++<<<<<<< HEAD |
| 153 | + + EM(rxrpc_conn_got, "GOT") \ |
| 154 | + + EM(rxrpc_conn_new_client, "NWc") \ |
| 155 | + + EM(rxrpc_conn_new_service, "NWs") \ |
| 156 | + + EM(rxrpc_conn_put_client, "PTc") \ |
| 157 | + + EM(rxrpc_conn_put_service, "PTs") \ |
| 158 | + + EM(rxrpc_conn_queued, "QUE") \ |
| 159 | + + EM(rxrpc_conn_reap_service, "RPs") \ |
| 160 | + + E_(rxrpc_conn_seen, "SEE") |
| 161 | +++======= |
| 162 | ++ EM(rxrpc_conn_free, "FREE ") \ |
| 163 | ++ EM(rxrpc_conn_get_activate_call, "GET act-call") \ |
| 164 | ++ EM(rxrpc_conn_get_call_input, "GET inp-call") \ |
| 165 | ++ EM(rxrpc_conn_get_conn_input, "GET inp-conn") \ |
| 166 | ++ EM(rxrpc_conn_get_idle, "GET idle ") \ |
| 167 | ++ EM(rxrpc_conn_get_poke_timer, "GET poke ") \ |
| 168 | ++ EM(rxrpc_conn_get_service_conn, "GET svc-conn") \ |
| 169 | ++ EM(rxrpc_conn_new_client, "NEW client ") \ |
| 170 | ++ EM(rxrpc_conn_new_service, "NEW service ") \ |
| 171 | ++ EM(rxrpc_conn_put_call, "PUT call ") \ |
| 172 | ++ EM(rxrpc_conn_put_call_input, "PUT inp-call") \ |
| 173 | ++ EM(rxrpc_conn_put_conn_input, "PUT inp-conn") \ |
| 174 | ++ EM(rxrpc_conn_put_discard, "PUT discard ") \ |
| 175 | ++ EM(rxrpc_conn_put_discard_idle, "PUT disc-idl") \ |
| 176 | ++ EM(rxrpc_conn_put_local_dead, "PUT loc-dead") \ |
| 177 | ++ EM(rxrpc_conn_put_noreuse, "PUT noreuse ") \ |
| 178 | ++ EM(rxrpc_conn_put_poke, "PUT poke ") \ |
| 179 | ++ EM(rxrpc_conn_put_service_reaped, "PUT svc-reap") \ |
| 180 | ++ EM(rxrpc_conn_put_unbundle, "PUT unbundle") \ |
| 181 | ++ EM(rxrpc_conn_put_unidle, "PUT unidle ") \ |
| 182 | ++ EM(rxrpc_conn_put_work, "PUT work ") \ |
| 183 | ++ EM(rxrpc_conn_queue_challenge, "QUE chall ") \ |
| 184 | ++ EM(rxrpc_conn_queue_rx_work, "QUE rx-work ") \ |
| 185 | ++ EM(rxrpc_conn_see_new_service_conn, "SEE new-svc ") \ |
| 186 | ++ EM(rxrpc_conn_see_reap_service, "SEE reap-svc") \ |
| 187 | ++ E_(rxrpc_conn_see_work, "SEE work ") |
| 188 | +++>>>>>>> f2cce89a074e (rxrpc: Implement a mechanism to send an event notification to a connection) |
| 189 | + |
| 190 | + #define rxrpc_client_traces \ |
| 191 | + EM(rxrpc_client_activate_chans, "Activa") \ |
| 192 | +diff --cc net/rxrpc/ar-internal.h |
| 193 | +index 46ce41afb431,d82d7f36cdaa..000000000000 |
| 194 | +--- a/net/rxrpc/ar-internal.h |
| 195 | ++++ b/net/rxrpc/ar-internal.h |
| 196 | +@@@ -276,16 -284,17 +277,22 @@@ struct rxrpc_local |
| 197 | + struct rcu_head rcu; |
| 198 | + atomic_t active_users; /* Number of users of the local endpoint */ |
| 199 | + refcount_t ref; /* Number of references to the structure */ |
| 200 | + - struct net *net; /* The network namespace */ |
| 201 | + - struct rxrpc_net *rxnet; /* Our bits in the network namespace */ |
| 202 | + + struct rxrpc_net *rxnet; /* The network ns in which this resides */ |
| 203 | + struct hlist_node link; |
| 204 | + struct socket *socket; /* my UDP socket */ |
| 205 | + - struct task_struct *io_thread; |
| 206 | + - struct completion io_thread_ready; /* Indication that the I/O thread started */ |
| 207 | + + struct work_struct processor; |
| 208 | + + struct list_head ack_tx_queue; /* List of ACKs that need sending */ |
| 209 | + + spinlock_t ack_tx_lock; /* ACK list lock */ |
| 210 | + struct rxrpc_sock __rcu *service; /* Service(s) listening on this endpoint */ |
| 211 | + struct rw_semaphore defrag_sem; /* control re-enablement of IP DF bit */ |
| 212 | +++<<<<<<< HEAD |
| 213 | + + struct sk_buff_head reject_queue; /* packets awaiting rejection */ |
| 214 | + + struct sk_buff_head event_queue; /* endpoint event packets awaiting processing */ |
| 215 | +++======= |
| 216 | ++ struct sk_buff_head rx_queue; /* Received packets */ |
| 217 | ++ struct list_head conn_attend_q; /* Conns requiring immediate attention */ |
| 218 | ++ struct list_head call_attend_q; /* Calls requiring immediate attention */ |
| 219 | +++>>>>>>> f2cce89a074e (rxrpc: Implement a mechanism to send an event notification to a connection) |
| 220 | + struct rb_root client_bundles; /* Client connection bundles by socket params */ |
| 221 | + spinlock_t client_bundles_lock; /* Lock for client_bundles */ |
| 222 | + spinlock_t lock; /* access lock */ |
| 223 | +@@@ -424,9 -439,14 +431,17 @@@ struct rxrpc_bundle |
| 224 | + */ |
| 225 | + struct rxrpc_connection { |
| 226 | + struct rxrpc_conn_proto proto; |
| 227 | +++<<<<<<< HEAD |
| 228 | + + struct rxrpc_conn_parameters params; |
| 229 | +++======= |
| 230 | ++ struct rxrpc_local *local; /* Representation of local endpoint */ |
| 231 | ++ struct rxrpc_peer *peer; /* Remote endpoint */ |
| 232 | ++ struct rxrpc_net *rxnet; /* Network namespace to which call belongs */ |
| 233 | ++ struct key *key; /* Security details */ |
| 234 | ++ struct list_head attend_link; /* Link in local->conn_attend_q */ |
| 235 | +++>>>>>>> f2cce89a074e (rxrpc: Implement a mechanism to send an event notification to a connection) |
| 236 | + |
| 237 | + refcount_t ref; |
| 238 | + - atomic_t active; /* Active count for service conns */ |
| 239 | + struct rcu_head rcu; |
| 240 | + struct list_head cache_link; |
| 241 | + |
| 242 | +@@@ -878,8 -903,12 +893,13 @@@ void rxrpc_clean_up_local_conns(struct |
| 243 | + /* |
| 244 | + * conn_event.c |
| 245 | + */ |
| 246 | + -void rxrpc_conn_retransmit_call(struct rxrpc_connection *conn, struct sk_buff *skb, |
| 247 | + - unsigned int channel); |
| 248 | + void rxrpc_process_connection(struct work_struct *); |
| 249 | + void rxrpc_process_delayed_final_acks(struct rxrpc_connection *, bool); |
| 250 | +++<<<<<<< HEAD |
| 251 | +++======= |
| 252 | ++ int rxrpc_input_conn_packet(struct rxrpc_connection *conn, struct sk_buff *skb); |
| 253 | ++ void rxrpc_input_conn_event(struct rxrpc_connection *conn, struct sk_buff *skb); |
| 254 | +++>>>>>>> f2cce89a074e (rxrpc: Implement a mechanism to send an event notification to a connection) |
| 255 | + |
| 256 | + /* |
| 257 | + * conn_object.c |
| 258 | +@@@ -887,18 -916,21 +907,26 @@@ |
| 259 | + extern unsigned int rxrpc_connection_expiry; |
| 260 | + extern unsigned int rxrpc_closed_conn_expiry; |
| 261 | + |
| 262 | +++<<<<<<< HEAD |
| 263 | + +struct rxrpc_connection *rxrpc_alloc_connection(gfp_t); |
| 264 | + +struct rxrpc_connection *rxrpc_find_connection_rcu(struct rxrpc_local *, |
| 265 | + + struct sk_buff *, |
| 266 | + + struct rxrpc_peer **); |
| 267 | +++======= |
| 268 | ++ void rxrpc_poke_conn(struct rxrpc_connection *conn, enum rxrpc_conn_trace why); |
| 269 | ++ struct rxrpc_connection *rxrpc_alloc_connection(struct rxrpc_net *, gfp_t); |
| 270 | ++ struct rxrpc_connection *rxrpc_find_client_connection_rcu(struct rxrpc_local *, |
| 271 | ++ struct sockaddr_rxrpc *, |
| 272 | ++ struct sk_buff *); |
| 273 | +++>>>>>>> f2cce89a074e (rxrpc: Implement a mechanism to send an event notification to a connection) |
| 274 | + void __rxrpc_disconnect_call(struct rxrpc_connection *, struct rxrpc_call *); |
| 275 | + void rxrpc_disconnect_call(struct rxrpc_call *); |
| 276 | + -void rxrpc_kill_client_conn(struct rxrpc_connection *); |
| 277 | + -void rxrpc_queue_conn(struct rxrpc_connection *, enum rxrpc_conn_trace); |
| 278 | + -void rxrpc_see_connection(struct rxrpc_connection *, enum rxrpc_conn_trace); |
| 279 | + -struct rxrpc_connection *rxrpc_get_connection(struct rxrpc_connection *, |
| 280 | + - enum rxrpc_conn_trace); |
| 281 | + -struct rxrpc_connection *rxrpc_get_connection_maybe(struct rxrpc_connection *, |
| 282 | + - enum rxrpc_conn_trace); |
| 283 | + -void rxrpc_put_connection(struct rxrpc_connection *, enum rxrpc_conn_trace); |
| 284 | + +void rxrpc_kill_connection(struct rxrpc_connection *); |
| 285 | + +bool rxrpc_queue_conn(struct rxrpc_connection *); |
| 286 | + +void rxrpc_see_connection(struct rxrpc_connection *); |
| 287 | + +struct rxrpc_connection *rxrpc_get_connection(struct rxrpc_connection *); |
| 288 | + +struct rxrpc_connection *rxrpc_get_connection_maybe(struct rxrpc_connection *); |
| 289 | + +void rxrpc_put_service_conn(struct rxrpc_connection *); |
| 290 | + void rxrpc_service_connection_reaper(struct work_struct *); |
| 291 | + void rxrpc_destroy_all_connections(struct rxrpc_net *); |
| 292 | + |
| 293 | +diff --cc net/rxrpc/conn_object.c |
| 294 | +index 156bd26daf74,281f59e356f5..000000000000 |
| 295 | +--- a/net/rxrpc/conn_object.c |
| 296 | ++++ b/net/rxrpc/conn_object.c |
| 297 | +@@@ -19,14 -19,34 +19,36 @@@ |
| 298 | + unsigned int __read_mostly rxrpc_connection_expiry = 10 * 60; |
| 299 | + unsigned int __read_mostly rxrpc_closed_conn_expiry = 10; |
| 300 | + |
| 301 | + -static void rxrpc_clean_up_connection(struct work_struct *work); |
| 302 | + -static void rxrpc_set_service_reap_timer(struct rxrpc_net *rxnet, |
| 303 | + - unsigned long reap_at); |
| 304 | + +static void rxrpc_destroy_connection(struct rcu_head *); |
| 305 | + |
| 306 | ++ void rxrpc_poke_conn(struct rxrpc_connection *conn, enum rxrpc_conn_trace why) |
| 307 | ++ { |
| 308 | ++ struct rxrpc_local *local = conn->local; |
| 309 | ++ bool busy; |
| 310 | ++ |
| 311 | ++ if (WARN_ON_ONCE(!local)) |
| 312 | ++ return; |
| 313 | ++ |
| 314 | ++ spin_lock_bh(&local->lock); |
| 315 | ++ busy = !list_empty(&conn->attend_link); |
| 316 | ++ if (!busy) { |
| 317 | ++ rxrpc_get_connection(conn, why); |
| 318 | ++ list_add_tail(&conn->attend_link, &local->conn_attend_q); |
| 319 | ++ } |
| 320 | ++ spin_unlock_bh(&local->lock); |
| 321 | ++ rxrpc_wake_up_io_thread(local); |
| 322 | ++ } |
| 323 | ++ |
| 324 | + static void rxrpc_connection_timer(struct timer_list *timer) |
| 325 | + { |
| 326 | + struct rxrpc_connection *conn = |
| 327 | + container_of(timer, struct rxrpc_connection, timer); |
| 328 | + |
| 329 | +++<<<<<<< HEAD |
| 330 | + + rxrpc_queue_conn(conn); |
| 331 | +++======= |
| 332 | ++ rxrpc_poke_conn(conn, rxrpc_conn_get_poke_timer); |
| 333 | +++>>>>>>> f2cce89a074e (rxrpc: Implement a mechanism to send an event notification to a connection) |
| 334 | + } |
| 335 | + |
| 336 | + /* |
| 337 | +diff --cc net/rxrpc/local_object.c |
| 338 | +index 846558613c7f,8ef6cd8defa4..000000000000 |
| 339 | +--- a/net/rxrpc/local_object.c |
| 340 | ++++ b/net/rxrpc/local_object.c |
| 341 | +@@@ -81,14 -94,14 +81,21 @@@ static struct rxrpc_local *rxrpc_alloc_ |
| 342 | + if (local) { |
| 343 | + refcount_set(&local->ref, 1); |
| 344 | + atomic_set(&local->active_users, 1); |
| 345 | + - local->net = net; |
| 346 | + - local->rxnet = rxrpc_net(net); |
| 347 | + + local->rxnet = rxnet; |
| 348 | + INIT_HLIST_NODE(&local->link); |
| 349 | + + INIT_WORK(&local->processor, rxrpc_local_processor); |
| 350 | + + INIT_LIST_HEAD(&local->ack_tx_queue); |
| 351 | + + spin_lock_init(&local->ack_tx_lock); |
| 352 | + init_rwsem(&local->defrag_sem); |
| 353 | +++<<<<<<< HEAD |
| 354 | + + skb_queue_head_init(&local->reject_queue); |
| 355 | + + skb_queue_head_init(&local->event_queue); |
| 356 | +++======= |
| 357 | ++ init_completion(&local->io_thread_ready); |
| 358 | ++ skb_queue_head_init(&local->rx_queue); |
| 359 | ++ INIT_LIST_HEAD(&local->conn_attend_q); |
| 360 | ++ INIT_LIST_HEAD(&local->call_attend_q); |
| 361 | +++>>>>>>> f2cce89a074e (rxrpc: Implement a mechanism to send an event notification to a connection) |
| 362 | + local->client_bundles = RB_ROOT; |
| 363 | + spin_lock_init(&local->client_bundles_lock); |
| 364 | + spin_lock_init(&local->lock); |
| 365 | +* Unmerged path net/rxrpc/io_thread.c |
| 366 | +* Unmerged path include/trace/events/rxrpc.h |
| 367 | +* Unmerged path net/rxrpc/ar-internal.h |
| 368 | +diff --git a/net/rxrpc/conn_event.c b/net/rxrpc/conn_event.c |
| 369 | +index abf03a5b1d31..cd4e27da2c8d 100644 |
| 370 | +--- a/net/rxrpc/conn_event.c |
| 371 | ++++ b/net/rxrpc/conn_event.c |
| 372 | +@@ -430,10 +430,6 @@ static void rxrpc_do_process_connection(struct rxrpc_connection *conn) |
| 373 | + if (test_and_clear_bit(RXRPC_CONN_EV_CHALLENGE, &conn->events)) |
| 374 | + rxrpc_secure_connection(conn); |
| 375 | + |
| 376 | +- /* Process delayed ACKs whose time has come. */ |
| 377 | +- if (conn->flags & RXRPC_CONN_FINAL_ACK_MASK) |
| 378 | +- rxrpc_process_delayed_final_acks(conn, false); |
| 379 | +- |
| 380 | + /* go through the conn-level event packets, releasing the ref on this |
| 381 | + * connection that each one has when we've finished with it */ |
| 382 | + while ((skb = skb_dequeue(&conn->rx_queue))) { |
| 383 | +@@ -483,3 +479,13 @@ void rxrpc_process_connection(struct work_struct *work) |
| 384 | + _leave(""); |
| 385 | + return; |
| 386 | + } |
| 387 | ++ |
| 388 | ++/* |
| 389 | ++ * Input a connection event. |
| 390 | ++ */ |
| 391 | ++void rxrpc_input_conn_event(struct rxrpc_connection *conn, struct sk_buff *skb) |
| 392 | ++{ |
| 393 | ++ /* Process delayed ACKs whose time has come. */ |
| 394 | ++ if (conn->flags & RXRPC_CONN_FINAL_ACK_MASK) |
| 395 | ++ rxrpc_process_delayed_final_acks(conn, false); |
| 396 | ++} |
| 397 | +* Unmerged path net/rxrpc/conn_object.c |
| 398 | +* Unmerged path net/rxrpc/io_thread.c |
| 399 | +* Unmerged path net/rxrpc/local_object.c |
0 commit comments