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

Function fs_eth_dev_conf_apply

dpdk/drivers/net/failsafe/failsafe_ether.c:71–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71static int
72fs_eth_dev_conf_apply(struct rte_eth_dev *dev,
73 struct sub_device *sdev)
74{
75 struct rte_eth_dev *edev;
76 struct rte_vlan_filter_conf *vfc1;
77 struct rte_vlan_filter_conf *vfc2;
78 struct rte_flow *flow;
79 struct rte_flow_error ferror;
80 uint32_t i;
81 int ret;
82
83 edev = ETH(sdev);
84 /* RX queue setup */
85 for (i = 0; i < dev->data->nb_rx_queues; i++) {
86 struct rxq *rxq;
87
88 rxq = dev->data->rx_queues[i];
89 ret = rte_eth_rx_queue_setup(PORT_ID(sdev), i,
90 rxq->info.nb_desc, rxq->socket_id,
91 &rxq->info.conf, rxq->info.mp);
92 if (ret) {
93 ERROR("rx_queue_setup failed");
94 return ret;
95 }
96 }
97 /* TX queue setup */
98 for (i = 0; i < dev->data->nb_tx_queues; i++) {
99 struct txq *txq;
100
101 txq = dev->data->tx_queues[i];
102 ret = rte_eth_tx_queue_setup(PORT_ID(sdev), i,
103 txq->info.nb_desc, txq->socket_id,
104 &txq->info.conf);
105 if (ret) {
106 ERROR("tx_queue_setup failed");
107 return ret;
108 }
109 }
110 /* dev_link.link_status */
111 if (dev->data->dev_link.link_status !=
112 edev->data->dev_link.link_status) {
113 DEBUG("Configuring link_status");
114 if (dev->data->dev_link.link_status)
115 ret = rte_eth_dev_set_link_up(PORT_ID(sdev));
116 else
117 ret = rte_eth_dev_set_link_down(PORT_ID(sdev));
118 if (ret) {
119 ERROR("Failed to apply link_status");
120 return ret;
121 }
122 } else {
123 DEBUG("link_status already set");
124 }
125 /* promiscuous */
126 if (dev->data->promiscuous != edev->data->promiscuous) {
127 DEBUG("Configuring promiscuous");
128 if (dev->data->promiscuous)

Callers 1

Calls 15

rte_eth_rx_queue_setupFunction · 0.85
rte_eth_tx_queue_setupFunction · 0.85
rte_eth_dev_set_link_upFunction · 0.85
rte_eth_dev_set_mtuFunction · 0.85
rte_eth_dev_mac_addr_addFunction · 0.85
rte_ether_format_addrFunction · 0.85

Tested by

no test coverage detected