static int iavf_dev_configure(struct rte_eth_dev *dev);
static int iavf_dev_start(struct rte_eth_dev *dev);
static void iavf_dev_stop(struct rte_eth_dev *dev);
-static void iavf_dev_close(struct rte_eth_dev *dev);
+static int iavf_dev_close(struct rte_eth_dev *dev);
static int iavf_dev_reset(struct rte_eth_dev *dev);
static int iavf_dev_info_get(struct rte_eth_dev *dev,
struct rte_eth_dev_info *dev_info);
.rss_hash_conf_get = iavf_dev_rss_hash_conf_get,
.rxq_info_get = iavf_dev_rxq_info_get,
.txq_info_get = iavf_dev_txq_info_get,
- .rx_queue_count = iavf_dev_rxq_count,
- .rx_descriptor_status = iavf_dev_rx_desc_status,
- .tx_descriptor_status = iavf_dev_tx_desc_status,
.mtu_set = iavf_dev_mtu_set,
.rx_queue_intr_enable = iavf_dev_rx_queue_intr_enable,
.rx_queue_intr_disable = iavf_dev_rx_queue_intr_disable,
{
struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
struct rte_eth_rss_conf *rss_conf;
- uint8_t i, j, nb_q;
+ uint16_t i, j, nb_q;
int ret;
rss_conf = &adapter->eth_dev->data->dev_conf.rx_adv_conf.rss_conf;
rxq->max_pkt_len = max_pkt_len;
if ((dev_data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_SCATTER) ||
- (rxq->max_pkt_len + 2 * IAVF_VLAN_TAG_SIZE) > buf_size) {
+ rxq->max_pkt_len > buf_size) {
dev_data->scattered_rx = 1;
}
IAVF_PCI_REG_WRITE(rxq->qrx_tail, rxq->nb_rx_desc - 1);
ret = iavf_config_promisc(adapter, true, vf->promisc_multicast_enabled);
if (!ret)
vf->promisc_unicast_enabled = true;
+ else if (ret == IAVF_NOT_SUPPORTED)
+ ret = -ENOTSUP;
else
ret = -EAGAIN;
vf->promisc_multicast_enabled);
if (!ret)
vf->promisc_unicast_enabled = false;
+ else if (ret == IAVF_NOT_SUPPORTED)
+ ret = -ENOTSUP;
else
ret = -EAGAIN;
ret = iavf_config_promisc(adapter, vf->promisc_unicast_enabled, true);
if (!ret)
vf->promisc_multicast_enabled = true;
+ else if (ret == IAVF_NOT_SUPPORTED)
+ ret = -ENOTSUP;
else
ret = -EAGAIN;
ret = iavf_config_promisc(adapter, vf->promisc_unicast_enabled, false);
if (!ret)
vf->promisc_multicast_enabled = false;
+ else if (ret == IAVF_NOT_SUPPORTED)
+ ret = -ENOTSUP;
else
ret = -EAGAIN;
old_addr = (struct rte_ether_addr *)hw->mac.addr;
perm_addr = (struct rte_ether_addr *)hw->mac.perm_addr;
- if (rte_is_same_ether_addr(mac_addr, old_addr))
- return 0;
-
/* If the MAC address is configured by host, skip the setting */
if (rte_is_valid_assigned_ether_addr(perm_addr))
return -EPERM;
}
}
+ vf->vf_reset = false;
+
return 0;
err_rss:
rte_free(vf->rss_key);
/* assign ops func pointer */
eth_dev->dev_ops = &iavf_eth_dev_ops;
+ eth_dev->rx_queue_count = iavf_dev_rxq_count;
+ eth_dev->rx_descriptor_status = iavf_dev_rx_desc_status;
+ eth_dev->tx_descriptor_status = iavf_dev_tx_desc_status;
eth_dev->rx_pkt_burst = &iavf_recv_pkts;
eth_dev->tx_pkt_burst = &iavf_xmit_pkts;
eth_dev->tx_pkt_prepare = &iavf_prep_pkts;
return 0;
}
-static void
+static int
iavf_dev_close(struct rte_eth_dev *dev)
{
struct iavf_hw *hw = IAVF_DEV_PRIVATE_TO_HW(dev->data->dev_private);
rte_free(vf->aq_resp);
vf->aq_resp = NULL;
+
+ return 0;
}
static int