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

Function nfp_net_force_port_down

dpdk/drivers/net/nfp/nfp_ethdev.c:1205–1226  ·  view source on GitHub ↗

Force the physical port down to clear the possible DMA error */

Source from the content-addressed store, hash-verified

1203
1204/* Force the physical port down to clear the possible DMA error */
1205static int
1206nfp_net_force_port_down(struct nfp_pf_dev *pf_dev,
1207 struct nfp_eth_table *nfp_eth_table,
1208 struct nfp_cpp *cpp)
1209{
1210 int ret;
1211 uint32_t i;
1212 uint32_t id;
1213 uint32_t index;
1214 uint32_t count;
1215
1216 count = nfp_net_get_port_num(pf_dev, nfp_eth_table);
1217 for (i = 0; i < count; i++) {
1218 id = nfp_function_id_get(pf_dev, i);
1219 index = nfp_eth_table->ports[id].index;
1220 ret = nfp_eth_set_configured(cpp, index, 0);
1221 if (ret < 0)
1222 return ret;
1223 }
1224
1225 return 0;
1226}
1227
1228static int
1229nfp_pf_init(struct rte_pci_device *pci_dev)

Callers 1

nfp_pf_initFunction · 0.85

Calls 3

nfp_net_get_port_numFunction · 0.85
nfp_function_id_getFunction · 0.85
nfp_eth_set_configuredFunction · 0.85

Tested by

no test coverage detected