]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: delay as much as possible skb_linearize
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Thu, 2 Jun 2016 18:05:42 +0000 (15:05 -0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Jun 2016 23:37:21 +0000 (19:37 -0400)
commit6905422c46d24cbb006935c914e649d5366e4dde
tree174b8c7ef21aaa3e2cddecd81a286976649bd6af
parentf0938a9b193ec4233e65da292eeb161a1cbde427
sctp: delay as much as possible skb_linearize

This patch is a preparation for the GSO one. In order to successfully
handle GSO packets on rx path we must not call skb_linearize, otherwise
it defeats any gain GSO may have had.

This patch thus delays as much as possible the call to skb_linearize,
leaving it to sctp_inq_pop() moment. For that the sanity checks
performed now know how to deal with fragments.

One positive side-effect of this is that if the socket is backlogged it
will have the chance of doing it on backlog processing instead of
during softirq.

With this move, it's evident that a check for non-linearity in
sctp_inq_pop was ineffective and is now removed. Note that a similar
check is performed a bit below this one.

Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Tested-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/input.c
net/sctp/inqueue.c