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

Function octeontx_dev_close

dpdk/drivers/net/octeontx/octeontx_ethdev.c:549–590  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547}
548
549static int
550octeontx_dev_close(struct rte_eth_dev *dev)
551{
552 struct octeontx_txq *txq = NULL;
553 struct octeontx_nic *nic = octeontx_pmd_priv(dev);
554 unsigned int i;
555 int ret;
556
557 PMD_INIT_FUNC_TRACE();
558 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
559 return 0;
560
561 /* Stopping/closing event device once all eth ports are closed. */
562 if (__atomic_fetch_sub(&evdev_refcnt, 1, __ATOMIC_ACQUIRE) - 1 == 0) {
563 rte_event_dev_stop(nic->evdev);
564 rte_event_dev_close(nic->evdev);
565 }
566
567 octeontx_dev_flow_ctrl_fini(dev);
568
569 octeontx_dev_vlan_offload_fini(dev);
570
571 ret = octeontx_pko_channel_close(nic->base_ochan);
572 if (ret < 0) {
573 octeontx_log_err("failed to close channel %d VF%d %d %d",
574 nic->base_ochan, nic->port_id, nic->num_tx_queues,
575 ret);
576 }
577 /* Free txq resources for this port */
578 for (i = 0; i < nic->num_tx_queues; i++) {
579 txq = dev->data->tx_queues[i];
580 if (!txq)
581 continue;
582
583 rte_free(txq);
584 }
585
586 octeontx_port_close(nic);
587 nic->reconfigure = false;
588
589 return 0;
590}
591
592static int
593octeontx_dev_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)

Callers 1

octeontx_removeFunction · 0.85

Calls 9

octeontx_pmd_privFunction · 0.85
rte_eal_process_typeFunction · 0.85
rte_event_dev_stopFunction · 0.85
rte_event_dev_closeFunction · 0.85
rte_freeFunction · 0.85
octeontx_port_closeFunction · 0.85

Tested by

no test coverage detected