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/hns3: add imissed packet stats
[dpdk.git]
/
drivers
/
net
/
szedata2
/
rte_eth_szedata2.c
diff --git
a/drivers/net/szedata2/rte_eth_szedata2.c
b/drivers/net/szedata2/rte_eth_szedata2.c
index
c89ff16
..
6eaeadf
100644
(file)
--- a/
drivers/net/szedata2/rte_eth_szedata2.c
+++ b/
drivers/net/szedata2/rte_eth_szedata2.c
@@
-15,8
+15,8
@@
#include <libsze2.h>
#include <rte_mbuf.h>
#include <libsze2.h>
#include <rte_mbuf.h>
-#include <
rte_
ethdev_driver.h>
-#include <
rte_
ethdev_pci.h>
+#include <ethdev_driver.h>
+#include <ethdev_pci.h>
#include <rte_malloc.h>
#include <rte_memcpy.h>
#include <rte_kvargs.h>
#include <rte_malloc.h>
#include <rte_memcpy.h>
#include <rte_kvargs.h>
@@
-1013,20
+1013,29
@@
err_rx:
return ret;
}
return ret;
}
-static
void
+static
int
eth_dev_stop(struct rte_eth_dev *dev)
{
uint16_t i;
uint16_t nb_rx = dev->data->nb_rx_queues;
uint16_t nb_tx = dev->data->nb_tx_queues;
eth_dev_stop(struct rte_eth_dev *dev)
{
uint16_t i;
uint16_t nb_rx = dev->data->nb_rx_queues;
uint16_t nb_tx = dev->data->nb_tx_queues;
+ int ret;
dev->data->dev_started = 0;
dev->data->dev_started = 0;
- for (i = 0; i < nb_tx; i++)
- eth_tx_queue_stop(dev, i);
+ for (i = 0; i < nb_tx; i++) {
+ ret = eth_tx_queue_stop(dev, i);
+ if (ret != 0)
+ return ret;
+ }
- for (i = 0; i < nb_rx; i++)
- eth_rx_queue_stop(dev, i);
+ for (i = 0; i < nb_rx; i++) {
+ ret = eth_rx_queue_stop(dev, i);
+ if (ret != 0)
+ return ret;
+ }
+
+ return 0;
}
static int
}
static int
@@
-1164,11
+1173,12
@@
eth_dev_close(struct rte_eth_dev *dev)
uint16_t i;
uint16_t nb_rx = dev->data->nb_rx_queues;
uint16_t nb_tx = dev->data->nb_tx_queues;
uint16_t i;
uint16_t nb_rx = dev->data->nb_rx_queues;
uint16_t nb_tx = dev->data->nb_tx_queues;
+ int ret;
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
- eth_dev_stop(dev);
+
ret =
eth_dev_stop(dev);
free(internals->sze_dev_path);
free(internals->sze_dev_path);
@@
-1183,7
+1193,7
@@
eth_dev_close(struct rte_eth_dev *dev)
}
dev->data->nb_tx_queues = 0;
}
dev->data->nb_tx_queues = 0;
- return
0
;
+ return
ret
;
}
static int
}
static int
@@
-1538,6
+1548,8
@@
rte_szedata2_eth_dev_init(struct rte_eth_dev *dev, struct port_info *pi)
rte_ether_addr_copy(ð_addr, data->mac_addrs);
rte_ether_addr_copy(ð_addr, data->mac_addrs);
+ dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+
PMD_INIT_LOG(INFO, "%s device %s successfully initialized",
RTE_STR(RTE_SZEDATA2_DRIVER_NAME), data->name);
PMD_INIT_LOG(INFO, "%s device %s successfully initialized",
RTE_STR(RTE_SZEDATA2_DRIVER_NAME), data->name);