Skip to content

Commit 8db182f

Browse files
Ben Hutchingsdavem330
authored andcommitted
sfc: Remove now-unused filter function
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent b2bb7b7 commit 8db182f

2 files changed

Lines changed: 0 additions & 48 deletions

File tree

‎drivers/net/ethernet/sfc/efx.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ extern void efx_remove_filters(struct efx_nic *efx);
6464
extern s32 efx_filter_insert_filter(struct efx_nic *efx,
6565
struct efx_filter_spec *spec,
6666
bool replace);
67-
extern int efx_filter_remove_filter(struct efx_nic *efx,
68-
struct efx_filter_spec *spec);
6967
extern int efx_filter_remove_id_safe(struct efx_nic *efx,
7068
enum efx_filter_priority priority,
7169
u32 filter_id);

‎drivers/net/ethernet/sfc/filter.c‎

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -680,52 +680,6 @@ int efx_filter_get_filter_safe(struct efx_nic *efx,
680680
return rc;
681681
}
682682

683-
/**
684-
* efx_filter_remove_filter - remove a filter by specification
685-
* @efx: NIC from which to remove the filter
686-
* @spec: Specification for the filter
687-
*
688-
* On success, return zero.
689-
* On failure, return a negative error code.
690-
*/
691-
int efx_filter_remove_filter(struct efx_nic *efx, struct efx_filter_spec *spec)
692-
{
693-
struct efx_filter_state *state = efx->filter_state;
694-
struct efx_filter_table *table = efx_filter_spec_table(state, spec);
695-
struct efx_filter_spec *saved_spec;
696-
efx_oword_t filter;
697-
unsigned int filter_idx, depth;
698-
u32 key;
699-
int rc;
700-
701-
if (!table)
702-
return -EINVAL;
703-
704-
key = efx_filter_build(&filter, spec);
705-
706-
spin_lock_bh(&state->lock);
707-
708-
rc = efx_filter_search(table, spec, key, false, &depth);
709-
if (rc < 0)
710-
goto out;
711-
filter_idx = rc;
712-
saved_spec = &table->spec[filter_idx];
713-
714-
if (spec->priority < saved_spec->priority) {
715-
rc = -EPERM;
716-
goto out;
717-
}
718-
719-
efx_filter_table_clear_entry(efx, table, filter_idx);
720-
if (table->used == 0)
721-
efx_filter_table_reset_search_depth(table);
722-
rc = 0;
723-
724-
out:
725-
spin_unlock_bh(&state->lock);
726-
return rc;
727-
}
728-
729683
static void efx_filter_table_clear(struct efx_nic *efx,
730684
enum efx_filter_table_id table_id,
731685
enum efx_filter_priority priority)

0 commit comments

Comments
 (0)