File Index
Files and directories
Sign in
FILE

stats.c

File preview with syntax highlighting.

linux-6.19.14/drivers/net/ovpn/stats.c C
 1// SPDX-License-Identifier: GPL-2.0
 2/*  OpenVPN data channel offload
 3 *
 4 *  Copyright (C) 2020-2025 OpenVPN, Inc.
 5 *
 6 *  Author:	James Yonan <james@openvpn.net>
 7 *		Antonio Quartulli <antonio@openvpn.net>
 8 */
 9
10#include <linux/atomic.h>
11
12#include "stats.h"
13
14void ovpn_peer_stats_init(struct ovpn_peer_stats *ps)
15{
16	atomic64_set(&ps->rx.bytes, 0);
17	atomic64_set(&ps->rx.packets, 0);
18
19	atomic64_set(&ps->tx.bytes, 0);
20	atomic64_set(&ps->tx.packets, 0);
21}
~/ Read-only file preview.