summaryrefslogtreecommitdiffstats
path: root/include/net/sctp
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2018-06-13 19:37:02 -0400
committerDavid S. Miller <davem@davemloft.net>2018-06-14 13:25:53 -0400
commit995191220056300c51ed870a5d5321f91f3eef89 (patch)
treec11f199c0065aabc72a112e724a7163deed8a72c /include/net/sctp
parent60d061e3470357b902c74f811772b2effc9ec5a0 (diff)
sctp: define sctp_packet_gso_append to build GSO frames
Now sctp GSO uses skb_gro_receive() to append the data into head skb frag_list. However it actually only needs very few code from skb_gro_receive(). Besides, NAPI_GRO_CB has to be set while most of its members are not needed here. This patch is to add sctp_packet_gso_append() to build GSO frames instead of skb_gro_receive(), and it would avoid many unnecessary checks and make the code clearer. Note that sctp will use page frags instead of frag_list to build GSO frames in another patch. But it may take time, as sctp's GSO frames may have different size. skb_segment() can only split it into the frags with the same size, which would break the border of sctp chunks. Signed-off-by: Xin Long <lucien.xin@gmail.com> Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sctp')
-rw-r--r--include/net/sctp/structs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index ebf809eed33a..dbe1b911a24d 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -1133,6 +1133,11 @@ struct sctp_input_cb {
1133}; 1133};
1134#define SCTP_INPUT_CB(__skb) ((struct sctp_input_cb *)&((__skb)->cb[0])) 1134#define SCTP_INPUT_CB(__skb) ((struct sctp_input_cb *)&((__skb)->cb[0]))
1135 1135
1136struct sctp_output_cb {
1137 struct sk_buff *last;
1138};
1139#define SCTP_OUTPUT_CB(__skb) ((struct sctp_output_cb *)&((__skb)->cb[0]))
1140
1136static inline const struct sk_buff *sctp_gso_headskb(const struct sk_buff *skb) 1141static inline const struct sk_buff *sctp_gso_headskb(const struct sk_buff *skb)
1137{ 1142{
1138 const struct sctp_chunk *chunk = SCTP_INPUT_CB(skb)->chunk; 1143 const struct sctp_chunk *chunk = SCTP_INPUT_CB(skb)->chunk;