MCPcopy Create free account
hub / github.com/F-Stack/f-stack / nfp_ext_reconfig

Function nfp_ext_reconfig

dpdk/drivers/common/nfp/nfp_common.c:124–149  ·  view source on GitHub ↗

* Reconfigure the NIC for the extend ctrl BAR. * * Write the update word to the BAR and ping the reconfig queue. Then poll * until the firmware has acknowledged the update by zeroing the update word. * * @param hw * Device to reconfigure. * @param ctrl_ext * The value for the first word of extend ctrl field in the BAR config. * @param update * The value for the update field in the

Source from the content-addressed store, hash-verified

122 * - (-EIO) if I/O err and fail to reconfigure the device.
123 */
124int
125nfp_ext_reconfig(struct nfp_hw *hw,
126 uint32_t ctrl_ext,
127 uint32_t update)
128{
129 int ret;
130
131 rte_spinlock_lock(&hw->reconfig_lock);
132
133 nn_cfg_writel(hw, NFP_NET_CFG_CTRL_WORD1, ctrl_ext);
134 nn_cfg_writel(hw, NFP_NET_CFG_UPDATE, update);
135
136 rte_wmb();
137
138 ret = nfp_reconfig_real(hw, update);
139
140 rte_spinlock_unlock(&hw->reconfig_lock);
141
142 if (ret != 0) {
143 PMD_DRV_LOG(ERR, "Error nfp ext reconfig: ctrl_ext=%#08x update=%#08x",
144 ctrl_ext, update);
145 return -EIO;
146 }
147
148 return 0;
149}
150
151void
152nfp_read_mac(struct nfp_hw *hw)

Callers 4

nfp_net_startFunction · 0.85
nfp_enable_multi_pfFunction · 0.85
nfp_vdpa_hw_startFunction · 0.85

Calls 4

nn_cfg_writelFunction · 0.85
nfp_reconfig_realFunction · 0.85
rte_spinlock_lockFunction · 0.50
rte_spinlock_unlockFunction · 0.50

Tested by

no test coverage detected