Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 895420dd authored by Dennis Dalessandro's avatar Dennis Dalessandro Committed by Doug Ledford
Browse files

staging/rdma/hfi1: Remove hfi1 MR and hfi1 specific qp type



This patch does the actual removal of the queue pair from the hfi1 driver
along with a number of dependent data structures. These were moved to rvt.

It also removes the MR functions to use those in rdmavt.

These two pieces can not reasonably be split apart becuase they depend on
each other.

Reviewed-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 8f1764fa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@
obj-$(CONFIG_INFINIBAND_HFI1) += hfi1.o

hfi1-y := chip.o cq.o device.o diag.o driver.o efivar.o eprom.o file_ops.o firmware.o \
	init.o intr.o keys.o mad.o mmap.o mr.o pcie.o pio.o pio_copy.o \
	init.o intr.o mad.o mmap.o pcie.o pio.o pio_copy.o \
	qp.o qsfp.o rc.o ruc.o sdma.o srq.o sysfs.o trace.o twsi.o \
	uc.o ud.o user_exp_rcv.o user_pages.o user_sdma.o verbs_mcast.o verbs.o
hfi1-$(CONFIG_DEBUG_FS) += debugfs.o
+1 −1
Original line number Diff line number Diff line
@@ -479,7 +479,7 @@ int hfi1_resize_cq(struct ib_cq *ibcq, int cqe, struct ib_udata *udata)

	if (cq->ip) {
		struct hfi1_ibdev *dev = to_idev(ibcq->device);
		struct hfi1_mmap_info *ip = cq->ip;
		struct rvt_mmap_info *ip = cq->ip;

		hfi1_update_mmap_info(dev, ip, sz, wc);

+4 −4
Original line number Diff line number Diff line
@@ -1603,7 +1603,7 @@ int snoop_recv_handler(struct hfi1_packet *packet)
/*
 * Handle snooping and capturing packets when sdma is being used.
 */
int snoop_send_dma_handler(struct hfi1_qp *qp, struct hfi1_pkt_state *ps,
int snoop_send_dma_handler(struct rvt_qp *qp, struct hfi1_pkt_state *ps,
			   u64 pbc)
{
	pr_alert("Snooping/Capture of Send DMA Packets Is Not Supported!\n");
@@ -1616,13 +1616,13 @@ int snoop_send_dma_handler(struct hfi1_qp *qp, struct hfi1_pkt_state *ps,
 * bypass packets. The only way to send a bypass packet currently is to use the
 * diagpkt interface. When that interface is enable snoop/capture is not.
 */
int snoop_send_pio_handler(struct hfi1_qp *qp, struct hfi1_pkt_state *ps,
int snoop_send_pio_handler(struct rvt_qp *qp, struct hfi1_pkt_state *ps,
			   u64 pbc)
{
	struct hfi1_qp_priv *priv = qp->priv;
	struct ahg_ib_header *ahdr = priv->s_hdr;
	u32 hdrwords = qp->s_hdrwords;
	struct hfi1_sge_state *ss = qp->s_cur_sge;
	struct rvt_sge_state *ss = qp->s_cur_sge;
	u32 len = qp->s_cur_size;
	u32 dwords = (len + 3) >> 2;
	u32 plen = hdrwords + dwords + 2; /* includes pbc */
@@ -1630,7 +1630,7 @@ int snoop_send_pio_handler(struct hfi1_qp *qp, struct hfi1_pkt_state *ps,
	struct snoop_packet *s_packet = NULL;
	u32 *hdr = (u32 *)&ahdr->ibh;
	u32 length = 0;
	struct hfi1_sge_state temp_ss;
	struct rvt_sge_state temp_ss;
	void *data = NULL;
	void *data_start = NULL;
	int ret;
+5 −5
Original line number Diff line number Diff line
@@ -318,7 +318,7 @@ static void rcv_hdrerr(struct hfi1_ctxtdata *rcd, struct hfi1_pportdata *ppd,
		/* Get the destination QP number. */
		qp_num = be32_to_cpu(ohdr->bth[1]) & HFI1_QPN_MASK;
		if (lid < be16_to_cpu(IB_MULTICAST_LID_BASE)) {
			struct hfi1_qp *qp;
			struct rvt_qp *qp;
			unsigned long flags;

			rcu_read_lock();
@@ -387,7 +387,7 @@ static void rcv_hdrerr(struct hfi1_ctxtdata *rcd, struct hfi1_pportdata *ppd,
			 * Only in pre-B0 h/w is the CNP_OPCODE handled
			 * via this code path.
			 */
			struct hfi1_qp *qp = NULL;
			struct rvt_qp *qp = NULL;
			u32 lqpn, rqpn;
			u16 rlid;
			u8 svc_type, sl, sc5;
@@ -456,7 +456,7 @@ static void prescan_rxq(struct hfi1_packet *packet) {}
#else /* !CONFIG_PRESCAN_RXQ */
static int prescan_receive_queue;

static void process_ecn(struct hfi1_qp *qp, struct hfi1_ib_header *hdr,
static void process_ecn(struct rvt_qp *qp, struct hfi1_ib_header *hdr,
			struct hfi1_other_headers *ohdr,
			u64 rhf, u32 bth1, struct ib_grh *grh)
{
@@ -595,7 +595,7 @@ static void prescan_rxq(struct hfi1_packet *packet)
		struct hfi1_ibport *ibp = &rcd->ppd->ibport_data;
		__le32 *rhf_addr = (__le32 *) rcd->rcvhdrq + mdata.ps_head +
					 dd->rhf_offset;
		struct hfi1_qp *qp;
		struct rvt_qp *qp;
		struct hfi1_ib_header *hdr;
		struct hfi1_other_headers *ohdr;
		struct ib_grh *grh = NULL;
@@ -770,7 +770,7 @@ static inline void process_rcv_qp_work(struct hfi1_packet *packet)
{

	struct hfi1_ctxtdata *rcd;
	struct hfi1_qp *qp, *nqp;
	struct rvt_qp *qp, *nqp;

	rcd = packet->rcd;
	rcd->head = packet->rhqoff;
+8 −8
Original line number Diff line number Diff line
@@ -334,7 +334,7 @@ struct hfi1_packet {
	void *hdr;
	struct hfi1_ctxtdata *rcd;
	__le32 *rhf_addr;
	struct hfi1_qp *qp;
	struct rvt_qp *qp;
	struct hfi1_other_headers *ohdr;
	u64 rhf;
	u32 maxcnt;
@@ -374,7 +374,7 @@ struct hfi1_snoop_data {
#define HFI1_PORT_SNOOP_MODE     1U
#define HFI1_PORT_CAPTURE_MODE   2U

struct hfi1_sge_state;
struct rvt_sge_state;

/*
 * Get/Set IB link-level config parameters for f_get/set_ib_cfg()
@@ -1091,9 +1091,9 @@ struct hfi1_devdata {
	 * Handlers for outgoing data so that snoop/capture does not
	 * have to have its hooks in the send path
	 */
	int (*process_pio_send)(struct hfi1_qp *qp, struct hfi1_pkt_state *ps,
	int (*process_pio_send)(struct rvt_qp *qp, struct hfi1_pkt_state *ps,
				u64 pbc);
	int (*process_dma_send)(struct hfi1_qp *qp, struct hfi1_pkt_state *ps,
	int (*process_dma_send)(struct rvt_qp *qp, struct hfi1_pkt_state *ps,
				u64 pbc);
	void (*pio_inline_send)(struct hfi1_devdata *dd, struct pio_buf *pbuf,
				u64 pbc, const void *from, size_t count);
@@ -1276,7 +1276,7 @@ static inline u32 egress_cycles(u32 len, u32 rate)
void set_link_ipg(struct hfi1_pportdata *ppd);
void process_becn(struct hfi1_pportdata *ppd, u8 sl,  u16 rlid, u32 lqpn,
		  u32 rqpn, u8 svc_type);
void return_cnp(struct hfi1_ibport *ibp, struct hfi1_qp *qp, u32 remote_qpn,
void return_cnp(struct hfi1_ibport *ibp, struct rvt_qp *qp, u32 remote_qpn,
		u32 pkey, u32 slid, u32 dlid, u8 sc5,
		const struct ib_grh *old_grh);

@@ -1468,9 +1468,9 @@ void reset_link_credits(struct hfi1_devdata *dd);
void assign_remote_cm_au_table(struct hfi1_devdata *dd, u8 vcu);

int snoop_recv_handler(struct hfi1_packet *packet);
int snoop_send_dma_handler(struct hfi1_qp *qp, struct hfi1_pkt_state *ps,
int snoop_send_dma_handler(struct rvt_qp *qp, struct hfi1_pkt_state *ps,
			   u64 pbc);
int snoop_send_pio_handler(struct hfi1_qp *qp, struct hfi1_pkt_state *ps,
int snoop_send_pio_handler(struct rvt_qp *qp, struct hfi1_pkt_state *ps,
			   u64 pbc);
void snoop_inline_pio_send(struct hfi1_devdata *dd, struct pio_buf *pbuf,
			   u64 pbc, const void *from, size_t count);
@@ -1682,7 +1682,7 @@ int process_receive_invalid(struct hfi1_packet *packet);

extern rhf_rcv_function_ptr snoop_rhf_rcv_functions[8];

void update_sge(struct hfi1_sge_state *ss, u32 length);
void update_sge(struct rvt_sge_state *ss, u32 length);

/* global module parameter variables */
extern unsigned int hfi1_max_mtu;
Loading