From 30e42e456d6df328420de84fe07366e2edf7a1cd Mon Sep 17 00:00:00 2001 From: Vitaliy Makkoveev Date: Mon, 20 Dec 2021 15:59:11 +0000 Subject: Use per-CPU counters for tunnel descriptor block (TDB) statistics. 'tdb_data' struct became unused and was removed. Tested by Hrvoje Popovski. ok bluhm@ --- sys/netinet/ip_ipcomp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/netinet/ip_ipcomp.c') diff --git a/sys/netinet/ip_ipcomp.c b/sys/netinet/ip_ipcomp.c index 65026466d48..0026fe2da12 100644 --- a/sys/netinet/ip_ipcomp.c +++ b/sys/netinet/ip_ipcomp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipcomp.c,v 1.89 2021/12/11 16:33:47 bluhm Exp $ */ +/* $OpenBSD: ip_ipcomp.c,v 1.90 2021/12/20 15:59:09 mvs Exp $ */ /* * Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj@wabbitt.org) @@ -193,7 +193,7 @@ ipcomp_input(struct mbuf **mp, struct tdb *tdb, int skip, int protoff) /* update the counters */ ibytes = m->m_pkthdr.len - (skip + hlen); tdb->tdb_cur_bytes += ibytes; - tdb->tdb_ibytes += ibytes; + tdbstat_add(tdb, tdb_ibytes, ibytes); ipcompstat_add(ipcomps_ibytes, ibytes); /* Hard expiration */ -- cgit v1.2.3