The commit 8892406c1d ("kernel/sys_clock.h: Deprecate and convert
uses of old conversions") changed code to not use deprecated macro.
Unfortunately there was some changes done to RX TC stats update that
were missing from that commit. This commit fixes the issue and removes
the last user of the deprecated SYS_CLOCK_HW_CYCLES_TO_NS64() macro.
This is follow up to commit 5bbdf56769 ("net: stats: Fix RX time
statistics update") which failed to remove all users of the deprecated
macro.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The commit 8892406c1d ("kernel/sys_clock.h: Deprecate and convert
uses of old conversions") changed code to not use deprecated macro.
Unfortunately there was some changes done to RX stats update that were
missing from that commit. This commit fixes the issue and removes use
of the deprecated SYS_CLOCK_HW_CYCLES_TO_NS64() macro.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Mark the old time conversion APIs deprecated, leave compatibility
macros in place, and replace all usage with the new API.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This function will be useful in shell when we want to monitor
the amount of bytes transferred and want to clear earlier
statistics.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Calculate how long on average net_pkt has spent on its way from
application to the network device driver. The data is calculated
for all network packets and not just for UDP or TCP ones like in
RX statistics.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Calculate how long on average net_pkt has spent on its way from
network device driver to the application. The data is only
calculated for UDP and TCP network packets.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Allow user to disable native IP stack and use offloaded IP
stack instead. It is also possible to enable both at the same
time if needed.
Fixes#18105
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Finalize the CONFIG_NET_CONTEXT_TIMESTAMP support that was started
earlier but never properly finished. We collect network statistics for
TX packet network stack throughput time from when the net_context_send
is called and when the net_pkt was sent out successfully by the network
device driver.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Because per-interface statistics rely on interface pointer stored in a
net_pkt, it should not be unreferenced before stats are updated.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Instead of one global statistics, collect statistics information
separately for each network interface. This per interface statistics
collection is optional but turned on by default. It can be turned
off if needed, in which case only global statistics are collected.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add statistics for number of packets and bytes to each traffic
class. Print this information in net-shell.
Also make sure that we do not calculate total packet length many
times. So calculate network packet total length once and then use
that value instead of calculating it many times in a row.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99
integer types.
Jira: ZEP-2051
Change-Id: I4ec03eb2183d59ef86ea2c20d956e5d272656837
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Collect number of received, sent or dropped multicast listener
reports and queries.
Change-Id: Ia5c08203155475763f96df23f44eceffa7569873
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Keep track of amount of bytes that are sent or received from
all network interfaces.
Change-Id: I706481aab1a7e0cf2bc78d032f2ef4ebbabe3184
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Replace the existing Apache 2.0 boilerplate header with an SPDX tag
throughout the zephyr code tree. This patch was generated via a
script run over the master branch.
Also updated doc/porting/application.rst that had a dependency on
line numbers in a literal include.
Manually updated subsys/logging/sys_log.c that had a malformed
header in the original file. Also cleanup several cases that already
had a SPDX tag and we either got a duplicate or missed updating.
Jira: ZEP-1457
Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This will help to track only what's wanted (ipv6, tpc, udp, else...) if
needed to.
Change-Id: I5c2e5e582db629b5d0e1cd98004f693c50f532a4
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Let's change from macros to inlined function to make things nicer.
Change-Id: Ie98e0667613961b03c84ca60bc551d0f473765f6
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This file will own more statistics handling in a near future.
Change-Id: Ifaf86852f5c7166e6878b5dc8f4cd4c166dbee90
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>