]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/spdk/dpdk/drivers/net/cxgbe/cxgbevf_ethdev.c
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / spdk / dpdk / drivers / net / cxgbe / cxgbevf_ethdev.c
index 0e93d99e6e4d4feee39e03f424fb317dfae2a840..4165ba986dff73aa19320b993551313902979275 100644 (file)
@@ -36,7 +36,7 @@
 static int cxgbevf_dev_stats_get(struct rte_eth_dev *eth_dev,
                                 struct rte_eth_stats *eth_stats)
 {
-       struct port_info *pi = (struct port_info *)(eth_dev->data->dev_private);
+       struct port_info *pi = eth_dev->data->dev_private;
        struct adapter *adapter = pi->adapter;
        struct sge *s = &adapter->sge;
        struct port_stats ps;
@@ -69,7 +69,6 @@ static int cxgbevf_dev_stats_get(struct rte_eth_dev *eth_dev,
 
                eth_stats->q_opackets[i] = txq->stats.pkts;
                eth_stats->q_obytes[i] = txq->stats.tx_bytes;
-               eth_stats->q_errors[i] = txq->stats.mapping_err;
        }
        return 0;
 }
@@ -107,7 +106,7 @@ static const struct eth_dev_ops cxgbevf_eth_dev_ops = {
  */
 static int eth_cxgbevf_dev_init(struct rte_eth_dev *eth_dev)
 {
-       struct port_info *pi = (struct port_info *)(eth_dev->data->dev_private);
+       struct port_info *pi = eth_dev->data->dev_private;
        struct rte_pci_device *pci_dev;
        char name[RTE_ETH_NAME_MAX_LEN];
        struct adapter *adapter = NULL;
@@ -163,6 +162,9 @@ static int eth_cxgbevf_dev_init(struct rte_eth_dev *eth_dev)
        adapter->pdev = pci_dev;
        adapter->eth_dev = eth_dev;
        pi->adapter = adapter;
+
+       cxgbe_process_devargs(adapter);
+
        err = cxgbevf_probe(adapter);
        if (err) {
                dev_err(adapter, "%s: cxgbevf probe failed with err %d\n",
@@ -179,7 +181,7 @@ out_free_adapter:
 
 static int eth_cxgbevf_dev_uninit(struct rte_eth_dev *eth_dev)
 {
-       struct port_info *pi = (struct port_info *)(eth_dev->data->dev_private);
+       struct port_info *pi = eth_dev->data->dev_private;
        struct adapter *adap = pi->adapter;
 
        /* Free up other ports and all resources */
@@ -209,3 +211,7 @@ static struct rte_pci_driver rte_cxgbevf_pmd = {
 RTE_PMD_REGISTER_PCI(net_cxgbevf, rte_cxgbevf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_cxgbevf, cxgb4vf_pci_tbl);
 RTE_PMD_REGISTER_KMOD_DEP(net_cxgbevf, "* igb_uio | vfio-pci");
+RTE_PMD_REGISTER_PARAM_STRING(net_cxgbevf,
+                             CXGBE_DEVARG_CMN_KEEP_OVLAN "=<0|1> "
+                             CXGBE_DEVARG_CMN_TX_MODE_LATENCY "=<0|1> "
+                             CXGBE_DEVARG_VF_FORCE_LINK_UP "=<0|1> ");