git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/ice: optimize maximum queue number calculation
[dpdk.git]
/
drivers
/
net
/
ice
/
ice_dcf_sched.c
diff --git
a/drivers/net/ice/ice_dcf_sched.c
b/drivers/net/ice/ice_dcf_sched.c
index
090988c
..
a231c1e
100644
(file)
--- a/
drivers/net/ice/ice_dcf_sched.c
+++ b/
drivers/net/ice/ice_dcf_sched.c
@@
-754,6
+754,13
@@
static int ice_dcf_hierarchy_commit(struct rte_eth_dev *dev,
uint8_t num_elem = 0;
int i, ret_val;
uint8_t num_elem = 0;
int i, ret_val;
+ /* check if port is stopped */
+ if (!adapter->parent.pf.adapter_stopped) {
+ PMD_DRV_LOG(ERR, "Please stop port first");
+ ret_val = ICE_ERR_NOT_READY;
+ goto err;
+ }
+
ret_val = ice_dcf_commit_check(hw);
if (ret_val)
goto fail_clear;
ret_val = ice_dcf_commit_check(hw);
if (ret_val)
goto fail_clear;
@@
-833,7
+840,7
@@
static int ice_dcf_hierarchy_commit(struct rte_eth_dev *dev,
goto fail_clear;
}
/* store the bandwidth information for replay */
goto fail_clear;
}
/* store the bandwidth information for replay */
- ice_memcpy(hw->qos_bw_cfg[vf_id], vf_bw, size
of(*vf_bw)
,
+ ice_memcpy(hw->qos_bw_cfg[vf_id], vf_bw, size,
ICE_NONDMA_TO_NONDMA);
ice_memset(vf_bw, 0, size, ICE_NONDMA_MEM);
}
ICE_NONDMA_TO_NONDMA);
ice_memset(vf_bw, 0, size, ICE_NONDMA_MEM);
}
@@
-859,7
+866,7
@@
static int ice_dcf_hierarchy_commit(struct rte_eth_dev *dev,
ret_val = ICE_ERR_NO_MEMORY;
goto fail_clear;
}
ret_val = ICE_ERR_NO_MEMORY;
goto fail_clear;
}
- ice_memcpy(hw->qos_bw_cfg[ICE_DCF_VFID], tc_bw, size
of(*tc_bw)
,
+ ice_memcpy(hw->qos_bw_cfg[ICE_DCF_VFID], tc_bw, size,
ICE_NONDMA_TO_NONDMA);
hw->tm_conf.committed = true;
ICE_NONDMA_TO_NONDMA);
hw->tm_conf.committed = true;
@@
-871,5
+878,6
@@
fail_clear:
ice_dcf_tm_conf_uninit(dev);
ice_dcf_tm_conf_init(dev);
}
ice_dcf_tm_conf_uninit(dev);
ice_dcf_tm_conf_init(dev);
}
+err:
return ret_val;
}
return ret_val;
}