diff options
author | David S. Miller <davem@davemloft.net> | 2017-12-11 09:58:39 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-11 09:58:39 -0500 |
commit | 9944a0f2f502e4501fccb1dc0a64a6012c83dd97 (patch) | |
tree | 98769c3324dd57bc2070c08852c9bf1f272ba2b8 /drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | |
parent | a0b586fa75a69578ecf10b40582eed9b35de2432 (diff) | |
parent | 64e0cd0d3540dbbdf6661943025409e6b31d5178 (diff) |
Merge branch 'rhashtable-New-features-in-walk-and-bucket'
Tom Herbert says:
====================
rhashtable: New features in walk and bucket
This patch contains some changes to related rhashtable:
- Above allow rhashtable_walk_start to return void
- Add a functon to peek at the next entry during a walk
- Abstract out function to compute a has for a table
- A library function to alloc a spinlocks bucket array
- Call the above function for rhashtable locks allocation
Tested: Exercised using various operations on an ILA xlat
table.
v2:
- Apply feedback from Herbert. Don't change semantics of resize
event reporting and -EAGAIN, just simplify API for callers that
ignore those.
- Add end_of_table in iter to reliably tell when the iterator has
reached to the eno.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c index 9807214da206..2ae5ed151369 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | |||
@@ -1412,11 +1412,7 @@ bnxt_tc_flow_stats_batch_prep(struct bnxt *bp, | |||
1412 | void *flow_node; | 1412 | void *flow_node; |
1413 | int rc, i; | 1413 | int rc, i; |
1414 | 1414 | ||
1415 | rc = rhashtable_walk_start(iter); | 1415 | rhashtable_walk_start(iter); |
1416 | if (rc && rc != -EAGAIN) { | ||
1417 | i = 0; | ||
1418 | goto done; | ||
1419 | } | ||
1420 | 1416 | ||
1421 | rc = 0; | 1417 | rc = 0; |
1422 | for (i = 0; i < BNXT_FLOW_STATS_BATCH_MAX; i++) { | 1418 | for (i = 0; i < BNXT_FLOW_STATS_BATCH_MAX; i++) { |