diff options
| author | David S. Miller <davem@davemloft.net> | 2009-06-15 06:02:23 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2009-06-15 06:02:23 -0400 |
| commit | 9cbc1cb8cd46ce1f7645b9de249b2ce8460129bb (patch) | |
| tree | 8d104ec2a459346b99413b0b77421ca7b9936c1a /net | |
| parent | ca44d6e60f9de26281fda203f58b570e1748c015 (diff) | |
| parent | 45e3e1935e2857c54783291107d33323b3ef33c8 (diff) | |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
Documentation/feature-removal-schedule.txt
drivers/scsi/fcoe/fcoe.c
net/core/drop_monitor.c
net/core/net-traces.c
Diffstat (limited to 'net')
| -rw-r--r-- | net/9p/trans_virtio.c | 6 | ||||
| -rw-r--r-- | net/core/dev.c | 2 | ||||
| -rw-r--r-- | net/core/drop_monitor.c | 4 | ||||
| -rw-r--r-- | net/core/net-traces.c | 7 | ||||
| -rw-r--r-- | net/core/netpoll.c | 2 | ||||
| -rw-r--r-- | net/core/skbuff.c | 2 | ||||
| -rw-r--r-- | net/ipv6/Kconfig | 2 | ||||
| -rw-r--r-- | net/ipv6/addrconf.c | 2 | ||||
| -rw-r--r-- | net/netfilter/Kconfig | 4 | ||||
| -rw-r--r-- | net/netfilter/nf_conntrack_acct.c | 2 | ||||
| -rw-r--r-- | net/sched/cls_cgroup.c | 3 | ||||
| -rw-r--r-- | net/sunrpc/svcsock.c | 35 | ||||
| -rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_sendto.c | 12 | ||||
| -rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_transport.c | 10 | ||||
| -rw-r--r-- | net/sunrpc/xprtrdma/verbs.c | 3 |
15 files changed, 60 insertions, 36 deletions
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index bb8579a141a8..a49484e67e1d 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c | |||
| @@ -246,7 +246,7 @@ static int p9_virtio_probe(struct virtio_device *vdev) | |||
| 246 | chan->vdev = vdev; | 246 | chan->vdev = vdev; |
| 247 | 247 | ||
| 248 | /* We expect one virtqueue, for requests. */ | 248 | /* We expect one virtqueue, for requests. */ |
| 249 | chan->vq = vdev->config->find_vq(vdev, 0, req_done); | 249 | chan->vq = virtio_find_single_vq(vdev, req_done, "requests"); |
| 250 | if (IS_ERR(chan->vq)) { | 250 | if (IS_ERR(chan->vq)) { |
| 251 | err = PTR_ERR(chan->vq); | 251 | err = PTR_ERR(chan->vq); |
| 252 | goto out_free_vq; | 252 | goto out_free_vq; |
| @@ -261,7 +261,7 @@ static int p9_virtio_probe(struct virtio_device *vdev) | |||
| 261 | return 0; | 261 | return 0; |
| 262 | 262 | ||
| 263 | out_free_vq: | 263 | out_free_vq: |
| 264 | vdev->config->del_vq(chan->vq); | 264 | vdev->config->del_vqs(vdev); |
| 265 | fail: | 265 | fail: |
| 266 | mutex_lock(&virtio_9p_lock); | 266 | mutex_lock(&virtio_9p_lock); |
| 267 | chan_index--; | 267 | chan_index--; |
| @@ -332,7 +332,7 @@ static void p9_virtio_remove(struct virtio_device *vdev) | |||
| 332 | BUG_ON(chan->inuse); | 332 | BUG_ON(chan->inuse); |
| 333 | 333 | ||
| 334 | if (chan->initialized) { | 334 | if (chan->initialized) { |
| 335 | vdev->config->del_vq(chan->vq); | 335 | vdev->config->del_vqs(vdev); |
| 336 | chan->initialized = false; | 336 | chan->initialized = false; |
| 337 | } | 337 | } |
| 338 | } | 338 | } |
diff --git a/net/core/dev.c b/net/core/dev.c index ea00e36f48e1..576a61574a93 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
| @@ -126,7 +126,7 @@ | |||
| 126 | #include <linux/in.h> | 126 | #include <linux/in.h> |
| 127 | #include <linux/jhash.h> | 127 | #include <linux/jhash.h> |
| 128 | #include <linux/random.h> | 128 | #include <linux/random.h> |
| 129 | #include <trace/napi.h> | 129 | #include <trace/events/napi.h> |
| 130 | 130 | ||
| 131 | #include "net-sysfs.h" | 131 | #include "net-sysfs.h" |
| 132 | 132 | ||
diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c index a6c2ac2828fb..9d66fa953ab7 100644 --- a/net/core/drop_monitor.c +++ b/net/core/drop_monitor.c | |||
| @@ -24,8 +24,8 @@ | |||
| 24 | #include <net/genetlink.h> | 24 | #include <net/genetlink.h> |
| 25 | #include <net/netevent.h> | 25 | #include <net/netevent.h> |
| 26 | 26 | ||
| 27 | #include <trace/skb.h> | 27 | #include <trace/events/skb.h> |
| 28 | #include <trace/napi.h> | 28 | #include <trace/events/napi.h> |
| 29 | 29 | ||
| 30 | #include <asm/unaligned.h> | 30 | #include <asm/unaligned.h> |
| 31 | 31 | ||
diff --git a/net/core/net-traces.c b/net/core/net-traces.c index b07b25bd2cde..f1e982c508bb 100644 --- a/net/core/net-traces.c +++ b/net/core/net-traces.c | |||
| @@ -19,15 +19,14 @@ | |||
| 19 | #include <linux/workqueue.h> | 19 | #include <linux/workqueue.h> |
| 20 | #include <linux/netlink.h> | 20 | #include <linux/netlink.h> |
| 21 | #include <linux/net_dropmon.h> | 21 | #include <linux/net_dropmon.h> |
| 22 | #include <trace/skb.h> | ||
| 23 | #include <trace/napi.h> | ||
| 24 | 22 | ||
| 25 | #include <asm/unaligned.h> | 23 | #include <asm/unaligned.h> |
| 26 | #include <asm/bitops.h> | 24 | #include <asm/bitops.h> |
| 27 | 25 | ||
| 26 | #define CREATE_TRACE_POINTS | ||
| 27 | #include <trace/events/skb.h> | ||
| 28 | #include <trace/events/napi.h> | ||
| 28 | 29 | ||
| 29 | DEFINE_TRACE(kfree_skb); | ||
| 30 | EXPORT_TRACEPOINT_SYMBOL_GPL(kfree_skb); | 30 | EXPORT_TRACEPOINT_SYMBOL_GPL(kfree_skb); |
| 31 | 31 | ||
| 32 | DEFINE_TRACE(napi_poll); | ||
| 33 | EXPORT_TRACEPOINT_SYMBOL_GPL(napi_poll); | 32 | EXPORT_TRACEPOINT_SYMBOL_GPL(napi_poll); |
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 7ab31a7576a1..9675f312830d 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | #include <net/tcp.h> | 24 | #include <net/tcp.h> |
| 25 | #include <net/udp.h> | 25 | #include <net/udp.h> |
| 26 | #include <asm/unaligned.h> | 26 | #include <asm/unaligned.h> |
| 27 | #include <trace/napi.h> | 27 | #include <trace/events/napi.h> |
| 28 | 28 | ||
| 29 | /* | 29 | /* |
| 30 | * We maintain a small pool of fully-sized skbs, to make sure the | 30 | * We maintain a small pool of fully-sized skbs, to make sure the |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index b94d777e3eb4..1a94a3037370 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
| @@ -65,7 +65,7 @@ | |||
| 65 | 65 | ||
| 66 | #include <asm/uaccess.h> | 66 | #include <asm/uaccess.h> |
| 67 | #include <asm/system.h> | 67 | #include <asm/system.h> |
| 68 | #include <trace/skb.h> | 68 | #include <trace/events/skb.h> |
| 69 | 69 | ||
| 70 | #include "kmap_skb.h" | 70 | #include "kmap_skb.h" |
| 71 | 71 | ||
diff --git a/net/ipv6/Kconfig b/net/ipv6/Kconfig index ca8cb326d1d2..ead6c7a42f44 100644 --- a/net/ipv6/Kconfig +++ b/net/ipv6/Kconfig | |||
| @@ -168,7 +168,7 @@ config IPV6_SIT | |||
| 168 | into IPv4 packets. This is useful if you want to connect two IPv6 | 168 | into IPv4 packets. This is useful if you want to connect two IPv6 |
| 169 | networks over an IPv4-only path. | 169 | networks over an IPv4-only path. |
| 170 | 170 | ||
| 171 | Saying M here will produce a module called sit.ko. If unsure, say Y. | 171 | Saying M here will produce a module called sit. If unsure, say Y. |
| 172 | 172 | ||
| 173 | config IPV6_NDISC_NODETYPE | 173 | config IPV6_NDISC_NODETYPE |
| 174 | bool | 174 | bool |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index c3488372f12d..8c1e86afbbf5 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
| @@ -2766,7 +2766,7 @@ static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags) | |||
| 2766 | spin_unlock_bh(&ifp->lock); | 2766 | spin_unlock_bh(&ifp->lock); |
| 2767 | read_unlock_bh(&idev->lock); | 2767 | read_unlock_bh(&idev->lock); |
| 2768 | /* | 2768 | /* |
| 2769 | * If the defice is not ready: | 2769 | * If the device is not ready: |
| 2770 | * - keep it tentative if it is a permanent address. | 2770 | * - keep it tentative if it is a permanent address. |
| 2771 | * - otherwise, kill it. | 2771 | * - otherwise, kill it. |
| 2772 | */ | 2772 | */ |
diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig index 79ba47f042c0..634d14affc8d 100644 --- a/net/netfilter/Kconfig +++ b/net/netfilter/Kconfig | |||
| @@ -327,7 +327,7 @@ config NETFILTER_XT_TARGET_CONNMARK | |||
| 327 | 327 | ||
| 328 | If you want to compile it as a module, say M here and read | 328 | If you want to compile it as a module, say M here and read |
| 329 | <file:Documentation/kbuild/modules.txt>. The module will be called | 329 | <file:Documentation/kbuild/modules.txt>. The module will be called |
| 330 | ipt_CONNMARK.ko. If unsure, say `N'. | 330 | ipt_CONNMARK. If unsure, say `N'. |
| 331 | 331 | ||
| 332 | config NETFILTER_XT_TARGET_CONNSECMARK | 332 | config NETFILTER_XT_TARGET_CONNSECMARK |
| 333 | tristate '"CONNSECMARK" target support' | 333 | tristate '"CONNSECMARK" target support' |
| @@ -584,7 +584,7 @@ config NETFILTER_XT_MATCH_CONNMARK | |||
| 584 | 584 | ||
| 585 | If you want to compile it as a module, say M here and read | 585 | If you want to compile it as a module, say M here and read |
| 586 | <file:Documentation/kbuild/modules.txt>. The module will be called | 586 | <file:Documentation/kbuild/modules.txt>. The module will be called |
| 587 | ipt_connmark.ko. If unsure, say `N'. | 587 | ipt_connmark. If unsure, say `N'. |
| 588 | 588 | ||
| 589 | config NETFILTER_XT_MATCH_CONNTRACK | 589 | config NETFILTER_XT_MATCH_CONNTRACK |
| 590 | tristate '"conntrack" connection tracking match support' | 590 | tristate '"conntrack" connection tracking match support' |
diff --git a/net/netfilter/nf_conntrack_acct.c b/net/netfilter/nf_conntrack_acct.c index 9fe8982bd7c9..4a1d94aac20b 100644 --- a/net/netfilter/nf_conntrack_acct.c +++ b/net/netfilter/nf_conntrack_acct.c | |||
| @@ -116,7 +116,7 @@ int nf_conntrack_acct_init(struct net *net) | |||
| 116 | if (net_eq(net, &init_net)) { | 116 | if (net_eq(net, &init_net)) { |
| 117 | #ifdef CONFIG_NF_CT_ACCT | 117 | #ifdef CONFIG_NF_CT_ACCT |
| 118 | printk(KERN_WARNING "CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use\n"); | 118 | printk(KERN_WARNING "CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use\n"); |
| 119 | printk(KERN_WARNING "nf_conntrack.acct=1 kernel paramater, acct=1 nf_conntrack module option or\n"); | 119 | printk(KERN_WARNING "nf_conntrack.acct=1 kernel parameter, acct=1 nf_conntrack module option or\n"); |
| 120 | printk(KERN_WARNING "sysctl net.netfilter.nf_conntrack_acct=1 to enable it.\n"); | 120 | printk(KERN_WARNING "sysctl net.netfilter.nf_conntrack_acct=1 to enable it.\n"); |
| 121 | #endif | 121 | #endif |
| 122 | 122 | ||
diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c index 0f815cc6a3db..e4877ca6727c 100644 --- a/net/sched/cls_cgroup.c +++ b/net/sched/cls_cgroup.c | |||
| @@ -161,6 +161,9 @@ static int cls_cgroup_change(struct tcf_proto *tp, unsigned long base, | |||
| 161 | struct tcf_exts e; | 161 | struct tcf_exts e; |
| 162 | int err; | 162 | int err; |
| 163 | 163 | ||
| 164 | if (!tca[TCA_OPTIONS]) | ||
| 165 | return -EINVAL; | ||
| 166 | |||
| 164 | if (head == NULL) { | 167 | if (head == NULL) { |
| 165 | if (!handle) | 168 | if (!handle) |
| 166 | return -EINVAL; | 169 | return -EINVAL; |
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index af3198814c15..9d504234af4a 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
| @@ -345,6 +345,7 @@ static void svc_sock_setbufsize(struct socket *sock, unsigned int snd, | |||
| 345 | lock_sock(sock->sk); | 345 | lock_sock(sock->sk); |
| 346 | sock->sk->sk_sndbuf = snd * 2; | 346 | sock->sk->sk_sndbuf = snd * 2; |
| 347 | sock->sk->sk_rcvbuf = rcv * 2; | 347 | sock->sk->sk_rcvbuf = rcv * 2; |
| 348 | sock->sk->sk_userlocks |= SOCK_SNDBUF_LOCK|SOCK_RCVBUF_LOCK; | ||
| 348 | release_sock(sock->sk); | 349 | release_sock(sock->sk); |
| 349 | #endif | 350 | #endif |
| 350 | } | 351 | } |
| @@ -796,6 +797,23 @@ static int svc_tcp_recvfrom(struct svc_rqst *rqstp) | |||
| 796 | test_bit(XPT_CONN, &svsk->sk_xprt.xpt_flags), | 797 | test_bit(XPT_CONN, &svsk->sk_xprt.xpt_flags), |
| 797 | test_bit(XPT_CLOSE, &svsk->sk_xprt.xpt_flags)); | 798 | test_bit(XPT_CLOSE, &svsk->sk_xprt.xpt_flags)); |
| 798 | 799 | ||
| 800 | if (test_and_clear_bit(XPT_CHNGBUF, &svsk->sk_xprt.xpt_flags)) | ||
| 801 | /* sndbuf needs to have room for one request | ||
| 802 | * per thread, otherwise we can stall even when the | ||
| 803 | * network isn't a bottleneck. | ||
| 804 | * | ||
| 805 | * We count all threads rather than threads in a | ||
| 806 | * particular pool, which provides an upper bound | ||
| 807 | * on the number of threads which will access the socket. | ||
| 808 | * | ||
| 809 | * rcvbuf just needs to be able to hold a few requests. | ||
| 810 | * Normally they will be removed from the queue | ||
| 811 | * as soon a a complete request arrives. | ||
| 812 | */ | ||
| 813 | svc_sock_setbufsize(svsk->sk_sock, | ||
| 814 | (serv->sv_nrthreads+3) * serv->sv_max_mesg, | ||
| 815 | 3 * serv->sv_max_mesg); | ||
| 816 | |||
| 799 | clear_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags); | 817 | clear_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags); |
| 800 | 818 | ||
| 801 | /* Receive data. If we haven't got the record length yet, get | 819 | /* Receive data. If we haven't got the record length yet, get |
| @@ -1043,6 +1061,15 @@ static void svc_tcp_init(struct svc_sock *svsk, struct svc_serv *serv) | |||
| 1043 | 1061 | ||
| 1044 | tcp_sk(sk)->nonagle |= TCP_NAGLE_OFF; | 1062 | tcp_sk(sk)->nonagle |= TCP_NAGLE_OFF; |
| 1045 | 1063 | ||
| 1064 | /* initialise setting must have enough space to | ||
| 1065 | * receive and respond to one request. | ||
| 1066 | * svc_tcp_recvfrom will re-adjust if necessary | ||
| 1067 | */ | ||
| 1068 | svc_sock_setbufsize(svsk->sk_sock, | ||
| 1069 | 3 * svsk->sk_xprt.xpt_server->sv_max_mesg, | ||
| 1070 | 3 * svsk->sk_xprt.xpt_server->sv_max_mesg); | ||
| 1071 | |||
| 1072 | set_bit(XPT_CHNGBUF, &svsk->sk_xprt.xpt_flags); | ||
| 1046 | set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags); | 1073 | set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags); |
| 1047 | if (sk->sk_state != TCP_ESTABLISHED) | 1074 | if (sk->sk_state != TCP_ESTABLISHED) |
| 1048 | set_bit(XPT_CLOSE, &svsk->sk_xprt.xpt_flags); | 1075 | set_bit(XPT_CLOSE, &svsk->sk_xprt.xpt_flags); |
| @@ -1112,14 +1139,8 @@ static struct svc_sock *svc_setup_socket(struct svc_serv *serv, | |||
| 1112 | /* Initialize the socket */ | 1139 | /* Initialize the socket */ |
| 1113 | if (sock->type == SOCK_DGRAM) | 1140 | if (sock->type == SOCK_DGRAM) |
| 1114 | svc_udp_init(svsk, serv); | 1141 | svc_udp_init(svsk, serv); |
| 1115 | else { | 1142 | else |
| 1116 | /* initialise setting must have enough space to | ||
| 1117 | * receive and respond to one request. | ||
| 1118 | */ | ||
| 1119 | svc_sock_setbufsize(svsk->sk_sock, 4 * serv->sv_max_mesg, | ||
| 1120 | 4 * serv->sv_max_mesg); | ||
| 1121 | svc_tcp_init(svsk, serv); | 1143 | svc_tcp_init(svsk, serv); |
| 1122 | } | ||
| 1123 | 1144 | ||
| 1124 | dprintk("svc: svc_setup_socket created %p (inet %p)\n", | 1145 | dprintk("svc: svc_setup_socket created %p (inet %p)\n", |
| 1125 | svsk, svsk->sk_sk); | 1146 | svsk, svsk->sk_sk); |
diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c index 8b510c5e8777..f11be72a1a80 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c +++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c | |||
| @@ -128,7 +128,8 @@ static int fast_reg_xdr(struct svcxprt_rdma *xprt, | |||
| 128 | page_bytes -= sge_bytes; | 128 | page_bytes -= sge_bytes; |
| 129 | 129 | ||
| 130 | frmr->page_list->page_list[page_no] = | 130 | frmr->page_list->page_list[page_no] = |
| 131 | ib_dma_map_page(xprt->sc_cm_id->device, page, 0, | 131 | ib_dma_map_single(xprt->sc_cm_id->device, |
| 132 | page_address(page), | ||
| 132 | PAGE_SIZE, DMA_TO_DEVICE); | 133 | PAGE_SIZE, DMA_TO_DEVICE); |
| 133 | if (ib_dma_mapping_error(xprt->sc_cm_id->device, | 134 | if (ib_dma_mapping_error(xprt->sc_cm_id->device, |
| 134 | frmr->page_list->page_list[page_no])) | 135 | frmr->page_list->page_list[page_no])) |
| @@ -532,18 +533,17 @@ static int send_reply(struct svcxprt_rdma *rdma, | |||
| 532 | clear_bit(RDMACTXT_F_FAST_UNREG, &ctxt->flags); | 533 | clear_bit(RDMACTXT_F_FAST_UNREG, &ctxt->flags); |
| 533 | 534 | ||
| 534 | /* Prepare the SGE for the RPCRDMA Header */ | 535 | /* Prepare the SGE for the RPCRDMA Header */ |
| 536 | ctxt->sge[0].lkey = rdma->sc_dma_lkey; | ||
| 537 | ctxt->sge[0].length = svc_rdma_xdr_get_reply_hdr_len(rdma_resp); | ||
| 535 | ctxt->sge[0].addr = | 538 | ctxt->sge[0].addr = |
| 536 | ib_dma_map_page(rdma->sc_cm_id->device, | 539 | ib_dma_map_single(rdma->sc_cm_id->device, page_address(page), |
| 537 | page, 0, PAGE_SIZE, DMA_TO_DEVICE); | 540 | ctxt->sge[0].length, DMA_TO_DEVICE); |
| 538 | if (ib_dma_mapping_error(rdma->sc_cm_id->device, ctxt->sge[0].addr)) | 541 | if (ib_dma_mapping_error(rdma->sc_cm_id->device, ctxt->sge[0].addr)) |
| 539 | goto err; | 542 | goto err; |
| 540 | atomic_inc(&rdma->sc_dma_used); | 543 | atomic_inc(&rdma->sc_dma_used); |
| 541 | 544 | ||
| 542 | ctxt->direction = DMA_TO_DEVICE; | 545 | ctxt->direction = DMA_TO_DEVICE; |
| 543 | 546 | ||
| 544 | ctxt->sge[0].length = svc_rdma_xdr_get_reply_hdr_len(rdma_resp); | ||
| 545 | ctxt->sge[0].lkey = rdma->sc_dma_lkey; | ||
| 546 | |||
| 547 | /* Determine how many of our SGE are to be transmitted */ | 547 | /* Determine how many of our SGE are to be transmitted */ |
| 548 | for (sge_no = 1; byte_count && sge_no < vec->count; sge_no++) { | 548 | for (sge_no = 1; byte_count && sge_no < vec->count; sge_no++) { |
| 549 | sge_bytes = min_t(size_t, vec->sge[sge_no].iov_len, byte_count); | 549 | sge_bytes = min_t(size_t, vec->sge[sge_no].iov_len, byte_count); |
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c index 4b0c2fa15e0b..5151f9f6c573 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c | |||
| @@ -500,8 +500,8 @@ int svc_rdma_post_recv(struct svcxprt_rdma *xprt) | |||
| 500 | BUG_ON(sge_no >= xprt->sc_max_sge); | 500 | BUG_ON(sge_no >= xprt->sc_max_sge); |
| 501 | page = svc_rdma_get_page(); | 501 | page = svc_rdma_get_page(); |
| 502 | ctxt->pages[sge_no] = page; | 502 | ctxt->pages[sge_no] = page; |
| 503 | pa = ib_dma_map_page(xprt->sc_cm_id->device, | 503 | pa = ib_dma_map_single(xprt->sc_cm_id->device, |
| 504 | page, 0, PAGE_SIZE, | 504 | page_address(page), PAGE_SIZE, |
| 505 | DMA_FROM_DEVICE); | 505 | DMA_FROM_DEVICE); |
| 506 | if (ib_dma_mapping_error(xprt->sc_cm_id->device, pa)) | 506 | if (ib_dma_mapping_error(xprt->sc_cm_id->device, pa)) |
| 507 | goto err_put_ctxt; | 507 | goto err_put_ctxt; |
| @@ -1315,8 +1315,8 @@ void svc_rdma_send_error(struct svcxprt_rdma *xprt, struct rpcrdma_msg *rmsgp, | |||
| 1315 | length = svc_rdma_xdr_encode_error(xprt, rmsgp, err, va); | 1315 | length = svc_rdma_xdr_encode_error(xprt, rmsgp, err, va); |
| 1316 | 1316 | ||
| 1317 | /* Prepare SGE for local address */ | 1317 | /* Prepare SGE for local address */ |
| 1318 | sge.addr = ib_dma_map_page(xprt->sc_cm_id->device, | 1318 | sge.addr = ib_dma_map_single(xprt->sc_cm_id->device, |
| 1319 | p, 0, PAGE_SIZE, DMA_FROM_DEVICE); | 1319 | page_address(p), PAGE_SIZE, DMA_FROM_DEVICE); |
| 1320 | if (ib_dma_mapping_error(xprt->sc_cm_id->device, sge.addr)) { | 1320 | if (ib_dma_mapping_error(xprt->sc_cm_id->device, sge.addr)) { |
| 1321 | put_page(p); | 1321 | put_page(p); |
| 1322 | return; | 1322 | return; |
| @@ -1343,7 +1343,7 @@ void svc_rdma_send_error(struct svcxprt_rdma *xprt, struct rpcrdma_msg *rmsgp, | |||
| 1343 | if (ret) { | 1343 | if (ret) { |
| 1344 | dprintk("svcrdma: Error %d posting send for protocol error\n", | 1344 | dprintk("svcrdma: Error %d posting send for protocol error\n", |
| 1345 | ret); | 1345 | ret); |
| 1346 | ib_dma_unmap_page(xprt->sc_cm_id->device, | 1346 | ib_dma_unmap_single(xprt->sc_cm_id->device, |
| 1347 | sge.addr, PAGE_SIZE, | 1347 | sge.addr, PAGE_SIZE, |
| 1348 | DMA_FROM_DEVICE); | 1348 | DMA_FROM_DEVICE); |
| 1349 | svc_rdma_put_context(ctxt, 1); | 1349 | svc_rdma_put_context(ctxt, 1); |
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index 3b21e0cc5e69..465aafc2007f 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c | |||
| @@ -1495,7 +1495,8 @@ rpcrdma_register_frmr_external(struct rpcrdma_mr_seg *seg, | |||
| 1495 | frmr_wr.wr.fast_reg.page_shift = PAGE_SHIFT; | 1495 | frmr_wr.wr.fast_reg.page_shift = PAGE_SHIFT; |
| 1496 | frmr_wr.wr.fast_reg.length = i << PAGE_SHIFT; | 1496 | frmr_wr.wr.fast_reg.length = i << PAGE_SHIFT; |
| 1497 | frmr_wr.wr.fast_reg.access_flags = (writing ? | 1497 | frmr_wr.wr.fast_reg.access_flags = (writing ? |
| 1498 | IB_ACCESS_REMOTE_WRITE : IB_ACCESS_REMOTE_READ); | 1498 | IB_ACCESS_REMOTE_WRITE | IB_ACCESS_LOCAL_WRITE : |
| 1499 | IB_ACCESS_REMOTE_READ); | ||
| 1499 | frmr_wr.wr.fast_reg.rkey = seg1->mr_chunk.rl_mw->r.frmr.fr_mr->rkey; | 1500 | frmr_wr.wr.fast_reg.rkey = seg1->mr_chunk.rl_mw->r.frmr.fr_mr->rkey; |
| 1500 | DECR_CQCOUNT(&r_xprt->rx_ep); | 1501 | DECR_CQCOUNT(&r_xprt->rx_ep); |
| 1501 | 1502 | ||
