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: support Rx descriptor advanced layout
[dpdk.git]
/
drivers
/
net
/
tap
/
rte_eth_tap.h
diff --git
a/drivers/net/tap/rte_eth_tap.h
b/drivers/net/tap/rte_eth_tap.h
index
c87a0b8
..
a98ea11
100644
(file)
--- a/
drivers/net/tap/rte_eth_tap.h
+++ b/
drivers/net/tap/rte_eth_tap.h
@@
-13,8
+13,9
@@
#include <linux/if_tun.h>
#include <linux/if_tun.h>
-#include <
rte_
ethdev_driver.h>
+#include <ethdev_driver.h>
#include <rte_ether.h>
#include <rte_ether.h>
+#include <rte_gso.h>
#include "tap_log.h"
#ifdef IFF_MULTI_QUEUE
#include "tap_log.h"
#ifdef IFF_MULTI_QUEUE
@@
-22,6
+23,14
@@
#else
#define RTE_PMD_TAP_MAX_QUEUES 1
#endif
#else
#define RTE_PMD_TAP_MAX_QUEUES 1
#endif
+#define MAX_GSO_MBUFS 64
+
+enum rte_tuntap_type {
+ ETH_TUNTAP_TYPE_UNKNOWN,
+ ETH_TUNTAP_TYPE_TUN,
+ ETH_TUNTAP_TYPE_TAP,
+ ETH_TUNTAP_TYPE_MAX,
+};
struct pkt_stats {
uint64_t opackets; /* Number of output packets */
struct pkt_stats {
uint64_t opackets; /* Number of output packets */
@@
-37,7
+46,7
@@
struct rx_queue {
struct rte_mempool *mp; /* Mempool for RX packets */
uint32_t trigger_seen; /* Last seen Rx trigger value */
uint16_t in_port; /* Port ID */
struct rte_mempool *mp; /* Mempool for RX packets */
uint32_t trigger_seen; /* Last seen Rx trigger value */
uint16_t in_port; /* Port ID */
- int fd;
+ uint16_t queue_id; /* queue ID*/
struct pkt_stats stats; /* Stats for this RX queue */
uint16_t nb_rx_desc; /* max number of mbufs available */
struct rte_eth_rxmode *rxmode; /* RX features */
struct pkt_stats stats; /* Stats for this RX queue */
uint16_t nb_rx_desc; /* max number of mbufs available */
struct rte_eth_rxmode *rxmode; /* RX features */
@@
-47,18
+56,22
@@
struct rx_queue {
};
struct tx_queue {
};
struct tx_queue {
- int
fd;
+ int
type; /* Type field - TUN|TAP */
uint16_t *mtu; /* Pointer to MTU from dev_data */
uint16_t csum:1; /* Enable checksum offloading */
struct pkt_stats stats; /* Stats for this TX queue */
uint16_t *mtu; /* Pointer to MTU from dev_data */
uint16_t csum:1; /* Enable checksum offloading */
struct pkt_stats stats; /* Stats for this TX queue */
+ struct rte_gso_ctx gso_ctx; /* GSO context */
+ uint16_t out_port; /* Port ID */
+ uint16_t queue_id; /* queue ID*/
};
struct pmd_internals {
struct rte_eth_dev *dev; /* Ethernet device. */
char remote_iface[RTE_ETH_NAME_MAX_LEN]; /* Remote netdevice name */
char name[RTE_ETH_NAME_MAX_LEN]; /* Internal Tap device name */
};
struct pmd_internals {
struct rte_eth_dev *dev; /* Ethernet device. */
char remote_iface[RTE_ETH_NAME_MAX_LEN]; /* Remote netdevice name */
char name[RTE_ETH_NAME_MAX_LEN]; /* Internal Tap device name */
- struct ether_addr eth_addr; /* Mac address of the device port */
- struct ifreq remote_initial_flags; /* Remote netdevice flags on init */
+ int type; /* Type field - TUN|TAP */
+ struct rte_ether_addr eth_addr; /* Mac address of the device port */
+ struct ifreq remote_initial_flags;/* Remote netdevice flags on init */
int remote_if_index; /* remote netdevice IF_INDEX */
int if_index; /* IF_INDEX for the port */
int ioctl_sock; /* socket for ioctl calls */
int remote_if_index; /* remote netdevice IF_INDEX */
int if_index; /* IF_INDEX for the port */
int ioctl_sock; /* socket for ioctl calls */
@@
-78,6
+91,12
@@
struct pmd_internals {
struct tx_queue txq[RTE_PMD_TAP_MAX_QUEUES]; /* List of TX queues */
struct rte_intr_handle intr_handle; /* LSC interrupt handle. */
int ka_fd; /* keep-alive file descriptor */
struct tx_queue txq[RTE_PMD_TAP_MAX_QUEUES]; /* List of TX queues */
struct rte_intr_handle intr_handle; /* LSC interrupt handle. */
int ka_fd; /* keep-alive file descriptor */
+ struct rte_mempool *gso_ctx_mp; /* Mempool for GSO packets */
+};
+
+struct pmd_process_private {
+ int rxq_fds[RTE_PMD_TAP_MAX_QUEUES];
+ int txq_fds[RTE_PMD_TAP_MAX_QUEUES];
};
/* tap_intr.c */
};
/* tap_intr.c */