mirror of
https://github.com/torvalds/linux.git
synced 2026-11-29 10:07:52 +00:00
Byte/packet counters for in-tunnel and transport streams are now initialized and updated as needed. To be exported via netlink. Signed-off-by: Antonio Quartulli <[email protected]> Link: https://patch.msgid.link/[email protected] Reviewed-by: Sabrina Dubroca <[email protected]> Tested-by: Oleksandr Natalenko <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
22 lines
452 B
C
22 lines
452 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/* OpenVPN data channel offload
|
|
*
|
|
* Copyright (C) 2020-2025 OpenVPN, Inc.
|
|
*
|
|
* Author: James Yonan <[email protected]>
|
|
* Antonio Quartulli <[email protected]>
|
|
*/
|
|
|
|
#include <linux/atomic.h>
|
|
|
|
#include "stats.h"
|
|
|
|
void ovpn_peer_stats_init(struct ovpn_peer_stats *ps)
|
|
{
|
|
atomic64_set(&ps->rx.bytes, 0);
|
|
atomic64_set(&ps->rx.packets, 0);
|
|
|
|
atomic64_set(&ps->tx.bytes, 0);
|
|
atomic64_set(&ps->tx.packets, 0);
|
|
}
|