Commit Graph

7 Commits

Author SHA1 Message Date
Ben Hutchings 64d8ad6d74 sfc: Implement hardware acceleration of RFS
Use the existing filter management functions to insert TCP/IPv4 and
UDP/IPv4 4-tuple filters for Receive Flow Steering.

For each channel, track how many RFS filters are being added during
processing of received packets and scan the corresponding number of
table entries for filters that may be reclaimed.  Do this in batches
to reduce lock overhead.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2011-02-17 21:00:33 +00:00
Ben Hutchings d472605104 sfc: Limit filter search depth further for performance hints (i.e. RFS)
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2011-02-16 23:02:03 +00:00
Ben Hutchings c39d35ebff sfc: Generalise filter spec initialisation
Move search_depth arrays into per-table state.

Define initialisation function efx_filter_init_rx() which sets
everything apart from the match fields.

Define efx_filter_set_{ipv4_local,ipv4_full,eth_local}() to set the
match fields.  This allows some simplification of callers and later
support for additional protocols and more flexible matching using
multiple calls to these functions.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2010-12-07 19:11:26 +00:00
Ben Hutchings 8891681af9 sfc: Remove filter table IDs from filter functions
The separation between filter tables is largely an internal detail
and it may be removed in future hardware.  To prepare for that:

- Merge table ID with filter index to make an opaque filter ID
- Wrap efx_filter_table_clear() with a function that clears filters
  from both RX tables, which is all that the current caller requires

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2010-12-07 19:02:50 +00:00
Eric Dumazet 89bf67f1f0 drivers/net: use vzalloc()
Use vzalloc() and vzalloc_node() in net drivers

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-27 22:53:38 -08:00
Ben Hutchings 993284dfff sfc: Don't try to set filters with search depths we know won't work
The filter engine will time-out and ignore filters beyond
200-something hops.  We also need to avoid infinite loops in
efx_filter_search() when the table is full.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-08 10:36:10 -07:00
Ben Hutchings 64eebcfd89 sfc: Add filter table management
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-21 14:58:00 -07:00