mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 08:50:54 +07:00
qed*: Don't reset statistics on inner reload
Several user APIs can cause driver to perform an inner-reload. Currently, doing this would cause the HW/FW statistics of the adapter to reset, which isn't the expected behavior [statistics should only reset on explicit unloads]. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
326439883e
commit
a0d26d5a4f
@ -1745,7 +1745,8 @@ static int qed_start_vport(struct qed_dev *cdev,
|
||||
start.vport_id, start.mtu);
|
||||
}
|
||||
|
||||
qed_reset_vport_stats(cdev);
|
||||
if (params->clear_stats)
|
||||
qed_reset_vport_stats(cdev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -3231,7 +3231,7 @@ static int qede_stop_queues(struct qede_dev *edev)
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int qede_start_queues(struct qede_dev *edev)
|
||||
static int qede_start_queues(struct qede_dev *edev, bool clear_stats)
|
||||
{
|
||||
int rc, tc, i;
|
||||
int vlan_removal_en = 1;
|
||||
@ -3462,6 +3462,7 @@ static void qede_unload(struct qede_dev *edev, enum qede_unload_mode mode)
|
||||
|
||||
enum qede_load_mode {
|
||||
QEDE_LOAD_NORMAL,
|
||||
QEDE_LOAD_RELOAD,
|
||||
};
|
||||
|
||||
static int qede_load(struct qede_dev *edev, enum qede_load_mode mode)
|
||||
@ -3500,7 +3501,7 @@ static int qede_load(struct qede_dev *edev, enum qede_load_mode mode)
|
||||
goto err3;
|
||||
DP_INFO(edev, "Setup IRQs succeeded\n");
|
||||
|
||||
rc = qede_start_queues(edev);
|
||||
rc = qede_start_queues(edev, mode != QEDE_LOAD_RELOAD);
|
||||
if (rc)
|
||||
goto err4;
|
||||
DP_INFO(edev, "Start VPORT, RXQ and TXQ succeeded\n");
|
||||
@ -3555,7 +3556,7 @@ void qede_reload(struct qede_dev *edev,
|
||||
if (func)
|
||||
func(edev, args);
|
||||
|
||||
qede_load(edev, QEDE_LOAD_NORMAL);
|
||||
qede_load(edev, QEDE_LOAD_RELOAD);
|
||||
|
||||
mutex_lock(&edev->qede_lock);
|
||||
qede_config_rx_mode(edev->ndev);
|
||||
|
@ -49,6 +49,7 @@ struct qed_start_vport_params {
|
||||
bool drop_ttl0;
|
||||
u8 vport_id;
|
||||
u16 mtu;
|
||||
bool clear_stats;
|
||||
};
|
||||
|
||||
struct qed_stop_rxq_params {
|
||||
|
Loading…
Reference in New Issue
Block a user