summaryrefslogtreecommitdiffstats
path: root/net/core/net-sysfs.c
diff options
context:
space:
mode:
authorJohn Hurley <john.hurley@netronome.com>2019-12-17 11:28:56 +0000
committerDavid S. Miller <davem@davemloft.net>2019-12-17 22:49:10 -0800
commit39f14c00b13c47186739a4cbc7a16e04d7fdbb60 (patch)
tree9c89ae7b37b630d2b99fbe3b4fc774b5f482ceb6 /net/core/net-sysfs.c
parent4e2ce6e55050125d313408770d20dbf387dfc79c (diff)
downloadlinux-39f14c00b13c47186739a4cbc7a16e04d7fdbb60.tar.gz
linux-39f14c00b13c47186739a4cbc7a16e04d7fdbb60.tar.bz2
linux-39f14c00b13c47186739a4cbc7a16e04d7fdbb60.zip
nfp: flower: fix stats id allocation
As flower rules are added, they are given a stats ID based on the number of rules that can be supported in firmware. Only after the initial allocation of all available IDs does the driver begin to reuse those that have been released. The initial allocation of IDs was modified to account for multiple memory units on the offloaded device. However, this introduced a bug whereby the counter that controls the IDs could be decremented before the ID was assigned (where it is further decremented). This means that the stats ID could be assigned as -1/0xfffffff which is out of range. Fix this by only decrementing the main counter after the current ID has been assigned. Fixes: 467322e2627f ("nfp: flower: support multiple memory units for filter offloads") Signed-off-by: John Hurley <john.hurley@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/net-sysfs.c')
0 files changed, 0 insertions, 0 deletions