blob: 2dae877c08762f1b285a48db5b01991a24f886d2 [file] [log] [blame]
David Howells17926a72007-04-26 15:48:28 -07001/* RxRPC packet transmission
2 *
3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */
11
Joe Perches9b6d5392016-06-02 12:08:52 -070012#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
13
David Howells17926a72007-04-26 15:48:28 -070014#include <linux/net.h>
Tejun Heo5a0e3ad2010-03-24 17:04:11 +090015#include <linux/gfp.h>
David Howells17926a72007-04-26 15:48:28 -070016#include <linux/skbuff.h>
Paul Gortmakerbc3b2d72011-07-15 11:47:34 -040017#include <linux/export.h>
David Howells17926a72007-04-26 15:48:28 -070018#include <net/sock.h>
19#include <net/af_rxrpc.h>
20#include "ar-internal.h"
21
David Howells26cb02a2016-10-06 08:11:49 +010022struct rxrpc_ack_buffer {
David Howells8d94aa32016-09-07 09:19:31 +010023 struct rxrpc_wire_header whdr;
David Howells26cb02a2016-10-06 08:11:49 +010024 struct rxrpc_ackpacket ack;
25 u8 acks[255];
26 u8 pad[3];
David Howells8d94aa32016-09-07 09:19:31 +010027 struct rxrpc_ackinfo ackinfo;
28};
29
David Howells26cb02a2016-10-06 08:11:49 +010030struct rxrpc_abort_buffer {
31 struct rxrpc_wire_header whdr;
32 __be32 abort_code;
33};
34
David Howells8d94aa32016-09-07 09:19:31 +010035/*
36 * Fill out an ACK packet.
37 */
38static size_t rxrpc_fill_out_ack(struct rxrpc_call *call,
David Howells26cb02a2016-10-06 08:11:49 +010039 struct rxrpc_ack_buffer *pkt,
David Howells805b21b2016-09-24 18:05:26 +010040 rxrpc_seq_t *_hard_ack,
41 rxrpc_seq_t *_top)
David Howells8d94aa32016-09-07 09:19:31 +010042{
David Howellsf3639df2016-09-17 10:49:13 +010043 rxrpc_serial_t serial;
David Howells248f2192016-09-08 11:10:12 +010044 rxrpc_seq_t hard_ack, top, seq;
45 int ix;
David Howells8d94aa32016-09-07 09:19:31 +010046 u32 mtu, jmax;
47 u8 *ackp = pkt->acks;
48
David Howells248f2192016-09-08 11:10:12 +010049 /* Barrier against rxrpc_input_data(). */
David Howellsf3639df2016-09-17 10:49:13 +010050 serial = call->ackr_serial;
David Howells248f2192016-09-08 11:10:12 +010051 hard_ack = READ_ONCE(call->rx_hard_ack);
52 top = smp_load_acquire(&call->rx_top);
David Howells805b21b2016-09-24 18:05:26 +010053 *_hard_ack = hard_ack;
54 *_top = top;
David Howells248f2192016-09-08 11:10:12 +010055
David Howells8d94aa32016-09-07 09:19:31 +010056 pkt->ack.bufferSpace = htons(8);
David Howells248f2192016-09-08 11:10:12 +010057 pkt->ack.maxSkew = htons(call->ackr_skew);
58 pkt->ack.firstPacket = htonl(hard_ack + 1);
David Howells8d94aa32016-09-07 09:19:31 +010059 pkt->ack.previousPacket = htonl(call->ackr_prev_seq);
David Howellsf3639df2016-09-17 10:49:13 +010060 pkt->ack.serial = htonl(serial);
David Howells248f2192016-09-08 11:10:12 +010061 pkt->ack.reason = call->ackr_reason;
62 pkt->ack.nAcks = top - hard_ack;
David Howells8d94aa32016-09-07 09:19:31 +010063
David Howells8e831342016-09-22 00:29:31 +010064 if (pkt->ack.reason == RXRPC_ACK_PING)
65 pkt->whdr.flags |= RXRPC_REQUEST_ACK;
66
David Howells248f2192016-09-08 11:10:12 +010067 if (after(top, hard_ack)) {
68 seq = hard_ack + 1;
69 do {
70 ix = seq & RXRPC_RXTX_BUFF_MASK;
71 if (call->rxtx_buffer[ix])
72 *ackp++ = RXRPC_ACK_TYPE_ACK;
73 else
74 *ackp++ = RXRPC_ACK_TYPE_NACK;
75 seq++;
76 } while (before_eq(seq, top));
77 }
78
79 mtu = call->conn->params.peer->if_mtu;
80 mtu -= call->conn->params.peer->hdrsize;
David Howells75e42122016-09-13 22:36:22 +010081 jmax = (call->nr_jumbo_bad > 3) ? 1 : rxrpc_rx_jumbo_max;
David Howells8d94aa32016-09-07 09:19:31 +010082 pkt->ackinfo.rxMTU = htonl(rxrpc_rx_mtu);
83 pkt->ackinfo.maxMTU = htonl(mtu);
David Howells75e42122016-09-13 22:36:22 +010084 pkt->ackinfo.rwind = htonl(call->rx_winsize);
David Howells8d94aa32016-09-07 09:19:31 +010085 pkt->ackinfo.jumbo_max = htonl(jmax);
86
87 *ackp++ = 0;
88 *ackp++ = 0;
89 *ackp++ = 0;
David Howells248f2192016-09-08 11:10:12 +010090 return top - hard_ack + 3;
David Howells8d94aa32016-09-07 09:19:31 +010091}
92
93/*
David Howells26cb02a2016-10-06 08:11:49 +010094 * Send an ACK call packet.
David Howells8d94aa32016-09-07 09:19:31 +010095 */
David Howells26cb02a2016-10-06 08:11:49 +010096int rxrpc_send_ack_packet(struct rxrpc_call *call)
David Howells8d94aa32016-09-07 09:19:31 +010097{
98 struct rxrpc_connection *conn = NULL;
David Howells26cb02a2016-10-06 08:11:49 +010099 struct rxrpc_ack_buffer *pkt;
David Howells8d94aa32016-09-07 09:19:31 +0100100 struct msghdr msg;
101 struct kvec iov[2];
102 rxrpc_serial_t serial;
David Howells805b21b2016-09-24 18:05:26 +0100103 rxrpc_seq_t hard_ack, top;
David Howells8d94aa32016-09-07 09:19:31 +0100104 size_t len, n;
David Howells8e831342016-09-22 00:29:31 +0100105 bool ping = false;
David Howells26cb02a2016-10-06 08:11:49 +0100106 int ret;
David Howells8d94aa32016-09-07 09:19:31 +0100107
108 spin_lock_bh(&call->lock);
109 if (call->conn)
110 conn = rxrpc_get_connection_maybe(call->conn);
111 spin_unlock_bh(&call->lock);
112 if (!conn)
113 return -ECONNRESET;
114
115 pkt = kzalloc(sizeof(*pkt), GFP_KERNEL);
116 if (!pkt) {
117 rxrpc_put_connection(conn);
118 return -ENOMEM;
119 }
120
David Howells8d94aa32016-09-07 09:19:31 +0100121 msg.msg_name = &call->peer->srx.transport;
122 msg.msg_namelen = call->peer->srx.transport_len;
123 msg.msg_control = NULL;
124 msg.msg_controllen = 0;
125 msg.msg_flags = 0;
126
127 pkt->whdr.epoch = htonl(conn->proto.epoch);
128 pkt->whdr.cid = htonl(call->cid);
129 pkt->whdr.callNumber = htonl(call->call_id);
130 pkt->whdr.seq = 0;
David Howells26cb02a2016-10-06 08:11:49 +0100131 pkt->whdr.type = RXRPC_PACKET_TYPE_ACK;
132 pkt->whdr.flags = RXRPC_SLOW_START_OK | conn->out_clientflag;
David Howells8d94aa32016-09-07 09:19:31 +0100133 pkt->whdr.userStatus = 0;
134 pkt->whdr.securityIndex = call->security_ix;
135 pkt->whdr._rsvd = 0;
136 pkt->whdr.serviceId = htons(call->service_id);
137
David Howells26cb02a2016-10-06 08:11:49 +0100138 spin_lock_bh(&call->lock);
139 if (!call->ackr_reason) {
David Howells8d94aa32016-09-07 09:19:31 +0100140 spin_unlock_bh(&call->lock);
David Howells26cb02a2016-10-06 08:11:49 +0100141 ret = 0;
David Howells8d94aa32016-09-07 09:19:31 +0100142 goto out;
143 }
David Howells26cb02a2016-10-06 08:11:49 +0100144 ping = (call->ackr_reason == RXRPC_ACK_PING);
145 n = rxrpc_fill_out_ack(call, pkt, &hard_ack, &top);
146 call->ackr_reason = 0;
147
148 spin_unlock_bh(&call->lock);
149
150 iov[0].iov_base = pkt;
151 iov[0].iov_len = sizeof(pkt->whdr) + sizeof(pkt->ack) + n;
152 iov[1].iov_base = &pkt->ackinfo;
153 iov[1].iov_len = sizeof(pkt->ackinfo);
154 len = iov[0].iov_len + iov[1].iov_len;
David Howells8d94aa32016-09-07 09:19:31 +0100155
David Howellsb86e2182016-09-23 15:08:48 +0100156 serial = atomic_inc_return(&conn->serial);
157 pkt->whdr.serial = htonl(serial);
David Howells26cb02a2016-10-06 08:11:49 +0100158 trace_rxrpc_tx_ack(call, serial,
159 ntohl(pkt->ack.firstPacket),
160 ntohl(pkt->ack.serial),
161 pkt->ack.reason, pkt->ack.nAcks);
David Howellsb86e2182016-09-23 15:08:48 +0100162
David Howells8e831342016-09-22 00:29:31 +0100163 if (ping) {
164 call->ackr_ping = serial;
165 smp_wmb();
166 /* We need to stick a time in before we send the packet in case
167 * the reply gets back before kernel_sendmsg() completes - but
168 * asking UDP to send the packet can take a relatively long
169 * time, so we update the time after, on the assumption that
170 * the packet transmission is more likely to happen towards the
171 * end of the kernel_sendmsg() call.
172 */
173 call->ackr_ping_time = ktime_get_real();
174 set_bit(RXRPC_CALL_PINGING, &call->flags);
175 trace_rxrpc_rtt_tx(call, rxrpc_rtt_tx_ping, serial);
176 }
David Howells26cb02a2016-10-06 08:11:49 +0100177
178 ret = kernel_sendmsg(conn->params.local->socket, &msg, iov, 2, len);
David Howells8e831342016-09-22 00:29:31 +0100179 if (ping)
180 call->ackr_ping_time = ktime_get_real();
David Howells8d94aa32016-09-07 09:19:31 +0100181
David Howells26cb02a2016-10-06 08:11:49 +0100182 if (call->state < RXRPC_CALL_COMPLETE) {
David Howells805b21b2016-09-24 18:05:26 +0100183 if (ret < 0) {
David Howells8e831342016-09-22 00:29:31 +0100184 clear_bit(RXRPC_CALL_PINGING, &call->flags);
David Howells248f2192016-09-08 11:10:12 +0100185 rxrpc_propose_ACK(call, pkt->ack.reason,
186 ntohs(pkt->ack.maxSkew),
187 ntohl(pkt->ack.serial),
David Howells9c7ad432016-09-23 13:50:40 +0100188 true, true,
189 rxrpc_propose_ack_retry_tx);
David Howells805b21b2016-09-24 18:05:26 +0100190 } else {
191 spin_lock_bh(&call->lock);
192 if (after(hard_ack, call->ackr_consumed))
193 call->ackr_consumed = hard_ack;
194 if (after(top, call->ackr_seen))
195 call->ackr_seen = top;
196 spin_unlock_bh(&call->lock);
David Howells248f2192016-09-08 11:10:12 +0100197 }
198 }
199
David Howells8d94aa32016-09-07 09:19:31 +0100200out:
201 rxrpc_put_connection(conn);
202 kfree(pkt);
203 return ret;
204}
205
David Howells5873c082014-02-07 18:58:44 +0000206/*
David Howells26cb02a2016-10-06 08:11:49 +0100207 * Send an ABORT call packet.
208 */
209int rxrpc_send_abort_packet(struct rxrpc_call *call)
210{
211 struct rxrpc_connection *conn = NULL;
212 struct rxrpc_abort_buffer pkt;
213 struct msghdr msg;
214 struct kvec iov[1];
215 rxrpc_serial_t serial;
216 int ret;
217
218 spin_lock_bh(&call->lock);
219 if (call->conn)
220 conn = rxrpc_get_connection_maybe(call->conn);
221 spin_unlock_bh(&call->lock);
222 if (!conn)
223 return -ECONNRESET;
224
225 msg.msg_name = &call->peer->srx.transport;
226 msg.msg_namelen = call->peer->srx.transport_len;
227 msg.msg_control = NULL;
228 msg.msg_controllen = 0;
229 msg.msg_flags = 0;
230
231 pkt.whdr.epoch = htonl(conn->proto.epoch);
232 pkt.whdr.cid = htonl(call->cid);
233 pkt.whdr.callNumber = htonl(call->call_id);
234 pkt.whdr.seq = 0;
235 pkt.whdr.type = RXRPC_PACKET_TYPE_ABORT;
236 pkt.whdr.flags = conn->out_clientflag;
237 pkt.whdr.userStatus = 0;
238 pkt.whdr.securityIndex = call->security_ix;
239 pkt.whdr._rsvd = 0;
240 pkt.whdr.serviceId = htons(call->service_id);
241 pkt.abort_code = htonl(call->abort_code);
242
243 iov[0].iov_base = &pkt;
244 iov[0].iov_len = sizeof(pkt);
245
246 serial = atomic_inc_return(&conn->serial);
247 pkt.whdr.serial = htonl(serial);
248
249 ret = kernel_sendmsg(conn->params.local->socket,
250 &msg, iov, 1, sizeof(pkt));
251
252 rxrpc_put_connection(conn);
253 return ret;
254}
255
256/*
David Howells17926a72007-04-26 15:48:28 -0700257 * send a packet through the transport endpoint
258 */
David Howellsa1767072016-09-29 22:37:15 +0100259int rxrpc_send_data_packet(struct rxrpc_call *call, struct sk_buff *skb,
260 bool retrans)
David Howells17926a72007-04-26 15:48:28 -0700261{
David Howells5a924b82016-09-22 00:29:31 +0100262 struct rxrpc_connection *conn = call->conn;
263 struct rxrpc_wire_header whdr;
264 struct rxrpc_skb_priv *sp = rxrpc_skb(skb);
David Howells17926a72007-04-26 15:48:28 -0700265 struct msghdr msg;
David Howells5a924b82016-09-22 00:29:31 +0100266 struct kvec iov[2];
267 rxrpc_serial_t serial;
268 size_t len;
David Howellsa1767072016-09-29 22:37:15 +0100269 bool lost = false;
David Howells17926a72007-04-26 15:48:28 -0700270 int ret, opt;
271
272 _enter(",{%d}", skb->len);
273
David Howells5a924b82016-09-22 00:29:31 +0100274 /* Each transmission of a Tx packet needs a new serial number */
275 serial = atomic_inc_return(&conn->serial);
David Howells17926a72007-04-26 15:48:28 -0700276
David Howells5a924b82016-09-22 00:29:31 +0100277 whdr.epoch = htonl(conn->proto.epoch);
278 whdr.cid = htonl(call->cid);
279 whdr.callNumber = htonl(call->call_id);
280 whdr.seq = htonl(sp->hdr.seq);
281 whdr.serial = htonl(serial);
282 whdr.type = RXRPC_PACKET_TYPE_DATA;
283 whdr.flags = sp->hdr.flags;
284 whdr.userStatus = 0;
285 whdr.securityIndex = call->security_ix;
286 whdr._rsvd = htons(sp->hdr._rsvd);
287 whdr.serviceId = htons(call->service_id);
288
289 iov[0].iov_base = &whdr;
290 iov[0].iov_len = sizeof(whdr);
291 iov[1].iov_base = skb->head;
292 iov[1].iov_len = skb->len;
293 len = iov[0].iov_len + iov[1].iov_len;
294
295 msg.msg_name = &call->peer->srx.transport;
296 msg.msg_namelen = call->peer->srx.transport_len;
David Howells17926a72007-04-26 15:48:28 -0700297 msg.msg_control = NULL;
298 msg.msg_controllen = 0;
299 msg.msg_flags = 0;
300
David Howells57494342016-09-24 18:05:27 +0100301 /* If our RTT cache needs working on, request an ACK. Also request
302 * ACKs if a DATA packet appears to have been lost.
303 */
David Howellsa1767072016-09-29 22:37:15 +0100304 if (retrans ||
David Howellsb112a672016-09-29 22:37:16 +0100305 call->cong_mode == RXRPC_CALL_SLOW_START ||
David Howells57494342016-09-24 18:05:27 +0100306 (call->peer->rtt_usage < 3 && sp->hdr.seq & 1) ||
David Howells0d4b1032016-09-22 00:29:31 +0100307 ktime_before(ktime_add_ms(call->peer->rtt_last_req, 1000),
308 ktime_get_real()))
309 whdr.flags |= RXRPC_REQUEST_ACK;
310
David Howells8a681c362016-09-17 10:49:15 +0100311 if (IS_ENABLED(CONFIG_AF_RXRPC_INJECT_LOSS)) {
312 static int lose;
313 if ((lose++ & 7) == 7) {
David Howellsa1767072016-09-29 22:37:15 +0100314 ret = 0;
315 lost = true;
316 goto done;
David Howells8a681c362016-09-17 10:49:15 +0100317 }
318 }
319
David Howells5a924b82016-09-22 00:29:31 +0100320 _proto("Tx DATA %%%u { #%u }", serial, sp->hdr.seq);
321
David Howells17926a72007-04-26 15:48:28 -0700322 /* send the packet with the don't fragment bit set if we currently
323 * think it's small enough */
David Howells5a924b82016-09-22 00:29:31 +0100324 if (iov[1].iov_len >= call->peer->maxdata)
325 goto send_fragmentable;
David Howells17926a72007-04-26 15:48:28 -0700326
David Howells5a924b82016-09-22 00:29:31 +0100327 down_read(&conn->params.local->defrag_sem);
328 /* send the packet by UDP
329 * - returns -EMSGSIZE if UDP would have to fragment the packet
330 * to go out of the interface
331 * - in which case, we'll have processed the ICMP error
332 * message and update the peer record
333 */
334 ret = kernel_sendmsg(conn->params.local->socket, &msg, iov, 2, len);
David Howells17926a72007-04-26 15:48:28 -0700335
David Howells5a924b82016-09-22 00:29:31 +0100336 up_read(&conn->params.local->defrag_sem);
337 if (ret == -EMSGSIZE)
338 goto send_fragmentable;
339
340done:
David Howellsa1767072016-09-29 22:37:15 +0100341 trace_rxrpc_tx_data(call, sp->hdr.seq, serial, whdr.flags,
342 retrans, lost);
David Howells50235c42016-09-22 00:29:31 +0100343 if (ret >= 0) {
David Howells0d4b1032016-09-22 00:29:31 +0100344 ktime_t now = ktime_get_real();
345 skb->tstamp = now;
David Howells50235c42016-09-22 00:29:31 +0100346 smp_wmb();
David Howells5a924b82016-09-22 00:29:31 +0100347 sp->hdr.serial = serial;
David Howells0d4b1032016-09-22 00:29:31 +0100348 if (whdr.flags & RXRPC_REQUEST_ACK) {
349 call->peer->rtt_last_req = now;
David Howells50235c42016-09-22 00:29:31 +0100350 trace_rxrpc_rtt_tx(call, rxrpc_rtt_tx_data, serial);
David Howells0d4b1032016-09-22 00:29:31 +0100351 }
David Howells17926a72007-04-26 15:48:28 -0700352 }
David Howells5a924b82016-09-22 00:29:31 +0100353 _leave(" = %d [%u]", ret, call->peer->maxdata);
354 return ret;
David Howells17926a72007-04-26 15:48:28 -0700355
356send_fragmentable:
357 /* attempt to send this message with fragmentation enabled */
358 _debug("send fragment");
359
David Howells985a5c82016-06-17 11:53:37 +0100360 down_write(&conn->params.local->defrag_sem);
David Howells17926a72007-04-26 15:48:28 -0700361
David Howells985a5c82016-06-17 11:53:37 +0100362 switch (conn->params.local->srx.transport.family) {
363 case AF_INET:
364 opt = IP_PMTUDISC_DONT;
365 ret = kernel_setsockopt(conn->params.local->socket,
366 SOL_IP, IP_MTU_DISCOVER,
367 (char *)&opt, sizeof(opt));
368 if (ret == 0) {
David Howells5a924b82016-09-22 00:29:31 +0100369 ret = kernel_sendmsg(conn->params.local->socket, &msg,
370 iov, 2, len);
David Howells985a5c82016-06-17 11:53:37 +0100371
372 opt = IP_PMTUDISC_DO;
373 kernel_setsockopt(conn->params.local->socket, SOL_IP,
374 IP_MTU_DISCOVER,
375 (char *)&opt, sizeof(opt));
376 }
377 break;
David Howells75b54cb2016-09-13 08:49:05 +0100378
David Howellsd1912742016-09-17 07:26:01 +0100379#ifdef CONFIG_AF_RXRPC_IPV6
David Howells75b54cb2016-09-13 08:49:05 +0100380 case AF_INET6:
381 opt = IPV6_PMTUDISC_DONT;
382 ret = kernel_setsockopt(conn->params.local->socket,
383 SOL_IPV6, IPV6_MTU_DISCOVER,
384 (char *)&opt, sizeof(opt));
385 if (ret == 0) {
386 ret = kernel_sendmsg(conn->params.local->socket, &msg,
387 iov, 1, iov[0].iov_len);
388
389 opt = IPV6_PMTUDISC_DO;
390 kernel_setsockopt(conn->params.local->socket,
391 SOL_IPV6, IPV6_MTU_DISCOVER,
392 (char *)&opt, sizeof(opt));
393 }
394 break;
David Howellsd1912742016-09-17 07:26:01 +0100395#endif
David Howells17926a72007-04-26 15:48:28 -0700396 }
397
David Howells985a5c82016-06-17 11:53:37 +0100398 up_write(&conn->params.local->defrag_sem);
David Howells5a924b82016-09-22 00:29:31 +0100399 goto done;
David Howells17926a72007-04-26 15:48:28 -0700400}
David Howells248f2192016-09-08 11:10:12 +0100401
402/*
403 * reject packets through the local endpoint
404 */
405void rxrpc_reject_packets(struct rxrpc_local *local)
406{
David Howells1c2bc7b2016-09-13 08:49:05 +0100407 struct sockaddr_rxrpc srx;
David Howells248f2192016-09-08 11:10:12 +0100408 struct rxrpc_skb_priv *sp;
409 struct rxrpc_wire_header whdr;
410 struct sk_buff *skb;
411 struct msghdr msg;
412 struct kvec iov[2];
413 size_t size;
414 __be32 code;
415
416 _enter("%d", local->debug_id);
417
418 iov[0].iov_base = &whdr;
419 iov[0].iov_len = sizeof(whdr);
420 iov[1].iov_base = &code;
421 iov[1].iov_len = sizeof(code);
422 size = sizeof(whdr) + sizeof(code);
423
David Howells1c2bc7b2016-09-13 08:49:05 +0100424 msg.msg_name = &srx.transport;
David Howells248f2192016-09-08 11:10:12 +0100425 msg.msg_control = NULL;
426 msg.msg_controllen = 0;
427 msg.msg_flags = 0;
428
David Howells248f2192016-09-08 11:10:12 +0100429 memset(&whdr, 0, sizeof(whdr));
430 whdr.type = RXRPC_PACKET_TYPE_ABORT;
431
432 while ((skb = skb_dequeue(&local->reject_queue))) {
David Howells71f3ca42016-09-17 10:49:14 +0100433 rxrpc_see_skb(skb, rxrpc_skb_rx_seen);
David Howells248f2192016-09-08 11:10:12 +0100434 sp = rxrpc_skb(skb);
David Howells1c2bc7b2016-09-13 08:49:05 +0100435
436 if (rxrpc_extract_addr_from_skb(&srx, skb) == 0) {
437 msg.msg_namelen = srx.transport_len;
438
David Howells248f2192016-09-08 11:10:12 +0100439 code = htonl(skb->priority);
440
441 whdr.epoch = htonl(sp->hdr.epoch);
442 whdr.cid = htonl(sp->hdr.cid);
443 whdr.callNumber = htonl(sp->hdr.callNumber);
444 whdr.serviceId = htons(sp->hdr.serviceId);
445 whdr.flags = sp->hdr.flags;
446 whdr.flags ^= RXRPC_CLIENT_INITIATED;
447 whdr.flags &= RXRPC_CLIENT_INITIATED;
448
449 kernel_sendmsg(local->socket, &msg, iov, 2, size);
David Howells248f2192016-09-08 11:10:12 +0100450 }
451
David Howells71f3ca42016-09-17 10:49:14 +0100452 rxrpc_free_skb(skb, rxrpc_skb_rx_freed);
David Howells248f2192016-09-08 11:10:12 +0100453 }
454
455 _leave("");
456}