mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
sctp: define the member stream as an object instead of pointer in asoc
As Marcelo's suggestion, stream is a fixed size member of asoc and would not grow with more streams. To avoid an allocation for it, this patch is to define it as an object instead of pointer and update the places using it, also create sctp_stream_update() called in sctp_assoc_update() to migrate the stream info from one stream to another. Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
6e7da286e3
commit
cee360ab4d
@@ -307,7 +307,7 @@ int sctp_chunk_abandoned(struct sctp_chunk *chunk)
|
||||
if (SCTP_PR_TTL_ENABLED(chunk->sinfo.sinfo_flags) &&
|
||||
time_after(jiffies, chunk->msg->expires_at)) {
|
||||
struct sctp_stream_out *streamout =
|
||||
&chunk->asoc->stream->out[chunk->sinfo.sinfo_stream];
|
||||
&chunk->asoc->stream.out[chunk->sinfo.sinfo_stream];
|
||||
|
||||
if (chunk->sent_count) {
|
||||
chunk->asoc->abandoned_sent[SCTP_PR_INDEX(TTL)]++;
|
||||
@@ -320,7 +320,7 @@ int sctp_chunk_abandoned(struct sctp_chunk *chunk)
|
||||
} else if (SCTP_PR_RTX_ENABLED(chunk->sinfo.sinfo_flags) &&
|
||||
chunk->sent_count > chunk->sinfo.sinfo_timetolive) {
|
||||
struct sctp_stream_out *streamout =
|
||||
&chunk->asoc->stream->out[chunk->sinfo.sinfo_stream];
|
||||
&chunk->asoc->stream.out[chunk->sinfo.sinfo_stream];
|
||||
|
||||
chunk->asoc->abandoned_sent[SCTP_PR_INDEX(RTX)]++;
|
||||
streamout->abandoned_sent[SCTP_PR_INDEX(RTX)]++;
|
||||
|
Reference in New Issue
Block a user