summaryrefslogtreecommitdiffstats
path: root/drivers/net/null/rte_eth_null.c
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2017-11-08 14:15:11 +0000
committerLuca Boccassi <luca.boccassi@gmail.com>2017-11-08 14:45:54 +0000
commit055c52583a2794da8ba1e85a48cce3832372b12f (patch)
tree8ceb1cb78fbb46a0f341f8ee24feb3c6b5540013 /drivers/net/null/rte_eth_null.c
parentf239aed5e674965691846e8ce3f187dd47523689 (diff)
New upstream version 17.11-rc3
Change-Id: I6a5baa40612fe0c20f30b5fa773a6cbbac63a685 Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'drivers/net/null/rte_eth_null.c')
-rw-r--r--drivers/net/null/rte_eth_null.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 5aef0591..032c30e9 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -36,7 +36,7 @@
#include <rte_ethdev_vdev.h>
#include <rte_malloc.h>
#include <rte_memcpy.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
#include <rte_kvargs.h>
#include <rte_spinlock.h>
@@ -68,7 +68,7 @@ struct null_queue {
struct pmd_internals {
unsigned packet_size;
unsigned packet_copy;
- uint8_t port_id;
+ uint16_t port_id;
struct null_queue rx_null_queues[RTE_MAX_QUEUES_PER_PORT];
struct null_queue tx_null_queues[RTE_MAX_QUEUES_PER_PORT];
@@ -298,7 +298,7 @@ eth_dev_info(struct rte_eth_dev *dev,
dev_info->flow_type_rss_offloads = internals->flow_type_rss_offloads;
}
-static void
+static int
eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *igb_stats)
{
unsigned i, num_stats;
@@ -306,7 +306,7 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *igb_stats)
const struct pmd_internals *internal;
if ((dev == NULL) || (igb_stats == NULL))
- return;
+ return -EINVAL;
internal = dev->data->dev_private;
num_stats = RTE_MIN((unsigned)RTE_ETHDEV_QUEUE_STAT_CNTRS,
@@ -333,6 +333,8 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *igb_stats)
igb_stats->ipackets = rx_total;
igb_stats->opackets = tx_total;
igb_stats->oerrors = tx_err_total;
+
+ return 0;
}
static void
@@ -540,8 +542,6 @@ eth_dev_null_create(struct rte_vdev_device *dev,
eth_dev->data = data;
eth_dev->dev_ops = &ops;
- data->dev_flags = RTE_ETH_DEV_DETACHABLE;
-
/* finally assign rx and tx ops */
if (packet_copy) {
eth_dev->rx_pkt_burst = eth_null_copy_rx;