linux/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_flex_keys.c

// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
/* Copyright (c) 2017-2018 Mellanox Technologies. All rights reserved */

#include <linux/kernel.h>
#include <linux/module.h>
#include "spectrum.h"
#include "item.h"
#include "core_acl_flex_keys.h"

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_l2_dmac[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_l2_smac[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_l2_smac_ex[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv4_sip[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv4_dip[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv4[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv4_ex[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv6_dip[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv6_ex1[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv6_sip[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv6_sip_ex[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_packet_type[] =;

static const struct mlxsw_afk_block mlxsw_sp1_afk_blocks[] =;

#define MLXSW_SP1_AFK_KEY_BLOCK_SIZE

static void mlxsw_sp1_afk_encode_block(char *output, int block_index,
				       char *block)
{}

static void mlxsw_sp1_afk_clear_block(char *output, int block_index)
{}

const struct mlxsw_afk_ops mlxsw_sp1_afk_ops =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_mac_0[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_mac_1[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_mac_2[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_mac_3[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_mac_4[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_mac_5[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv4_0[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv4_1[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv4_2[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv4_5[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv6_0[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv6_1[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv6_2[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv6_3[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv6_4[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv6_5[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_l4_0[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_l4_2[] =;

static const struct mlxsw_afk_block mlxsw_sp2_afk_blocks[] =;

#define MLXSW_SP2_AFK_BITS_PER_BLOCK

/* A block in Spectrum-2 is of the following form:
 *
 * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
 * |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |35|34|33|32|
 * +-----------------------------------------------------------------------------------------------+
 * |31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0|
 * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
 */
MLXSW_ITEM64(sp2_afk, block, value, 0x00, 0, MLXSW_SP2_AFK_BITS_PER_BLOCK);

/* The key / mask block layout in Spectrum-2 is of the following form:
 *
 * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
 * |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |                block11_high                   |
 * +-----------------------------------------------------------------------------------------------+
 * |                    block11_low                               |         block10_high           |
 * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
 * ...
 */

struct mlxsw_sp2_afk_block_layout {};

#define MLXSW_SP2_AFK_BLOCK_LAYOUT(_block, _offset, _shift)									\

static const struct mlxsw_sp2_afk_block_layout mlxsw_sp2_afk_blocks_layout[] =;

static void __mlxsw_sp2_afk_block_value_set(char *output, int block_index,
					    u64 block_value)
{}

static void mlxsw_sp2_afk_encode_block(char *output, int block_index,
				       char *block)
{}

static void mlxsw_sp2_afk_clear_block(char *output, int block_index)
{}

const struct mlxsw_afk_ops mlxsw_sp2_afk_ops =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_mac_5b[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv4_5b[] =;

static struct mlxsw_afk_element_inst mlxsw_sp_afk_element_info_ipv6_2b[] =;

static const struct mlxsw_afk_block mlxsw_sp4_afk_blocks[] =;

const struct mlxsw_afk_ops mlxsw_sp4_afk_ops =;