#include <kunit/test.h>
#include "vcap_api.h"
#include "vcap_api_client.h"
#include "vcap_model_kunit.h"
#define TEST_BUF_CNT …
#define TEST_BUF_SZ …
#define STREAMWSIZE …
static u32 test_updateaddr[STREAMWSIZE] = …;
static int test_updateaddridx;
static int test_cache_erase_count;
static u32 test_init_start;
static u32 test_init_count;
static u32 test_hw_counter_id;
static struct vcap_cache_data test_hw_cache;
static struct net_device test_netdev = …;
static int test_move_addr;
static int test_move_offset;
static int test_move_count;
static enum vcap_keyfield_set test_val_keyset(struct net_device *ndev,
struct vcap_admin *admin,
struct vcap_rule *rule,
struct vcap_keyset_list *kslist,
u16 l3_proto)
{ … }
static void test_add_def_fields(struct net_device *ndev,
struct vcap_admin *admin,
struct vcap_rule *rule)
{ … }
static void test_cache_erase(struct vcap_admin *admin)
{ … }
static void test_cache_init(struct net_device *ndev, struct vcap_admin *admin,
u32 start, u32 count)
{ … }
static void test_cache_read(struct net_device *ndev, struct vcap_admin *admin,
enum vcap_selection sel, u32 start, u32 count)
{ … }
static void test_cache_write(struct net_device *ndev, struct vcap_admin *admin,
enum vcap_selection sel, u32 start, u32 count)
{ … }
static void test_cache_update(struct net_device *ndev, struct vcap_admin *admin,
enum vcap_command cmd,
enum vcap_selection sel, u32 addr)
{ … }
static void test_cache_move(struct net_device *ndev, struct vcap_admin *admin,
u32 addr, int offset, int count)
{ … }
static int vcap_test_port_info(struct net_device *ndev,
struct vcap_admin *admin,
struct vcap_output_print *out)
{ … }
static const struct vcap_operations test_callbacks = …;
static struct vcap_control test_vctrl = …;
static void vcap_test_api_init(struct vcap_admin *admin)
{ … }
static void test_vcap_xn_rule_creator(struct kunit *test, int cid,
enum vcap_user user, u16 priority,
int id, int size, int expected_addr)
{ … }
static void test_init_rule_deletion(void)
{ … }
static void vcap_api_set_bit_1_test(struct kunit *test)
{ … }
static void vcap_api_set_bit_0_test(struct kunit *test)
{ … }
static void vcap_api_iterator_init_test(struct kunit *test)
{ … }
static void vcap_api_iterator_next_test(struct kunit *test)
{ … }
static void vcap_api_encode_typegroups_test(struct kunit *test)
{ … }
static void vcap_api_encode_bit_test(struct kunit *test)
{ … }
static void vcap_api_encode_field_test(struct kunit *test)
{ … }
static void vcap_api_encode_short_field_test(struct kunit *test)
{ … }
static void vcap_api_encode_keyfield_test(struct kunit *test)
{ … }
static void vcap_api_encode_max_keyfield_test(struct kunit *test)
{ … }
static void vcap_api_encode_actionfield_test(struct kunit *test)
{ … }
static void vcap_api_keyfield_typegroup_test(struct kunit *test)
{ … }
static void vcap_api_actionfield_typegroup_test(struct kunit *test)
{ … }
static void vcap_api_vcap_keyfields_test(struct kunit *test)
{ … }
static void vcap_api_vcap_actionfields_test(struct kunit *test)
{ … }
static void vcap_api_encode_rule_keyset_test(struct kunit *test)
{ … }
static void vcap_api_encode_rule_actionset_test(struct kunit *test)
{ … }
static void vcap_free_ckf(struct vcap_rule *rule)
{ … }
static void vcap_api_rule_add_keyvalue_test(struct kunit *test)
{ … }
static void vcap_free_caf(struct vcap_rule *rule)
{ … }
static void vcap_api_rule_add_actionvalue_test(struct kunit *test)
{ … }
static void vcap_api_rule_find_keyset_basic_test(struct kunit *test)
{ … }
static void vcap_api_rule_find_keyset_failed_test(struct kunit *test)
{ … }
static void vcap_api_rule_find_keyset_many_test(struct kunit *test)
{ … }
static void vcap_api_encode_rule_test(struct kunit *test)
{ … }
static void vcap_api_set_rule_counter_test(struct kunit *test)
{ … }
static void vcap_api_get_rule_counter_test(struct kunit *test)
{ … }
static void vcap_api_rule_insert_in_order_test(struct kunit *test)
{ … }
static void vcap_api_rule_insert_reverse_order_test(struct kunit *test)
{ … }
static void vcap_api_rule_remove_at_end_test(struct kunit *test)
{ … }
static void vcap_api_rule_remove_in_middle_test(struct kunit *test)
{ … }
static void vcap_api_rule_remove_in_front_test(struct kunit *test)
{ … }
static struct kunit_case vcap_api_rule_remove_test_cases[] = …;
static void vcap_api_next_lookup_basic_test(struct kunit *test)
{ … }
static void vcap_api_next_lookup_advanced_test(struct kunit *test)
{ … }
static void vcap_api_filter_unsupported_keys_test(struct kunit *test)
{ … }
static void vcap_api_filter_keylist_test(struct kunit *test)
{ … }
static void vcap_api_rule_chain_path_test(struct kunit *test)
{ … }
static struct kunit_case vcap_api_rule_enable_test_cases[] = …;
static struct kunit_suite vcap_api_rule_enable_test_suite = …;
static struct kunit_suite vcap_api_rule_remove_test_suite = …;
static struct kunit_case vcap_api_rule_insert_test_cases[] = …;
static struct kunit_suite vcap_api_rule_insert_test_suite = …;
static struct kunit_case vcap_api_rule_counter_test_cases[] = …;
static struct kunit_suite vcap_api_rule_counter_test_suite = …;
static struct kunit_case vcap_api_support_test_cases[] = …;
static struct kunit_suite vcap_api_support_test_suite = …;
static struct kunit_case vcap_api_full_rule_test_cases[] = …;
static struct kunit_suite vcap_api_full_rule_test_suite = …;
static struct kunit_case vcap_api_rule_value_test_cases[] = …;
static struct kunit_suite vcap_api_rule_value_test_suite = …;
static struct kunit_case vcap_api_encoding_test_cases[] = …;
static struct kunit_suite vcap_api_encoding_test_suite = …;
kunit_test_suite(…) …;
kunit_test_suite(…) …;
kunit_test_suite(…) …;
kunit_test_suite(…) …;
kunit_test_suite(…) …;
kunit_test_suite(…) …;
kunit_test_suite(…) …;
kunit_test_suite(…) …;