diff options
author | Vlad Yasevich <vladislav.yasevich@hp.com> | 2008-10-08 17:19:01 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-08 17:19:01 -0400 |
commit | 02015180e2509afd2e3fe3790a333b30708a116b (patch) | |
tree | d2d92b62758f01375602cd7e44cb9ffbb3e44d59 /include/net/sctp/tsnmap.h | |
parent | 8e1ee18c332e08bee9d8bd66e63cd564fbf17fc2 (diff) |
sctp: shrink sctp_tsnmap some more by removing gabs array
The gabs array in the sctp_tsnmap structure is only used
in one place, sctp_make_sack(). As such, carrying the
array around in the sctp_tsnmap and thus directly in
the sctp_association is rather pointless since most
of the time it's just taking up space. Now, let
sctp_make_sack create and populate it and then throw
it away when it's done.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sctp/tsnmap.h')
-rw-r--r-- | include/net/sctp/tsnmap.h | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/include/net/sctp/tsnmap.h b/include/net/sctp/tsnmap.h index 6dabbee8bbd3..4aabc5a96cf6 100644 --- a/include/net/sctp/tsnmap.h +++ b/include/net/sctp/tsnmap.h | |||
@@ -94,11 +94,8 @@ struct sctp_tsnmap { | |||
94 | * every SACK. Store up to SCTP_MAX_DUP_TSNS worth of | 94 | * every SACK. Store up to SCTP_MAX_DUP_TSNS worth of |
95 | * information. | 95 | * information. |
96 | */ | 96 | */ |
97 | __be32 dup_tsns[SCTP_MAX_DUP_TSNS]; | ||
98 | __u16 num_dup_tsns; | 97 | __u16 num_dup_tsns; |
99 | 98 | __be32 dup_tsns[SCTP_MAX_DUP_TSNS]; | |
100 | /* Record gap ack block information here. */ | ||
101 | struct sctp_gap_ack_block gabs[SCTP_MAX_GABS]; | ||
102 | }; | 99 | }; |
103 | 100 | ||
104 | struct sctp_tsnmap_iter { | 101 | struct sctp_tsnmap_iter { |
@@ -151,17 +148,12 @@ static inline __be32 *sctp_tsnmap_get_dups(struct sctp_tsnmap *map) | |||
151 | } | 148 | } |
152 | 149 | ||
153 | /* How many gap ack blocks do we have recorded? */ | 150 | /* How many gap ack blocks do we have recorded? */ |
154 | __u16 sctp_tsnmap_num_gabs(struct sctp_tsnmap *map); | 151 | __u16 sctp_tsnmap_num_gabs(struct sctp_tsnmap *map, |
152 | struct sctp_gap_ack_block *gabs); | ||
155 | 153 | ||
156 | /* Refresh the count on pending data. */ | 154 | /* Refresh the count on pending data. */ |
157 | __u16 sctp_tsnmap_pending(struct sctp_tsnmap *map); | 155 | __u16 sctp_tsnmap_pending(struct sctp_tsnmap *map); |
158 | 156 | ||
159 | /* Return pointer to gap ack blocks as needed by SACK. */ | ||
160 | static inline struct sctp_gap_ack_block *sctp_tsnmap_get_gabs(struct sctp_tsnmap *map) | ||
161 | { | ||
162 | return map->gabs; | ||
163 | } | ||
164 | |||
165 | /* Is there a gap in the TSN map? */ | 157 | /* Is there a gap in the TSN map? */ |
166 | static inline int sctp_tsnmap_has_gap(const struct sctp_tsnmap *map) | 158 | static inline int sctp_tsnmap_has_gap(const struct sctp_tsnmap *map) |
167 | { | 159 | { |