| 69 | } |
| 70 | |
| 71 | static int |
| 72 | fs_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) |
no test coverage detected