int n_retry = 5;
- /* supppres interrupt in the next adminq receive slot
+ /* suppress interrupt in the next adminq receive slot
as we are going to wait for response
we only need interrupts when event is received */
d = &ad->arq[ad->arq_next_slot];
sizeof (virtchnl_vf_res_request_t));
/*
- * if PF respondes, the request failed
+ * if PF responds, the request failed
* else PF initializes restart and avf_send_to_pf returns an error
*/
if (!error)
"(remote %d.%d)", ver.major, ver.minor);
/*
- * OP_GET_VF_RESOUCES
+ * OP_GET_VF_RESOURCES
*/
if ((error = avf_op_get_vf_resources (vm, ad, &res)))
return error;
*createp += 1;
}
- /* Sesison setup */
+ /* Session setup */
memset (s0, 0, sizeof (*s0));
clib_memcpy_fast (s0, kvpp, sizeof (ct6_session_key_t));
s0->thread_index = my_thread_index;
/** \brief Delete NAT44 session
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request
- @param is_in - 1 if inside network addres and port pari, 0 if outside
+ @param is_in - 1 if inside network address and port pair, 0 if outside
@param ip_address - IPv4 address
@param protocol - IP protocol
@param port - port number
* @param port L4 port number
* @param proto L4 protocol
* @param vrf_id VRF ID
- * @param is_in 1 = inside network addres and por pair, 0 = outside
+ * @param is_in 1 = inside network address and port pair, 0 = outside
*
* @return 0 on success, non-zero value otherwise
*/
* @param port L4 port number
* @param proto L4 protocol
* @param vrf_id VRF ID
- * @param is_in 1 = inside network addres and por pair, 0 = outside
+ * @param is_in 1 = inside network address and port pair, 0 = outside
*
* @return 0 on success, non-zero value otherwise
*/
*
* @param addresses vector of outside addresses
* @param thread_index thread index
- * @param k adddress, port and protocol
+ * @param k address, port and protocol
*/
void snat_free_outside_address_and_port (snat_address_t * addresses,
u32 thread_index,
goto done;
case VNET_API_ERROR_INVALID_VALUE:
error =
- clib_error_return (0, "Outside addres %U and port %u already in use.",
+ clib_error_return (0,
+ "Outside address %U and port %u already in use.",
format_ip4_address, &out_addr, out_port);
goto done;
case VNET_API_ERROR_INVALID_VALUE_2:
bti = bier_table_add_or_lock(&bt_0_0_0_256, 1600);
/*
- * Add a BIER dispoition table
+ * Add a BIER disposition table
*/
const u32 bier_disp_tbl_id = 1;
index_t bdti1;
bdti1 = bier_disp_table_add_or_lock(bier_disp_tbl_id);
/*
- * add a bit-poistion in the table that resolves via
+ * add a bit-position in the table that resolves via
* DISP table, i.e. a for-us bit-position
*/
fib_route_path_t *paths_via_disp = NULL, path_via_disp = {
}
/*
- * Callback to blow up spectacularly if anthing remains in the table
+ * Callback to blow up spectacularly if anything remains in the table
*/
static void
count_items (BVT (clib_bihash_kv) * kvp, void *notused)
event_t *ep;
ep = add_ep++;
- ep->time = (ulonglong) (delta * 1e9); /* time in intger nanoseconds */
+ ep->time = (ulonglong) (delta * 1e9); /* time in integer nanoseconds */
ep->pid = find_or_add_pid(track);
ep->code = event;
ep->datum = index;
vlib_main_t **vlib_mains = &__bootstrap_vlib_main_vector.vm;
-/* When dubugging validate that given buffers are either known allocated
+/* When debugging validate that given buffers are either known allocated
or known free. */
void
vlib_buffer_validate_alloc_free (vlib_main_t * vm,
/**
* @file
- * Circular joournal diagnostic mechanism.
+ * Circular journal diagnostic mechanism.
*
* The @c cj thread-safe circular log buffer scheme is occasionally useful
* when chasing bugs. Calls to it should not be checked in.
/*?
* Configure the circular journal diagnostic mechanism. This is only useful
- * if you, the deveoper, have written code to make use of the circular
+ * if you, the developer, have written code to make use of the circular
* journal.
*
* @cfgcmd{records, <number>}
/*?
* Enable, disable the collection of diagnostic data into a
* circular journal or dump the circular journal diagnostic data.
- * This is only useful if you, the deveoper, have written code to make
+ * This is only useful if you, the developer, have written code to make
* use of the circular journal.
*
* When dumping the data it is formatted and sent to @c stderr of the
* @param str The buffer in which to search for the value.
* @param len The depth into the buffer to search.
*
- * @return The index of the first occurence of \c chr. If \c chr is not
+ * @return The index of the first occurrence of \c chr. If \c chr is not
* found then \c len instead.
*/
always_inline word
*
* If instead @c line is @c NULL then @c len_or_index is taken to mean the
* index of an existing line in the pager buffer; this simply means that the
- * input line does not need to be cloned since we alreayd have it. This is
+ * input line does not need to be cloned since we already have it. This is
* typical if we are reindexing the pager buffer.
*
* @param cf The CLI session whose pager we are adding to.
case IP_LOOKUP_NEXT_ICMP_ERROR:
case IP_LOOKUP_N_NEXT:
/*
- * these adjcencey types are terminal graph nodes, so there's no
+ * these adjacency types are terminal graph nodes, so there's no
* possibility of a loop down here.
*/
break;
}
/*
- * Context for the walk to update the cached feture flags.
+ * Context for the walk to update the cached feature flags.
*/
typedef struct adj_feature_update_t_
{
}
/*?
- * Enabe/disble per-adjacency counters. This is optional because it comes with
- * a non-negligible performance cost.
+ * Enable/disable per-adjacency counters. This is optional because it comes
+ * with a non-negligible performance cost.
?*/
VLIB_CLI_COMMAND (adj_cli_counters_set_command, static) = {
.path = "adjacency counters",
{
/*
* lock the adj. add the delegate.
- * Lockinging the adj prevents it being removed and thus maintains
+ * Locking the adj prevents it being removed and thus maintains
* the BFD derived states
*/
adj_lock(ai);
/*
* it would be best here if we could ignore this create and just
- * wait for the first update, but this is not posible because
+ * wait for the first update, but this is not possible because
* BFD sessions are created in the down state, and can remain this
* way without transitioning to another state if the peer is
- * unresponxive. So we have to assuem down and wait for up.
+ * unresponsive. So we have to assume down and wait for up.
*/
abd->abd_state = ADJ_BFD_STATE_DOWN;
abd->abd_index = session->bs_idx;
case BFD_LISTEN_EVENT_UPDATE:
/*
- * state change up/dowm and
+ * state change up/down and
*/
abd = adj_bfd_from_base(adj_delegate_get(adj_get(ai), ADJ_DELEGATE_BFD));
{
/*
* has an associated BFD tracking delegate
- * remove the BFD tracking deletgate, update children, then
+ * remove the BFD tracking delegate, update children, then
* unlock the adj
*/
adj_delegate_remove(ai, ADJ_DELEGATE_BFD);
static adj_delegate_vft_t *ad_vfts;
/**
- * The value of the last dynamically allocated delegeate value
+ * The value of the last dynamically allocated delegate value
*/
static adj_delegate_type_t ad_max_id = ADJ_DELEGATE_LAST;
adj0[0].rewrite_header.max_l3_packet_bytes)))
{
/* Don't adjust the buffer for ttl issue; icmp-error node wants
- * to see the IP headerr */
+ * to see the IP header */
p0->current_data -= rw_len0;
p0->current_length += rw_len0;
tx_sw_if_index0 = adj0[0].rewrite_header.sw_if_index;
* adj_mcast_update_rewrite
*
* Update the adjacency's rewrite string. A NULL string implies the
- * rewirte is reset (i.e. when ARP/ND etnry is gone).
+ * rewrite is reset (i.e. when ARP/ND entry is gone).
* NB: the adj being updated may be handling traffic in the DP.
*/
void
* adj_mcast_midchain_update_rewrite
*
* Update the adjacency's rewrite string. A NULL string implies the
- * rewirte is reset (i.e. when ARP/ND etnry is gone).
+ * rewrite is reset (i.e. when ARP/ND entry is gone).
* NB: the adj being updated may be handling traffic in the DP.
*/
void
adj = adj_get(adj_index);
/*
- * one time only update. since we don't support chainging the tunnel
+ * one time only update. since we don't support changing the tunnel
* src,dst, this is all we need.
*/
ASSERT(adj->lookup_next_index == IP_LOOKUP_NEXT_MCAST);
* adj_nbr_midchain_update_rewrite
*
* Update the adjacency's rewrite string. A NULL string implies the
- * rewrite is reset (i.e. when ARP/ND etnry is gone).
+ * rewrite is reset (i.e. when ARP/ND entry is gone).
* NB: the adj being updated may be handling traffic in the DP.
*/
void
adj = adj_get(adj_index);
/*
- * one time only update. since we don't support chainging the tunnel
+ * one time only update. since we don't support changing the tunnel
* src,dst, this is all we need.
*/
ASSERT((adj->lookup_next_index == IP_LOOKUP_NEXT_ARP) ||
adj_midchain_setup(adj_index, fixup, fixup_data, flags);
/*
- * update the rewirte with the workers paused.
+ * update the rewrite with the workers paused.
*/
adj_nbr_update_rewrite_internal(adj,
IP_LOOKUP_NEXT_MIDCHAIN,
{
/*
* The entry this midchain links to is already in the set
- * of visisted entries, this is a loop
+ * of visited entries, this is a loop
*/
adj->ia_flags |= ADJ_FLAG_MIDCHAIN_LOOPED;
return (1);
* adj_nbr_update_rewrite
*
* Update the adjacency's rewrite string. A NULL string implies the
- * rewirte is reset (i.e. when ARP/ND etnry is gone).
+ * rewrite is reset (i.e. when ARP/ND etnry is gone).
* NB: the adj being updated may be handling traffic in the DP.
*/
void
* adj_nbr_update_rewrite_internal
*
* Update the adjacency's rewrite string. A NULL string implies the
- * rewirte is reset (i.e. when ARP/ND etnry is gone).
+ * rewrite is reset (i.e. when ARP/ND etnry is gone).
* NB: the adj being updated may be handling traffic in the DP.
*/
void
{
/*
* The link type MPLS has no children in the control plane graph, it only
- * has children in the data-palne graph. The backwalk is up the former.
+ * has children in the data-plane graph. The backwalk is up the former.
* So we need to walk from its IP cousin.
*/
walk_ai = adj_nbr_find(adj->ia_nh_proto,
* lock the adjacencies that are affected by updates this walk will provoke.
* Since the aim of the walk is to update children to link to a different
* DPO, this adj will no longer be in use and its lock count will drop to 0.
- * We don't want it to be deleted as part of this endevour.
+ * We don't want it to be deleted as part of this endeavour.
*/
adj_lock(adj_get_index(adj));
adj_lock(walk_ai);
* ideally we would only want to suspend forwarding via this adj whilst we
* do this, but we do not have that level of granularity - it's suspend all
* worker threads or nothing.
- * The other chioces are:
+ * The other choices are:
* - to mark the adj down and back walk so child load-balances drop this adj
* from the set.
* - update the next_node index of this adj to point to error-drop
* node. So from the options above, updating the next_node of the adj to
* be drop will work, but it relies on each graph node v4/v6/mpls, rewrite/
* arp/midchain always be valid w.r.t. a mis-match of adj type and node type
- * (i.e. a rewrite adj in the arp node). This is not enforcable. Getting it
+ * (i.e. a rewrite adj in the arp node). This is not enforceable. Getting it
* wrong will lead to hard to find bugs since its a race condition. So we
* choose the more reliable method of updating the children to use the drop,
* then switching adj's type, then updating the children again. Did I mention
fib_node_back_walk_ctx_t bw_ctx = {
.fnbw_reason = FIB_NODE_BW_REASON_FLAG_ADJ_DOWN,
/*
- * force this walk to be synchrous. if we don't and a node in the graph
+ * force this walk to be synchronous. if we don't and a node in the graph
* (a heavily shared path-list) chooses to back-ground the walk (make it
* async) then it will pause and we will do the adj update below, before
* all the children are updated. not good.
next_node);
/*
- * done with the rewirte update - let the workers loose.
+ * done with the rewrite update - let the workers loose.
*/
vlib_worker_thread_barrier_release(vm);
adj0[0].rewrite_header.max_l3_packet_bytes)))
{
/* Don't adjust the buffer for ttl issue; icmp-error node wants
- * to see the IP headerr */
+ * to see the IP header */
p0->current_data -= rw_len0;
p0->current_length += rw_len0;
tx_sw_if_index0 = adj0[0].rewrite_header.sw_if_index;
/*
* bfd_api_hookup
* Add vpe's API message handlers to the table.
- * vlib has alread mapped shared memory and
+ * vlib has already mapped shared memory and
* added the client registration handlers.
* See .../vlib-api/vlibmemory/memclnt_vlib.c:memclnt_process()
*/
}
/*
- * Validate a bit poistion
+ * Validate a bit position
*/
#define BIER_BIT_POS_IS_VALID(_bp, _str) \
{ \
* limitations under the License.
*/
/**
- * bier_dispositon : The BIER dispositon object
+ * bier_dispositon : The BIER disposition object
*
- * A BIER dispositon object is present in the IP mcast output list
- * and represents the dispositon of a BIER bitmask. After BIER header
- * dispositon the packet is forward within the appropriate/specifid
+ * A BIER disposition object is present in the IP mcast output list
+ * and represents the disposition of a BIER bitmask. After BIER header
+ * disposition the packet is forward within the appropriate/specified
* BIER table
*/
static void
bier_disp_entry_dpo_mem_show (void)
{
- fib_show_memory_usage("BIER dispositon",
+ fib_show_memory_usage("BIER disposition",
pool_elts(bier_disp_entry_pool),
pool_len(bier_disp_entry_pool),
sizeof(bier_disp_entry_t));
if (0 == bfm->bfm_bits.bfmb_refs[BIER_BP_TO_INDEX(bp)])
{
/*
- * 0 -> 1 transistion - set the bit in the string
+ * 0 -> 1 transition - set the bit in the string
*/
bier_bit_string_set_bit(&bfm->bfm_bits.bfmb_input_reset_string, bp);
}
if (0 == bfm->bfm_bits.bfmb_refs[BIER_BP_TO_INDEX(bp)])
{
/*
- * 1 -> 0 transistion - clear the bit in the string
+ * 1 -> 0 transition - clear the bit in the string
*/
bier_bit_string_clear_bit(&bfm->bfm_bits.bfmb_input_reset_string, bp);
}
*
* The table's key is part of this DB key, since the fmasks therein build up
* their forwarding mask based on the routes that resolve through
- * it, so cross polination would be bad.
+ * it, so cross pollination would be bad.
*/
typedef struct bier_fmask_db_t_ {
/**
if (NULL == p) {
/*
- * remove a non-exitant entry - oops
+ * remove a non-existent entry - oops
*/
- ASSERT (!"remove non-existant fmask");
+ ASSERT (!"remove non-existent fmask");
} else {
hash_unset(bier_fmask_db.bfdb_hash, fmid);
}
*
* A BIER imposition object is present in the IP mcast output list
* and represents the imposition of a BIER bitmask. After BIER header
- * imposition the packet is forward within the appropriate/specifid
+ * imposition the packet is forward within the appropriate/specified
* BIER table
*/
/*
* use TTL 64 for the post enacp MPLS label/BIFT-ID
- * this we be decremeted in bier_output node.
+ * this we be decremented in bier_output node.
*/
vnet_buffer(b0)->mpls.ttl = 65;
bier_hdr_ntoh(bh0);
/*
- * In the MPLS decap node we squirelled away the
+ * In the MPLS decap node we squirrelled away the
* index for the BIER table as the tx adjacency
*/
bt_index0 = vnet_buffer(b0)->ip.adj_index[VLIB_TX];
#include <vnet/bier/bier_fmask.h>
/**
- * Struct maintining the per-worker thread data for BIER lookups
+ * Struct maintaining the per-worker thread data for BIER lookups
*/
typedef struct bier_lookup_main_t_
{
};
/*
- * Keep these values sematically the same as BIER output
+ * Keep these values semantically the same as BIER output
*/
#define foreach_bier_output_next \
_(DROP, "bier-drop")
extern vlib_combined_counter_main_t bier_fmask_counters;
/**
- * @brief Packet trace recoed for a BIER output
+ * @brief Packet trace record for a BIER output
*/
typedef struct bier_output_trace_t_
{
bier_bit_string_init_from_hdr(bh0, &bbs);
/*
- * In the BIER Lookup node we squirelled away the
+ * In the BIER Lookup node we squirrelled away the
* BIER fmask index as the adj index
*/
bfmi0 = vnet_buffer (b0)->ip.adj_index[VLIB_TX];
FIB_SOURCE_BIER);
/*
- * stack the entry on the forwarding chain prodcued by the
+ * stack the entry on the forwarding chain produced by the
* path-list via the ECMP tables.
*/
fib_path_list_contribute_forwarding(bt->bt_pl,
}
/*
- * no oppotunity to share, this the resolving ECMP tables are unique
+ * no opportunity to share, this the resolving ECMP tables are unique
* to this table.
* no need to be a child of the path list, we can do nothing with any
* notifications it would generate [not that it will].
u32 mask = n_slaves - 1;
#ifdef CLIB_HAVE_VEC256
- /* only lower 16 bits of hash due to single precision fp arithmetics */
+ /* only lower 16 bits of hash due to single precision fp arithmetic */
u32x8 mask8, sc8u, h8a, h8b;
f32x8 sc8f;
vlib_get_buffers (vm, from, bufs, n_left);
- /* active-backup mode, ship everyting to first sw if index */
+ /* active-backup mode, ship everything to first sw if index */
if ((bif->lb == BOND_LB_AB) || PREDICT_FALSE (n_slaves == 1))
{
sw_if_index = *vec_elt_at_index (bif->active_slaves, 0);
if (r == VNET_API_ERROR_SUBIF_ALREADY_EXISTS)
{
- error = clib_error_return (0, "Interface elready exists");
+ error = clib_error_return (0, "Interface already exists");
goto done;
}
dhcpv60 = vlib_buffer_get_current (b0);
ip0 = (void *) (b0->data + vnet_buffer (b0)->l3_hdr_offset);
- u32 dhcpv6_ip6_palyoad_offset =
+ u32 dhcpv6_ip6_payload_offset =
(u8 *) dhcpv60 - ((u8 *) ip0 + sizeof (*ip0));
options_length =
- ntohs (ip0->payload_length) - dhcpv6_ip6_palyoad_offset -
+ ntohs (ip0->payload_length) - dhcpv6_ip6_payload_offset -
sizeof (*dhcpv60);
clib_memset (&report, 0, sizeof (report));
dhcp6_reply_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
vlib_frame_t * f)
{
- /* These cross the longjmp boundry (vlib_process_wait_for_event)
+ /* These cross the longjmp boundary (vlib_process_wait_for_event)
* and need to be volatile - to prevent them from being optimized into
* a register - which could change during suspension */
dhcp6_pd_reply_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
vlib_frame_t * f)
{
- /* These cross the longjmp boundry (vlib_process_wait_for_event)
+ /* These cross the longjmp boundary (vlib_process_wait_for_event)
* and need to be volatile - to prevent them from being optimized into
* a register - which could change during suspension */
/*
* dhcp_api_hookup
* Add vpe's API message handlers to the table.
- * vlib has alread mapped shared memory and
+ * vlib has already mapped shared memory and
* added the client registration handlers.
* See .../vlib-api/vlibmemory/memclnt_vlib.c:memclnt_process()
*/
/*
* This loop is optimised not so we can really quickly process DHCp
* offers... but so we can quickly sift them out when the interface
- * is also receving 'normal' packets
+ * is also receiving 'normal' packets
*/
while (n_left_from >= 8 && n_left_to_next >= 4)
{
}
/* *INDENT-OFF* */
- foreach_ip_interface_address(lm4, ia, sw_if_index, 1 /* honor unnummbered */,
+ foreach_ip_interface_address(lm4, ia, sw_if_index, 1 /* honor unnumbered */,
({
src_address = ip_interface_address_get_address (lm4, ia);
goto found_src_address;
sw_if_index = fib_entry_get_resolving_interface (fei);
/* *INDENT-OFF* */
- foreach_ip_interface_address(lm6, ia, sw_if_index, 1 /* honor unnummbered */,
+ foreach_ip_interface_address(lm6, ia, sw_if_index, 1 /* honor unnumbered */,
({
src_address = ip_interface_address_get_address (lm6, ia);
goto found_src_address;
}
/* *INDENT-OFF* */
- foreach_ip_interface_address(lm4, ia, sw_if_index, 1 /* honor unnummbered */,
+ foreach_ip_interface_address(lm4, ia, sw_if_index, 1 /* honor unnumbered */,
({
src_address = ip_interface_address_get_address (lm4, ia);
goto found_src_address;
* applied to packets are they are switched through VPP.
*
* The DPO is a base class that is specialised by other objects to provide
- * concreate actions
+ * concrete actions
*
* The VLIB graph nodes are graph of types, the DPO graph is a graph of instances.
*/
* the third dimension in dpo_nodes is lost, hence, the edge index from each
* node MUST be the same.
* Including both the child and parent protocol is required to support the
- * case where it changes as the grapth is traversed, most notablly when an
+ * case where it changes as the graph is traversed, most notably when an
* MPLS label is popped.
*
* Note that this array is child type specific, not child instance specific.
static u32 ****dpo_edges;
/**
- * @brief The DPO type value that can be assigend to the next dynamic
+ * @brief The DPO type value that can be assigned to the next dynamic
* type registration.
*/
static dpo_type_t dpo_dynamic = DPO_LAST;
parent_proto, ~0);
/*
- * if the edge index has not yet been created for this node to node transistion
+ * if the edge index has not yet been created for this node to node transition
*/
if (~0 == dpo_edges[child_type][child_proto][parent_type][parent_proto])
{
dpo_copy(&tmp, parent);
/*
- * get the edge index for the parent to child VLIB graph transisition
+ * get the edge index for the parent to child VLIB graph transition
*/
tmp.dpoi_next_node = edge;
/*
* not maintaining a lock count on the drop
* more trouble than it's worth.
- * There always needs to be one around. no point it managaing its lifetime
+ * There always needs to be one around. no point it managing its lifetime
*/
}
static void
* Complete the remaining fields of the adj's rewrite to direct the
* complete of the rewrite at switch time by copying in the IP
* dst address's bytes.
- * Ofset is 2 bytes into the MAC desintation address.
+ * Offset is 2 bytes into the MAC destination address.
*/
adj_mcast_update_rewrite (ai, rewrite, offset);
/**
* @brief publish wildcard arp event
- * @param sw_if_index The interface on which the ARP entires are acted
+ * @param sw_if_index The interface on which the ARP entries are acted
*/
static int
vnet_arp_wc_publish (u32 sw_if_index,
}
/*
- * Remove any proxy arp entries asdociated with the
- * specificed fib.
+ * Remove any proxy arp entries associated with the
+ * specified fib.
*/
int
vnet_proxy_arp_fib_reset (u32 fib_id)
}
/*
- * Remove any arp entries asociated with the specificed interface
+ * Remove any arp entries associated with the specified interface
*/
static clib_error_t *
vnet_arp_delete_sw_interface (vnet_main_t * vnm, u32 sw_if_index, u32 is_add)
features_in_order = fm->feature_nodes[arc_index];
- /* If specificed, verify that the last node in the arc is actually last */
+ /* If specified, verify that the last node in the arc is actually last */
if (areg->last_in_arc && vec_len (features_in_order) > 0)
{
last_feature = features_in_order[vec_len (features_in_order) - 1];
}
/*
- * the special INVALID label meams we are not recursing via a
+ * the special INVALID label means we are not recursing via a
* label. Exp-null value is never a valid via-label so that
* also means it's not a via-label and means clients that set
* it to 0 by default get the expected behaviour
typedef struct fib_ae_import_t_
{
/**
- * The entry in the epxort table that this importer
+ * The entry in the export table that this importer
* is importing covereds from
*/
fib_node_index_t faei_export_entry;
} fib_ae_export_t;
/*
- * memory pools for the importers and exportes
+ * memory pools for the importers and exporters
*/
static fib_ae_import_t *fib_ae_import_pool;
static fib_ae_export_t *fib_ae_export_pool;
if (index < vec_len(import->faei_importeds))
{
/*
- * this is an entry that was previsouly imported
+ * this is an entry that was previously imported
*/
fib_table_entry_special_remove(import->faei_import_fib,
fib_entry_get_prefix(entry_index),
fib_node_index_t fei;
/*
- * save index for later post-realloc retreival
+ * save index for later post-realloc retrieval
*/
fei = fib_entry_get_index(fib_entry);
}
/**
- * \brief All the imported entries need to be pruged
+ * \brief All the imported entries need to be purged
*/
void
fib_attached_export_purge (fib_entry_t *fib_entry)
fib_entry_t *fib_entry;
/*
- * create and initiliase the new enty
+ * create and initialize the new enty
*/
fib_entry = fib_entry_alloc(fib_index, prefix, &fib_entry_index);
/**
* fib_entry_inherit
*
- * If the source on the cover is inherting then push this source
+ * If the source on the cover is inheriting then push this source
* down to the covered.
*/
void
fib_attached_export_cover_change(fib_entry);
/*
- * propagate the notificuation to each of the added sources
+ * propagate the notification to each of the added sources
*/
index = 0;
FOR_EACH_SRC_ADDED(fib_entry, esrc, source,
fib_attached_export_cover_update(fib_entry);
/*
- * propagate the notificuation to each of the added sources
+ * propagate the notification to each of the added sources
*/
index = 0;
FOR_EACH_SRC_ADDED(fib_entry, esrc, source,
}
/**
- * Return !0 is the entry is reoslved, i.e. will return a valid forwarding
+ * Return !0 is the entry is resolved, i.e. will return a valid forwarding
* chain
*/
int
const ip4_address_t * a2)
{
/*
- * IP addresses are unsiged ints. the return value here needs to be signed
+ * IP addresses are unsigned ints. the return value here needs to be signed
* a simple subtraction won't cut it.
- * If the addresses are the same, the sort order is undefiend, so phoey.
+ * If the addresses are the same, the sort order is undefined, so phoey.
*/
return ((clib_net_to_host_u32(a1->data_u32) >
clib_net_to_host_u32(a2->data_u32) ) ?
}
/**
- * Internal struct to hold user supplied paraneters for the cover walk
+ * Internal struct to hold user supplied parameters for the cover walk
*/
typedef struct fib_enty_cover_walk_ctx_t_ {
fib_entry_t *cover;
/*
* else
* the path does not refine the cover, meaning that
- * the adjacency doesdoes not match the sub-net on the link.
+ * the adjacency does/does not match the sub-net on the link.
* So this path does not contribute forwarding.
*/
break;
/*
* As an optimisation we allocate the vector of next-hops to be sized
- * equal to the maximum nuber of paths we will need, which is also the
+ * equal to the maximum number of paths we will need, which is also the
* most likely number we will need, since in most cases the paths are 'up'.
*/
vec_validate(ctx.next_hops, fib_path_list_get_n_paths(esrc->fes_pl));
/*
* the covered source is itself a COVERED_INHERIT, i.e.
* it also pushes this source down the sub-tree.
- * We consider this more specfic covered to be the owner
+ * We consider this more specific covered to be the owner
* of the sub-tree from this point down.
*/
return (FIB_TABLE_WALK_SUB_TREE_STOP);
{
/*
* The covered's source was not inherited and it is also
- * not inherting. Nevertheless, it still owns the sub-tree from
+ * not inheriting. Nevertheless, it still owns the sub-tree from
* this point down.
*/
return (FIB_TABLE_WALK_SUB_TREE_STOP);
/*
* the covered source is itself a COVERED_INHERIT, i.e.
* it also pushes this source down the sub-tree.
- * We consider this more specfic covered to be the owner
+ * We consider this more specific covered to be the owner
* of the sub-tree from this point down.
*/
return (FIB_TABLE_WALK_SUB_TREE_STOP);
{
/*
* The covered's source was not inherited and it is also
- * not inherting. Nevertheless, it still owns the sub-tree from
+ * not inheriting. Nevertheless, it still owns the sub-tree from
* this point down.
*/
return (FIB_TABLE_WALK_SUB_TREE_STOP);
fib_entry_t *cover;
/*
- * remove the depednecy on the covering entry
+ * remove the dependency on the covering entry
*/
if (FIB_NODE_INDEX_INVALID == src->u.adj.fesa_cover)
{
{
/*
* the cover has updated, i.e. its forwarding or flags
- * have changed. don't decativate/activate here, since this
+ * have changed. don't deactivate/activate here, since this
* prefix is updated during the covers walk.
*/
fib_entry_src_cover_res_t res = {
src->fes_pl = fib_path_list_create(pl_flags, paths);
/*
- * this is a hack to get the entry's prefix into the glean adjacnecy
- * so that it is available for fast retreival in the switch path.
+ * this is a hack to get the entry's prefix into the glean adjacency
+ * so that it is available for fast retrieval in the switch path.
*/
if (!(FIB_ENTRY_FLAG_LOCAL & src->fes_entry_flags))
{
fib_entry_t *cover;
/*
- * remove the depednecy on the covering entry
+ * remove the dependency on the covering entry
*/
if (FIB_NODE_INDEX_INVALID != src->u.interface.fesi_cover)
{
if (FIB_NODE_INDEX_INVALID != src->u.interpose.fesi_cover)
{
/*
- * remove the depednecy on the covering entry, if that's
+ * remove the dependency on the covering entry, if that's
* what was contributing the path-list
*/
cover = fib_entry_get(src->u.interpose.fesi_cover);
/*
* this function is called when this entry's cover has a more specific
- * entry inserted benaeth it. That does not necessarily mean that this
+ * entry inserted beneath it. That does not necessarily mean that this
* entry is covered by the new prefix. check that
*/
if (src->u.interpose.fesi_cover !=
fib_index = mpls_fib_index_from_table_id(MPLS_FIB_DEFAULT_TABLE_ID);
/*
- * if this is a change in label, reomve the old one first
+ * if this is a change in label, remove the old one first
*/
if (src->u.mpls.fesm_label != label)
{
* and there would be 2 locks on the path-list; one since its used
* by the cover, and 1 from here. The first lock will go when the
* cover is removed, the second, and last, when the covered walk
- * occurs during the cover's removel - this is not a place where
+ * occurs during the cover's removal - this is not a place where
* we can handle last lock gone.
* In short, don't let the loop form. The usual rules of 'we must
* let it form so we know when it breaks' don't apply here, since
fib_entry_t *cover;
/*
- * remove the depednecy on the covering entry
+ * remove the dependency on the covering entry
*/
if (FIB_NODE_INDEX_INVALID != src->u.rr.fesr_cover)
{
tunnel_index0 = last_tunnel_index;
t0 = pool_elt_at_index (vxm->tunnels, tunnel_index0);
- /* Validate GENEVE tunnel encap-fib index agaist packet */
+ /* Validate GENEVE tunnel encap-fib index against packet */
if (PREDICT_FALSE (validate_geneve_fib (b0, t0, is_ip4) == 0))
{
error0 = GENEVE_ERROR_NO_SUCH_TUNNEL;
tunnel_index0 = last_tunnel_index;
t0 = pool_elt_at_index (vxm->tunnels, tunnel_index0);
- /* Validate GENEVE tunnel encap-fib index agaist packet */
+ /* Validate GENEVE tunnel encap-fib index against packet */
if (PREDICT_FALSE (validate_geneve_fib (b0, t0, is_ip4) == 0))
{
error0 = GENEVE_ERROR_NO_SUCH_TUNNEL;
tunnel_index1 = last_tunnel_index;
t1 = pool_elt_at_index (vxm->tunnels, tunnel_index1);
- /* Validate GENEVE tunnel encap-fib index agaist packet */
+ /* Validate GENEVE tunnel encap-fib index against packet */
if (PREDICT_FALSE (validate_geneve_fib (b1, t1, is_ip4) == 0))
{
error1 = GENEVE_ERROR_NO_SUCH_TUNNEL;
tunnel_index1 = last_tunnel_index;
t1 = pool_elt_at_index (vxm->tunnels, tunnel_index1);
- /* Validate GENEVE tunnel encap-fib index agaist packet */
+ /* Validate GENEVE tunnel encap-fib index against packet */
if (PREDICT_FALSE (validate_geneve_fib (b1, t1, is_ip4) == 0))
{
error1 = GENEVE_ERROR_NO_SUCH_TUNNEL;
ip6_radv_t *radv_info;
ip6_address_t a;
- /* create solicited node multicast address for this interface adddress */
+ /* create solicited node multicast address for this interface address */
ip6_set_solicited_node_multicast_address (&a, 0);
a.as_u8[0xd] = address->as_u8[0xd];
* @file
* @brief IPv4 and IPv6 ICMP Ping.
*
- * This file contains code to suppport IPv4 or IPv6 ICMP ECHO_REQUEST to
+ * This file contains code to support IPv4 or IPv6 ICMP ECHO_REQUEST to
* network hosts.
*
*/
while (*junk_after_name && *junk_after_name != ' ')
junk_after_name++;
*junk_after_name = 0;
- s = format (s, "edit-funtion %s, ", function_name);
+ s = format (s, "edit-function %s, ", function_name);
vec_free (function_name);
}
u32 app_index; /**< Server app index */
u32 my_client_index; /**< API client handle */
- u32 node_index; /**< process node index for evnt scheduling */
+ u32 node_index; /**< process node index for event scheduling */
/*
* Config params
IP_VXLAN_GBP_BYPASS_NEXT_DROP,
IP_VXLAN_GBP_BYPASS_NEXT_VXLAN_GBP,
IP_VXLAN_GBP_BYPASS_N_NEXT,
-} ip_vxan_gbp_bypass_next_t;
+} ip_vxlan_gbp_bypass_next_t;
always_inline uword
ip_vxlan_gbp_bypass_inline (vlib_main_t * vm,
IP_VXLAN_BYPASS_NEXT_DROP,
IP_VXLAN_BYPASS_NEXT_VXLAN,
IP_VXLAN_BYPASS_N_NEXT,
-} ip_vxan_bypass_next_t;
+} ip_vxlan_bypass_next_t;
always_inline uword
ip_vxlan_gpe_bypass_inline (vlib_main_t * vm,
IP_VXLAN_BYPASS_NEXT_DROP,
IP_VXLAN_BYPASS_NEXT_VXLAN,
IP_VXLAN_BYPASS_N_NEXT,
-} ip_vxan_bypass_next_t;
+} ip_vxlan_bypass_next_t;
always_inline uword
ip_vxlan_bypass_inline (vlib_main_t * vm,
def add_template(self, template):
"""
- Add IPFIX tempalte
+ Add IPFIX template
:param template: IPFIX template
"""
@classmethod
def setUpClass(cls):
- # fork new process before clinet connects to VPP
+ # fork new process before client connects to VPP
cls.remote_test = RemoteClass(RemoteVppTestCase)
# start remote process
self.pg_start()
- # Pick first received frame and check if it's corectly encapsulated.
+ # Pick first received frame and check if it's correctly encapsulated.
out = self.pg0.get_capture(1)
pkt = out[0]
self.check_encapsulation(pkt, self.single_tunnel_bd)
self.pg_start()
- # Get packet from each tunnel and assert it's corectly encapsulated.
+ # Get packet from each tunnel and assert it's correctly encapsulated.
out = self.pg0.get_capture(self.n_ucast_tunnels)
for pkt in out:
self.check_encapsulation(pkt, self.ucast_flood_bd, True)
self.pg_start()
- # Pick first received frame and check if it's corectly encapsulated.
+ # Pick first received frame and check if it's correctly encapsulated.
out = self.pg0.get_capture(1)
pkt = out[0]
self.check_encapsulation(pkt, self.mcast_flood_bd,
# move VPP's SA to just before the seq-number wrap
self.vapi.cli("test ipsec sa %d seq 0xffffffff" % p.scapy_tra_sa_id)
- # then fire in a packet that VPP should drop becuase it causes the
- # seq number to wrap, unless we're using exteneded.
+ # then fire in a packet that VPP should drop because it causes the
+ # seq number to wrap unless we're using extended.
pkt = (Ether(src=self.tra_if.remote_mac,
dst=self.tra_if.local_mac) /
p.scapy_tra_sa.encrypt(IP(src=self.tra_if.remote_ip4,
# the application of ACLs to a forwarding path to achieve
# ABF
# So we construct just a few ACLs to ensure the ABF policies
- # are correclty constructed and used. And a few path types
+ # are correctly constructed and used. And a few path types
# to test the API path decoding.
#
super(TestDHCPv6DataPlane, self).tearDown()
def test_dhcp_ia_na_send_solicit_receive_advertise(self):
- """ Verify DHCPv6 IA NA Solicit packet and Advertise envent """
+ """ Verify DHCPv6 IA NA Solicit packet and Advertise event """
self.vapi.dhcp6_clients_enable_disable()
self.vapi.want_dhcp6_reply_events(enable_disable=0)
def test_dhcp_pd_send_solicit_receive_advertise(self):
- """ Verify DHCPv6 PD Solicit packet and Advertise envent """
+ """ Verify DHCPv6 PD Solicit packet and Advertise event """
self.vapi.dhcp6_clients_enable_disable()
self.send_advertise(ianaopts=noavail)
self.wait_for_solicit(is_resend=True)
- def test_preferred_greater_than_valit_lifetime(self):
+ def test_preferred_greater_than_valid_lifetime(self):
""" Preferred lifetime is greater than valid lifetime """
self.wait_for_solicit()
self.send_advertise(iapdopt=noavail)
self.wait_for_solicit(is_resend=True)
- def test_preferred_greater_than_valit_lifetime(self):
+ def test_preferred_greater_than_valid_lifetime(self):
""" Preferred lifetime is greater than valid lifetime """
try:
push_dot1q=93)
#
- # Disable UU flooding, learning and ARP terminaation. makes this test
+ # Disable UU flooding, learning and ARP termination. makes this test
# easier as unicast packets are dropped if not extracted.
#
self.vapi.bridge_flags(bd_id=1, is_set=0,
ip_layer = capture[0][IPv6]
if data_set is not None:
for record in data:
- # skip flow if in/out gress interface is 0
+ # skip flow if ingress/egress interface is 0
if int(binascii.hexlify(record[10]), 16) == 0:
continue
if int(binascii.hexlify(record[14]), 16) == 0:
self.wait_for_cflow_packet(self.collector, templates[1])
self.collector.get_capture(4)
- # disble IPFIX
+ # disable IPFIX
ipfix.disable_exporter()
self.pg_enable_capture([self.collector])
self.wait_for_cflow_packet(self.collector, templates[1])
self.collector.get_capture(4)
- # disble IPFIX
+ # disable IPFIX
ipfix.disable_flowprobe_feature()
self.pg_enable_capture([self.collector])
self.wait_for_cflow_packet(self.collector, templates[1], 5)
self.collector.get_capture(4)
- # disble FPP feature
+ # disable FPP feature
ipfix.disable_flowprobe_feature()
self.pg_enable_capture([self.collector])
self.send_and_expect_bridged(self.pg0, pkt_intra_epg * 65, self.pg1)
#
- # in the abscense of policy, endpoints in the different EPG
+ # in the absence of policy, endpoints in the different EPG
# cannot communicate
#
pkt_inter_epg_220_to_221 = (Ether(src=self.pg0.remote_mac,
eps[0].fip6))
#
- # From an EP to an outside addess: IN2OUT
+ # From an EP to an outside address: IN2OUT
#
pkt_inter_epg_220_to_global = (Ether(src=self.pg0.remote_mac,
dst=str(self.router_mac)) /
#
# The VXLAN GBP tunnel is a bridge-port and has L2 endpoint
- # leanring enabled
+ # learning enabled
#
vx_tun_l2_1 = VppGbpVxlanTunnel(
self, 99, bd1.bd_id,
self.assertTrue(find_route(self, ep.ip4.address, 32, table_id=1))
- # a packet with an sclass from an unknwon EPG
+ # a packet with an sclass from an unknown EPG
p = (Ether(src=self.pg2.remote_mac,
dst=self.pg2.local_mac) /
IP(src=self.pg2.remote_hosts[0].ip4,
self.pg2.remote_hosts[0].ip4,
99))
- # epg is not learnt, becasue the EPG is unknwon
+ # epg is not learnt, because the EPG is unknwon
self.assertEqual(len(self.vapi.gbp_endpoint_dump()), 1)
#
# Learn new EPs from IP packets
#
for ii, l in enumerate(learnt):
- # a packet with an sclass from a knwon EPG
+ # a packet with an sclass from a known EPG
# arriving on an unknown TEP
p = (Ether(src=self.pg2.remote_mac,
dst=self.pg2.local_mac) /
# Learn new EPs from GARP packets received on the BD's mcast tunnel
#
for ii, l in enumerate(learnt):
- # a packet with an sclass from a knwon EPG
+ # a packet with an sclass from a known EPG
# arriving on an unknown TEP
p = (Ether(src=self.pg2.remote_mac,
dst=self.pg2.local_mac) /
# Learn new EPs from L2 packets
#
for ii, l in enumerate(learnt):
- # a packet with an sclass from a knwon EPG
+ # a packet with an sclass from a known EPG
# arriving on an unknown TEP
p = (Ether(src=self.pg2.remote_mac,
dst=self.pg2.local_mac) /
# repeat. the do not learn bit is set so the EPs are not learnt
#
for l in learnt:
- # a packet with an sclass from a knwon EPG
+ # a packet with an sclass from a known EPG
p = (Ether(src=self.pg2.remote_mac,
dst=self.pg2.local_mac) /
IP(src=self.pg2.remote_hosts[1].ip4,
# repeat
#
for l in learnt:
- # a packet with an sclass from a knwon EPG
+ # a packet with an sclass from a known EPG
p = (Ether(src=self.pg2.remote_mac,
dst=self.pg2.local_mac) /
IP(src=self.pg2.remote_hosts[1].ip4,
# so the packet is cleared for delivery
#
for l in learnt:
- # a packet with an sclass from a knwon EPG
+ # a packet with an sclass from a known EPG
p = (Ether(src=self.pg2.remote_mac,
dst=self.pg2.local_mac) /
IP(src=self.pg2.remote_hosts[1].ip4,
# refresh the entries after the check for no replies above
#
for l in learnt:
- # a packet with an sclass from a knwon EPG
+ # a packet with an sclass from a known EPG
p = (Ether(src=self.pg2.remote_mac,
dst=self.pg2.local_mac) /
IP(src=self.pg2.remote_hosts[1].ip4,
# Check v6 Endpoints
#
for l in learnt:
- # a packet with an sclass from a knwon EPG
+ # a packet with an sclass from a known EPG
p = (Ether(src=self.pg2.remote_mac,
dst=self.pg2.local_mac) /
IP(src=self.pg2.remote_hosts[1].ip4,
#
# The VXLAN GBP tunnel is a bridge-port and has L2 endpoint
- # leanring enabled
+ # learning enabled
#
vx_tun_l2_1 = VppGbpVxlanTunnel(
self, 99, bd1.bd_id,
# Send to the static EP
#
for ii, l in enumerate(learnt):
- # a packet with an sclass from a knwon EPG
+ # a packet with an sclass from a known EPG
# arriving on an unknown TEP
p = (Ether(src=self.pg2.remote_mac,
dst=self.pg2.local_mac) /
#
# The VXLAN GBP tunnel is a bridge-port and has L2 endpoint
- # leanring enabled
+ # learning enabled
#
vx_tun_l3 = VppGbpVxlanTunnel(
self, 101, rd1.rd_id,
# learn some remote IPv4 EPs
#
for ii, l in enumerate(learnt):
- # a packet with an sclass from a knwon EPG
+ # a packet with an sclass from a known EPG
# arriving on an unknown TEP
p = (Ether(src=self.pg2.remote_mac,
dst=self.pg2.local_mac) /
# learn some remote IPv6 EPs
#
for ii, l in enumerate(learnt):
- # a packet with an sclass from a knwon EPG
+ # a packet with an sclass from a known EPG
# arriving on an unknown TEP
p = (Ether(src=self.pg2.remote_mac,
dst=self.pg2.local_mac) /
# learn some remote IPv4 EPs
#
for ii, l in enumerate(learnt):
- # a packet with an sclass from a knwon EPG
+ # a packet with an sclass from a known EPG
# arriving on an unknown TEP
p = (Ether(src=self.pg2.remote_mac,
dst=self.pg2.local_mac) /
rep_2.add_vpp_config()
#
- # Add a route to the leanred EP's v4 subnet
+ # Add a route to the learned EP's v4 subnet
# packets should be send on the v4/v6 uu=fwd interface resp.
#
se_10_1_24 = VppGbpSubnet(
rxs = self.send_and_expect(self.pg0, [p], self.pg4)
#
- # to appease the testcase we cannot have the registered EP stll
+ # to appease the testcase we cannot have the registered EP still
# present (because it's DP learnt) when the TC ends so wait until
# it is removed
#
rep.add_vpp_config()
#
- # ARP packet from External EPs are accpeted and replied to
+ # ARP packet from External EPs are accepted and replied to
#
p_arp = (Ether(src=eep1.mac, dst="ff:ff:ff:ff:ff:ff") /
Dot1Q(vlan=100) /
self.pg_start()
- # Pick first received frame and check if it's corectly encapsulated.
+ # Pick first received frame and check if it's correctly encapsulated.
out = self.pg0.get_capture(1)
pkt = out[0]
self.check_encapsulation(pkt, self.single_tunnel_bd)
self.pg_start()
- # Get packet from each tunnel and assert it's corectly encapsulated.
+ # Get packet from each tunnel and assert it's correctly encapsulated.
out = self.pg0.get_capture(self.n_ucast_tunnels)
for pkt in out:
self.check_encapsulation(pkt, self.ucast_flood_bd, True)
self.pg_start()
- # Pick first received frame and check if it's corectly encapsulated.
+ # Pick first received frame and check if it's correctly encapsulated.
out = self.pg0.get_capture(1)
pkt = out[0]
self.check_encapsulation(pkt, self.mcast_flood_bd,
[IgmpRecord(h1.sg, "Mode Is Include")])
#
- # Two source and group specific queires in qucik sucession, the
+ # Two source and group specific queries in quick succession, the
# first does not have VPPs source the second does. then vice-versa
#
self.send(self.pg0, [p_gs2, p_gs1])
#
# resend the join. wait for two queries and then send a current-state
- # record to include all sources. this should reset the exiry time
+ # record to include all sources. this should reset the expiry time
# on the sources and thus they will still be present in 2 seconds time.
# If the source timer was not refreshed, then the state would have
# expired in 3 seconds.
self.assertFalse(self.vapi.igmp_dump())
#
- # resend the join, then a leave. Router sends a gruop+source
+ # resend the join, then a leave. Router sends a group+source
# specific query containing both sources
#
self.send(self.pg0, p_j)
"239.1.1.3", "0.0.0.0", 1))
#
- # A 'allow sourcees' for {} should be ignored as it should
+ # A 'allow sources' for {} should be ignored as it should
# never be sent.
#
p_j = (Ether(dst=self.pg0.local_mac, src=self.pg0.remote_mac) /
# create a 2 pg interfaces
self.create_pg_interfaces(range(2))
- # pg0 we will use to experiemnt
+ # pg0 we will use to experiment
self.pg0.admin_up()
# pg1 is setup normally
# src,dst
# We are not going to ensure equal amounts of packets across each link,
# since the hash algorithm is statistical and therefore this can never
- # be guaranteed. But wuth 64 different packets we do expect some
+ # be guaranteed. But with 64 different packets we do expect some
# balancing. So instead just ensure there is traffic on each link.
#
self.send_and_expect_load_balancing(self.pg0, port_ip_pkts,
self.pg_start()
#
- # the number of packet recieved should be greater than 0,
+ # the number of packet received should be greater than 0,
# but not equal to the number sent, since some were policed
#
rx = self.pg1._get_capture(1)
self.assertLess(len(rx), len(pkts))
#
- # remove the poilcer. back to full rx
+ # remove the policer. back to full rx
#
self.vapi.ip_punt_police(policer.policer_index, is_add=0)
self.vapi.policer_add_del(b"ip4-punt", 400, 0, 10, 0,
#
# remove the duplicate on pg1
- # packet stream shoud generate NSs out of pg1
+ # packet stream should generate NSs out of pg1
#
ns_pg1.remove_vpp_config()
# decipher how to decode. this 1st layer of option always returns
# nested classes, so a direct obj1=obj2 comparison always fails.
# however, the getlayer(.., 2) does give one instnace.
- # so we cheat here and construct a new opt instnace for comparison
+ # so we cheat here and construct a new opt instance for comparison
rd = ICMPv6NDOptPrefixInfo(
prefixlen=raos.prefixlen,
prefix=raos.prefix,
self.send_and_assert_no_replies(self.pg0, pkts, "RA rate limited")
#
- # When we reconfiure the IPv6 RA config, we reset the RA rate limiting,
+ # When we reconfigure the IPv6 RA config,
+ # we reset the RA rate limiting,
# so we need to do this before each test below so as not to drop
# packets for rate limiting reasons. Test this works here.
#
opt=opt)
#
- # Use the reset to defults option to revert to defaults
+ # Use the reset to defaults option to revert to defaults
# L and A flag are clear in the advert
#
self.pg0.ip6_ra_prefix(self.pg0.local_ip6,
opt=opt)
#
- # Remove the first refix-info - expect the second is still in the
+ # Remove the first prefix-info - expect the second is still in the
# advert
#
self.pg0.ip6_ra_prefix(self.pg0.local_ip6,
opt=opt)
#
- # Remove the second prefix-info - expect no prefix-info i nthe adverts
+ # Remove the second prefix-info - expect no prefix-info in the adverts
#
self.pg0.ip6_ra_prefix(self.pg1.local_ip6,
self.pg1.local_ip6_prefix_len,
if entry.address_length == 0:
for path in entry.path:
if path.sw_if_index != 0xFFFFFFFF:
- defaut_route = {}
- defaut_route['sw_if_index'] = path.sw_if_index
- defaut_route['next_hop'] = path.next_hop
- list.append(defaut_route)
+ default_route = {}
+ default_route['sw_if_index'] = path.sw_if_index
+ default_route['next_hop'] = path.next_hop
+ list.append(default_route)
return list
@staticmethod
# create 2 pg interfaces
self.create_pg_interfaces(range(2))
- # PG0 is IP enalbed
+ # PG0 is IP enabled
self.pg0.admin_up()
self.pg0.config_ip6()
self.pg0.resolve_ndp()
src_ip_hdr))
#
- # A route for the IP pacekts
+ # A route for the IP packets
#
route_3000_1 = VppIpRoute(self, "3000::1", 128,
[VppRoutePath(self.pg1.remote_ip6,
# src,dst
# We are not going to ensure equal amounts of packets across each link,
# since the hash algorithm is statistical and therefore this can never
- # be guaranteed. But wuth 64 different packets we do expect some
+ # be guaranteed. But with 64 different packets we do expect some
# balancing. So instead just ensure there is traffic on each link.
#
self.send_and_expect_load_balancing(self.pg0, port_ip_pkts,
#
# The packets with Entropy label in should not load-balance,
- # since the Entorpy value is fixed.
+ # since the Entropy value is fixed.
#
self.send_and_expect_one_itf(self.pg0, port_ent_pkts, self.pg1)
self.pg_start()
#
- # the number of packet recieved should be greater than 0,
+ # the number of packet received should be greater than 0,
# but not equal to the number sent, since some were policed
#
rx = self.pg1._get_capture(1)
def verify_filter(self, capture, sent):
if not len(capture) == len(sent):
- # filter out any IPv6 RAs from the captur
+ # filter out any IPv6 RAs from the capture
for p in capture:
if (p.haslayer(IPv6)):
capture.remove(p)
#
# A (*,G).
# one accepting interface, pg0, 7 forwarding interfaces
- # many forwarding interfaces test the case where the replicare DPO
+ # many forwarding interfaces test the case where the replicate DPO
# needs to use extra cache lines for the buckets.
#
route_232_1_1_1 = VppIpMRoute(
rx = self.pg1.get_capture(2)
# Scapy defragment doesn't deal well with multiple layers
- # of samy type / Ethernet header first
+ # of same type / Ethernet header first
f = [p[1] for p in rx]
reass_pkt = defragment6(f)
self.validate(reass_pkt, p6_reply)
Below 4 cases are covered as part of this test
1) ipsec esp v4 transport basic test - IPv4 Transport mode
- scenario using HMAC-SHA1-96 intergrity algo
+ scenario using HMAC-SHA1-96 integrity algo
2) ipsec esp v4 transport burst test
Above test for 257 pkts
3) ipsec esp 4o4 tunnel basic test - IPv4 Tunnel mode
- scenario using HMAC-SHA1-96 intergrity algo
+ scenario using HMAC-SHA1-96 integrity algo
4) ipsec esp 4o4 tunnel burst test
Above test for 257 pkts
class TestIpsec6MultiTunIfEsp(TemplateIpsec, IpsecTun6):
- """ IPsec IPv6 Muitli Tunnel interface """
+ """ IPsec IPv6 Multi Tunnel interface """
encryption_type = ESP
tun6_encrypt_node_name = "esp6-encrypt"
bd_id=1, shg=0)
#
- # an unknown unicast and braodcast packets
+ # an unknown unicast and broadcast packets
#
p_uu = (Ether(dst="00:00:00:c1:5c:00",
src="00:00:de:ad:be:ef") /
Test scenario:
1.config
MAC learning enabled
- learn 100 MAC enries
+ learn 100 MAC entries
3 interfaces: untagged, dot1q, dot1ad (dot1q used instead of
dot1ad in the first version)
Test scenario:
1.config
MAC learning enabled
- learn 100 MAC enries
+ learn 100 MAC entries
3 interfaces: untagged, dot1q, dot1ad (dot1q used instead of
dot1ad in the first version)
self.vapi.ppcli("map params pre-resolve ip6-nh 4001::1")
self.send_and_assert_no_replies(self.pg0, v4,
- "resovled via default route")
+ "resolved via default route")
#
# Add a route to 4001::1. Expect the encapped traffic to be
self.verify_capture_ip4(self.pg0, rx, tx)
#
- # disposed packets have an invalid IPv4 checkusm
+ # disposed packets have an invalid IPv4 checksum
#
tx = self.create_stream_labelled_ip4(self.pg0, [VppMplsLabel(33)],
dst_ip=self.pg0.remote_ip4,
self.send_and_assert_no_replies(self.pg0, tx, "RPF-ID drop none")
#
- # set the RPF-ID of the enrtry to match the input packet's
+ # set the RPF-ID of the entry to match the input packet's
#
route_232_1_1_1.update_rpf_id(55)
self.verify_capture_ip4(self.pg1, rx, tx)
#
- # disposed packets have an invalid IPv4 checkusm
+ # disposed packets have an invalid IPv4 checksum
#
tx = self.create_stream_labelled_ip4(self.pg0, [VppMplsLabel(34)],
dst_ip="232.1.1.1", n=65,
self.send_and_assert_no_replies(self.pg0, tx, "RPF Miss")
#
- # set the RPF-ID of the enrtry to match the input packet's
+ # set the RPF-ID of the entry to match the input packet's
#
route_ff.update_rpf_id(55)
self.verify_capture_ip6_icmp(self.pg0, rx, tx)
#
- # set the RPF-ID of the enrtry to not match the input packet's
+ # set the RPF-ID of the entry to not match the input packet's
#
route_ff.update_rpf_id(56)
tx = self.create_stream_labelled_ip6(self.pg0,
self.tbl = VppMplsTable(self, 0)
self.tbl.add_vpp_config()
- # PG0 is MPLS enalbed
+ # PG0 is MPLS enabled
self.pg0.admin_up()
self.pg0.config_ip4()
self.pg0.resolve_arp()
rx0 = self.pg0._get_capture(1)
rx1 = self.pg1._get_capture(1)
- # not testig the LB hashing algorithm so we're not concerned
+ # not testing the LB hashing algorithm so we're not concerned
# with the split ratio, just as long as neither is 0
self.assertNotEqual(0, len(rx0))
self.assertNotEqual(0, len(rx1))
#
# use a test CLI command to stop the FIB walk process, this
# will prevent the FIB converging the VPN routes and thus allow
- # us to probe the interim (psot-fail, pre-converge) state
+ # us to probe the interim (post-fail, pre-converge) state
#
self.vapi.ppcli("test fib-walk-process disable")
#
# use a test CLI command to stop the FIB walk process, this
# will prevent the FIB converging the VPN routes and thus allow
- # us to probe the interim (psot-fail, pre-converge) state
+ # us to probe the interim (post-fail, pre-converge) state
#
self.vapi.ppcli("test fib-walk-process disable")
#
# use a test CLI command to stop the FIB walk process, this
# will prevent the FIB converging the VPN routes and thus allow
- # us to probe the interim (psot-fail, pre-converge) state
+ # us to probe the interim (post-fail, pre-converge) state
#
self.vapi.ppcli("test fib-walk-process disable")
self.assertEqual(rx0[0][Ether].src, payload[Ether].src)
#
- # Inject a packet from the custoer/L2 side
+ # Inject a packet from the customer/L2 side
#
tx1 = pcore[MPLS].payload * 65
rx1 = self.send_and_expect(self.pg1, tx1, self.pg0)
protocol=id_m.protocol,
is_add=0)
- adresses = self.vapi.nat44_address_dump()
- for addr in adresses:
+ addresses = self.vapi.nat44_address_dump()
+ for addr in addresses:
self.vapi.nat44_add_del_address_range(addr.ip_address,
addr.ip_address,
twice_nat=addr.twice_nat,
:param ip: IP address
:param is_add: 1 if add, 0 if delete (Default add)
- :param twice_nat: twice NAT address for extenal hosts
+ :param twice_nat: twice NAT address for external hosts
"""
nat_addr = socket.inet_pton(socket.AF_INET, ip)
self.vapi.nat44_add_del_address_range(nat_addr, nat_addr, is_add,
:param capture: Captured packets
:param nat_ip: Translated IP address (Default use global NAT address)
- :param same_port: Sorce port number is not translated (Default False)
+ :param same_port: Source port number is not translated (Default False)
:param dst_ip: Destination IP address (Default do not verify)
:param is_ip6: If L3 protocol is IPv6 (Default False)
"""
:param capture: Captured packets
:param nat_ip: Translated IP address
- :param same_port: Sorce port number is not translated (Default False)
+ :param same_port: Source port number is not translated (Default False)
:param dst_ip: Destination IP address (Default do not verify)
"""
return self.verify_capture_out(capture, nat_ip, same_port, dst_ip,
:param data: Payload data
:param proto: protocol (TCP, UDP, ICMP)
:param echo_reply: use echo_reply if protocol is ICMP
- :returns: Fragmets
+ :returns: Fragments
"""
if proto == IP_PROTOS.tcp:
p = (IP(src=src_if.remote_ip4, dst=dst) /
:param pref: NAT64 prefix
:param plen: NAT64 prefix length
:param fragsize: size of fragments
- :returns: Fragmets
+ :returns: Fragments
"""
if pref is None:
dst_ip6 = ''.join(['64:ff9b::', dst])
self.vapi.nat44_add_del_interface_addr(self.pg7.sw_if_index)
# no address in NAT pool
- adresses = self.vapi.nat44_address_dump()
- self.assertEqual(0, len(adresses))
+ addresses = self.vapi.nat44_address_dump()
+ self.assertEqual(0, len(addresses))
# configure interface address and check NAT address pool
self.pg7.config_ip4()
- adresses = self.vapi.nat44_address_dump()
- self.assertEqual(1, len(adresses))
- self.assertEqual(adresses[0].ip_address[0:4], self.pg7.local_ip4n)
+ addresses = self.vapi.nat44_address_dump()
+ self.assertEqual(1, len(addresses))
+ self.assertEqual(addresses[0].ip_address[0:4], self.pg7.local_ip4n)
# remove interface address and check NAT address pool
self.pg7.unconfig_ip4()
- adresses = self.vapi.nat44_address_dump()
- self.assertEqual(0, len(adresses))
+ addresses = self.vapi.nat44_address_dump()
+ self.assertEqual(0, len(addresses))
def test_interface_addr_static_mapping(self):
""" Static mapping with addresses from interface """
identity_mappings[0].sw_if_index)
def test_ipfix_nat44_sess(self):
- """ IPFIX logging NAT44 session created/delted """
+ """ IPFIX logging NAT44 session created/deleted """
self.ipfix_domain_id = 10
self.ipfix_src_port = 20202
- colector_port = 30303
+ collector_port = 30303
bind_layers(UDP, IPFIX, dport=30303)
self.nat44_add_address(self.nat_addr)
self.vapi.nat44_interface_add_del_feature(self.pg0.sw_if_index)
src_address=self.pg3.local_ip4n,
path_mtu=512,
template_interval=10,
- collector_port=colector_port)
+ collector_port=collector_port)
self.vapi.nat_ipfix_enable_disable(domain_id=self.ipfix_domain_id,
src_port=self.ipfix_src_port)
self.assertEqual(p[IP].src, self.pg3.local_ip4)
self.assertEqual(p[IP].dst, self.pg3.remote_ip4)
self.assertEqual(p[UDP].sport, self.ipfix_src_port)
- self.assertEqual(p[UDP].dport, colector_port)
+ self.assertEqual(p[UDP].dport, collector_port)
self.assertEqual(p[IPFIX].observationDomainID,
self.ipfix_domain_id)
if p.haslayer(Template):
self.vapi.nat44_interface_add_del_output_feature(self.pg1.sw_if_index,
is_inside=0)
- # session initiaded from service host - translate
+ # session initiated from service host - translate
pkts = self.create_stream_in(self.pg0, self.pg1)
self.pg0.add_stream(pkts)
self.pg_enable_capture(self.pg_interfaces)
capture = self.pg0.get_capture(len(pkts))
self.verify_capture_in(capture, self.pg0)
- # session initiaded from remote host - do not translate
+ # session initiated from remote host - do not translate
self.tcp_port_in = 60303
self.udp_port_in = 60304
self.icmp_id_in = 60305
:param capture: Captured packets
:param nat_ip: Translated IP address (Default use global NAT address)
- :param same_port: Sorce port number is not translated (Default False)
+ :param same_port: Source port number is not translated (Default False)
"""
if nat_ip is None:
nat_ip = self.nat_addr
self.vapi.nat64_add_del_interface_addr(self.pg4.sw_if_index)
# no address in NAT64 pool
- adresses = self.vapi.nat44_address_dump()
- self.assertEqual(0, len(adresses))
+ addresses = self.vapi.nat44_address_dump()
+ self.assertEqual(0, len(addresses))
# configure interface address and check NAT64 address pool
self.pg4.config_ip4()
# remove interface address and check NAT64 address pool
self.pg4.unconfig_ip4()
addresses = self.vapi.nat64_pool_addr_dump()
- self.assertEqual(0, len(adresses))
+ self.assertEqual(0, len(addresses))
@unittest.skipUnless(running_extended_tests, "part of extended tests")
def test_ipfix_max_bibs_sessions(self):
self.pg1._remote_hosts[9].ip4)
#
- # Add a hierachy of routes for a host in the sub-net.
+ # Add a hierarchy of routes for a host in the sub-net.
# Should still get an ARP resp since the cover is attached
#
p = (Ether(dst="ff:ff:ff:ff:ff:ff", src=self.pg1.remote_mac) /
#
# 2 - don't respond to ARP request from an address not within the
# interface's sub-net
- # 2b - to a prxied address
- # 2c - not within a differents interface's sub-net
+ # 2b - to a proxied address
+ # 2c - not within a different interface's sub-net
p = (Ether(dst="ff:ff:ff:ff:ff:ff", src=self.pg0.remote_mac) /
ARP(op="who-has",
hwsrc=self.pg0.remote_mac,
self.pg1.generate_remote_hosts(2)
#
- # Proxy ARP rewquest packets for each interface
+ # Proxy ARP request packets for each interface
#
arp_req_pg0 = (Ether(src=self.pg0.remote_mac,
dst="ff:ff:ff:ff:ff:ff") /
self.pg2.generate_remote_hosts(2)
#
- # Add a reoute with out going label via an ARP unresolved next-hop
+ # Add a route with out going label via an ARP unresolved next-hop
#
ip_10_0_0_1 = VppIpRoute(self, "10.0.0.1", 32,
[VppRoutePath(self.pg2.remote_hosts[1].ip4,
#
# remove the duplicate on pg1
- # packet stream shoud generate ARPs out of pg1
+ # packet stream should generate ARPs out of pg1
#
arp_pg1.remove_vpp_config()
self.pg1.remote_hosts[1].ip4)
#
- # set the mac address on the inteface that does not have a
+ # set the mac address on the interface that does not have a
# configured subnet and thus no glean
#
self.vapi.sw_interface_set_mac_address(self.pg2.sw_if_index,
mac=self.pg1.remote_hosts[3].mac))
#
- # GARPs (requets nor replies) for host we don't know yet
+ # GARPs (request nor replies) for host we don't know yet
# don't result in new neighbour entries
#
p1 = (Ether(dst="ff:ff:ff:ff:ff:ff",
# Test that VPP responds with ARP requests to addresses that
# are connected and local routes.
# Use one of the 'remote' addresses in the subnet as a local address
- # The intention of this route is that it then acts like a secondardy
+ # The intention of this route is that it then acts like a secondary
# address added to an interface
#
self.pg0.generate_remote_hosts(2)
self.pg1.sw_if_index,
enable=1)
- # test bi-drectional L2 flow pg0<->pg1
+ # test bi-directional L2 flow pg0<->pg1
p = (Ether(src=self.pg0.remote_mac,
dst=self.pg1.remote_mac) /
IP(src="1.1.1.1",
self.portsCheck[p] = 0
#
- # create stream with random pakets count per given ports
+ # create stream with random packets count per given ports
#
pkts = list()
for _ in range(0, self.nr_packets):
self.portsCheck[p] = 0
#
- # create stream with random pakets count per given ports
+ # create stream with random packets count per given ports
#
pkts = list()
for _ in range(0, self.nr_packets):
self.portsCheck[p] = 0
#
- # create stream with random pakets count per given ports
+ # create stream with random packets count per given ports
#
pkts = list()
for _ in range(0, self.nr_packets):
self.portsCheck[p] = 0
#
- # create stream with random pakets count per given ports
+ # create stream with random packets count per given ports
#
pkts = list()
for _ in range(0, self.nr_packets):
self.assertEqual(p[IPv6].tc, 1)
#
- # Enable QoS recrding on IP input for pg0
+ # Enable QoS recording on IP input for pg0
#
self.vapi.qos_record_enable_disable(self.pg0.sw_if_index,
QOS_SOURCE.IP,
self.assertEqual(p[IP].tos, 254)
#
- # clean-up the masp
+ # clean-up the map
#
self.vapi.qos_egress_map_delete(1)
self.vapi.qos_egress_map_delete(4)
self.assertIsNotNone(r, 'No response msg for add_del_table')
table_index = r.new_table_index
- # add the source routign node as a ip6 inacl netxt node
+ # add the source routing node as a ip6 inacl netxt node
r = self.vapi.add_node_next('ip6-inacl',
'sr-pl-rewrite-insert')
inacl_next_node_index = r.node_index
#!/usr/bin/env python
+import unittest
+
from framework import VppTestCase, VppTestRunner
from vpp_ip_route import VppIpTable
""" Source VRF Select IP4 """
#
- # packets destinet out of the 3 non-default table interfaces
+ # packets destined out of the 3 non-default table interfaces
#
pkts_0 = [(Ether(dst=self.pg0.local_mac, src=self.pg0.remote_mac) /
IP(src="1.1.1.1", dst=self.pg1.remote_ip4) /
#
# Add table 1001 & 1002 into which we'll add the routes
- # determing the source VRF selection
+ # determining the source VRF selection
#
table_ids = [101, 102]
""" Source VRF Select IP6 """
#
- # packets destinet out of the 3 non-default table interfaces
+ # packets destined out of the 3 non-default table interfaces
#
pkts_0 = [(Ether(dst=self.pg0.local_mac, src=self.pg0.remote_mac) /
IPv6(src="2001:1::1", dst=self.pg1.remote_ip6) /
#
# Add table 1001 & 1002 into which we'll add the routes
- # determing the source VRF selection
+ # determining the source VRF selection
#
table_ids = [101, 102]
#
# construct a UDP encap object through each of the peers
- # v4 through the first two peears, v6 through the second.
+ # v4 through the first two peers, v6 through the second.
#
udp_encap_0 = VppUdpEncap(self,
self.pg0.local_ip4,
self.pg_start()
- # Pick first received frame and check if it's corectly encapsulated.
+ # Pick first received frame and check if it's correctly encapsulated.
out = self.pg0.get_capture(1)
pkt = out[0]
self.check_encapsulation(pkt, self.single_tunnel_bd)
self.pg_start()
- # Get packet from each tunnel and assert it's corectly encapsulated.
+ # Get packet from each tunnel and assert it's correctly encapsulated.
out = self.pg0.get_capture(self.n_ucast_tunnels)
for pkt in out:
self.check_encapsulation(pkt, self.ucast_flood_bd, True)
class VppIpsecSpdItfBinding(VppObject):
"""
VPP SPD DB to interface binding
- (i.e. this SPD is used on this interfce)
+ (i.e. this SPD is used on this interface)
"""
def __init__(self, test, spd, itf):
:param outer_fib_id: (Default value = 0)
:param tunnel_type: (Default value = 0)
:param instance: (Default value = 0xFFFFFFFF)
- :param session_id: (Defalt value = 0)
+ :param session_id: (Default value = 0)
:param is_add: (Default value = 1)
:param is_ipv6: (Default value = 0)
"""
:param first_ip_address: First IP address
:param last_ip_address: Last IP address
:param vrf_id: VRF id for the address range
- :param twice_nat: twice NAT address for extenal hosts
+ :param twice_nat: twice NAT address for extenral hosts
:param is_add: 1 if add, 0 if delete (Default value = 1)
"""
return self.api(
"""Add/del NAT44 address from interface
:param sw_if_index: Software index of the interface
- :param twice_nat: twice NAT address for extenal hosts
+ :param twice_nat: twice NAT address for external hosts
:param is_add: 1 if add, 0 if delete (Default value = 1)
"""
return self.api(
is_add=1):
"""Add/delete NAT44 load-balancing static mapping rule backend
- :param external_addr: external IPv4 address of the servic
+ :param external_addr: external IPv4 address of the service
:param external_port: external L4 port number of the service
:param local_addr: IPv4 address of the internal node
:param local_port: L4 port number of the internal node
:param por: port number
:param protocol: IP protocol number
:param vrf_id: VRF ID
- :param is_in: 1 if inside network addres and port pari, 0 if outside
+ :param is_in: 1 if inside network address and port pair, 0 if outside
:param ext_host_address: external host IPv4 address
:param ext_host_port: external host port
"""
"""Dump NAT64 session table
:param protocol: IP protocol (Default value = 255, all STs)
- :returns: Dictionary of NAT64 sesstion table entries
+ :returns: Dictionary of NAT64 session table entries
"""
return self.api(self.papi.nat64_st_dump, {'proto': protocol})
"""Set HA failover (remote settings)
:param addr: failover IP4 address
- :param port: failvoer UDP port number
+ :param port: failover UDP port number
:param refresh: number of seconds after which to send session refresh
"""
return self.api(self.papi.nat_ha_set_failover,