diff options
author | Dave Barach <dave@barachs.net> | 2016-01-20 09:11:55 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2016-01-21 12:33:07 +0000 |
commit | bfdedbd5a3ba7e6fdc036d212253aa55c9062211 (patch) | |
tree | 63cf45fd5839e377ef757946be8bdcaa90dbc2a4 /vnet | |
parent | 08ff7e00bf0e7cf93a732e98a026a76a4349fd41 (diff) |
PowerPC64-be arch support. Qemu ("qppc") platform support.
Change-Id: Ib0a05f9d1b08bacef09f6d7c101391737031ee0d
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'vnet')
-rw-r--r-- | vnet/vnet/devices/ssvm/node.c | 15 | ||||
-rw-r--r-- | vnet/vnet/lawful-intercept/lawful_intercept.c | 4 | ||||
-rw-r--r-- | vnet/vnet/lawful-intercept/node.c | 36 | ||||
-rw-r--r-- | vnet/vnet/map/map.c | 11 | ||||
-rw-r--r-- | vnet/vnet/policer/fix_types.h | 4 | ||||
-rw-r--r-- | vnet/vnet/vcgn/vcgn_classify.c | 2 |
6 files changed, 71 insertions, 1 deletions
diff --git a/vnet/vnet/devices/ssvm/node.c b/vnet/vnet/devices/ssvm/node.c index fe53d1199a2..b26d73d12b8 100644 --- a/vnet/vnet/devices/ssvm/node.c +++ b/vnet/vnet/devices/ssvm/node.c @@ -94,6 +94,7 @@ ssvm_eth_device_input (ssvm_eth_main_t * em, u32 trace_cnt __attribute__((unused)) = vlib_get_trace_count (vm, node); volatile u32 * lock; u32 * elt_indices; + uword n_trace = vlib_get_trace_count (vm, node); /* Either side down? buh-bye... */ if ((u64)(sh->opaque [MASTER_ADMIN_STATE_INDEX]) == 0 || @@ -236,7 +237,19 @@ ssvm_eth_device_input (ssvm_eth_main_t * em, */ VLIB_BUFFER_TRACE_TRAJECTORY_INIT(b0); - /* $$$$ tracing */ + if (PREDICT_FALSE(n_trace > 0)) + { + ssvm_eth_input_trace_t *tr; + + vlib_trace_buffer (vm, node, next0, + b0, /* follow_chain */ 1); + vlib_set_trace_count (vm, node, --n_trace); + + tr = vlib_add_trace (vm, node, b0, sizeof (*tr)); + + tr->next_index = next0; + tr->sw_if_index = intfc->vlib_hw_if_index; + } vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next, n_left_to_next, diff --git a/vnet/vnet/lawful-intercept/lawful_intercept.c b/vnet/vnet/lawful-intercept/lawful_intercept.c index bd3f33efa0c..6b2f41f4795 100644 --- a/vnet/vnet/lawful-intercept/lawful_intercept.c +++ b/vnet/vnet/lawful-intercept/lawful_intercept.c @@ -13,6 +13,7 @@ * limitations under the License. */ +#if DPDK==1 #include <vnet/lawful-intercept/lawful_intercept.h> static clib_error_t * @@ -109,3 +110,6 @@ li_init (vlib_main_t * vm) } VLIB_INIT_FUNCTION(li_init); +#else +#endif /* DPDK */ + diff --git a/vnet/vnet/lawful-intercept/node.c b/vnet/vnet/lawful-intercept/node.c index cc066491116..8a47aa32855 100644 --- a/vnet/vnet/lawful-intercept/node.c +++ b/vnet/vnet/lawful-intercept/node.c @@ -17,6 +17,7 @@ #include <vnet/vnet.h> #include <vppinfra/error.h> +#if DPDK==1 #include <vnet/lawful-intercept/lawful_intercept.h> #include <vppinfra/error.h> @@ -270,3 +271,38 @@ VLIB_REGISTER_NODE (li_hit_node) = { [LI_HIT_NEXT_ETHERNET] = "ethernet-input-not-l2", }, }; + +#else +#include <vlib/vlib.h> + +static uword +li_hit_node_fn (vlib_main_t * vm, + vlib_node_runtime_t * node, + vlib_frame_t * frame) +{ + clib_warning ("LI not implemented (no DPDK)"); + return 0; +} + +VLIB_REGISTER_NODE (li_hit_node) = { + .vector_size = sizeof (u32), + .function = li_hit_node_fn, + .name = "li-hit", +}; + +VLIB_REGISTER_NODE (ipsec_output_node) = { + .vector_size = sizeof (u32), + .function = li_hit_node_fn, + .name = "ipsec-output", +}; + +static clib_error_t * +li_init (vlib_main_t * vm) +{ + return 0; +} + +VLIB_INIT_FUNCTION(li_init); + + +#endif /* DPDK */ diff --git a/vnet/vnet/map/map.c b/vnet/vnet/map/map.c index a63122b58f3..3cf5e692489 100644 --- a/vnet/vnet/map/map.c +++ b/vnet/vnet/map/map.c @@ -17,6 +17,17 @@ #include "map.h" +#ifdef __powerpc64__ +#include <vppinfra/xxhash.h> + +static inline u32 +crc_u32(u32 data, u32 value) +{ + u64 tmp = ((u64)data<<32) | (u64) value; + return (u32) clib_xxhash(tmp); +} +#endif + /* * This code supports the following MAP modes: * diff --git a/vnet/vnet/policer/fix_types.h b/vnet/vnet/policer/fix_types.h index cbb79e049fc..71a4173108a 100644 --- a/vnet/vnet/policer/fix_types.h +++ b/vnet/vnet/policer/fix_types.h @@ -28,4 +28,8 @@ typedef unsigned char uint8_t; typedef unsigned short int uint16_t; typedef unsigned int uint32_t; +#ifdef __powerpc64__ +typedef unsigned long uint64_t; +#endif + #endif /* __included_fix_types_h__ */ diff --git a/vnet/vnet/vcgn/vcgn_classify.c b/vnet/vnet/vcgn/vcgn_classify.c index 518f9102317..5574f80287e 100644 --- a/vnet/vnet/vcgn/vcgn_classify.c +++ b/vnet/vnet/vcgn/vcgn_classify.c @@ -397,7 +397,9 @@ clib_error_t *vcgn_classify_init (vlib_main_t *vm) mp->inside_sw_if_index = 1; mp->outside_sw_if_index = 0; +#if DPDK==1 dpdk_set_next_node (DPDK_RX_NEXT_IP4_INPUT, "vcgn-classify"); +#endif { pg_node_t * pn; |