summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/cisco/enic/enic_clsf.c
diff options
context:
space:
mode:
authorGovindarajulu Varadarajan <_govind@gmx.com>2014-07-21 15:52:18 +0400
committerDavid S. Miller <davem@davemloft.net>2014-07-22 07:22:46 +0400
commit3762ff8f0e95f50f78d94e3f62e839103d1303aa (patch)
tree1a67ff907fb9a2ba706d692e3bc25505a689c1cb /drivers/net/ethernet/cisco/enic/enic_clsf.c
parente3e5af33e6d64a36bce1dfd9f599649f539801de (diff)
downloadlinux-3762ff8f0e95f50f78d94e3f62e839103d1303aa.tar.xz
enic: Add ethtool support to show classifier filters added by the driver
This patch impliments ethtool_ops->get_rxnfc() to display the classifier filter added by the driver. Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cisco/enic/enic_clsf.c')
-rw-r--r--drivers/net/ethernet/cisco/enic/enic_clsf.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cisco/enic/enic_clsf.c b/drivers/net/ethernet/cisco/enic/enic_clsf.c
index ee6acbf02ef0..69dfd3c9e529 100644
--- a/drivers/net/ethernet/cisco/enic/enic_clsf.c
+++ b/drivers/net/ethernet/cisco/enic/enic_clsf.c
@@ -103,6 +103,24 @@ void enic_rfs_flw_tbl_free(struct enic *enic)
spin_unlock(&enic->rfs_h.lock);
}
+struct enic_rfs_fltr_node *htbl_fltr_search(struct enic *enic, u16 fltr_id)
+{
+ int i;
+
+ for (i = 0; i < (1 << ENIC_RFS_FLW_BITSHIFT); i++) {
+ struct hlist_head *hhead;
+ struct hlist_node *tmp;
+ struct enic_rfs_fltr_node *n;
+
+ hhead = &enic->rfs_h.ht_head[i];
+ hlist_for_each_entry_safe(n, tmp, hhead, node)
+ if (n->fltr_id == fltr_id)
+ return n;
+ }
+
+ return NULL;
+}
+
#ifdef CONFIG_RFS_ACCEL
void enic_flow_may_expire(unsigned long data)
{