diff options
| author | David S. Miller <davem@davemloft.net> | 2016-07-13 18:10:15 -0700 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2016-07-13 18:10:15 -0700 |
| commit | 398aae25aa59d0613a87451c8db9e6ee013db131 (patch) | |
| tree | 9ebae306004e92e2a188d933dedf889c8e66a681 /include | |
| parent | ce3a380dddd0cb16cb3d8d947b69657d7646c121 (diff) | |
| parent | 2d47fd120d23390fea38c3c7cc5ee05a5b95c49f (diff) | |
Merge branch 'sctp-gso-frags-from-chunk'
Marcelo Ricardo Leitner says:
====================
sctp: allow GSO frags to access the chunk too
Patchset is named after the most important fix in it. First two patches
are preparing the grounds for the 3rd patch.
After the 3rd, they are not strictly logically related to the patchset,
but I kept them together as they depend on each other.
More details on patch changelogs.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/sctp/structs.h | 23 | ||||
| -rw-r--r-- | include/net/sctp/ulpevent.h | 12 |
2 files changed, 29 insertions, 6 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 8626bdd3249a..ce93c4b10d26 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h @@ -59,6 +59,7 @@ #include <linux/workqueue.h> /* We need tq_struct. */ #include <linux/sctp.h> /* We need sctp* header structs. */ #include <net/sctp/auth.h> /* We need auth specific structs */ +#include <net/ip.h> /* For inet_skb_parm */ /* A convenience structure for handling sockaddr structures. * We should wean ourselves off this. @@ -1092,6 +1093,28 @@ static inline void sctp_outq_cork(struct sctp_outq *q) q->cork = 1; } +/* SCTP skb control block. + * sctp_input_cb is currently used on rx and sock rx queue + */ +struct sctp_input_cb { + union { + struct inet_skb_parm h4; +#if IS_ENABLED(CONFIG_IPV6) + struct inet6_skb_parm h6; +#endif + } header; + struct sctp_chunk *chunk; + struct sctp_af *af; +}; +#define SCTP_INPUT_CB(__skb) ((struct sctp_input_cb *)&((__skb)->cb[0])) + +static inline const struct sk_buff *sctp_gso_headskb(const struct sk_buff *skb) +{ + const struct sctp_chunk *chunk = SCTP_INPUT_CB(skb)->chunk; + + return chunk->head_skb ? : skb; +} + /* These bind address data fields common between endpoints and associations */ struct sctp_bind_addr { diff --git a/include/net/sctp/ulpevent.h b/include/net/sctp/ulpevent.h index cccdcfd14973..2c098cd7e7e2 100644 --- a/include/net/sctp/ulpevent.h +++ b/include/net/sctp/ulpevent.h @@ -48,15 +48,15 @@ */ struct sctp_ulpevent { struct sctp_association *asoc; - __u16 stream; - __u16 ssn; - __u16 flags; + struct sctp_chunk *chunk; + unsigned int rmem_len; __u32 ppid; __u32 tsn; __u32 cumtsn; - int msg_flags; - int iif; - unsigned int rmem_len; + __u16 stream; + __u16 ssn; + __u16 flags; + __u16 msg_flags; }; /* Retrieve the skb this event sits inside of. */ |
