nfp: nsp: add support for optional hwinfo lookup
authorDirk van der Merwe <dirk.vandermerwe@netronome.com>
Sun, 8 Sep 2019 23:54:20 +0000 (00:54 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 Sep 2019 16:29:26 +0000 (17:29 +0100)
commit74612cdaf55bd37595a4d27486915c4c6e5a0a09
treec6332ca7e6bfe6844aa14b67d165b61591807033
parent1da16f0c84c39e138bf9245bf32b5cd102c8f142
nfp: nsp: add support for optional hwinfo lookup

There are cases where we want to read a hwinfo entry from the NFP, and
if it doesn't exist, use a default value instead.

To support this, we must silence warning/error messages when the hwinfo
entry doesn't exist since this is a valid use case. The NSP command
structure provides the ability to silence command errors, in which case
the caller should log any command errors appropriately. Protocol errors
are unaffected by this.

Signed-off-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@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/nfpcore/nfp_nsp.c
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h