nvethernet: remove calling of osi_update_stats_counter

remove osi_update_stats_counter and add logic in
nvethernet itself to take care of incrementing the
value

Bug 4284096
Bug 4449611

Change-Id: I0b7e6f03651b0d092d136baf0efd1caffc762205
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053871
(cherry picked from commit bdb1fedec9f3781a3100bd2838271551df31984f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3074753
(cherry picked from commit d31b03a583adf52a7978ef14a9cc0c7d3005ccb0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3081228
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Bhadram Varka <vbhadram@nvidia.com>
This commit is contained in:
Narayan Reddy
2024-01-15 17:03:23 +00:00
committed by mobile promotions
parent 050caf414d
commit 85cf3fb4b3
3 changed files with 21 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright (c) 2019-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved */
/* Copyright (c) 2019-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved */
#ifndef ETHER_LINUX_H
#define ETHER_LINUX_H
@@ -857,6 +857,17 @@ int ether_tc_setup_cbs(struct ether_priv_data *pdata,
*/
int ether_get_tx_ts(struct ether_priv_data *pdata);
void ether_restart_lane_bringup_task(struct tasklet_struct *t);
static inline nveu64_t update_stats_counter(nveu64_t last_value, nveu64_t incr)
{
nveu64_t temp = last_value + incr;
if (temp < last_value) {
/* Stats overflow, so reset it to zero */
temp = 0UL;
}
return temp;
}
#ifdef ETHER_NVGRO
void ether_nvgro_purge_timer(struct timer_list *t);
#endif /* ETHER_NVGRO */