netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: David Miller <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <linux-net-drivers@solarflare.com>
Subject: [PATCHv2 net-next 7/8] sfc: Remove now-unused filter function
Date: Tue, 3 Jan 2012 22:05:58 +0000	[thread overview]
Message-ID: <1325628358.2832.43.camel@bwh-desktop> (raw)
In-Reply-To: <1325627819.2832.31.camel@bwh-desktop>

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
 drivers/net/ethernet/sfc/efx.h    |    2 -
 drivers/net/ethernet/sfc/filter.c |   46 -------------------------------------
 2 files changed, 0 insertions(+), 48 deletions(-)

diff --git a/drivers/net/ethernet/sfc/efx.h b/drivers/net/ethernet/sfc/efx.h
index f0a5b7c..a3541ac 100644
--- a/drivers/net/ethernet/sfc/efx.h
+++ b/drivers/net/ethernet/sfc/efx.h
@@ -64,8 +64,6 @@ extern void efx_remove_filters(struct efx_nic *efx);
 extern s32 efx_filter_insert_filter(struct efx_nic *efx,
 				    struct efx_filter_spec *spec,
 				    bool replace);
-extern int efx_filter_remove_filter(struct efx_nic *efx,
-				    struct efx_filter_spec *spec);
 extern int efx_filter_remove_id_safe(struct efx_nic *efx,
 				     enum efx_filter_priority priority,
 				     u32 filter_id);
diff --git a/drivers/net/ethernet/sfc/filter.c b/drivers/net/ethernet/sfc/filter.c
index 8e3d33d..929b09b 100644
--- a/drivers/net/ethernet/sfc/filter.c
+++ b/drivers/net/ethernet/sfc/filter.c
@@ -680,52 +680,6 @@ int efx_filter_get_filter_safe(struct efx_nic *efx,
 	return rc;
 }
 
-/**
- * efx_filter_remove_filter - remove a filter by specification
- * @efx: NIC from which to remove the filter
- * @spec: Specification for the filter
- *
- * On success, return zero.
- * On failure, return a negative error code.
- */
-int efx_filter_remove_filter(struct efx_nic *efx, struct efx_filter_spec *spec)
-{
-	struct efx_filter_state *state = efx->filter_state;
-	struct efx_filter_table *table = efx_filter_spec_table(state, spec);
-	struct efx_filter_spec *saved_spec;
-	efx_oword_t filter;
-	unsigned int filter_idx, depth;
-	u32 key;
-	int rc;
-
-	if (!table)
-		return -EINVAL;
-
-	key = efx_filter_build(&filter, spec);
-
-	spin_lock_bh(&state->lock);
-
-	rc = efx_filter_search(table, spec, key, false, &depth);
-	if (rc < 0)
-		goto out;
-	filter_idx = rc;
-	saved_spec = &table->spec[filter_idx];
-
-	if (spec->priority < saved_spec->priority) {
-		rc = -EPERM;
-		goto out;
-	}
-
-	efx_filter_table_clear_entry(efx, table, filter_idx);
-	if (table->used == 0)
-		efx_filter_table_reset_search_depth(table);
-	rc = 0;
-
-out:
-	spin_unlock_bh(&state->lock);
-	return rc;
-}
-
 static void efx_filter_table_clear(struct efx_nic *efx,
 				   enum efx_filter_table_id table_id,
 				   enum efx_filter_priority priority)
-- 
1.7.4.4



-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

  parent reply	other threads:[~2012-01-03 22:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-03 21:56 [PATCHv2 net-next 0/8] RX NFC support for hash-based filters Ben Hutchings
2012-01-03 21:59 ` [PATCHv2 net-next 1/8] gianfar: Reject out-of-range RX NFC locations Ben Hutchings
2012-01-03 22:04 ` [PATCHv2 net-next 2/8] ethtool: Allow drivers to select RX NFC rule locations Ben Hutchings
2012-01-03 22:05 ` [PATCHv2 net-next 3/8] sfc: Change filter ID generation to satisfy priority semantics of RX NFC Ben Hutchings
2012-01-03 22:05 ` [PATCHv2 net-next 4/8] sfc: Use consistent types for filter IDs, indices and search depths Ben Hutchings
2012-01-03 22:05 ` [PATCHv2 net-next 5/8] sfc: Add support for retrieving and removing filters by ID Ben Hutchings
2012-01-03 22:05 ` [PATCHv2 net-next 6/8] sfc: Implement ethtool RX NFC rules API instead of n-tuple API Ben Hutchings
2012-01-03 22:05 ` Ben Hutchings [this message]
2012-01-03 22:07 ` [PATCHv2 net-next 8/8] ethtool: Remove ethtool_ops::set_rx_ntuple operation Ben Hutchings
2012-01-03 22:24 ` [PATCHv2 ethtool 1/3] ethtool-copy.h: sync with net-next Ben Hutchings
2012-01-03 22:24 ` [PATCHv2 ethtool 2/3] rxclass: Use RX_CLS_LOC_{ANY,SPECIAL} in place of RX_CLS_LOC_UNSPEC Ben Hutchings
2012-01-03 22:25 ` [PATCHv2 ethtool 3/3] rxclass: Allow driver to select RX NFC rule location Ben Hutchings
2012-01-04 19:11 ` [PATCHv2 net-next 0/8] RX NFC support for hash-based filters David Miller
2012-01-04 21:39   ` Ben Hutchings

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1325628358.2832.43.camel@bwh-desktop \
    --to=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=linux-net-drivers@solarflare.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).