RE: [PATCH rdma-next v2 08/11] RDMA/efa: Add common command handlers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>Subject: [PATCH rdma-next v2 08/11] RDMA/efa: Add common command
>handlers
>
>Add the EFA common commands implementation.
>
>Signed-off-by: Gal Pressman <galpress@xxxxxxxxxx>
>---
> drivers/infiniband/hw/efa/efa_com_cmd.c | 726
>++++++++++++++++++++++++++++++++
> 1 file changed, 726 insertions(+)
> create mode 100644 drivers/infiniband/hw/efa/efa_com_cmd.c
>
>diff --git a/drivers/infiniband/hw/efa/efa_com_cmd.c
>b/drivers/infiniband/hw/efa/efa_com_cmd.c
>new file mode 100644
>index 000000000000..05eb8f723197
>--- /dev/null
>+++ b/drivers/infiniband/hw/efa/efa_com_cmd.c
>@@ -0,0 +1,726 @@
>+// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
>+/*
>+ * Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All rights reserved.
>+ */
>+
>+#include "efa.h"
>+#include "efa_com.h"
>+#include "efa_com_cmd.h"
>+
>+void efa_com_set_dma_addr(dma_addr_t addr, u32 *addr_high, u32
>+*addr_low) {
>+	*addr_low = addr & GENMASK(31, 0);
>+	*addr_high = (addr >> 32) & GENMASK(31, 0); }
>+
>+int efa_com_create_qp(struct efa_com_dev *edev,
>+		      struct efa_com_create_qp_params *params,
>+		      struct efa_com_create_qp_result *res) {
>+	struct efa_admin_create_qp_resp cmd_completion;
>+	struct efa_admin_create_qp_cmd create_qp_cmd;
>+	struct efa_com_admin_queue *aq = &edev->aq;
>+	int err;
>+
>+	memset(&create_qp_cmd, 0x0, sizeof(create_qp_cmd));

Use = {}. Few hits of these here...
>+

[..]

>+int efa_com_register_mr(struct efa_com_dev *edev,
>+			struct efa_com_reg_mr_params *params,
>+			struct efa_com_reg_mr_result *result) {
>+	struct efa_admin_reg_mr_resp cmd_completion;
>+	struct efa_com_admin_queue *aq = &edev->aq;
>+	struct efa_admin_reg_mr_cmd mr_cmd;
>+	int err;
>+
>+	memset(&mr_cmd, 0x0, sizeof(mr_cmd));
>+
>+	mr_cmd.aq_common_desc.opcode = EFA_ADMIN_REG_MR;
>+	mr_cmd.aq_common_desc.flags = 0;
>+
>+	mr_cmd.pd = params->pd;
>+	mr_cmd.mr_length = params->mr_length_in_bytes;
>+
>+	mr_cmd.flags |= 0 &
>+
>	EFA_ADMIN_REG_MR_CMD_MEM_ADDR_PHY_MODE_EN_MASK;

Doesn't look right.



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux