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

Function nfp_reconfig

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

* Reconfigure the NIC. * * 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 * The value for the ctrl field in the BAR config. * @param update * The value for the update field in the BAR config. * * @return * - (0) if OK to rec

Source from the content-addressed store, hash-verified

78 * - (-EIO) if I/O err and fail to reconfigure the device.
79 */
80int
81nfp_reconfig(struct nfp_hw *hw,
82 uint32_t ctrl,
83 uint32_t update)
84{
85 int ret;
86
87 rte_spinlock_lock(&hw->reconfig_lock);
88
89 nn_cfg_writel(hw, NFP_NET_CFG_CTRL, ctrl);
90 nn_cfg_writel(hw, NFP_NET_CFG_UPDATE, update);
91
92 rte_wmb();
93
94 ret = nfp_reconfig_real(hw, update);
95
96 rte_spinlock_unlock(&hw->reconfig_lock);
97
98 if (ret != 0) {
99 PMD_DRV_LOG(ERR, "Error nfp reconfig: ctrl=%#08x update=%#08x",
100 ctrl, update);
101 return -EIO;
102 }
103
104 return 0;
105}
106
107/**
108 * Reconfigure the NIC for the extend ctrl BAR.

Callers 12

nfp_net_set_mac_addrFunction · 0.85
nfp_net_promisc_enableFunction · 0.85
nfp_net_promisc_disableFunction · 0.85
nfp_net_vlan_offload_setFunction · 0.85
nfp_net_reta_updateFunction · 0.85
nfp_net_rss_hash_updateFunction · 0.85
nfp_netvf_startFunction · 0.85
nfp_net_startFunction · 0.85
nfp_flower_pf_startFunction · 0.85
nfp_disable_queuesFunction · 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