aboutsummaryrefslogtreecommitdiffstats
path: root/tests/kubernetes/perf/container_memif/10ge2p1x520-eth-1drcl2xcbase-eth-2memif-1drcl2xc-1paral-k8s-ndrpdrdisc.robot
AgeCommit message (Collapse)AuthorFilesLines
2018-07-26CSIT-1065 High failure rate with K8s/Ligato orchestrationPeter Mikus1-302/+0
- Update Ligato Bootstrap for latest changes - Update Ligato Test cases for latest vpp-agent changes - Convert TC to new format - Add Hyperthreading support Change-Id: Id7c8513b01c66ee6c652b6294ddc50bc10be8f7d Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-07-09CSIT-1142 Change thread perf test TAGsPeter Mikus1-24/+24
Due to automatization of SMT detection this change is suppose to remove static thread/core tags in favor of dynamic one. Leaving the static tags for number of physical cores to be able to select TCs. Change-Id: I7f99f605821f363e45c333f46d1dea786693521b Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-05-09Report: Fix grepsTibor Frank1-1/+1
Change-Id: I450d5e9fa1cbd4a40caec68f3fc4674f744f1168 Signed-off-by: Tibor Frank <tifrank@cisco.com>
2018-02-19FIX: Ligato testsPeter Mikus1-24/+24
- update binary search - update VPP agent ver Change-Id: If93346f43fabc8afac28b1dcfa5c44433d53a1a4 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2018-01-17Rename Ligato testsPeter Mikus1-0/+302
- Rename Ligato tests - Change l2bdbasemacstat to l2bdbasemaclrn Change-Id: I8a24b04f1da285082ef6c3ac90c0be7f1d8588cc Signed-off-by: Peter Mikus <pmikus@cisco.com>
ight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
/*
 * Copyright (c) 2020 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef __CNAT_SESSION_H__
#define __CNAT_SESSION_H__

#include <vnet/udp/udp.h>

#include <cnat/cnat_types.h>
#include <cnat/cnat_client.h>
#include <cnat/bihash_40_48.h>


/**
 * A session represents the memory of a translation.
 * In the tx direction (from behind to in front of the NAT), the
 * session is preserved so subsequent packets follow the same path
 * even if the translation has been updated. In the tx direction
 * the session represents the swap from the VIP to the server address
 * In the RX direction the swap is from the server address/port to VIP.
 *
 * A session exists only as key and value in the bihash, there is no
 * pool for this object. If there were a pool, one would need to be
 * concerned about what worker is using it.
 */
typedef struct cnat_session_t_
{
  /**
   * this key sits in the same memory location a 'key' in the bihash kvp
   */
  struct
  {
    /**
     * IP 4/6 address in the rx/tx direction
     */
    ip46_address_t cs_ip[VLIB_N_DIR];

    /**
     * ports in rx/tx
     */
    u16 cs_port[VLIB_N_DIR];

    /**
     * The IP protocol TCP or UDP only supported
     */
    ip_protocol_t cs_proto;

    /**
     * The address family describing the IP addresses
     */
    u8 cs_af;

    /**
     * spare space
     */
    u8 __cs_pad[2];
  } key;
  /**
   * this value sits in the same memory location a 'value' in the bihash kvp
   */
  struct
  {
    /**
     * The IP address to translate to.
     */
    ip46_address_t cs_ip[VLIB_N_DIR];

    /**
     * the port to translate to.
     */
    u16 cs_port[VLIB_N_DIR];

    /**
     * The load balance object to use to forward
     */
    index_t cs_lbi;

    /**
     * Timestamp index this session was last used
     */
    u32 cs_ts_index;
    /**
     * Indicates a return path session that was source NATed
     * on the way in.
     */
    u32 flags;
  } value;
} cnat_session_t;

typedef enum cnat_session_flag_t_
{
  CNAT_SESSION_FLAG_HAS_SNAT = (1 << 0),
  CNAT_SESSION_FLAG_ALLOC_PORT = (1 << 1),
  CNAT_SESSION_FLAG_NO_CLIENT = (1 << 2),
} cnat_session_flag_t;

extern u8 *format_cnat_session (u8 * s, va_list * args);

/**
 * Ensure the session object correctly overlays the bihash key/value pair
 */
STATIC_ASSERT (STRUCT_OFFSET_OF (cnat_session_t, key) ==
	       STRUCT_OFFSET_OF (clib_bihash_kv_40_48_t, key),
	       "key overlaps");
STATIC_ASSERT (STRUCT_OFFSET_OF (cnat_session_t, value) ==
	       STRUCT_OFFSET_OF (clib_bihash_kv_40_48_t, value),
	       "value overlaps");
STATIC_ASSERT (sizeof (cnat_session_t) == sizeof (clib_bihash_kv_40_48_t),
	       "session kvp");

/**
 * The DB of sessions
 */
extern clib_bihash_40_48_t cnat_session_db;

/**
 * Callback function invoked during a walk of all translations
 */
typedef walk_rc_t (*cnat_session_walk_cb_t) (const cnat_session_t *
					     session, void *ctx);

/**
 * Walk/visit each of the cnat session
 */
extern void cnat_session_walk (cnat_session_walk_cb_t cb, void *ctx);

/**
 * Scan the session DB for expired sessions
 */
extern u64 cnat_session_scan (vlib_main_t * vm, f64 start_time, int i);

/**
 * Purge all the sessions
 */
extern int cnat_session_purge (void);

/*
 * fd.io coding-style-patch-verification: ON
 *
 * Local Variables:
 * eval: (c-set-style "gnu")
 * End:
 */

#endif