aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/hfi1/driver.c
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@wdc.com>2017-10-11 10:48:59 -0700
committerDoug Ledford <dledford@redhat.com>2017-10-14 20:47:06 -0400
commite2fdbc23689258d9dd43450048707c953bab5f89 (patch)
tree72c09d7ac146f3268b50d44847f25cd569da2dbd /drivers/infiniband/hw/hfi1/driver.c
parentIB/hfi1: Remove set-but-not-used variables (diff)
downloadlinux-dev-e2fdbc23689258d9dd43450048707c953bab5f89.tar.xz
linux-dev-e2fdbc23689258d9dd43450048707c953bab5f89.zip
IB/hfi1: Define hfi1_handle_cnp_tbl[] once
Move the hfi1_handle_cnp_tbl[] from a header file to a .c file such that only one copy ends up in the hfi1 kernel module. This patch does not change any functionality. Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Cc: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to '')
-rw-r--r--drivers/infiniband/hw/hfi1/driver.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hfi1/driver.c b/drivers/infiniband/hw/hfi1/driver.c
index 85a425ef740e..b4f69c07ca2a 100644
--- a/drivers/infiniband/hw/hfi1/driver.c
+++ b/drivers/infiniband/hw/hfi1/driver.c
@@ -433,6 +433,12 @@ static inline void init_packet(struct hfi1_ctxtdata *rcd,
packet->numpkt = 0;
}
+/* We support only two types - 9B and 16B for now */
+static const hfi1_handle_cnp hfi1_handle_cnp_tbl[2] = {
+ [HFI1_PKT_TYPE_9B] = &return_cnp,
+ [HFI1_PKT_TYPE_16B] = &return_cnp_16B
+};
+
void hfi1_process_ecn_slowpath(struct rvt_qp *qp, struct hfi1_packet *pkt,
bool do_cnp)
{