]> git.baikalelectronics.ru Git - kernel.git/commit
l2tp: capture more tx errors in data plane stats
authorTom Parkin <tparkin@katalix.com>
Thu, 3 Sep 2020 08:54:50 +0000 (09:54 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Sep 2020 19:19:03 +0000 (12:19 -0700)
commitb55d73ac91007b2a68ec12c71b537945d48b74e4
treec3007fbeeefd5b9b8d0130ac4b19c610eaca4e30
parentf42c872678ead589d445187025a0db24d5360b9e
l2tp: capture more tx errors in data plane stats

l2tp_xmit_skb has a number of failure paths which are not reflected in
the tunnel and session statistics because the stats are updated by
l2tp_xmit_core.  Hence any errors occurring before l2tp_xmit_core is
called are missed from the statistics.

Refactor the transmit path slightly to capture all error paths.

l2tp_xmit_skb now leaves all the actual work of transmission to
l2tp_xmit_core, and updates the statistics based on l2tp_xmit_core's
return code.

Signed-off-by: Tom Parkin <tparkin@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/l2tp/l2tp_core.c