sctp: avoid identifying address family many times for a chunk

Identifying address family operations during rx path is not something
expensive but it's ugly to the eye to have it done multiple times,
specially when we already validated it during initial rx processing.

This patch takes advantage of the now shared sctp_input_cb and make the
pointer to the operations readily available.

Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Marcelo Ricardo Leitner
2016-07-13 15:08:58 -03:00
committed by David S. Miller
parent 1f45f78f8e
commit e7487c86dc
5 changed files with 9 additions and 21 deletions

View File

@@ -1104,6 +1104,7 @@ struct sctp_input_cb {
#endif
} header;
struct sctp_chunk *chunk;
struct sctp_af *af;
};
#define SCTP_INPUT_CB(__skb) ((struct sctp_input_cb *)&((__skb)->cb[0]))