input.c (b54a134a7de461f804cf0e28331d0a43ee82fb13) input.c (b1d9f7fde0bb6c143a9a5b9246ea191e28f2c364)
1/* RxRPC packet reception
2 *
3 * Copyright (C) 2007, 2016 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

--- 467 unchanged lines hidden (view full) ---

476 seq != call->rx_top)
477 return rxrpc_proto_abort("LSN", call, seq);
478 } else {
479 if (test_bit(RXRPC_CALL_RX_LAST, &call->flags) &&
480 after_eq(seq, call->rx_top))
481 return rxrpc_proto_abort("LSA", call, seq);
482 }
483
1/* RxRPC packet reception
2 *
3 * Copyright (C) 2007, 2016 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

--- 467 unchanged lines hidden (view full) ---

476 seq != call->rx_top)
477 return rxrpc_proto_abort("LSN", call, seq);
478 } else {
479 if (test_bit(RXRPC_CALL_RX_LAST, &call->flags) &&
480 after_eq(seq, call->rx_top))
481 return rxrpc_proto_abort("LSA", call, seq);
482 }
483
484 trace_rxrpc_rx_data(call, seq, serial, flags, annotation);
484 if (before_eq(seq, hard_ack)) {
485 ack = RXRPC_ACK_DUPLICATE;
486 ack_serial = serial;
487 goto skip;
488 }
489
490 if (flags & RXRPC_REQUEST_ACK && !ack) {
491 ack = RXRPC_ACK_REQUESTED;

--- 268 unchanged lines hidden (view full) ---

760
761 acked_serial = ntohl(buf.ack.serial);
762 first_soft_ack = ntohl(buf.ack.firstPacket);
763 hard_ack = first_soft_ack - 1;
764 nr_acks = buf.ack.nAcks;
765 summary.ack_reason = (buf.ack.reason < RXRPC_ACK__INVALID ?
766 buf.ack.reason : RXRPC_ACK__INVALID);
767
485 if (before_eq(seq, hard_ack)) {
486 ack = RXRPC_ACK_DUPLICATE;
487 ack_serial = serial;
488 goto skip;
489 }
490
491 if (flags & RXRPC_REQUEST_ACK && !ack) {
492 ack = RXRPC_ACK_REQUESTED;

--- 268 unchanged lines hidden (view full) ---

761
762 acked_serial = ntohl(buf.ack.serial);
763 first_soft_ack = ntohl(buf.ack.firstPacket);
764 hard_ack = first_soft_ack - 1;
765 nr_acks = buf.ack.nAcks;
766 summary.ack_reason = (buf.ack.reason < RXRPC_ACK__INVALID ?
767 buf.ack.reason : RXRPC_ACK__INVALID);
768
768 trace_rxrpc_rx_ack(call, first_soft_ack, summary.ack_reason, nr_acks);
769 trace_rxrpc_rx_ack(call, sp->hdr.serial, acked_serial,
770 first_soft_ack, ntohl(buf.ack.previousPacket),
771 summary.ack_reason, nr_acks);
769
770 if (buf.ack.reason == RXRPC_ACK_PING_RESPONSE)
771 rxrpc_input_ping_response(call, skb->tstamp, acked_serial,
772 sp->hdr.serial);
773 if (buf.ack.reason == RXRPC_ACK_REQUESTED)
774 rxrpc_input_requested_ack(call, skb->tstamp, acked_serial,
775 sp->hdr.serial);
776

--- 169 unchanged lines hidden (view full) ---

946 default:
947 if (rxrpc_abort_call("IMP", call, 0, RX_CALL_DEAD, ESHUTDOWN)) {
948 set_bit(RXRPC_CALL_EV_ABORT, &call->events);
949 rxrpc_queue_call(call);
950 }
951 break;
952 }
953
772
773 if (buf.ack.reason == RXRPC_ACK_PING_RESPONSE)
774 rxrpc_input_ping_response(call, skb->tstamp, acked_serial,
775 sp->hdr.serial);
776 if (buf.ack.reason == RXRPC_ACK_REQUESTED)
777 rxrpc_input_requested_ack(call, skb->tstamp, acked_serial,
778 sp->hdr.serial);
779

--- 169 unchanged lines hidden (view full) ---

949 default:
950 if (rxrpc_abort_call("IMP", call, 0, RX_CALL_DEAD, ESHUTDOWN)) {
951 set_bit(RXRPC_CALL_EV_ABORT, &call->events);
952 rxrpc_queue_call(call);
953 }
954 break;
955 }
956
957 trace_rxrpc_improper_term(call);
954 __rxrpc_disconnect_call(conn, call);
955 rxrpc_notify_socket(call);
956}
957
958/*
959 * post connection-level events to the connection
960 * - this includes challenges, responses, some aborts and call terminal packet
961 * retransmission.

--- 268 unchanged lines hidden ---
958 __rxrpc_disconnect_call(conn, call);
959 rxrpc_notify_socket(call);
960}
961
962/*
963 * post connection-level events to the connection
964 * - this includes challenges, responses, some aborts and call terminal packet
965 * retransmission.

--- 268 unchanged lines hidden ---