Compare commits
16 Commits
master
...
stable/240
Author | SHA1 | Date | |
---|---|---|---|
|
cd30ea1ddf | ||
|
a095e37d2a | ||
|
6e8b350a01 | ||
|
6244633428 | ||
|
55457075d9 | ||
|
4c872e9f75 | ||
|
6e0f70a035 | ||
|
d8d3ad99af | ||
|
2f93a43118 | ||
|
29ad53b932 | ||
|
2f06443855 | ||
|
13780d4383 | ||
|
1b955f9ee6 | ||
|
2ab34c8cb0 | ||
|
1121f0067c | ||
|
b3304b2b76 |
@ -2,3 +2,4 @@
|
||||
host=gerrit.fd.io
|
||||
port=29418
|
||||
project=vpp
|
||||
defaultbranch=stable/2406
|
||||
|
8
build/external/packages/octeon-roc.mk
vendored
8
build/external/packages/octeon-roc.mk
vendored
@ -2,12 +2,12 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://spdx.org/licenses/Apache-2.0.html
|
||||
|
||||
octeon-roc_version := 0.3
|
||||
octeon-roc_tarball := octeon-roc-v$(octeon-roc_version).tar.gz
|
||||
octeon-roc_tarball_md5sum := e4a16beb76a6c63af1600dd4d1d752b8
|
||||
octeon-roc_version := 0.5
|
||||
octeon-roc_tarball := v$(octeon-roc_version).tar.gz
|
||||
octeon-roc_tarball_md5sum := 76bc56c84935da944bbf340fe5283ef0
|
||||
|
||||
octeon-roc_tarball_strip_dirs := 1
|
||||
octeon-roc_url := https://github.com/MarvellEmbeddedProcessors/marvell-vpp/archive/refs/tags/$(octeon-roc_tarball)
|
||||
octeon-roc_url := https://github.com/MarvellEmbeddedProcessors/marvell-octeon-roc/archive/refs/tags/$(octeon-roc_tarball)
|
||||
|
||||
define octeon-roc_config_cmds
|
||||
@true
|
||||
|
@ -6,6 +6,7 @@ Release notes
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
v24.06
|
||||
v24.02
|
||||
v23.10
|
||||
v23.06
|
||||
|
500
docs/aboutvpp/releasenotes/v24.06.rst
Normal file
500
docs/aboutvpp/releasenotes/v24.06.rst
Normal file
File diff suppressed because it is too large
Load Diff
4
src/cmake/platform/octeon9.cmake
Normal file
4
src/cmake/platform/octeon9.cmake
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
set(VPP_PLATFORM_CACHE_LINE_SIZE 128)
|
||||
set(VPP_PLATFORM_MARCH_FLAGS -march=armv8.2-a+crc+crypto)
|
||||
set(VPP_PLATFORM_BUFFER_ALIGN 128)
|
@ -118,12 +118,24 @@ sha2_key_add (vnet_crypto_key_t *key, clib_sha2_type_t type)
|
||||
static int
|
||||
probe ()
|
||||
{
|
||||
#if defined(__SHA__) && defined(__x86_64__)
|
||||
#if defined(__x86_64__)
|
||||
|
||||
#if defined(__SHA__) && defined(__AVX512F__)
|
||||
if (clib_cpu_supports_sha () && clib_cpu_supports_avx512f ())
|
||||
return 30;
|
||||
#elif defined(__SHA__) && defined(__AVX2__)
|
||||
if (clib_cpu_supports_sha () && clib_cpu_supports_avx2 ())
|
||||
return 20;
|
||||
#elif defined(__SHA__)
|
||||
if (clib_cpu_supports_sha ())
|
||||
return 50;
|
||||
#elif defined(__ARM_FEATURE_SHA2)
|
||||
return 10;
|
||||
#endif
|
||||
|
||||
#elif defined(__aarch64__)
|
||||
#if defined(__ARM_FEATURE_SHA2)
|
||||
if (clib_cpu_supports_sha2 ())
|
||||
return 10;
|
||||
#endif
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# Copyright(c) 2022 Cisco Systems, Inc.
|
||||
|
||||
if (NOT VPP_PLATFORM_NAME STREQUAL "octeon10")
|
||||
if (NOT VPP_PLATFORM_NAME STREQUAL "octeon10" AND NOT VPP_PLATFORM_NAME STREQUAL "octeon9")
|
||||
return()
|
||||
endif()
|
||||
|
||||
@ -21,6 +21,10 @@ endif()
|
||||
|
||||
include_directories (${OCTEON_ROC_DIR}/)
|
||||
|
||||
if (VPP_PLATFORM_NAME STREQUAL "octeon9")
|
||||
add_compile_definitions(PLATFORM_OCTEON9)
|
||||
endif()
|
||||
|
||||
add_vpp_plugin(dev_octeon
|
||||
SOURCES
|
||||
init.c
|
||||
@ -31,6 +35,7 @@ add_vpp_plugin(dev_octeon
|
||||
rx_node.c
|
||||
tx_node.c
|
||||
flow.c
|
||||
counter.c
|
||||
|
||||
MULTIARCH_SOURCES
|
||||
rx_node.c
|
||||
|
338
src/plugins/dev_octeon/counter.c
Normal file
338
src/plugins/dev_octeon/counter.c
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -25,7 +25,7 @@ format_oct_nix_rx_cqe_desc (u8 *s, va_list *args)
|
||||
typeof (d->sg0) *sg0 = &d->sg0;
|
||||
typeof (d->sg0) *sg1 = &d->sg1;
|
||||
|
||||
s = format (s, "hdr: cqe_type %u nude %u q %u tag 0x%x", h->cqe_type,
|
||||
s = format (s, "hdr: cqe_type %u nude %u qid %u tag 0x%x", h->cqe_type,
|
||||
h->node, h->q, h->tag);
|
||||
s = format (s, "\n%Uparse:", format_white_space, indent);
|
||||
#define _(n, f) s = format (s, " " #n " " f, p->n)
|
||||
|
@ -141,6 +141,7 @@ oct_init_nix (vlib_main_t *vm, vnet_dev_t *dev)
|
||||
.config_change_validate = oct_port_cfg_change_validate,
|
||||
.format_status = format_oct_port_status,
|
||||
.format_flow = format_oct_port_flow,
|
||||
.clear_counters = oct_port_clear_counters,
|
||||
},
|
||||
.data_size = sizeof (oct_port_t),
|
||||
.initial_data = &oct_port,
|
||||
@ -159,6 +160,7 @@ oct_init_nix (vlib_main_t *vm, vnet_dev_t *dev)
|
||||
.alloc = oct_rx_queue_alloc,
|
||||
.free = oct_rx_queue_free,
|
||||
.format_info = format_oct_rxq_info,
|
||||
.clear_counters = oct_rxq_clear_counters,
|
||||
},
|
||||
},
|
||||
.tx_queue = {
|
||||
@ -173,6 +175,7 @@ oct_init_nix (vlib_main_t *vm, vnet_dev_t *dev)
|
||||
.alloc = oct_tx_queue_alloc,
|
||||
.free = oct_tx_queue_free,
|
||||
.format_info = format_oct_txq_info,
|
||||
.clear_counters = oct_txq_clear_counters,
|
||||
},
|
||||
},
|
||||
};
|
||||
@ -245,6 +248,7 @@ oct_init (vlib_main_t *vm, vnet_dev_t *dev)
|
||||
{
|
||||
case OCT_DEVICE_TYPE_RVU_PF:
|
||||
case OCT_DEVICE_TYPE_RVU_VF:
|
||||
case OCT_DEVICE_TYPE_LBK_VF:
|
||||
case OCT_DEVICE_TYPE_SDP_VF:
|
||||
return oct_init_nix (vm, dev);
|
||||
|
||||
|
@ -12,6 +12,12 @@
|
||||
#include <vnet/flow/flow.h>
|
||||
#include <vnet/udp/udp.h>
|
||||
#include <vnet/ipsec/esp.h>
|
||||
#include <vnet/ethernet/packet.h>
|
||||
#include <vnet/ip/ip_packet.h>
|
||||
#include <vnet/ip/icmp46_packet.h>
|
||||
#include <vnet/ip/igmp_packet.h>
|
||||
#include <vnet/gre/packet.h>
|
||||
#include <vxlan/vxlan.h>
|
||||
#include <base/roc_api.h>
|
||||
#include <dev_octeon/hw_defs.h>
|
||||
|
||||
@ -141,6 +147,17 @@ vnet_dev_rv_t oct_flow_validate_params (vlib_main_t *, vnet_dev_port_t *,
|
||||
vnet_dev_rv_t oct_flow_query (vlib_main_t *, vnet_dev_port_t *, u32, uword,
|
||||
u64 *);
|
||||
|
||||
/* counter.c */
|
||||
void oct_port_add_counters (vlib_main_t *, vnet_dev_port_t *);
|
||||
void oct_port_clear_counters (vlib_main_t *, vnet_dev_port_t *);
|
||||
void oct_rxq_clear_counters (vlib_main_t *, vnet_dev_rx_queue_t *);
|
||||
void oct_txq_clear_counters (vlib_main_t *, vnet_dev_tx_queue_t *);
|
||||
vnet_dev_rv_t oct_port_get_stats (vlib_main_t *, vnet_dev_port_t *);
|
||||
vnet_dev_rv_t oct_rxq_get_stats (vlib_main_t *, vnet_dev_port_t *,
|
||||
vnet_dev_rx_queue_t *);
|
||||
vnet_dev_rv_t oct_txq_get_stats (vlib_main_t *, vnet_dev_port_t *,
|
||||
vnet_dev_tx_queue_t *);
|
||||
|
||||
#define log_debug(dev, f, ...) \
|
||||
vlib_log (VLIB_LOG_LEVEL_DEBUG, oct_log.class, "%U: " f, \
|
||||
format_vnet_dev_addr, (dev), ##__VA_ARGS__)
|
||||
|
@ -124,6 +124,8 @@ oct_port_init (vlib_main_t *vm, vnet_dev_port_t *port)
|
||||
return rv;
|
||||
}
|
||||
|
||||
oct_port_add_counters (vm, port);
|
||||
|
||||
return VNET_DEV_OK;
|
||||
}
|
||||
|
||||
@ -172,6 +174,21 @@ oct_port_poll (vlib_main_t *vm, vnet_dev_port_t *port)
|
||||
vnet_dev_port_state_changes_t changes = {};
|
||||
int rrv;
|
||||
|
||||
if (oct_port_get_stats (vm, port))
|
||||
return;
|
||||
|
||||
foreach_vnet_dev_port_rx_queue (q, port)
|
||||
{
|
||||
if (oct_rxq_get_stats (vm, port, q))
|
||||
return;
|
||||
}
|
||||
|
||||
foreach_vnet_dev_port_tx_queue (q, port)
|
||||
{
|
||||
if (oct_txq_get_stats (vm, port, q))
|
||||
return;
|
||||
}
|
||||
|
||||
if (roc_nix_is_lbk (nix))
|
||||
{
|
||||
link_info.status = 1;
|
||||
@ -203,7 +220,8 @@ oct_port_poll (vlib_main_t *vm, vnet_dev_port_t *port)
|
||||
if (cd->speed != link_info.speed)
|
||||
{
|
||||
changes.change.link_speed = 1;
|
||||
changes.link_speed = link_info.speed;
|
||||
/* Convert to Kbps */
|
||||
changes.link_speed = link_info.speed * 1000;
|
||||
cd->speed = link_info.speed;
|
||||
}
|
||||
|
||||
@ -385,7 +403,7 @@ oct_validate_config_promisc_mode (vnet_dev_port_t *port, int enable)
|
||||
oct_device_t *cd = vnet_dev_get_data (dev);
|
||||
struct roc_nix *nix = cd->nix;
|
||||
|
||||
if (roc_nix_is_vf_or_sdp (nix))
|
||||
if (roc_nix_is_sdp (nix) || roc_nix_is_lbk (nix))
|
||||
return VNET_DEV_ERR_UNSUPPORTED_DEVICE;
|
||||
|
||||
return VNET_DEV_OK;
|
||||
@ -405,6 +423,9 @@ oct_op_config_promisc_mode (vlib_main_t *vm, vnet_dev_port_t *port, int enable)
|
||||
return oct_roc_err (dev, rv, "roc_nix_npc_promisc_ena_dis failed");
|
||||
}
|
||||
|
||||
if (!roc_nix_is_pf (nix))
|
||||
return VNET_DEV_OK;
|
||||
|
||||
rv = roc_nix_mac_promisc_mode_enable (nix, enable);
|
||||
if (rv)
|
||||
{
|
||||
|
@ -49,6 +49,12 @@ oct_plt_get_thread_index (void)
|
||||
return __os_thread_index;
|
||||
}
|
||||
|
||||
static u64
|
||||
oct_plt_get_cache_line_size (void)
|
||||
{
|
||||
return CLIB_CACHE_LINE_BYTES;
|
||||
}
|
||||
|
||||
static void
|
||||
oct_drv_physmem_free (vlib_main_t *vm, void *mem)
|
||||
{
|
||||
@ -178,4 +184,5 @@ oct_plt_init_param_t oct_plt_init_param = {
|
||||
.oct_plt_spinlock_unlock = oct_plt_spinlock_unlock,
|
||||
.oct_plt_spinlock_trylock = oct_plt_spinlock_trylock,
|
||||
.oct_plt_get_thread_index = oct_plt_get_thread_index,
|
||||
.oct_plt_get_cache_line_size = oct_plt_get_cache_line_size,
|
||||
};
|
||||
|
@ -165,6 +165,38 @@ oct_rx_batch (vlib_main_t *vm, oct_rx_node_ctx_t *ctx,
|
||||
return n;
|
||||
}
|
||||
|
||||
#ifdef PLATFORM_OCTEON9
|
||||
static_always_inline u32
|
||||
oct_rxq_refill (vlib_main_t *vm, vnet_dev_rx_queue_t *rxq, u16 n_refill)
|
||||
{
|
||||
u32 n_alloc, n_free;
|
||||
u32 buffer_indices[n_refill];
|
||||
vlib_buffer_t *buffers[n_refill];
|
||||
u8 bpi = vnet_dev_get_rx_queue_buffer_pool_index (rxq);
|
||||
oct_rxq_t *crq = vnet_dev_get_rx_queue_data (rxq);
|
||||
u64 aura = roc_npa_aura_handle_to_aura (crq->aura_handle);
|
||||
const uint64_t addr =
|
||||
roc_npa_aura_handle_to_base (crq->aura_handle) + NPA_LF_AURA_OP_FREE0;
|
||||
|
||||
if (n_refill < 256)
|
||||
return 0;
|
||||
|
||||
n_alloc = vlib_buffer_alloc (vm, buffer_indices, n_refill);
|
||||
if (PREDICT_FALSE (n_alloc < n_refill))
|
||||
goto alloc_fail;
|
||||
|
||||
vlib_get_buffers (vm, buffer_indices, (vlib_buffer_t **) buffers, n_alloc);
|
||||
|
||||
for (n_free = 0; n_free < n_alloc; n_free++)
|
||||
roc_store_pair ((u64) buffers[n_free], aura, addr);
|
||||
|
||||
return n_alloc;
|
||||
|
||||
alloc_fail:
|
||||
vlib_buffer_unalloc_to_pool (vm, buffer_indices, n_alloc, bpi);
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
static_always_inline void
|
||||
oct_rxq_refill_batch (vlib_main_t *vm, u64 lmt_id, u64 addr,
|
||||
oct_npa_lf_aura_batch_free_line_t *lines, u32 *bi,
|
||||
@ -260,6 +292,7 @@ oct_rxq_refill (vlib_main_t *vm, vnet_dev_rx_queue_t *rxq, u16 n_refill)
|
||||
|
||||
return n_enq;
|
||||
}
|
||||
#endif
|
||||
|
||||
static_always_inline void
|
||||
oct_rx_trace (vlib_main_t *vm, vlib_node_runtime_t *node,
|
||||
|
@ -32,6 +32,44 @@ typedef struct
|
||||
lmt_line_t *lmt_lines;
|
||||
} oct_tx_ctx_t;
|
||||
|
||||
#ifdef PLATFORM_OCTEON9
|
||||
static_always_inline u32
|
||||
oct_batch_free (vlib_main_t *vm, oct_tx_ctx_t *ctx, vnet_dev_tx_queue_t *txq)
|
||||
{
|
||||
oct_txq_t *ctq = vnet_dev_get_tx_queue_data (txq);
|
||||
u16 off = ctq->hdr_off;
|
||||
u64 ah = ctq->aura_handle;
|
||||
u32 n_freed = 0, n;
|
||||
|
||||
ah = ctq->aura_handle;
|
||||
|
||||
if ((n = roc_npa_aura_op_available (ah)) >= 32)
|
||||
{
|
||||
u64 buffers[n];
|
||||
u32 bi[n];
|
||||
|
||||
n_freed = roc_npa_aura_op_bulk_alloc (ah, buffers, n, 0, 1);
|
||||
vlib_get_buffer_indices_with_offset (vm, (void **) &buffers, bi, n_freed,
|
||||
off);
|
||||
vlib_buffer_free_no_next (vm, bi, n_freed);
|
||||
}
|
||||
|
||||
return n_freed;
|
||||
}
|
||||
|
||||
static_always_inline void
|
||||
oct_lmt_copy (void *lmt_addr, u64 io_addr, void *desc, u64 dwords)
|
||||
{
|
||||
u64 lmt_status;
|
||||
|
||||
do
|
||||
{
|
||||
roc_lmt_mov_seg (lmt_addr, desc, dwords);
|
||||
lmt_status = roc_lmt_submit_ldeor (io_addr);
|
||||
}
|
||||
while (lmt_status == 0);
|
||||
}
|
||||
#else
|
||||
static_always_inline u32
|
||||
oct_batch_free (vlib_main_t *vm, oct_tx_ctx_t *ctx, vnet_dev_tx_queue_t *txq)
|
||||
{
|
||||
@ -133,6 +171,7 @@ oct_batch_free (vlib_main_t *vm, oct_tx_ctx_t *ctx, vnet_dev_tx_queue_t *txq)
|
||||
|
||||
return n_freed;
|
||||
}
|
||||
#endif
|
||||
|
||||
static_always_inline u8
|
||||
oct_tx_enq1 (vlib_main_t *vm, oct_tx_ctx_t *ctx, vlib_buffer_t *b,
|
||||
@ -158,6 +197,11 @@ oct_tx_enq1 (vlib_main_t *vm, oct_tx_ctx_t *ctx, vlib_buffer_t *b,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef PLATFORM_OCTEON9
|
||||
/* Override line for Octeon9 */
|
||||
line = ctx->lmt_lines;
|
||||
#endif
|
||||
|
||||
if (!simple && flags & VLIB_BUFFER_NEXT_PRESENT)
|
||||
{
|
||||
u8 n_tail_segs = 0;
|
||||
@ -238,8 +282,12 @@ oct_tx_enq1 (vlib_main_t *vm, oct_tx_ctx_t *ctx, vlib_buffer_t *b,
|
||||
t->sw_if_index = vnet_buffer (b)->sw_if_index[VLIB_TX];
|
||||
}
|
||||
|
||||
#ifdef PLATFORM_OCTEON9
|
||||
oct_lmt_copy (line, ctx->lmt_ioaddr, &d, n_dwords);
|
||||
#else
|
||||
for (u32 i = 0; i < n_dwords; i++)
|
||||
line->dwords[i] = d.as_u128[i];
|
||||
#endif
|
||||
|
||||
*dpl = n_dwords;
|
||||
*n = *n + 1;
|
||||
@ -252,7 +300,7 @@ oct_tx_enq16 (vlib_main_t *vm, oct_tx_ctx_t *ctx, vnet_dev_tx_queue_t *txq,
|
||||
vlib_buffer_t **b, u32 n_pkts, int trace)
|
||||
{
|
||||
u8 dwords_per_line[16], *dpl = dwords_per_line;
|
||||
u64 lmt_arg, ioaddr, n_lines;
|
||||
u64 __attribute__ ((unused)) lmt_arg, ioaddr, n_lines;
|
||||
u32 n_left, or_flags_16 = 0, n = 0;
|
||||
const u32 not_simple_flags =
|
||||
VLIB_BUFFER_NEXT_PRESENT | VNET_BUFFER_F_OFFLOAD;
|
||||
@ -331,6 +379,7 @@ oct_tx_enq16 (vlib_main_t *vm, oct_tx_ctx_t *ctx, vnet_dev_tx_queue_t *txq,
|
||||
if (PREDICT_FALSE (!n_lines))
|
||||
return n_pkts;
|
||||
|
||||
#ifndef PLATFORM_OCTEON9
|
||||
if (PREDICT_FALSE (or_flags_16 & VLIB_BUFFER_NEXT_PRESENT))
|
||||
{
|
||||
dpl = dwords_per_line;
|
||||
@ -359,6 +408,7 @@ oct_tx_enq16 (vlib_main_t *vm, oct_tx_ctx_t *ctx, vnet_dev_tx_queue_t *txq,
|
||||
}
|
||||
|
||||
roc_lmt_submit_steorl (lmt_arg, ioaddr);
|
||||
#endif
|
||||
|
||||
return n_pkts;
|
||||
}
|
||||
@ -375,7 +425,11 @@ VNET_DEV_NODE_FN (oct_tx_node)
|
||||
u32 *from = vlib_frame_vector_args (frame);
|
||||
u32 n, n_enq, n_left, n_pkts = frame->n_vectors;
|
||||
vlib_buffer_t *buffers[VLIB_FRAME_SIZE + 8], **b = buffers;
|
||||
#ifdef PLATFORM_OCTEON9
|
||||
u64 lmt_id = 0;
|
||||
#else
|
||||
u64 lmt_id = vm->thread_index << ROC_LMT_LINES_PER_CORE_LOG2;
|
||||
#endif
|
||||
|
||||
oct_tx_ctx_t ctx = {
|
||||
.node = node,
|
||||
|
@ -54,7 +54,7 @@ vnet_dev_counters_clear (vlib_main_t *vm, vnet_dev_counter_main_t *cm)
|
||||
{
|
||||
for (int i = 0; i < cm->n_counters; i++)
|
||||
{
|
||||
cm->counter_start[i] = cm->counter_data[i];
|
||||
cm->counter_start[i] += cm->counter_data[i];
|
||||
cm->counter_data[i] = 0;
|
||||
}
|
||||
}
|
||||
|
@ -115,6 +115,7 @@ typedef struct
|
||||
vnet_dev_rx_queue_op_t *start;
|
||||
vnet_dev_rx_queue_op_no_rv_t *stop;
|
||||
vnet_dev_rx_queue_op_no_rv_t *free;
|
||||
vnet_dev_rx_queue_op_no_rv_t *clear_counters;
|
||||
format_function_t *format_info;
|
||||
} vnet_dev_rx_queue_ops_t;
|
||||
|
||||
@ -124,6 +125,7 @@ typedef struct
|
||||
vnet_dev_tx_queue_op_t *start;
|
||||
vnet_dev_tx_queue_op_no_rv_t *stop;
|
||||
vnet_dev_tx_queue_op_no_rv_t *free;
|
||||
vnet_dev_tx_queue_op_no_rv_t *clear_counters;
|
||||
format_function_t *format_info;
|
||||
} vnet_dev_tx_queue_ops_t;
|
||||
|
||||
@ -245,6 +247,7 @@ typedef struct
|
||||
vnet_dev_port_op_no_rv_t *stop;
|
||||
vnet_dev_port_op_no_rv_t *deinit;
|
||||
vnet_dev_port_op_no_rv_t *free;
|
||||
vnet_dev_port_op_no_rv_t *clear_counters;
|
||||
format_function_t *format_status;
|
||||
format_function_t *format_flow;
|
||||
} vnet_dev_port_ops_t;
|
||||
|
@ -733,16 +733,26 @@ vnet_dev_port_if_remove (vlib_main_t *vm, vnet_dev_port_t *port)
|
||||
void
|
||||
vnet_dev_port_clear_counters (vlib_main_t *vm, vnet_dev_port_t *port)
|
||||
{
|
||||
if (port->counter_main)
|
||||
if (port->port_ops.clear_counters)
|
||||
port->port_ops.clear_counters (vm, port);
|
||||
else if (port->counter_main)
|
||||
vnet_dev_counters_clear (vm, port->counter_main);
|
||||
|
||||
foreach_vnet_dev_port_rx_queue (q, port)
|
||||
if (q->counter_main)
|
||||
vnet_dev_counters_clear (vm, q->counter_main);
|
||||
{
|
||||
if (port->rx_queue_ops.clear_counters)
|
||||
port->rx_queue_ops.clear_counters (vm, q);
|
||||
else if (q->counter_main)
|
||||
vnet_dev_counters_clear (vm, q->counter_main);
|
||||
}
|
||||
|
||||
foreach_vnet_dev_port_tx_queue (q, port)
|
||||
if (q->counter_main)
|
||||
vnet_dev_counters_clear (vm, q->counter_main);
|
||||
{
|
||||
if (port->tx_queue_ops.clear_counters)
|
||||
port->tx_queue_ops.clear_counters (vm, q);
|
||||
else if (q->counter_main)
|
||||
vnet_dev_counters_clear (vm, q->counter_main);
|
||||
}
|
||||
|
||||
log_notice (port->dev, "counters cleared on port %u", port->port_id);
|
||||
}
|
||||
|
@ -316,6 +316,12 @@ class VppAsfTestCase(CPUInterface, unittest.TestCase):
|
||||
if "DVPP_ENABLE_SANITIZE_ADDR=ON" in vpp_extra_cmake_args:
|
||||
cls = unittest.skip("Skipping @tag_fixme_asan tests")(cls)
|
||||
|
||||
@classmethod
|
||||
def skip_fixme_ubuntu2204(cls):
|
||||
"""if @tag_fixme_ubuntu2204 & is Ubuntu22.04 - mark for skip"""
|
||||
if cls.has_tag(TestCaseTag.FIXME_UBUNTU2204) and is_distro_ubuntu2204 == True:
|
||||
cls = unittest.skip("Skipping @tag_fixme_ubuntu2204 tests")(cls)
|
||||
|
||||
@classmethod
|
||||
def instance(cls):
|
||||
"""Return the instance of this testcase"""
|
||||
@ -1361,6 +1367,13 @@ class VppTestResult(unittest.TestResult):
|
||||
test_title = colorize(f"FIXME with ASAN: {test_title}", RED)
|
||||
test.skip_fixme_asan()
|
||||
|
||||
if (
|
||||
test.has_tag(TestCaseTag.FIXME_UBUNTU2204)
|
||||
and is_distro_ubuntu2204 == True
|
||||
):
|
||||
test_title = colorize(f"FIXME with Ubuntu 22.04: {test_title}", RED)
|
||||
test.skip_fixme_ubuntu2204()
|
||||
|
||||
if hasattr(test, "vpp_worker_count"):
|
||||
if test.vpp_worker_count == 0:
|
||||
test_title += " [main thread only]"
|
||||
|
@ -39,6 +39,7 @@ class TestProm(VppAsfTestCase):
|
||||
"""Enable HTTP Static server and prometheus exporter, get stats"""
|
||||
self.vapi.cli("http static server uri tcp://0.0.0.0/80 url-handlers")
|
||||
self.vapi.cli("prom enable")
|
||||
self.sleep(1, "wait for min-scrape-interval to expire")
|
||||
|
||||
process = subprocess.run(
|
||||
[
|
||||
|
@ -183,9 +183,7 @@ class MethodHolder(VppTestCase):
|
||||
variables and configure VPP.
|
||||
"""
|
||||
super(MethodHolder, cls).setUpClass()
|
||||
if (is_distro_ubuntu2204 == True or is_distro_debian11 == True) and not hasattr(
|
||||
cls, "vpp"
|
||||
):
|
||||
if (is_distro_debian11 == True) and not hasattr(cls, "vpp"):
|
||||
return
|
||||
try:
|
||||
# Create pg interfaces
|
||||
|
@ -2036,6 +2036,7 @@ class TestResponderBehindNAT(TemplateResponder, Ikev2Params):
|
||||
|
||||
|
||||
@tag_fixme_vpp_workers
|
||||
@tag_fixme_ubuntu2204
|
||||
class TestInitiatorNATT(TemplateInitiator, Ikev2Params):
|
||||
"""test ikev2 initiator - NAT traversal (intitiator behind NAT)"""
|
||||
|
||||
@ -2068,6 +2069,7 @@ class TestInitiatorNATT(TemplateInitiator, Ikev2Params):
|
||||
|
||||
|
||||
@tag_fixme_vpp_workers
|
||||
@tag_fixme_ubuntu2204
|
||||
class TestInitiatorPsk(TemplateInitiator, Ikev2Params):
|
||||
"""test ikev2 initiator - pre shared key auth"""
|
||||
|
||||
@ -2099,6 +2101,7 @@ class TestInitiatorPsk(TemplateInitiator, Ikev2Params):
|
||||
|
||||
|
||||
@tag_fixme_vpp_workers
|
||||
@tag_fixme_ubuntu2204
|
||||
class TestInitiatorRequestWindowSize(TestInitiatorPsk):
|
||||
"""test initiator - request window size (1)"""
|
||||
|
||||
@ -2148,6 +2151,7 @@ class TestInitiatorRequestWindowSize(TestInitiatorPsk):
|
||||
|
||||
|
||||
@tag_fixme_vpp_workers
|
||||
@tag_fixme_ubuntu2204
|
||||
class TestInitiatorRekey(TestInitiatorPsk):
|
||||
"""test ikev2 initiator - rekey"""
|
||||
|
||||
@ -2193,6 +2197,7 @@ class TestInitiatorRekey(TestInitiatorPsk):
|
||||
|
||||
|
||||
@tag_fixme_vpp_workers
|
||||
@tag_fixme_ubuntu2204
|
||||
class TestInitiatorDelSAFromResponder(TemplateInitiator, Ikev2Params):
|
||||
"""test ikev2 initiator - delete IKE SA from responder"""
|
||||
|
||||
@ -2413,9 +2418,7 @@ class TestResponderVrf(TestResponderPsk, Ikev2Params):
|
||||
|
||||
globals()["ikev2"] = _ikev2
|
||||
super(IkePeer, cls).setUpClass()
|
||||
if (is_distro_ubuntu2204 == True or is_distro_debian11 == True) and not hasattr(
|
||||
cls, "vpp"
|
||||
):
|
||||
if (is_distro_debian11 == True) and not hasattr(cls, "vpp"):
|
||||
return
|
||||
cls.create_pg_interfaces(range(1))
|
||||
cls.vapi.cli("ip table add 1")
|
||||
@ -2525,6 +2528,7 @@ class Test_IKE_AES_GCM_16_256(TemplateResponder, Ikev2Params):
|
||||
|
||||
|
||||
@tag_fixme_vpp_workers
|
||||
@tag_fixme_ubuntu2204
|
||||
class TestInitiatorKeepaliveMsg(TestInitiatorPsk):
|
||||
"""
|
||||
Test for keep alive messages
|
||||
|
@ -162,8 +162,6 @@ class TestNAT44ED(VppTestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
if is_distro_ubuntu2204 == True and not hasattr(cls, "vpp"):
|
||||
return
|
||||
|
||||
cls.create_pg_interfaces(range(12))
|
||||
cls.interfaces = list(cls.pg_interfaces[:4])
|
||||
|
@ -55,8 +55,6 @@ class TestNAT64(VppTestCase):
|
||||
def setUpClass(cls):
|
||||
super(TestNAT64, cls).setUpClass()
|
||||
|
||||
if is_distro_ubuntu2204 == True and not hasattr(cls, "vpp"):
|
||||
return
|
||||
cls.tcp_port_in = 6303
|
||||
cls.tcp_port_out = 6303
|
||||
cls.udp_port_in = 6304
|
||||
|
Loading…
x
Reference in New Issue
Block a user