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

Commit 1fde76f1 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull more rdma updates from Doug Ledford:
 "Minor updates for rxe driver"

[ Starting to do merge window pulls again - the current -git tree does
  appear to have some netfilter use-after-free issues, but I've sent
  off the report to the proper channels, and I don't want to delay merge
  window activity any more ]

* tag 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
  IB/rxe: improved debug prints & code cleanup
  rdma_rxe: Ensure rdma_rxe init occurs at correct time
  IB/rxe: Properly honor max IRD value for rd/atomic.
  IB/{rxe,core,rdmavt}: Fix kernel crash for reg MR
  IB/rxe: Fix sending out loopback packet on netdev interface.
  IB/rxe: Avoid scheduling tasklet for userspace QP
parents b66484cd e404f945
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -138,6 +138,21 @@ static void rvt_unmap_sg(struct ib_device *dev,
	/* This is a stub, nothing to be done here */
}

static int rvt_map_sg_attrs(struct ib_device *dev, struct scatterlist *sgl,
			    int nents, enum dma_data_direction direction,
			    unsigned long attrs)
{
	return rvt_map_sg(dev, sgl, nents, direction);
}

static void rvt_unmap_sg_attrs(struct ib_device *dev,
			       struct scatterlist *sg, int nents,
			       enum dma_data_direction direction,
			       unsigned long attrs)
{
	return rvt_unmap_sg(dev, sg, nents, direction);
}

static void rvt_sync_single_for_cpu(struct ib_device *dev, u64 addr,
				    size_t size, enum dma_data_direction dir)
{
@@ -177,6 +192,8 @@ struct ib_dma_mapping_ops rvt_default_dma_mapping_ops = {
	.unmap_page = rvt_dma_unmap_page,
	.map_sg = rvt_map_sg,
	.unmap_sg = rvt_unmap_sg,
	.map_sg_attrs = rvt_map_sg_attrs,
	.unmap_sg_attrs = rvt_unmap_sg_attrs,
	.sync_single_for_cpu = rvt_sync_single_for_cpu,
	.sync_single_for_device = rvt_sync_single_for_device,
	.alloc_coherent = rvt_dma_alloc_coherent,
+7 −29
Original line number Diff line number Diff line
@@ -358,38 +358,16 @@ static int __init rxe_module_init(void)
	/* initialize slab caches for managed objects */
	err = rxe_cache_init();
	if (err) {
		pr_err("rxe: unable to init object pools\n");
		pr_err("unable to init object pools\n");
		return err;
	}

	err = rxe_net_ipv4_init();
	if (err) {
		pr_err("rxe: unable to init ipv4 tunnel\n");
		rxe_cache_exit();
		goto exit;
	}

	err = rxe_net_ipv6_init();
	if (err) {
		pr_err("rxe: unable to init ipv6 tunnel\n");
		rxe_cache_exit();
		goto exit;
	}

	err = register_netdevice_notifier(&rxe_net_notifier);
	if (err) {
		pr_err("rxe: Failed to rigister netdev notifier\n");
		goto exit;
	}

	pr_info("rxe: loaded\n");
	err = rxe_net_init();
	if (err)
		return err;

	pr_info("loaded\n");
	return 0;

exit:
	rxe_release_udp_tunnel(recv_sockets.sk4);
	rxe_release_udp_tunnel(recv_sockets.sk6);
	return err;
}

static void __exit rxe_module_exit(void)
@@ -398,8 +376,8 @@ static void __exit rxe_module_exit(void)
	rxe_net_exit();
	rxe_cache_exit();

	pr_info("rxe: unloaded\n");
	pr_info("unloaded\n");
}

module_init(rxe_module_init);
late_initcall(rxe_module_init);
module_exit(rxe_module_exit);
+5 −0
Original line number Diff line number Diff line
@@ -34,6 +34,11 @@
#ifndef RXE_H
#define RXE_H

#ifdef pr_fmt
#undef pr_fmt
#endif
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/module.h>
#include <linux/skbuff.h>
#include <linux/crc32.h>
+2 −2
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ int rxe_av_chk_attr(struct rxe_dev *rxe, struct ib_ah_attr *attr)
	struct rxe_port *port;

	if (attr->port_num != 1) {
		pr_info("rxe: invalid port_num = %d\n", attr->port_num);
		pr_info("invalid port_num = %d\n", attr->port_num);
		return -EINVAL;
	}

@@ -47,7 +47,7 @@ int rxe_av_chk_attr(struct rxe_dev *rxe, struct ib_ah_attr *attr)

	if (attr->ah_flags & IB_AH_GRH) {
		if (attr->grh.sgid_index > port->attr.gid_tbl_len) {
			pr_info("rxe: invalid sgid index = %d\n",
			pr_info("invalid sgid index = %d\n",
				attr->grh.sgid_index);
			return -EINVAL;
		}
+4 −2
Original line number Diff line number Diff line
@@ -567,7 +567,8 @@ int rxe_completer(void *arg)
	state = COMPST_GET_ACK;

	while (1) {
		pr_debug("state = %s\n", comp_state_name[state]);
		pr_debug("qp#%d state = %s\n", qp_num(qp),
			 comp_state_name[state]);
		switch (state) {
		case COMPST_GET_ACK:
			skb = skb_dequeue(&qp->resp_pkts);
@@ -709,7 +710,8 @@ int rxe_completer(void *arg)
					qp->comp.rnr_retry--;

				qp->req.need_retry = 1;
				pr_debug("set rnr nak timer\n");
				pr_debug("qp#%d set rnr nak timer\n",
					 qp_num(qp));
				mod_timer(&qp->rnr_nak_timer,
					  jiffies + rnrnak_jiffies(aeth_syn(pkt)
						& ~AETH_TYPE_MASK));
Loading