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

Commit 2eb7f910 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull infiniband/RDMA updates from Roland Dreier:
 - large set of iSER initiator improvements
 - hardware driver fixes for cxgb4, mlx5 and ocrdma
 - small fixes to core midlayer

* tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (47 commits)
  RDMA/cxgb4: Fix ntuple calculation for ipv6 and remove duplicate line
  RDMA/cxgb4: Add missing neigh_release in find_route
  RDMA/cxgb4: Take IPv6 into account for best_mtu and set_emss
  RDMA/cxgb4: Make c4iw_wr_log_size_order static
  IB/core: Fix XRC race condition in ib_uverbs_open_qp
  IB/core: Clear AH attr variable to prevent garbage data
  RDMA/ocrdma: Save the bit environment, spare unncessary parenthesis
  RDMA/ocrdma: The kernel has a perfectly good BIT() macro - use it
  RDMA/ocrdma: Don't memset() buffers we just allocated with kzalloc()
  RDMA/ocrdma: Remove a unused-label warning
  RDMA/ocrdma: Convert kernel VA to PA for mmap in user
  RDMA/ocrdma: Get vlan tag from ib_qp_attrs
  RDMA/ocrdma: Add default GID at index 0
  IB/mlx5, iser, isert: Add Signature API additions
  Target/iser: Centralize ib_sig_domain setting
  IB/iser: Centralize ib_sig_domain settings
  IB/mlx5: Use extended internal signature layout
  IB/iser: Set IP_CSUM as default guard type
  IB/iser: Remove redundant assignment
  IB/mlx5: Use enumerations for PI copy mask
  ...
parents 1f6075f9 7b909bb4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5112,6 +5112,7 @@ F: include/scsi/*iscsi*

ISCSI EXTENSIONS FOR RDMA (ISER) INITIATOR
M:	Or Gerlitz <ogerlitz@mellanox.com>
M:	Sagi Grimberg <sagig@mellanox.com>
M:	Roi Dayan <roid@mellanox.com>
L:	linux-rdma@vger.kernel.org
S:	Supported
+2 −0
Original line number Diff line number Diff line
@@ -2518,6 +2518,8 @@ ssize_t ib_uverbs_create_ah(struct ib_uverbs_file *file,
	attr.grh.sgid_index    = cmd.attr.grh.sgid_index;
	attr.grh.hop_limit     = cmd.attr.grh.hop_limit;
	attr.grh.traffic_class = cmd.attr.grh.traffic_class;
	attr.vlan_id           = 0;
	memset(&attr.dmac, 0, sizeof(attr.dmac));
	memcpy(attr.grh.dgid.raw, cmd.attr.grh.dgid, 16);

	ah = ib_create_ah(pd, &attr);
+5 −0
Original line number Diff line number Diff line
@@ -477,6 +477,7 @@ static void ib_uverbs_async_handler(struct ib_uverbs_file *file,

	entry->desc.async.element    = element;
	entry->desc.async.event_type = event;
	entry->desc.async.reserved   = 0;
	entry->counter               = counter;

	list_add_tail(&entry->list, &file->async_file->event_list);
@@ -502,6 +503,10 @@ void ib_uverbs_qp_event_handler(struct ib_event *event, void *context_ptr)
{
	struct ib_uevent_object *uobj;

	/* for XRC target qp's, check that qp is live */
	if (!event->element.qp->uobject || !event->element.qp->uobject->live)
		return;

	uobj = container_of(event->element.qp->uobject,
			    struct ib_uevent_object, uobject);

+20 −12
Original line number Diff line number Diff line
@@ -236,10 +236,12 @@ static void release_tid(struct c4iw_rdev *rdev, u32 hwtid, struct sk_buff *skb)
static void set_emss(struct c4iw_ep *ep, u16 opt)
{
	ep->emss = ep->com.dev->rdev.lldi.mtus[GET_TCPOPT_MSS(opt)] -
		   sizeof(struct iphdr) - sizeof(struct tcphdr);
		   ((AF_INET == ep->com.remote_addr.ss_family) ?
		    sizeof(struct iphdr) : sizeof(struct ipv6hdr)) -
		   sizeof(struct tcphdr);
	ep->mss = ep->emss;
	if (GET_TCPOPT_TSTAMP(opt))
		ep->emss -= 12;
		ep->emss -= round_up(TCPOLEN_TIMESTAMP, 4);
	if (ep->emss < 128)
		ep->emss = 128;
	if (ep->emss & 7)
@@ -415,6 +417,7 @@ static struct dst_entry *find_route(struct c4iw_dev *dev, __be32 local_ip,
		return NULL;
	if (!our_interface(dev, n->dev) &&
	    !(n->dev->flags & IFF_LOOPBACK)) {
		neigh_release(n);
		dst_release(&rt->dst);
		return NULL;
	}
@@ -581,11 +584,14 @@ static void c4iw_record_pm_msg(struct c4iw_ep *ep,
}

static void best_mtu(const unsigned short *mtus, unsigned short mtu,
		     unsigned int *idx, int use_ts)
		     unsigned int *idx, int use_ts, int ipv6)
{
	unsigned short hdr_size = sizeof(struct iphdr) +
	unsigned short hdr_size = (ipv6 ?
				   sizeof(struct ipv6hdr) :
				   sizeof(struct iphdr)) +
				  sizeof(struct tcphdr) +
				  (use_ts ? 12 : 0);
				  (use_ts ?
				   round_up(TCPOLEN_TIMESTAMP, 4) : 0);
	unsigned short data_size = mtu - hdr_size;

	cxgb4_best_aligned_mtu(mtus, hdr_size, data_size, 8, idx);
@@ -634,7 +640,8 @@ static int send_connect(struct c4iw_ep *ep)
	set_wr_txq(skb, CPL_PRIORITY_SETUP, ep->ctrlq_idx);

	best_mtu(ep->com.dev->rdev.lldi.mtus, ep->mtu, &mtu_idx,
		 enable_tcp_timestamps);
		 enable_tcp_timestamps,
		 (AF_INET == ep->com.remote_addr.ss_family) ? 0 : 1);
	wscale = compute_wscale(rcv_win);

	/*
@@ -668,6 +675,7 @@ static int send_connect(struct c4iw_ep *ep)
	if (is_t5(ep->com.dev->rdev.lldi.adapter_type)) {
		opt2 |= T5_OPT_2_VALID;
		opt2 |= V_CONG_CNTRL(CONG_ALG_TAHOE);
		opt2 |= CONG_CNTRL_VALID; /* OPT_2_ISS for T5 */
	}
	t4_set_arp_err_handler(skb, ep, act_open_req_arp_failure);

@@ -713,8 +721,6 @@ static int send_connect(struct c4iw_ep *ep)
	} else {
		u32 isn = (prandom_u32() & ~7UL) - 1;

		opt2 |= T5_OPT_2_VALID;
		opt2 |= CONG_CNTRL_VALID; /* OPT_2_ISS for T5 */
		if (peer2peer)
			isn += 4;

@@ -756,10 +762,10 @@ static int send_connect(struct c4iw_ep *ep)
			t5_req6->peer_ip_lo = *((__be64 *)
						(ra6->sin6_addr.s6_addr + 8));
			t5_req6->opt0 = cpu_to_be64(opt0);
			t5_req6->params = (__force __be64)cpu_to_be32(
			t5_req6->params = cpu_to_be64(V_FILTER_TUPLE(
							cxgb4_select_ntuple(
						ep->com.dev->rdev.lldi.ports[0],
						ep->l2t));
						ep->l2t)));
			t5_req6->rsvd = cpu_to_be32(isn);
			PDBG("%s snd_isn %u\n", __func__,
			     be32_to_cpu(t5_req6->rsvd));
@@ -1763,7 +1769,8 @@ static void send_fw_act_open_req(struct c4iw_ep *ep, unsigned int atid)
	req->tcb.tx_max = (__force __be32) jiffies;
	req->tcb.rcv_adv = htons(1);
	best_mtu(ep->com.dev->rdev.lldi.mtus, ep->mtu, &mtu_idx,
		 enable_tcp_timestamps);
		 enable_tcp_timestamps,
		 (AF_INET == ep->com.remote_addr.ss_family) ? 0 : 1);
	wscale = compute_wscale(rcv_win);

	/*
@@ -2162,7 +2169,8 @@ static void accept_cr(struct c4iw_ep *ep, struct sk_buff *skb,
						    ep->hwtid));

	best_mtu(ep->com.dev->rdev.lldi.mtus, ep->mtu, &mtu_idx,
		 enable_tcp_timestamps && req->tcpopt.tstamp);
		 enable_tcp_timestamps && req->tcpopt.tstamp,
		 (AF_INET == ep->com.remote_addr.ss_family) ? 0 : 1);
	wscale = compute_wscale(rcv_win);

	/*
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ int c4iw_wr_log = 0;
module_param(c4iw_wr_log, int, 0444);
MODULE_PARM_DESC(c4iw_wr_log, "Enables logging of work request timing data.");

int c4iw_wr_log_size_order = 12;
static int c4iw_wr_log_size_order = 12;
module_param(c4iw_wr_log_size_order, int, 0444);
MODULE_PARM_DESC(c4iw_wr_log_size_order,
		 "Number of entries (log2) in the work request timing log.");
Loading