- for (i = 0; i < priv->nr_virtqs; i++)
- mlx5_vdpa_virtq_unset(&priv->virtqs[i]);
- if (priv->tis) {
- claim_zero(mlx5_devx_cmd_destroy(priv->tis));
- priv->tis = NULL;
+ for (i = 0; i < priv->nr_virtqs; i++) {
+ virtq = &priv->virtqs[i];
+ mlx5_vdpa_virtq_unset(virtq);
+ if (virtq->counters) {
+ claim_zero(mlx5_devx_cmd_destroy(virtq->counters));
+ virtq->counters = NULL;
+ memset(&virtq->reset, 0, sizeof(virtq->reset));
+ }
+ memset(virtq->err_time, 0, sizeof(virtq->err_time));
+ virtq->n_retry = 0;
+ }
+ for (i = 0; i < priv->num_lag_ports; i++) {
+ if (priv->tiss[i]) {
+ claim_zero(mlx5_devx_cmd_destroy(priv->tiss[i]));
+ priv->tiss[i] = NULL;
+ }