Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add extern to *_main global variable declarations in header files.
[vpp.git]
/
src
/
plugins
/
dpdk
/
device
/
dpdk.h
diff --git
a/src/plugins/dpdk/device/dpdk.h
b/src/plugins/dpdk/device/dpdk.h
index
6364d16
..
a0c57ea
100644
(file)
--- a/
src/plugins/dpdk/device/dpdk.h
+++ b/
src/plugins/dpdk/device/dpdk.h
@@
-38,6
+38,7
@@
#include <rte_version.h>
#include <rte_eth_bond.h>
#include <rte_sched.h>
#include <rte_version.h>
#include <rte_eth_bond.h>
#include <rte_sched.h>
+#include <rte_net.h>
#include <vnet/unix/pcap.h>
#include <vnet/devices/devices.h>
#include <vnet/unix/pcap.h>
#include <vnet/devices/devices.h>
@@
-73,7
+74,9
@@
extern vlib_node_registration_t dpdk_input_node;
_ ("net_cxgbe", CXGBE) \
_ ("net_mlx4", MLX4) \
_ ("net_mlx5", MLX5) \
_ ("net_cxgbe", CXGBE) \
_ ("net_mlx4", MLX4) \
_ ("net_mlx5", MLX5) \
- _ ("net_dpaa2", DPAA2)
+ _ ("net_dpaa2", DPAA2) \
+ _ ("net_virtio_user", VIRTIO_USER) \
+ _ ("net_vhost", VHOST_ETHER)
typedef enum
{
typedef enum
{
@@
-90,11
+93,14
@@
typedef enum
VNET_DPDK_PORT_TYPE_ETH_10G,
VNET_DPDK_PORT_TYPE_ETH_25G,
VNET_DPDK_PORT_TYPE_ETH_40G,
VNET_DPDK_PORT_TYPE_ETH_10G,
VNET_DPDK_PORT_TYPE_ETH_25G,
VNET_DPDK_PORT_TYPE_ETH_40G,
+ VNET_DPDK_PORT_TYPE_ETH_50G,
VNET_DPDK_PORT_TYPE_ETH_100G,
VNET_DPDK_PORT_TYPE_ETH_BOND,
VNET_DPDK_PORT_TYPE_ETH_SWITCH,
VNET_DPDK_PORT_TYPE_AF_PACKET,
VNET_DPDK_PORT_TYPE_ETH_VF,
VNET_DPDK_PORT_TYPE_ETH_100G,
VNET_DPDK_PORT_TYPE_ETH_BOND,
VNET_DPDK_PORT_TYPE_ETH_SWITCH,
VNET_DPDK_PORT_TYPE_AF_PACKET,
VNET_DPDK_PORT_TYPE_ETH_VF,
+ VNET_DPDK_PORT_TYPE_VIRTIO_USER,
+ VNET_DPDK_PORT_TYPE_VHOST_ETHER,
VNET_DPDK_PORT_TYPE_UNKNOWN,
} dpdk_port_type_t;
VNET_DPDK_PORT_TYPE_UNKNOWN,
} dpdk_port_type_t;
@@
-170,6
+176,10
@@
typedef struct
#define DPDK_DEVICE_FLAG_MAYBE_MULTISEG (1 << 4)
#define DPDK_DEVICE_FLAG_HAVE_SUBIF (1 << 5)
#define DPDK_DEVICE_FLAG_HQOS (1 << 6)
#define DPDK_DEVICE_FLAG_MAYBE_MULTISEG (1 << 4)
#define DPDK_DEVICE_FLAG_HAVE_SUBIF (1 << 5)
#define DPDK_DEVICE_FLAG_HQOS (1 << 6)
+#define DPDK_DEVICE_FLAG_BOND_SLAVE (1 << 7)
+#define DPDK_DEVICE_FLAG_BOND_SLAVE_UP (1 << 8)
+#define DPDK_DEVICE_FLAG_TX_OFFLOAD (1 << 9)
+#define DPDK_DEVICE_FLAG_INTEL_PHDR_CKSUM (1 << 10)
u16 nb_tx_desc;
CLIB_CACHE_LINE_ALIGN_MARK (cacheline1);
u16 nb_tx_desc;
CLIB_CACHE_LINE_ALIGN_MARK (cacheline1);
@@
-194,6
+204,10
@@
typedef struct
/* af_packet or BondEthernet instance number */
u8 port_id;
/* af_packet or BondEthernet instance number */
u8 port_id;
+ /* Bonded interface port# of a slave -
+ only valid if DPDK_DEVICE_FLAG_BOND_SLAVE bit is set */
+ u8 bond_port;
+
struct rte_eth_link link;
f64 time_last_link_update;
struct rte_eth_link link;
f64 time_last_link_update;
@@
-318,7
+332,7
@@
typedef struct
} dpdk_config_main_t;
} dpdk_config_main_t;
-dpdk_config_main_t dpdk_config_main;
+
extern
dpdk_config_main_t dpdk_config_main;
typedef struct
{
typedef struct
{
@@
-406,6
+420,15
@@
void dpdk_device_setup (dpdk_device_t * xd);
void dpdk_device_start (dpdk_device_t * xd);
void dpdk_device_stop (dpdk_device_t * xd);
void dpdk_device_start (dpdk_device_t * xd);
void dpdk_device_stop (dpdk_device_t * xd);
+#if DPDK_VOID_CALLBACK
+void dpdk_port_state_callback (uint8_t port_id,
+ enum rte_eth_event_type type, void *param);
+#else
+int dpdk_port_state_callback (uint8_t port_id,
+ enum rte_eth_event_type type,
+ void *param, void *ret_param);
+#endif
+
#define foreach_dpdk_error \
_(NONE, "no error") \
_(RX_PACKET_ERROR, "Rx packet errors") \
#define foreach_dpdk_error \
_(NONE, "no error") \
_(RX_PACKET_ERROR, "Rx packet errors") \
@@
-432,7
+455,7
@@
format_function_t format_dpdk_tx_dma_trace;
format_function_t format_dpdk_rx_dma_trace;
format_function_t format_dpdk_rte_mbuf;
format_function_t format_dpdk_rx_rte_mbuf;
format_function_t format_dpdk_rx_dma_trace;
format_function_t format_dpdk_rte_mbuf;
format_function_t format_dpdk_rx_rte_mbuf;
-unformat_function_t unformat_
socket_mem
;
+unformat_function_t unformat_
dpdk_log_level
;
clib_error_t *unformat_rss_fn (unformat_input_t * input, uword * rss_fn);
clib_error_t *unformat_hqos (unformat_input_t * input,
dpdk_device_config_hqos_t * hqos);
clib_error_t *unformat_rss_fn (unformat_input_t * input, uword * rss_fn);
clib_error_t *unformat_hqos (unformat_input_t * input,
dpdk_device_config_hqos_t * hqos);
@@
-441,6
+464,14
@@
uword
admin_up_down_process (vlib_main_t * vm,
vlib_node_runtime_t * rt, vlib_frame_t * f);
admin_up_down_process (vlib_main_t * vm,
vlib_node_runtime_t * rt, vlib_frame_t * f);
+clib_error_t *dpdk_buffer_pool_create (vlib_main_t * vm, unsigned num_mbufs,
+ unsigned socket_id);
+
+#if CLI_DEBUG
+int dpdk_buffer_validate_trajectory_all (u32 * uninitialized);
+void dpdk_buffer_poison_trajectory_all (void);
+#endif
+
#endif /* __included_dpdk_h__ */
/*
#endif /* __included_dpdk_h__ */
/*