linux/lib/test_parman.c

/*
 * lib/test_parman.c - Test module for parman
 * Copyright (c) 2017 Mellanox Technologies. All rights reserved.
 * Copyright (c) 2017 Jiri Pirko <[email protected]>
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the names of the copyright holders nor the names of its
 *    contributors may be used to endorse or promote products derived from
 *    this software without specific prior written permission.
 *
 * Alternatively, this software may be distributed under the terms of the
 * GNU General Public License ("GPL") version 2 as published by the Free
 * Software Foundation.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

#define pr_fmt(fmt)

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/bitops.h>
#include <linux/err.h>
#include <linux/random.h>
#include <linux/parman.h>

#define TEST_PARMAN_PRIO_SHIFT
#define TEST_PARMAN_PRIO_COUNT
#define TEST_PARMAN_PRIO_MASK

#define TEST_PARMAN_ITEM_SHIFT
#define TEST_PARMAN_ITEM_COUNT
#define TEST_PARMAN_ITEM_MASK

#define TEST_PARMAN_BASE_SHIFT
#define TEST_PARMAN_BASE_COUNT
#define TEST_PARMAN_RESIZE_STEP_SHIFT
#define TEST_PARMAN_RESIZE_STEP_COUNT

#define TEST_PARMAN_BULK_MAX_SHIFT
#define TEST_PARMAN_BULK_MAX_COUNT
#define TEST_PARMAN_BULK_MAX_MASK

#define TEST_PARMAN_RUN_BUDGET

struct test_parman_prio {};

struct test_parman_item {};

struct test_parman {};

#define ITEM_PTRS_SIZE(count)

static int test_parman_resize(void *priv, unsigned long new_count)
{}

static void test_parman_move(void *priv, unsigned long from_index,
			     unsigned long to_index, unsigned long count)
{}

static const struct parman_ops test_parman_lsort_ops =;

static void test_parman_rnd_init(struct test_parman *test_parman)
{}

static u32 test_parman_rnd_get(struct test_parman *test_parman)
{}

static unsigned long test_parman_priority_gen(struct test_parman *test_parman)
{}

static void test_parman_prios_init(struct test_parman *test_parman)
{}

static void test_parman_prios_fini(struct test_parman *test_parman)
{}

static void test_parman_items_init(struct test_parman *test_parman)
{}

static void test_parman_items_fini(struct test_parman *test_parman)
{}

static struct test_parman *test_parman_create(const struct parman_ops *ops)
{}

static void test_parman_destroy(struct test_parman *test_parman)
{}

static bool test_parman_run_check_budgets(struct test_parman *test_parman)
{}

static int test_parman_run(struct test_parman *test_parman)
{}

static int test_parman_check_array(struct test_parman *test_parman,
				   bool gaps_allowed)
{}

static int test_parman_lsort(void)
{}

static int __init test_parman_init(void)
{}

static void __exit test_parman_exit(void)
{}

module_init();
module_exit(test_parman_exit);

MODULE_LICENSE();
MODULE_AUTHOR();
MODULE_DESCRIPTION();