diff options
author | Alex Maftei (amaftei) <amaftei@solarflare.com> | 2020-01-10 13:28:45 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-01-10 11:24:37 -0800 |
commit | f7226e0f9b64b0454d1a5a32f2553aa677fc5400 (patch) | |
tree | 92736655396a9f6650487cc1ac7350d0dcf35669 /drivers/net/ethernet/sfc/rx_common.h | |
parent | 314823108c9dc3a54d041d9b7251934859c853f1 (diff) |
sfc: move RPS code
Includes a couple of filtering functions and also renames a constant.
Style fixes included.
Signed-off-by: Alexandru-Mihai Maftei <amaftei@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/rx_common.h')
-rw-r--r-- | drivers/net/ethernet/sfc/rx_common.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/rx_common.h b/drivers/net/ethernet/sfc/rx_common.h index 4d2e7d38e260..c41f12a89477 100644 --- a/drivers/net/ethernet/sfc/rx_common.h +++ b/drivers/net/ethernet/sfc/rx_common.h @@ -74,4 +74,24 @@ struct efx_rss_context *efx_find_rss_context_entry(struct efx_nic *efx, u32 id); void efx_free_rss_context_entry(struct efx_rss_context *ctx); void efx_set_default_rx_indir_table(struct efx_nic *efx, struct efx_rss_context *ctx); + +bool efx_filter_is_mc_recipient(const struct efx_filter_spec *spec); +bool efx_filter_spec_equal(const struct efx_filter_spec *left, + const struct efx_filter_spec *right); +u32 efx_filter_spec_hash(const struct efx_filter_spec *spec); + +#ifdef CONFIG_RFS_ACCEL +bool efx_rps_check_rule(struct efx_arfs_rule *rule, unsigned int filter_idx, + bool *force); +struct efx_arfs_rule *efx_rps_hash_find(struct efx_nic *efx, + const struct efx_filter_spec *spec); +struct efx_arfs_rule *efx_rps_hash_add(struct efx_nic *efx, + const struct efx_filter_spec *spec, + bool *new); +void efx_rps_hash_del(struct efx_nic *efx, const struct efx_filter_spec *spec); +#endif + +int efx_probe_filters(struct efx_nic *efx); +void efx_remove_filters(struct efx_nic *efx); + #endif |