]> git.baikalelectronics.ru Git - kernel.git/commit
strparser: Don't schedule in workqueue in paused state
authorVakul Garg <vakul.garg@nxp.com>
Wed, 20 Jun 2018 21:59:49 +0000 (03:29 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Jun 2018 00:54:05 +0000 (09:54 +0900)
commitac66c1255d8eee7902dd0544574ce8583ecf5211
tree99832c64a319d35a3b9475539654f1e1df03464b
parentabe4f4d3b7249a60f9856e784658d050e98959b4
strparser: Don't schedule in workqueue in paused state

In function strp_data_ready(), it is useless to call queue_work if
the state of strparser is already paused. The state checking should
be done before calling queue_work. The change reduces the context
switches and improves the ktls-rx throughput by approx 20% (measured
on cortex-a53 based platform).

Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Acked-by: Dave Watson <davejwatson@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/strparser/strparser.c