summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2012-10-30 01:01:52 +0000
committerBen Hutchings <bhutchings@solarflare.com>2013-08-22 19:25:52 +0100
commitf26e958cfce0522832a5d593943948e6b61c3126 (patch)
tree061f021f616b46bbc1ae4d3d5b600aa2d59f4ef6 /drivers/net/ethernet
parent33a8985c4a414e468c33598c1d70b139bc97b909 (diff)
sfc: Name the RX drop queue ID
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/sfc/ethtool.c4
-rw-r--r--drivers/net/ethernet/sfc/filter.h7
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sfc/ethtool.c b/drivers/net/ethernet/sfc/ethtool.c
index 4db37f7b0ef..ec5cacd427e 100644
--- a/drivers/net/ethernet/sfc/ethtool.c
+++ b/drivers/net/ethernet/sfc/ethtool.c
@@ -822,7 +822,7 @@ static int efx_ethtool_get_class_rule(struct efx_nic *efx,
if (rc)
return rc;
- if (spec.dmaq_id == 0xfff)
+ if (spec.dmaq_id == EFX_FILTER_RX_DMAQ_ID_DROP)
rule->ring_cookie = RX_CLS_FLOW_DISC;
else
rule->ring_cookie = spec.dmaq_id;
@@ -967,7 +967,7 @@ static int efx_ethtool_set_class_rule(struct efx_nic *efx,
efx_filter_init_rx(&spec, EFX_FILTER_PRI_MANUAL,
efx->rx_scatter ? EFX_FILTER_FLAG_RX_SCATTER : 0,
(rule->ring_cookie == RX_CLS_FLOW_DISC) ?
- 0xfff : rule->ring_cookie);
+ EFX_FILTER_RX_DMAQ_ID_DROP : rule->ring_cookie);
switch (rule->flow_type) {
case TCP_V4_FLOW:
diff --git a/drivers/net/ethernet/sfc/filter.h b/drivers/net/ethernet/sfc/filter.h
index 5cb54723b82..b1170d44171 100644
--- a/drivers/net/ethernet/sfc/filter.h
+++ b/drivers/net/ethernet/sfc/filter.h
@@ -76,7 +76,8 @@ enum efx_filter_flags {
* @type: Type of match to be performed, from &enum efx_filter_type
* @priority: Priority of the filter, from &enum efx_filter_priority
* @flags: Miscellaneous flags, from &enum efx_filter_flags
- * @dmaq_id: Source/target queue index
+ * @dmaq_id: Source/target queue index, or %EFX_FILTER_RX_DMAQ_ID_DROP for
+ * an RX drop filter
* @data: Match data (type-dependent)
*
* Use the efx_filter_set_*() functions to initialise the @type and
@@ -94,6 +95,10 @@ struct efx_filter_spec {
u32 data[3];
};
+enum {
+ EFX_FILTER_RX_DMAQ_ID_DROP = 0xfff
+};
+
static inline void efx_filter_init_rx(struct efx_filter_spec *spec,
enum efx_filter_priority priority,
enum efx_filter_flags flags,