Unverified Commit 2a642396 authored by Doug Ledford's avatar Doug Ledford
Browse files

Merge branch 'opfn' into hfi1-tid



This series adds the OPFN feature, which is used as the negotiation
protocol by TID RDMA. This adds a totally hidden, in-band negotiation
transfer that happens on the consumer's queue pair but without the
consumer's knowledge.  For that reason, things like completions for OPFN
transfers must be filtered out of the completion queue and not sent to
the consumer.  This feature does not impact any consumer APIs, but does
impact the driver/driver wire API.

At a high level OPFN enables exchanging parameters between two hosts
using IB compare and swap requests to a special virtual address. The
request uses a reserved IB work request opcode (see patch 3).

* opfn:
  IB/hfi1: Add static trace for OPFN
  IB/hfi1: Integrate OPFN into RC transactions
  IB/hfi1, IB/rdmavt: Allow for extending of QP's s_ack_queue
  IB/hfi1: OPFN interface
  IB/hfi1: Add OPFN helper functions for TID RDMA feature
  IB/hfi1: OPFN support discovery

Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parents db421a54 a131d164
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ hfi1-y := \
	mad.o \
	mmu_rb.o \
	msix.o \
	opfn.o \
	pcie.o \
	pio.o \
	pio_copy.o \
+11 −0
Original line number Diff line number Diff line
@@ -5222,6 +5222,17 @@ int is_bx(struct hfi1_devdata *dd)
	return (chip_rev_minor & 0xF0) == 0x10;
}

/* return true is kernel urg disabled for rcd */
bool is_urg_masked(struct hfi1_ctxtdata *rcd)
{
	u64 mask;
	u32 is = IS_RCVURGENT_START + rcd->ctxt;
	u8 bit = is % 64;

	mask = read_csr(rcd->dd, CCE_INT_MASK + (8 * (is / 64)));
	return !(mask & BIT_ULL(bit));
}

/*
 * Append string s to buffer buf.  Arguments curp and len are the current
 * position and remaining length, respectively.
+2 −1
Original line number Diff line number Diff line
#ifndef _CHIP_H
#define _CHIP_H
/*
 * Copyright(c) 2015 - 2017 Intel Corporation.
 * Copyright(c) 2015 - 2018 Intel Corporation.
 *
 * This file is provided under a dual BSD/GPLv2 license.  When using or
 * redistributing this file, you may do so under either license.
@@ -804,6 +804,7 @@ void clear_linkup_counters(struct hfi1_devdata *dd);
u32 hdrqempty(struct hfi1_ctxtdata *rcd);
int is_ax(struct hfi1_devdata *dd);
int is_bx(struct hfi1_devdata *dd);
bool is_urg_masked(struct hfi1_ctxtdata *rcd);
u32 read_physical_state(struct hfi1_devdata *dd);
u32 chip_to_opa_pstate(struct hfi1_devdata *dd, u32 chip_pstate);
const char *opa_lstate_name(u32 lstate);
+3 −0
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@

#include "chip_registers.h"
#include "common.h"
#include "opfn.h"
#include "verbs.h"
#include "pio.h"
#include "chip.h"
@@ -98,6 +99,8 @@
#define NEIGHBOR_TYPE_HFI		0
#define NEIGHBOR_TYPE_SWITCH	1

#define HFI1_MAX_ACTIVE_WORKQUEUE_ENTRIES 5

extern unsigned long hfi1_cap_mask;
#define HFI1_CAP_KGET_MASK(mask, cap) ((mask) & HFI1_CAP_##cap)
#define HFI1_CAP_UGET_MASK(mask, cap) \
+9 −1
Original line number Diff line number Diff line
@@ -72,7 +72,6 @@
#undef pr_fmt
#define pr_fmt(fmt) DRIVER_NAME ": " fmt

#define HFI1_MAX_ACTIVE_WORKQUEUE_ENTRIES 5
/*
 * min buffers we want to have per context, after driver
 */
@@ -927,6 +926,8 @@ int hfi1_init(struct hfi1_devdata *dd, int reinit)
		lastfail = hfi1_create_rcvhdrq(dd, rcd);
		if (!lastfail)
			lastfail = hfi1_setup_eagerbufs(rcd);
		if (!lastfail)
			lastfail = hfi1_kern_exp_rcv_init(rcd, reinit);
		if (lastfail) {
			dd_dev_err(dd,
				   "failed to allocate kernel ctxt's rcvhdrq and/or egr bufs\n");
@@ -1497,6 +1498,12 @@ static int __init hfi1_mod_init(void)
	/* sanitize link CRC options */
	link_crc_mask &= SUPPORTED_CRCS;

	ret = opfn_init();
	if (ret < 0) {
		pr_err("Failed to allocate opfn_wq");
		goto bail_dev;
	}

	/*
	 * These must be called before the driver is registered with
	 * the PCI subsystem.
@@ -1527,6 +1534,7 @@ module_init(hfi1_mod_init);
static void __exit hfi1_mod_cleanup(void)
{
	pci_unregister_driver(&hfi1_pci_driver);
	opfn_exit();
	node_affinity_destroy_all();
	hfi1_dbg_exit();

Loading