#include "sja1105_static_config.h"
#include <linux/crc32.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/errno.h>
void sja1105_pack(void *buf, const u64 *val, int start, int end, size_t len)
{ … }
void sja1105_unpack(const void *buf, u64 *val, int start, int end, size_t len)
{ … }
void sja1105_packing(void *buf, u64 *val, int start, int end,
size_t len, enum packing_op op)
{ … }
u32 sja1105_crc32(const void *buf, size_t len)
{ … }
static size_t sja1105et_avb_params_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
size_t sja1105pqrs_avb_params_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
static size_t sja1105et_general_params_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
size_t sja1105pqrs_general_params_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
size_t sja1110_general_params_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
static size_t
sja1105_l2_forwarding_params_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
size_t sja1110_l2_forwarding_params_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
size_t sja1105_l2_forwarding_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
size_t sja1110_l2_forwarding_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
static size_t
sja1105et_l2_lookup_params_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
size_t sja1105pqrs_l2_lookup_params_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
size_t sja1110_l2_lookup_params_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
size_t sja1105et_l2_lookup_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
size_t sja1105pqrs_l2_lookup_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
size_t sja1110_l2_lookup_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
static size_t sja1105_l2_policing_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
size_t sja1110_l2_policing_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
static size_t sja1105et_mac_config_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
size_t sja1105pqrs_mac_config_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
size_t sja1110_mac_config_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
static size_t
sja1105_schedule_entry_points_params_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
static size_t
sja1105_schedule_entry_points_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
static size_t
sja1110_schedule_entry_points_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
static size_t sja1105_schedule_params_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
static size_t sja1110_schedule_params_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
static size_t sja1105_schedule_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
static size_t sja1110_schedule_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
static size_t
sja1105_vl_forwarding_params_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
static size_t
sja1110_vl_forwarding_params_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
static size_t sja1105_vl_forwarding_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
static size_t sja1110_vl_forwarding_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
size_t sja1105_vl_lookup_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
size_t sja1110_vl_lookup_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
static size_t sja1105_vl_policing_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
size_t sja1110_vl_policing_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
size_t sja1105_vlan_lookup_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
size_t sja1110_vlan_lookup_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
static size_t sja1105_xmii_params_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
size_t sja1110_xmii_params_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
size_t sja1105_retagging_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
size_t sja1110_retagging_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
static size_t sja1110_pcp_remapping_entry_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
size_t sja1105_table_header_packing(void *buf, void *entry_ptr,
enum packing_op op)
{ … }
void
sja1105_table_header_pack_with_crc(void *buf, struct sja1105_table_header *hdr)
{ … }
static void sja1105_table_write_crc(u8 *table_start, u8 *crc_ptr)
{ … }
static u64 blk_id_map[BLK_IDX_MAX] = …;
const char *sja1105_static_config_error_msg[] = …;
static sja1105_config_valid_t
static_config_check_memory_size(const struct sja1105_table *tables, int max_mem)
{ … }
sja1105_config_valid_t
sja1105_static_config_check_valid(const struct sja1105_static_config *config,
int max_mem)
{ … }
void
sja1105_static_config_pack(void *buf, struct sja1105_static_config *config)
{ … }
size_t
sja1105_static_config_get_length(const struct sja1105_static_config *config)
{ … }
const struct sja1105_table_ops sja1105e_table_ops[BLK_IDX_MAX] = …;
const struct sja1105_table_ops sja1105t_table_ops[BLK_IDX_MAX] = …;
const struct sja1105_table_ops sja1105p_table_ops[BLK_IDX_MAX] = …;
const struct sja1105_table_ops sja1105q_table_ops[BLK_IDX_MAX] = …;
const struct sja1105_table_ops sja1105r_table_ops[BLK_IDX_MAX] = …;
const struct sja1105_table_ops sja1105s_table_ops[BLK_IDX_MAX] = …;
const struct sja1105_table_ops sja1110_table_ops[BLK_IDX_MAX] = …;
int sja1105_static_config_init(struct sja1105_static_config *config,
const struct sja1105_table_ops *static_ops,
u64 device_id)
{ … }
void sja1105_static_config_free(struct sja1105_static_config *config)
{ … }
int sja1105_table_delete_entry(struct sja1105_table *table, int i)
{ … }
int sja1105_table_resize(struct sja1105_table *table, size_t new_count)
{ … }