summaryrefslogtreecommitdiffstats
path: root/net/sctp/input.c
diff options
context:
space:
mode:
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>2016-07-13 15:08:58 -0300
committerDavid S. Miller <davem@davemloft.net>2016-07-13 18:10:14 -0700
commite7487c86dc5c4a528a7dbd9dc14f453a0de61a84 (patch)
treefee52720c9c4621d165294c8d48dff6326468c36 /net/sctp/input.c
parent1f45f78f8e511203f03138f2ccde3d2cf90d2cbf (diff)
downloadop-kernel-dev-e7487c86dc5c4a528a7dbd9dc14f453a0de61a84.zip
op-kernel-dev-e7487c86dc5c4a528a7dbd9dc14f453a0de61a84.tar.gz
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>
Diffstat (limited to 'net/sctp/input.c')
-rw-r--r--net/sctp/input.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 7a327ff..30d72f7 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -140,6 +140,7 @@ int sctp_rcv(struct sk_buff *skb)
af = sctp_get_af_specific(family);
if (unlikely(!af))
goto discard_it;
+ SCTP_INPUT_CB(skb)->af = af;
/* Initialize local addresses for lookups. */
af->from_skb(&src, skb, 1);
OpenPOWER on IntegriCloud