nvethernet: Update status counters using ioctls

Issue:
TSN, extra, packet error stats counters
are not getting updated during virtualization,
as NVEQOS reads them from the VF OSI core structure.

Fix:
Add new ioctls to update these counters from
the ethernet server OSI core to
the VF OSI core structure.

Bug 3763499

Change-Id: I6e82f9756afe0c2f1adefb5a2449fad479864ea6
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2809358
(cherry picked from commit ab043869fb9b1feb197496d4695b333845689e5e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2815774
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Mohan Thadikamalla
2022-11-15 13:02:41 +05:30
committed by mobile promotions
parent 61f908bce9
commit d0ac6d4396
4 changed files with 138 additions and 134 deletions

View File

@@ -376,6 +376,24 @@ struct ether_tx_ts_skb_list {
unsigned long pkt_jiffies;
};
/**
* @brief ether_xtra_stat_counters - OSI core extra stat counters
*/
struct ether_xtra_stat_counters {
/** rx skb allocation failure count */
nveu64_t re_alloc_rxbuf_failed[OSI_MGBE_MAX_NUM_QUEUES];
/** TX per channel interrupt count */
nveu64_t tx_normal_irq_n[OSI_MGBE_MAX_NUM_QUEUES];
/** TX per channel SW timer callback count */
nveu64_t tx_usecs_swtimer_n[OSI_MGBE_MAX_NUM_QUEUES];
/** RX per channel interrupt count */
nveu64_t rx_normal_irq_n[OSI_MGBE_MAX_NUM_QUEUES];
/** link connect count */
nveu64_t link_connect_count;
/** link disconnect count */
nveu64_t link_disconnect_count;
};
/**
* @brief Ethernet driver private data
*/
@@ -611,6 +629,8 @@ struct ether_priv_data {
unsigned int tx_start_stop;
/** Tasklet for restarting UPHY lanes */
struct tasklet_struct lane_restart_task;
/** xtra sw error counters */
struct ether_xtra_stat_counters xstats;
};
/**