]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: flower: get flows by host context
authorJohn Hurley <john.hurley@netronome.com>
Mon, 15 Apr 2019 14:55:58 +0000 (16:55 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Apr 2019 22:45:36 +0000 (15:45 -0700)
commitd73056b1e737246014355381084f372ca6d7ed33
tree1e1cb9e52e77f364f4fbb6b3b1b2288abe418a0d
parent3c087f9863039c5871bfbce21b5c66e51cffe8da
nfp: flower: get flows by host context

Each flow is given a context ID that the fw uses (along with its cookie)
to identity the flow. The flows stats are updated by the fw via this ID
which is a reference to a pre-allocated array entry.

In preparation for flow merge code, enable the nfp_fl_payload structure to
be accessed via this stats context ID. Rather than increasing the memory
requirements of the pre-allocated array, add a new rhashtable to associate
each active stats context ID with its rule payload.

While adding new code to the compile metadata functions, slightly
restructure the existing function to allow for cleaner, easier to read
error handling.

Signed-off-by: John Hurley <john.hurley@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/flower/main.h
drivers/net/ethernet/netronome/nfp/flower/metadata.c