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/mlx5: fix flow creation with a single target queue
[dpdk.git]
/
drivers
/
net
/
null
/
rte_eth_null.c
diff --git
a/drivers/net/null/rte_eth_null.c
b/drivers/net/null/rte_eth_null.c
index
abf3ec7
..
d003b28
100644
(file)
--- a/
drivers/net/null/rte_eth_null.c
+++ b/
drivers/net/null/rte_eth_null.c
@@
-32,11
+32,11
@@
*/
#include <rte_mbuf.h>
*/
#include <rte_mbuf.h>
-#include <rte_ethdev.h>
+#include <rte_ethdev
_driver
.h>
#include <rte_ethdev_vdev.h>
#include <rte_malloc.h>
#include <rte_memcpy.h>
#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>
#include <rte_kvargs.h>
#include <rte_spinlock.h>
@@
-49,7
+49,6
@@
static unsigned default_packet_copy;
static const char *valid_arguments[] = {
ETH_NULL_PACKET_SIZE_ARG,
ETH_NULL_PACKET_COPY_ARG,
static const char *valid_arguments[] = {
ETH_NULL_PACKET_SIZE_ARG,
ETH_NULL_PACKET_COPY_ARG,
- "driver",
NULL
};
NULL
};
@@
-69,7
+68,7
@@
struct null_queue {
struct pmd_internals {
unsigned packet_size;
unsigned packet_copy;
struct pmd_internals {
unsigned packet_size;
unsigned packet_copy;
- uint
8
_t port_id;
+ uint
16
_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];
struct null_queue rx_null_queues[RTE_MAX_QUEUES_PER_PORT];
struct null_queue tx_null_queues[RTE_MAX_QUEUES_PER_PORT];
@@
-92,7
+91,7
@@
static struct rte_eth_link pmd_link = {
.link_speed = ETH_SPEED_NUM_10G,
.link_duplex = ETH_LINK_FULL_DUPLEX,
.link_status = ETH_LINK_DOWN,
.link_speed = ETH_SPEED_NUM_10G,
.link_duplex = ETH_LINK_FULL_DUPLEX,
.link_status = ETH_LINK_DOWN,
- .link_autoneg = ETH_LINK_
SPEED_
AUTONEG,
+ .link_autoneg = ETH_LINK_AUTONEG,
};
static uint16_t
};
static uint16_t
@@
-139,8
+138,6
@@
eth_null_copy_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
packet_size);
bufs[i]->data_len = (uint16_t)packet_size;
bufs[i]->pkt_len = packet_size;
packet_size);
bufs[i]->data_len = (uint16_t)packet_size;
bufs[i]->pkt_len = packet_size;
- bufs[i]->nb_segs = 1;
- bufs[i]->next = NULL;
bufs[i]->port = h->internals->port_id;
}
bufs[i]->port = h->internals->port_id;
}
@@
-281,6
+278,11
@@
eth_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id,
return 0;
}
return 0;
}
+static int
+eth_mtu_set(struct rte_eth_dev *dev __rte_unused, uint16_t mtu __rte_unused)
+{
+ return 0;
+}
static void
eth_dev_info(struct rte_eth_dev *dev,
static void
eth_dev_info(struct rte_eth_dev *dev,
@@
-301,7
+303,7
@@
eth_dev_info(struct rte_eth_dev *dev,
dev_info->flow_type_rss_offloads = internals->flow_type_rss_offloads;
}
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;
eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *igb_stats)
{
unsigned i, num_stats;
@@
-309,7
+311,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))
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,
internal = dev->data->dev_private;
num_stats = RTE_MIN((unsigned)RTE_ETHDEV_QUEUE_STAT_CNTRS,
@@
-336,6
+338,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;
igb_stats->ipackets = rx_total;
igb_stats->opackets = tx_total;
igb_stats->oerrors = tx_err_total;
+
+ return 0;
}
static void
}
static void
@@
-457,6
+461,12
@@
eth_rss_hash_conf_get(struct rte_eth_dev *dev,
return 0;
}
return 0;
}
+static void
+eth_mac_address_set(__rte_unused struct rte_eth_dev *dev,
+ __rte_unused struct ether_addr *addr)
+{
+}
+
static const struct eth_dev_ops ops = {
.dev_start = eth_dev_start,
.dev_stop = eth_dev_stop,
static const struct eth_dev_ops ops = {
.dev_start = eth_dev_start,
.dev_stop = eth_dev_stop,
@@
-466,7
+476,9
@@
static const struct eth_dev_ops ops = {
.tx_queue_setup = eth_tx_queue_setup,
.rx_queue_release = eth_queue_release,
.tx_queue_release = eth_queue_release,
.tx_queue_setup = eth_tx_queue_setup,
.rx_queue_release = eth_queue_release,
.tx_queue_release = eth_queue_release,
+ .mtu_set = eth_mtu_set,
.link_update = eth_link_update,
.link_update = eth_link_update,
+ .mac_addr_set = eth_mac_address_set,
.stats_get = eth_stats_get,
.stats_reset = eth_stats_reset,
.reta_update = eth_rss_reta_update,
.stats_get = eth_stats_get,
.stats_reset = eth_stats_reset,
.reta_update = eth_rss_reta_update,
@@
-543,8
+555,6
@@
eth_dev_null_create(struct rte_vdev_device *dev,
eth_dev->data = data;
eth_dev->dev_ops = &ops;
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;
/* finally assign rx and tx ops */
if (packet_copy) {
eth_dev->rx_pkt_burst = eth_null_copy_rx;