net/bnxt: add completion ring
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Wed, 15 Jun 2016 21:23:08 +0000 (14:23 -0700)
committerBruce Richardson <bruce.richardson@intel.com>
Mon, 20 Jun 2016 15:21:51 +0000 (17:21 +0200)
commitf2a768d4d186754f5fed173b1e1656c0b38f2abf
tree01ea2dc1b97e14f30dc9ff6c7260015fa64e22e6
parent8e7405f7e4a7be40869849afafbf5e4cf1bd6b11
net/bnxt: add completion ring

Structures, macros, and functions for working with completion rings
in the driver.

Completion Ring is used by the Ethernet controller to provide the
status of transmitted & received packets, report errors, report
status changes to the host software, and inter-function forwarding
requests.  In addition to the generic ring features, a completion ring
can have a statistics context that has statistics periodically DMAed
to host memory, along with a consumer index.

bnxt_handle_async_event() handles completions not related to a specific
transmit or receive ring such as link status changes which arrive on
the default completion ring.

Other physical or virtual functions on the same device may send an HWRM
command forward request.  In this case, we will pass it through
unvalidated. In the future, we will be able to have the PF monitor and
control VF access to the HWRM interface if needed.

New HWRM Calls:
bnxt_hwrm_exec_fwd_resp:
Execute an encapsulated command and forward the response.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
drivers/net/bnxt/Makefile
drivers/net/bnxt/bnxt.h
drivers/net/bnxt/bnxt_cpr.c [new file with mode: 0644]
drivers/net/bnxt/bnxt_cpr.h [new file with mode: 0644]
drivers/net/bnxt/bnxt_hwrm.c
drivers/net/bnxt/bnxt_hwrm.h
drivers/net/bnxt/hsi_struct_def_dpdk.h