aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorDavid Johnson <davijoh3@cisco.com>2018-12-14 14:53:41 -0500
committerDavid Johnson <davijoh3@cisco.com>2019-01-02 10:55:55 -0500
commitd9818dd68c162079f3ddb5443a78d0d91d55d0fe (patch)
tree71a597e8fb2c9c7ebd70870ae78091872591e216 /src/vnet
parentd6897c1597c4f0904d5956f7d794e3f001d52f72 (diff)
Fixes for buliding for 32bit targets:
* u32/u64/uword mismatches * pointer-to-int fixes * printf formatting issues * issues with incorrect "ULL" and related suffixes * structure alignment and padding issues Change-Id: I70b989007758755fe8211c074f651150680f60b4 Signed-off-by: David Johnson <davijoh3@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/classify/vnet_classify.h1
-rw-r--r--src/vnet/devices/virtio/virtio.h1
-rwxr-xr-xsrc/vnet/ip/ip6_neighbor.c2
-rw-r--r--src/vnet/session/application.c12
-rw-r--r--src/vnet/session/segment_manager.c6
-rw-r--r--src/vnet/session/session.c9
-rw-r--r--src/vnet/session/session_node.c7
7 files changed, 23 insertions, 15 deletions
diff --git a/src/vnet/classify/vnet_classify.h b/src/vnet/classify/vnet_classify.h
index 4fea95d5b72..2bc1224c72e 100644
--- a/src/vnet/classify/vnet_classify.h
+++ b/src/vnet/classify/vnet_classify.h
@@ -149,6 +149,7 @@ typedef struct
typedef struct
{
+ CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
/* Mask to apply after skipping N vectors */
u32x4 *mask;
/* Buckets and entries */
diff --git a/src/vnet/devices/virtio/virtio.h b/src/vnet/devices/virtio/virtio.h
index 5fc521672d9..e401f2ddcd7 100644
--- a/src/vnet/devices/virtio/virtio.h
+++ b/src/vnet/devices/virtio/virtio.h
@@ -73,6 +73,7 @@ typedef enum
typedef struct
{
+ CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
struct vring_desc *desc;
struct vring_used *used;
struct vring_avail *avail;
diff --git a/src/vnet/ip/ip6_neighbor.c b/src/vnet/ip/ip6_neighbor.c
index a7ce2798f2a..f9acfeff389 100755
--- a/src/vnet/ip/ip6_neighbor.c
+++ b/src/vnet/ip/ip6_neighbor.c
@@ -2348,7 +2348,7 @@ create_buffer_for_rs (vlib_main_t * vm, ip6_radv_t * radv_info)
rh->ip.hop_limit = 255;
rh->ip.src_address = radv_info->link_local_address;
/* set address ff02::2 */
- rh->ip.dst_address.as_u64[0] = clib_host_to_net_u64 (0xff02L << 48);
+ rh->ip.dst_address.as_u64[0] = clib_host_to_net_u64 (0xff02ULL << 48);
rh->ip.dst_address.as_u64[1] = clib_host_to_net_u64 (2);
rh->neighbor.icmp.checksum = ip6_tcp_udp_icmp_compute_checksum (vm, p0,
diff --git a/src/vnet/session/application.c b/src/vnet/session/application.c
index 01dc818216d..19c8fa2f2e0 100644
--- a/src/vnet/session/application.c
+++ b/src/vnet/session/application.c
@@ -1695,14 +1695,14 @@ failed:
return rv;
}
-static uword
+static u64
application_client_local_connect_key (local_session_t * ls)
{
- return ((uword) ls->app_wrk_index << 32 | (uword) ls->session_index);
+ return (((u64) ls->app_wrk_index) << 32 | (u64) ls->session_index);
}
static void
-application_client_local_connect_key_parse (uword key, u32 * app_wrk_index,
+application_client_local_connect_key_parse (u64 key, u32 * app_wrk_index,
u32 * session_index)
{
*app_wrk_index = key >> 32;
@@ -1718,7 +1718,7 @@ application_local_session_connect_notify (local_session_t * ls)
application_t *client;
int rv, is_fail = 0;
u64 segment_handle;
- uword client_key;
+ u64 client_key;
client_wrk = app_worker_get (ls->client_wrk_index);
server_wrk = app_worker_get (ls->app_wrk_index);
@@ -1759,7 +1759,7 @@ application_local_session_cleanup (app_worker_t * client_wrk,
svm_fifo_segment_private_t *seg;
stream_session_t *listener;
segment_manager_t *sm;
- uword client_key;
+ u64 client_key;
u8 has_transport;
/* Retrieve listener transport type as it is the one that decides where
@@ -2179,7 +2179,7 @@ app_worker_format_local_connects (app_worker_t * app, int verbose)
u32 app_wrk_index, session_index;
app_worker_t *server_wrk;
local_session_t *ls;
- uword client_key;
+ u64 client_key;
u64 value;
/* Header */
diff --git a/src/vnet/session/segment_manager.c b/src/vnet/session/segment_manager.c
index 2b8a7326ea7..e48e951722d 100644
--- a/src/vnet/session/segment_manager.c
+++ b/src/vnet/session/segment_manager.c
@@ -186,7 +186,7 @@ segment_manager_add_segment (segment_manager_t * sm, u32 segment_size)
segment_manager_main_t *smm = &segment_manager_main;
u32 rnd_margin = 128 << 10, seg_index, page_size;
segment_manager_properties_t *props;
- uword baseva = (u64) ~ 0, alloc_size;
+ uword baseva = (uword) ~ 0ULL, alloc_size;
svm_fifo_segment_private_t *seg;
u8 *seg_name;
int rv;
@@ -735,8 +735,8 @@ segment_manager_show_fn (vlib_main_t * vm, unformat_input_t * input,
svm_fifo_segment_private_t *seg;
segment_manager_t *sm;
u8 show_segments = 0, verbose = 0;
- uword address;
- u64 size;
+ char *address;
+ size_t size;
u32 active_fifos;
u32 free_fifos;
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index d30254e5fc0..4cf0f9e7e49 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -1539,9 +1539,14 @@ clib_error_t *
session_manager_main_init (vlib_main_t * vm)
{
session_manager_main_t *smm = &session_manager_main;
- smm->session_baseva = 0x200000000ULL;
- smm->session_va_space_size = (u64) 128 << 30;
+ smm->session_baseva = HIGH_SEGMENT_BASEVA;
+#if (HIGH_SEGMENT_BASEVA > (4ULL << 30))
+ smm->session_va_space_size = 128ULL << 30;
smm->evt_qs_segment_size = 64 << 20;
+#else
+ smm->session_va_space_size = 128 << 20;
+ smm->evt_qs_segment_size = 1 << 20;
+#endif
smm->is_enabled = 0;
return 0;
}
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index a01f01c8bcb..98965f334af 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -589,8 +589,8 @@ session_tx_fifo_read_and_snd_i (vlib_main_t * vm, vlib_node_runtime_t * node,
}
ctx->snd_space = transport_connection_snd_space (ctx->tc,
- vm->
- clib_time.last_cpu_time,
+ vm->clib_time.
+ last_cpu_time,
ctx->snd_mss);
if (ctx->snd_space == 0 || ctx->snd_mss == 0)
{
@@ -1008,7 +1008,8 @@ dump_thread_0_event_queue (void)
case FIFO_EVENT_RPC:
fformat (stdout, "[%04d] RPC call %llx with %llx\n",
- i, (u64) (e->rpc_args.fp), (u64) (e->rpc_args.arg));
+ i, (u64) (uword) (e->rpc_args.fp),
+ (u64) (uword) (e->rpc_args.arg));
break;
default: