]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/sctp/socket.c
tcp: add TCPMemoryPressuresChrono counter
[karo-tx-linux.git] / net / sctp / socket.c
index f16c8d97b7f313e9f671d8bb8620b0f9566e619f..5f58dd03e3ace38b9c4babbe2d92f0a3f98a4b68 100644 (file)
@@ -103,7 +103,7 @@ static int sctp_autobind(struct sock *sk);
 static void sctp_sock_migrate(struct sock *, struct sock *,
                              struct sctp_association *, sctp_socket_type_t);
 
-static int sctp_memory_pressure;
+static unsigned long sctp_memory_pressure;
 static atomic_long_t sctp_memory_allocated;
 struct percpu_counter sctp_sockets_allocated;
 
@@ -1920,7 +1920,7 @@ static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len)
        }
 
        /* Check for invalid stream. */
-       if (sinfo->sinfo_stream >= asoc->stream->outcnt) {
+       if (sinfo->sinfo_stream >= asoc->stream.outcnt) {
                err = -EINVAL;
                goto out_free;
        }
@@ -4497,8 +4497,8 @@ int sctp_get_sctp_info(struct sock *sk, struct sctp_association *asoc,
        info->sctpi_rwnd = asoc->a_rwnd;
        info->sctpi_unackdata = asoc->unack_data;
        info->sctpi_penddata = sctp_tsnmap_pending(&asoc->peer.tsn_map);
-       info->sctpi_instrms = asoc->stream->incnt;
-       info->sctpi_outstrms = asoc->stream->outcnt;
+       info->sctpi_instrms = asoc->stream.incnt;
+       info->sctpi_outstrms = asoc->stream.outcnt;
        list_for_each(pos, &asoc->base.inqueue.in_chunk_list)
                info->sctpi_inqueue++;
        list_for_each(pos, &asoc->outqueue.out_chunk_list)
@@ -4727,8 +4727,8 @@ static int sctp_getsockopt_sctp_status(struct sock *sk, int len,
        status.sstat_unackdata = asoc->unack_data;
 
        status.sstat_penddata = sctp_tsnmap_pending(&asoc->peer.tsn_map);
-       status.sstat_instrms = asoc->stream->incnt;
-       status.sstat_outstrms = asoc->stream->outcnt;
+       status.sstat_instrms = asoc->stream.incnt;
+       status.sstat_outstrms = asoc->stream.outcnt;
        status.sstat_fragmentation_point = asoc->frag_point;
        status.sstat_primary.spinfo_assoc_id = sctp_assoc2id(transport->asoc);
        memcpy(&status.sstat_primary.spinfo_address, &transport->ipaddr,
@@ -6600,10 +6600,10 @@ static int sctp_getsockopt_pr_streamstatus(struct sock *sk, int len,
                goto out;
 
        asoc = sctp_id2assoc(sk, params.sprstat_assoc_id);
-       if (!asoc || params.sprstat_sid >= asoc->stream->outcnt)
+       if (!asoc || params.sprstat_sid >= asoc->stream.outcnt)
                goto out;
 
-       streamout = &asoc->stream->out[params.sprstat_sid];
+       streamout = &asoc->stream.out[params.sprstat_sid];
        if (policy == SCTP_PR_SCTP_NONE) {
                params.sprstat_abandoned_unsent = 0;
                params.sprstat_abandoned_sent = 0;