mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00: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:
parent
6e7da286e3
commit
cee360ab4d
10 changed files with 65 additions and 69 deletions
|
@ -381,6 +381,7 @@ int sctp_stream_new(struct sctp_association *asoc, gfp_t gfp);
|
|||
int sctp_stream_init(struct sctp_association *asoc, gfp_t gfp);
|
||||
void sctp_stream_free(struct sctp_stream *stream);
|
||||
void sctp_stream_clear(struct sctp_stream *stream);
|
||||
void sctp_stream_update(struct sctp_stream *stream, struct sctp_stream *new);
|
||||
|
||||
/* What is the current SSN number for this stream? */
|
||||
#define sctp_ssn_peek(stream, type, sid) \
|
||||
|
@ -1750,7 +1751,7 @@ struct sctp_association {
|
|||
__u32 default_rcv_context;
|
||||
|
||||
/* Stream arrays */
|
||||
struct sctp_stream *stream;
|
||||
struct sctp_stream stream;
|
||||
|
||||
/* All outbound chunks go through this structure. */
|
||||
struct sctp_outq outqueue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue