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)
commitde68b039e970c1e55850818fb1bcd49f52dc02e8
treec3007fbeeefd5b9b8d0130ac4b19c610eaca4e30
parentc9ccd4c63c40fa03a9d5850c4a8847192b640524
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