#include "mcdi_filters.h"
#include "mcdi.h"
#include "nic.h"
#include "rx_common.h"
#define EFX_EF10_MAX_SHARED_RSS_CONTEXT_SIZE …
#define EFX_EF10_FILTER_ID_INVALID …
#define EFX_EF10_FILTER_SEARCH_LIMIT …
static struct efx_filter_spec *
efx_mcdi_filter_entry_spec(const struct efx_mcdi_filter_table *table,
unsigned int filter_idx)
{ … }
static unsigned int
efx_mcdi_filter_entry_flags(const struct efx_mcdi_filter_table *table,
unsigned int filter_idx)
{ … }
static u32 efx_mcdi_filter_get_unsafe_id(u32 filter_id)
{ … }
static unsigned int efx_mcdi_filter_get_unsafe_pri(u32 filter_id)
{ … }
static u32 efx_mcdi_filter_make_filter_id(unsigned int pri, u16 idx)
{ … }
static bool efx_mcdi_filter_is_exclusive(const struct efx_filter_spec *spec)
{ … }
static void
efx_mcdi_filter_set_entry(struct efx_mcdi_filter_table *table,
unsigned int filter_idx,
const struct efx_filter_spec *spec,
unsigned int flags)
{ … }
static void
efx_mcdi_filter_push_prep_set_match_fields(struct efx_nic *efx,
const struct efx_filter_spec *spec,
efx_dword_t *inbuf)
{ … }
static void efx_mcdi_filter_push_prep(struct efx_nic *efx,
const struct efx_filter_spec *spec,
efx_dword_t *inbuf, u64 handle,
struct efx_rss_context_priv *ctx,
bool replacing)
{ … }
static int efx_mcdi_filter_push(struct efx_nic *efx,
const struct efx_filter_spec *spec, u64 *handle,
struct efx_rss_context_priv *ctx, bool replacing)
{ … }
static u32 efx_mcdi_filter_mcdi_flags_from_spec(const struct efx_filter_spec *spec)
{ … }
static int efx_mcdi_filter_pri(struct efx_mcdi_filter_table *table,
const struct efx_filter_spec *spec)
{ … }
static s32 efx_mcdi_filter_insert_locked(struct efx_nic *efx,
struct efx_filter_spec *spec,
bool replace_equal)
{ … }
s32 efx_mcdi_filter_insert(struct efx_nic *efx, struct efx_filter_spec *spec,
bool replace_equal)
{ … }
static int efx_mcdi_filter_remove_internal(struct efx_nic *efx,
unsigned int priority_mask,
u32 filter_id, bool by_index)
{ … }
static void efx_mcdi_filter_remove_old(struct efx_nic *efx)
{ … }
int efx_mcdi_filter_remove_safe(struct efx_nic *efx,
enum efx_filter_priority priority,
u32 filter_id)
{ … }
static void efx_mcdi_filter_remove_unsafe(struct efx_nic *efx,
enum efx_filter_priority priority,
u32 filter_id)
{ … }
int efx_mcdi_filter_get_safe(struct efx_nic *efx,
enum efx_filter_priority priority,
u32 filter_id, struct efx_filter_spec *spec)
{ … }
static int efx_mcdi_filter_insert_addr_list(struct efx_nic *efx,
struct efx_mcdi_filter_vlan *vlan,
bool multicast, bool rollback)
{ … }
static int efx_mcdi_filter_insert_def(struct efx_nic *efx,
struct efx_mcdi_filter_vlan *vlan,
enum efx_encap_type encap_type,
bool multicast, bool rollback)
{ … }
static void efx_mcdi_filter_vlan_sync_rx_mode(struct efx_nic *efx,
struct efx_mcdi_filter_vlan *vlan)
{ … }
int efx_mcdi_filter_clear_rx(struct efx_nic *efx,
enum efx_filter_priority priority)
{ … }
u32 efx_mcdi_filter_count_rx_used(struct efx_nic *efx,
enum efx_filter_priority priority)
{ … }
u32 efx_mcdi_filter_get_rx_id_limit(struct efx_nic *efx)
{ … }
s32 efx_mcdi_filter_get_rx_ids(struct efx_nic *efx,
enum efx_filter_priority priority,
u32 *buf, u32 size)
{ … }
static int efx_mcdi_filter_match_flags_from_mcdi(bool encap, u32 mcdi_flags)
{ … }
bool efx_mcdi_filter_match_supported(struct efx_mcdi_filter_table *table,
bool encap,
enum efx_filter_match_flags match_flags)
{ … }
static int
efx_mcdi_filter_table_probe_matches(struct efx_nic *efx,
struct efx_mcdi_filter_table *table,
bool encap)
{ … }
int efx_mcdi_filter_table_probe(struct efx_nic *efx, bool multicast_chaining)
{ … }
void efx_mcdi_filter_table_reset_mc_allocations(struct efx_nic *efx)
{ … }
void efx_mcdi_filter_table_restore(struct efx_nic *efx)
{ … }
void efx_mcdi_filter_table_down(struct efx_nic *efx)
{ … }
void efx_mcdi_filter_table_remove(struct efx_nic *efx)
{ … }
static void efx_mcdi_filter_mark_one_old(struct efx_nic *efx, uint16_t *id)
{ … }
static void _efx_mcdi_filter_vlan_mark_old(struct efx_nic *efx,
struct efx_mcdi_filter_vlan *vlan)
{ … }
static void efx_mcdi_filter_mark_old(struct efx_nic *efx)
{ … }
int efx_mcdi_filter_add_vlan(struct efx_nic *efx, u16 vid)
{ … }
static void efx_mcdi_filter_del_vlan_internal(struct efx_nic *efx,
struct efx_mcdi_filter_vlan *vlan)
{ … }
void efx_mcdi_filter_del_vlan(struct efx_nic *efx, u16 vid)
{ … }
struct efx_mcdi_filter_vlan *efx_mcdi_filter_find_vlan(struct efx_nic *efx,
u16 vid)
{ … }
void efx_mcdi_filter_cleanup_vlans(struct efx_nic *efx)
{ … }
static void efx_mcdi_filter_uc_addr_list(struct efx_nic *efx)
{ … }
static void efx_mcdi_filter_mc_addr_list(struct efx_nic *efx)
{ … }
void efx_mcdi_filter_sync_rx_mode(struct efx_nic *efx)
{ … }
#ifdef CONFIG_RFS_ACCEL
bool efx_mcdi_filter_rfs_expire_one(struct efx_nic *efx, u32 flow_id,
unsigned int filter_idx)
{ … }
#endif
#define RSS_MODE_HASH_ADDRS …
#define RSS_MODE_HASH_PORTS …
#define RSS_CONTEXT_FLAGS_DEFAULT …
static int efx_mcdi_get_rss_context_flags(struct efx_nic *efx, u32 context,
u32 *flags)
{ … }
static void efx_mcdi_set_rss_context_flags(struct efx_nic *efx,
struct efx_rss_context_priv *ctx)
{ … }
static int efx_mcdi_filter_alloc_rss_context(struct efx_nic *efx, bool exclusive,
struct efx_rss_context_priv *ctx,
unsigned *context_size)
{ … }
static int efx_mcdi_filter_free_rss_context(struct efx_nic *efx, u32 context)
{ … }
static int efx_mcdi_filter_populate_rss_table(struct efx_nic *efx, u32 context,
const u32 *rx_indir_table, const u8 *key)
{ … }
void efx_mcdi_rx_free_indir_table(struct efx_nic *efx)
{ … }
static int efx_mcdi_filter_rx_push_shared_rss_config(struct efx_nic *efx,
unsigned *context_size)
{ … }
static int efx_mcdi_filter_rx_push_exclusive_rss_config(struct efx_nic *efx,
const u32 *rx_indir_table,
const u8 *key)
{ … }
int efx_mcdi_rx_push_rss_context_config(struct efx_nic *efx,
struct efx_rss_context_priv *ctx,
const u32 *rx_indir_table,
const u8 *key, bool delete)
{ … }
int efx_mcdi_rx_pull_rss_context_config(struct efx_nic *efx,
struct efx_rss_context *ctx)
{ … }
int efx_mcdi_rx_pull_rss_config(struct efx_nic *efx)
{ … }
void efx_mcdi_rx_restore_rss_contexts(struct efx_nic *efx)
{ … }
int efx_mcdi_pf_rx_push_rss_config(struct efx_nic *efx, bool user,
const u32 *rx_indir_table,
const u8 *key)
{ … }
int efx_mcdi_vf_rx_push_rss_config(struct efx_nic *efx, bool user,
const u32 *rx_indir_table
__attribute__ ((unused)),
const u8 *key
__attribute__ ((unused)))
{ … }
int efx_mcdi_push_default_indir_table(struct efx_nic *efx,
unsigned int rss_spread)
{ … }