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:

committed by
David S. Miller

parent
1f45f78f8e
commit
e7487c86dc
@@ -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]))
|
||||
|
||||
|
Reference in New Issue
Block a user