diff options
author | Damjan Marion <damarion@cisco.com> | 2016-05-25 18:40:13 +0200 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2016-05-25 18:45:07 +0200 |
commit | 64ae66903847cff20f0752caa7796b02e2fcec23 (patch) | |
tree | ffc75a1b749eb2a7caf9fd358e04b8cbb68b6564 /vnet/vnet/devices/dpdk/dpdk.h | |
parent | 94e34764b46a2babcaea6b309158524a7c1bb632 (diff) |
Move dpdk startup config data to separate struct
This is preparation work for moving DPDK
EAL and mempool initialization to vlib.
Change-Id: I2dc35aa53edec0e07fc2650d630aa625831154c3
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'vnet/vnet/devices/dpdk/dpdk.h')
-rw-r--r-- | vnet/vnet/devices/dpdk/dpdk.h | 70 |
1 files changed, 39 insertions, 31 deletions
diff --git a/vnet/vnet/devices/dpdk/dpdk.h b/vnet/vnet/devices/dpdk/dpdk.h index 2006f6fe149..144333fb384 100644 --- a/vnet/vnet/devices/dpdk/dpdk.h +++ b/vnet/vnet/devices/dpdk/dpdk.h @@ -309,6 +309,44 @@ typedef struct dpdk_efd_t { typedef struct { + /* Config stuff */ + u8 ** eal_init_args; + u8 * eal_init_args_str; + u8 * eth_if_blacklist; + u8 * eth_if_whitelist; + u8 * uio_driver_name; + u8 no_multi_seg; + u8 enable_tcp_udp_checksum; + + /* Required config parameters */ + u8 coremask_set_manually; + u8 nchannels_set_manually; + u32 coremask; + u32 nchannels; + u32 num_mbufs; + u32 use_rss; + u32 max_tx_queues; + u8 num_kni;/* while kni_init allows u32, port_id in callback fn is only u8 */ + + /* + * format interface names ala xxxEthernet%d/%d/%d instead of + * xxxEthernet%x/%x/%x. For VIRL. + */ + u8 interface_name_format_decimal; + + /* virtio vhost-user switch */ + u8 use_virtio_vhost; + + /* vhost-user coalescence frames config */ + u32 vhost_coalesce_frames; + f64 vhost_coalesce_time; + +} dpdk_config_main_t; + +dpdk_config_main_t dpdk_config_main; + +typedef struct { + /* Devices */ dpdk_device_t * devices; dpdk_device_and_queue_t ** devices_by_cpu; @@ -325,33 +363,9 @@ typedef struct { /* vlib buffer free list, must be same size as an rte_mbuf */ u32 vlib_buffer_free_list_index; - /* - * format interface names ala xxxEthernet%d/%d/%d instead of - * xxxEthernet%x/%x/%x. For VIRL. - */ - u8 interface_name_format_decimal; - - /* dpdk worker "threads" */ dpdk_worker_t * workers; - /* Config stuff */ - u8 ** eal_init_args; - u8 * eal_init_args_str; - u8 * eth_if_blacklist; - u8 * eth_if_whitelist; - u8 * uio_driver_name; - u8 no_multi_seg; - - /* Required config parameters */ - u8 coremask_set_manually; - u8 nchannels_set_manually; - u32 coremask; - u32 nchannels; - u32 num_mbufs; - u32 use_rss; - u32 max_tx_queues; - u8 num_kni; /* while kni_init allows u32, port_id in callback fn is only u8 */ /* Ethernet input node index */ u32 ethernet_input_node_index; @@ -366,13 +380,6 @@ typedef struct { u32 pcap_sw_if_index; u32 pcap_pkts_to_capture; - /* virtio vhost-user switch */ - u8 use_virtio_vhost; - - /* vhost-user coalescence frames config */ - u32 vhost_coalesce_frames; - f64 vhost_coalesce_time; - /* hashes */ uword * dpdk_device_by_kni_port_id; uword * vu_sw_if_index_by_listener_fd; @@ -407,6 +414,7 @@ typedef struct { /* convenience */ vlib_main_t * vlib_main; vnet_main_t * vnet_main; + dpdk_config_main_t * conf; } dpdk_main_t; dpdk_main_t dpdk_main; |