[NET]: cleanup extra semicolons
[powerpc.git] / net / sctp / output.c
index cdc5a39..d85543d 100644 (file)
@@ -85,8 +85,8 @@ struct sctp_packet *sctp_packet_config(struct sctp_packet *packet,
                chunk = sctp_get_ecne_prepend(packet->transport->asoc);
 
                /* If there a is a prepend chunk stick it on the list before
-                * any other chunks get appended.
-                */
+                * any other chunks get appended.
+                */
                if (chunk)
                        sctp_packet_append_chunk(packet, chunk);
        }
@@ -110,8 +110,8 @@ struct sctp_packet *sctp_packet_init(struct sctp_packet *packet,
        packet->destination_port = dport;
        INIT_LIST_HEAD(&packet->chunk_list);
        if (asoc) {
-               struct sctp_sock *sp = sctp_sk(asoc->base.sk);  
-               overhead = sp->pf->af->net_header_len; 
+               struct sctp_sock *sp = sctp_sk(asoc->base.sk);
+               overhead = sp->pf->af->net_header_len;
        } else {
                overhead = sizeof(struct ipv6hdr);
        }
@@ -176,7 +176,7 @@ sctp_xmit_t sctp_packet_transmit_chunk(struct sctp_packet *packet,
        case SCTP_XMIT_OK:
        case SCTP_XMIT_NAGLE_DELAY:
                break;
-       };
+       }
 
        return retval;
 }
@@ -442,7 +442,7 @@ int sctp_packet_transmit(struct sctp_packet *packet)
                 * acknowledged or have failed.
                 */
                if (!sctp_chunk_is_data(chunk))
-                       sctp_chunk_free(chunk);
+                       sctp_chunk_free(chunk);
        }
 
        /* Perform final transformation on checksum. */
@@ -528,7 +528,7 @@ err:
        list_for_each_entry_safe(chunk, tmp, &packet->chunk_list, list) {
                list_del_init(&chunk->list);
                if (!sctp_chunk_is_data(chunk))
-                       sctp_chunk_free(chunk);
+                       sctp_chunk_free(chunk);
        }
        goto out;
 nomem:
@@ -633,7 +633,7 @@ static sctp_xmit_t sctp_packet_append_data(struct sctp_packet *packet,
                 * data will fit or delay in hopes of bundling a full
                 * sized packet.
                 */
-               if (len < asoc->pathmtu - packet->overhead) {
+               if (len < asoc->frag_point) {
                        retval = SCTP_XMIT_NAGLE_DELAY;
                        goto finish;
                }
@@ -645,7 +645,13 @@ static sctp_xmit_t sctp_packet_append_data(struct sctp_packet *packet,
        /* Keep track of how many bytes are in flight to the receiver. */
        asoc->outqueue.outstanding_bytes += datasize;
 
-       /* Update our view of the receiver's rwnd. */
+       /* Update our view of the receiver's rwnd. Include sk_buff overhead
+        * while updating peer.rwnd so that it reduces the chances of a
+        * receiver running out of receive buffer space even when receive
+        * window is still open. This can happen when a sender is sending
+        * sending small messages.
+        */
+       datasize += sizeof(struct sk_buff);
        if (datasize < rwnd)
                rwnd -= datasize;
        else