git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/ice/base: track HW stat registers past rollover
[dpdk.git]
/
drivers
/
net
/
cxgbe
/
cxgbevf_ethdev.c
diff --git
a/drivers/net/cxgbe/cxgbevf_ethdev.c
b/drivers/net/cxgbe/cxgbevf_ethdev.c
index
3b32ca9
..
60e96aa
100644
(file)
--- a/
drivers/net/cxgbe/cxgbevf_ethdev.c
+++ b/
drivers/net/cxgbe/cxgbevf_ethdev.c
@@
-28,7
+28,7
@@
/*
*... and the PCI ID Table itself ...
*/
/*
*... and the PCI ID Table itself ...
*/
-#include "t4_pci_id_tbl.h"
+#include "
base/
t4_pci_id_tbl.h"
/*
* Get port statistics.
/*
* Get port statistics.
@@
-36,7
+36,7
@@
static int cxgbevf_dev_stats_get(struct rte_eth_dev *eth_dev,
struct rte_eth_stats *eth_stats)
{
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;
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_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;
}
}
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)
{
*/
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;
struct rte_pci_device *pci_dev;
char name[RTE_ETH_NAME_MAX_LEN];
struct adapter *adapter = NULL;
@@
-177,6
+176,16
@@
out_free_adapter:
return err;
}
return err;
}
+static int eth_cxgbevf_dev_uninit(struct rte_eth_dev *eth_dev)
+{
+ struct port_info *pi = eth_dev->data->dev_private;
+ struct adapter *adap = pi->adapter;
+
+ /* Free up other ports and all resources */
+ cxgbe_close(adap);
+ return 0;
+}
+
static int eth_cxgbevf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
struct rte_pci_device *pci_dev)
{
static int eth_cxgbevf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
struct rte_pci_device *pci_dev)
{
@@
-186,7
+195,7
@@
static int eth_cxgbevf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
static int eth_cxgbevf_pci_remove(struct rte_pci_device *pci_dev)
{
static int eth_cxgbevf_pci_remove(struct rte_pci_device *pci_dev)
{
- return rte_eth_dev_pci_generic_remove(pci_dev,
NULL
);
+ return rte_eth_dev_pci_generic_remove(pci_dev,
eth_cxgbevf_dev_uninit
);
}
static struct rte_pci_driver rte_cxgbevf_pmd = {
}
static struct rte_pci_driver rte_cxgbevf_pmd = {