X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_pmd_vmxnet3%2Fvmxnet3_ethdev.c;h=a2a2aaaf103fc4e0b75a6455b5a23bcbdc43bd62;hb=1f693b8f37650d7e5928c31f2686e8847204393b;hp=c6e69f223cdfc8caf54278b47bfd7f9cbc81c16c;hpb=638e82a1399d0a33722d9dd4e64994cf1500399e;p=dpdk.git diff --git a/lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c b/lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c index c6e69f223c..a2a2aaaf10 100644 --- a/lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c +++ b/lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c @@ -70,8 +70,7 @@ #define PROCESS_SYS_EVENTS 0 -static int eth_vmxnet3_dev_init(struct eth_driver *eth_drv, - struct rte_eth_dev *eth_dev); +static int eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev); static int vmxnet3_dev_configure(struct rte_eth_dev *dev); static int vmxnet3_dev_start(struct rte_eth_dev *dev); static void vmxnet3_dev_stop(struct rte_eth_dev *dev); @@ -182,8 +181,7 @@ vmxnet3_disable_intr(struct vmxnet3_hw *hw) * It returns 0 on success. */ static int -eth_vmxnet3_dev_init(__attribute__((unused)) struct eth_driver *eth_drv, - struct rte_eth_dev *eth_dev) +eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev) { struct rte_pci_device *pci_dev; struct vmxnet3_hw *hw = eth_dev->data->dev_private; @@ -347,7 +345,7 @@ vmxnet3_dev_configure(struct rte_eth_dev *dev) /* Allocate memory structure for UPT1_RSSConf and configure */ mz = gpa_zone_reserve(dev, sizeof(struct VMXNET3_RSSConf), "rss_conf", - rte_socket_id(), CACHE_LINE_SIZE); + rte_socket_id(), RTE_CACHE_LINE_SIZE); if (mz == NULL) { PMD_INIT_LOG(ERR, "ERROR: Creating rss_conf structure zone"); @@ -401,15 +399,17 @@ vmxnet3_setup_driver_shared(struct rte_eth_dev *dev) for (i = 0; i < hw->num_tx_queues; i++) { Vmxnet3_TxQueueDesc *tqd = &hw->tqd_start[i]; - vmxnet3_tx_queue_t *txq = dev->data->tx_queues[i]; + vmxnet3_tx_queue_t *txq = dev->data->tx_queues[i]; tqd->ctrl.txNumDeferred = 0; tqd->ctrl.txThreshold = 1; tqd->conf.txRingBasePA = txq->cmd_ring.basePA; tqd->conf.compRingBasePA = txq->comp_ring.basePA; + tqd->conf.dataRingBasePA = txq->data_ring.basePA; tqd->conf.txRingSize = txq->cmd_ring.size; tqd->conf.compRingSize = txq->comp_ring.size; + tqd->conf.dataRingSize = txq->data_ring.size; tqd->conf.intrIdx = txq->comp_ring.intr_idx; tqd->status.stopped = TRUE; tqd->status.error = 0; @@ -418,7 +418,7 @@ vmxnet3_setup_driver_shared(struct rte_eth_dev *dev) for (i = 0; i < hw->num_rx_queues; i++) { Vmxnet3_RxQueueDesc *rqd = &hw->rqd_start[i]; - vmxnet3_rx_queue_t *rxq = dev->data->rx_queues[i]; + vmxnet3_rx_queue_t *rxq = dev->data->rx_queues[i]; rqd->conf.rxRingBasePA[0] = rxq->cmd_ring[0].basePA; rqd->conf.rxRingBasePA[1] = rxq->cmd_ring[1].basePA; @@ -583,7 +583,6 @@ vmxnet3_dev_close(struct rte_eth_dev *dev) vmxnet3_dev_stop(dev); hw->adapter_stopped = TRUE; - } static void @@ -641,6 +640,10 @@ vmxnet3_dev_info_get(__attribute__((unused))struct rte_eth_dev *dev, struct rte_ dev_info->min_rx_bufsize = 1518 + RTE_PKTMBUF_HEADROOM; dev_info->max_rx_pktlen = 16384; /* includes CRC, cf MAXFRS register */ dev_info->max_mac_addrs = VMXNET3_MAX_MAC_ADDRS; + + dev_info->default_txconf.txq_flags = ETH_TXQ_FLAGS_NOMULTSEGS | + ETH_TXQ_FLAGS_NOOFFLOADS; + dev_info->flow_type_rss_offloads = VMXNET3_RSS_OFFLOAD_ALL; } /* return 0 means link status changed, -1 means not changed */