aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-21 13:03:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-21 13:03:46 -0400
commitcb62ab71fe2b16e8203a0f0a2ef4eda23d761338 (patch)
tree536ba39658e47d511a489c52f7aac60cd78967e5 /net/sunrpc
parent31ed8e6f93a27304c9e157dab0267772cd94eaad (diff)
parent74863948f925d9f3bb4e3d3a783e49e9c662d839 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking changes from David Miller: 1) Get rid of the error prone NLA_PUT*() macros that used an embedded goto. 2) Kill off the token-ring and MCA networking drivers, from Paul Gortmaker. 3) Reduce high-order allocations made by datagram AF_UNIX sockets, from Eric Dumazet. 4) Add PTP hardware clock support to IGB and IXGBE, from Richard Cochran and Jacob Keller. 5) Allow users to query timestamping capabilities of a card via ethtool, from Richard Cochran. 6) Add loadbalance mode to the teaming driver, from Jiri Pirko. Part of this is that we can now have BPF filters not attached to sockets, and the loadbalancing function is calculated using one. 7) Francois Romieu went through the network drivers removing gratuitous uses of netdev->base_addr, perhaps some day we can remove it completely but it's used for ISA probing still. 8) Add a BPF JIT for sparc. I know, who cares, right? :-) 9) Move networking sysctl registry away from using the compatability mode interfaces in the sysctl code. From Eric W Biederman. 10) Pavel Emelyanov added a way to save and restore TCP socket state via TCP_REPAIR, TCP_REPAIR_QUEUE, and TCP_QUEUE_SEQ socket options as well as a way to forcefully bind a socket to a port via the sk->sk_reuse value SK_FORCE_REUSE. There is also a TCP_REPAIR_OPTIONS which allows to reinstante the TCP options enabled on the connection. 11) Several enhancements from Eric Dumazet that, in particular, can enhance splice performance on TCP sockets significantly. a) Reset the offset of the per-socket sendmsg page when we know we're the only use of the page in linear_to_page(). b) Add facilities such that skb->data can be backed a page rather than SLAB kmalloc'd memory. In particular devices which were receiving into linear RX buffers can now end up providing paged data. The big result is that code like splice and GRO do not have to copy any more. 12) Allow a pure sender to more gracefully handle ACK backlogs in TCP. What can happen at high rates is that the sender hasn't grown his receive buffer limits at all (he's not receiving data so really doesn't need to), but the non-data ACKs consume receive buffer space. sk_add_backlog() is too aggressive in dropping frames in this case, so relax it's requirements by using the receive buffer plus the send buffer limit as the backlog limit instead of just the former. Also from Eric Dumazet. 13) Add ipv6 support to L2TP, from Benjamin LaHaise, James Chapman, and Chris Elston. 14) Implement TCP early retransmit (RFC 5827), from Yuchung Cheng. Basically, we can start fast retransmit before hiting the dupack threshold under certain conditions. 15) New CODEL active queue management packet scheduler, from Eric Dumazet based upon initial work by Dave Taht. Basically, the big feature is that packets are dropped (or ECN bits are set) based upon how long packets live in the queue, rather than the queue length (which is what RED uses). * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1341 commits) drivers/net/stmmac: seq_file fix memory leak ipv6/exthdrs: strict Pad1 and PadN check USB: qmi_wwan: Add ZTE (Vodafone) K3520-Z USB: qmi_wwan: Add ZTE (Vodafone) K3765-Z USB: qmi_wwan: Make forced int 4 whitelist generic net/ipv4: replace simple_strtoul with kstrtoul net/ipv4/ipconfig: neaten __setup placement net: qmi_wwan: Add Vodafone/Huawei K5005 support net: cdc_ether: Add ZTE WWAN matches before generic Ethernet ipv6: use skb coalescing in reassembly ipv4: use skb coalescing in defragmentation net: introduce skb_try_coalesce() net:ipv6:fixed space issues relating to operators. net:ipv6:fixed a trailing white space issue. ipv6: disable GSO on sockets hitting dst_allfrag tg3: use netdev_alloc_frag() API net: napi_frags_skb() is static ppp: avoid false drop_monitor false positives ipv6: bool/const conversions phase2 ipx: Remove spurious NULL checking in ipx_ioctl(). ...
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/auth_gss/gss_krb5_mech.c2
-rw-r--r--net/sunrpc/cache.c2
-rw-r--r--net/sunrpc/svc.c18
-rw-r--r--net/sunrpc/svc_xprt.c13
-rw-r--r--net/sunrpc/svcsock.c30
-rw-r--r--net/sunrpc/timer.c6
-rw-r--r--net/sunrpc/xdr.c2
-rw-r--r--net/sunrpc/xprt.c2
8 files changed, 31 insertions, 44 deletions
diff --git a/net/sunrpc/auth_gss/gss_krb5_mech.c b/net/sunrpc/auth_gss/gss_krb5_mech.c
index 8eff8c32d1b9..d3611f11a8df 100644
--- a/net/sunrpc/auth_gss/gss_krb5_mech.c
+++ b/net/sunrpc/auth_gss/gss_krb5_mech.c
@@ -624,7 +624,7 @@ gss_import_v2_context(const void *p, const void *end, struct krb5_ctx *ctx,
624 ctx->seq_send = ctx->seq_send64; 624 ctx->seq_send = ctx->seq_send64;
625 if (ctx->seq_send64 != ctx->seq_send) { 625 if (ctx->seq_send64 != ctx->seq_send) {
626 dprintk("%s: seq_send64 %lx, seq_send %x overflow?\n", __func__, 626 dprintk("%s: seq_send64 %lx, seq_send %x overflow?\n", __func__,
627 (long unsigned)ctx->seq_send64, ctx->seq_send); 627 (unsigned long)ctx->seq_send64, ctx->seq_send);
628 p = ERR_PTR(-EINVAL); 628 p = ERR_PTR(-EINVAL);
629 goto out_err; 629 goto out_err;
630 } 630 }
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
index de0b0f39d9d8..47ad2666fdf6 100644
--- a/net/sunrpc/cache.c
+++ b/net/sunrpc/cache.c
@@ -1273,7 +1273,7 @@ static void *c_start(struct seq_file *m, loff_t *pos)
1273 __acquires(cd->hash_lock) 1273 __acquires(cd->hash_lock)
1274{ 1274{
1275 loff_t n = *pos; 1275 loff_t n = *pos;
1276 unsigned hash, entry; 1276 unsigned int hash, entry;
1277 struct cache_head *ch; 1277 struct cache_head *ch;
1278 struct cache_detail *cd = ((struct handle*)m->private)->cd; 1278 struct cache_detail *cd = ((struct handle*)m->private)->cd;
1279 1279
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 4153846984ac..017c0117d154 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -1041,23 +1041,21 @@ static void svc_unregister(const struct svc_serv *serv, struct net *net)
1041 * Printk the given error with the address of the client that caused it. 1041 * Printk the given error with the address of the client that caused it.
1042 */ 1042 */
1043static __printf(2, 3) 1043static __printf(2, 3)
1044int svc_printk(struct svc_rqst *rqstp, const char *fmt, ...) 1044void svc_printk(struct svc_rqst *rqstp, const char *fmt, ...)
1045{ 1045{
1046 struct va_format vaf;
1046 va_list args; 1047 va_list args;
1047 int r;
1048 char buf[RPC_MAX_ADDRBUFLEN]; 1048 char buf[RPC_MAX_ADDRBUFLEN];
1049 1049
1050 if (!net_ratelimit()) 1050 va_start(args, fmt);
1051 return 0;
1052 1051
1053 printk(KERN_WARNING "svc: %s: ", 1052 vaf.fmt = fmt;
1054 svc_print_addr(rqstp, buf, sizeof(buf))); 1053 vaf.va = &args;
1055 1054
1056 va_start(args, fmt); 1055 net_warn_ratelimited("svc: %s: %pV",
1057 r = vprintk(fmt, args); 1056 svc_print_addr(rqstp, buf, sizeof(buf)), &vaf);
1058 va_end(args);
1059 1057
1060 return r; 1058 va_end(args);
1061} 1059}
1062 1060
1063/* 1061/*
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
index 4bda09d7e1a4..b98ee3514912 100644
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -544,14 +544,11 @@ static void svc_check_conn_limits(struct svc_serv *serv)
544 struct svc_xprt *xprt = NULL; 544 struct svc_xprt *xprt = NULL;
545 spin_lock_bh(&serv->sv_lock); 545 spin_lock_bh(&serv->sv_lock);
546 if (!list_empty(&serv->sv_tempsocks)) { 546 if (!list_empty(&serv->sv_tempsocks)) {
547 if (net_ratelimit()) { 547 /* Try to help the admin */
548 /* Try to help the admin */ 548 net_notice_ratelimited("%s: too many open connections, consider increasing the %s\n",
549 printk(KERN_NOTICE "%s: too many open " 549 serv->sv_name, serv->sv_maxconn ?
550 "connections, consider increasing %s\n", 550 "max number of connections" :
551 serv->sv_name, serv->sv_maxconn ? 551 "number of threads");
552 "the max number of connections." :
553 "the number of threads.");
554 }
555 /* 552 /*
556 * Always select the oldest connection. It's not fair, 553 * Always select the oldest connection. It's not fair,
557 * but so is life 554 * but so is life
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 824d32fb3121..a6de09de5d21 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -617,11 +617,8 @@ static int svc_udp_recvfrom(struct svc_rqst *rqstp)
617 rqstp->rq_prot = IPPROTO_UDP; 617 rqstp->rq_prot = IPPROTO_UDP;
618 618
619 if (!svc_udp_get_dest_address(rqstp, cmh)) { 619 if (!svc_udp_get_dest_address(rqstp, cmh)) {
620 if (net_ratelimit()) 620 net_warn_ratelimited("svc: received unknown control message %d/%d; dropping RPC reply datagram\n",
621 printk(KERN_WARNING 621 cmh->cmsg_level, cmh->cmsg_type);
622 "svc: received unknown control message %d/%d; "
623 "dropping RPC reply datagram\n",
624 cmh->cmsg_level, cmh->cmsg_type);
625 skb_free_datagram_locked(svsk->sk_sk, skb); 622 skb_free_datagram_locked(svsk->sk_sk, skb);
626 return 0; 623 return 0;
627 } 624 }
@@ -871,18 +868,17 @@ static struct svc_xprt *svc_tcp_accept(struct svc_xprt *xprt)
871 if (err == -ENOMEM) 868 if (err == -ENOMEM)
872 printk(KERN_WARNING "%s: no more sockets!\n", 869 printk(KERN_WARNING "%s: no more sockets!\n",
873 serv->sv_name); 870 serv->sv_name);
874 else if (err != -EAGAIN && net_ratelimit()) 871 else if (err != -EAGAIN)
875 printk(KERN_WARNING "%s: accept failed (err %d)!\n", 872 net_warn_ratelimited("%s: accept failed (err %d)!\n",
876 serv->sv_name, -err); 873 serv->sv_name, -err);
877 return NULL; 874 return NULL;
878 } 875 }
879 set_bit(XPT_CONN, &svsk->sk_xprt.xpt_flags); 876 set_bit(XPT_CONN, &svsk->sk_xprt.xpt_flags);
880 877
881 err = kernel_getpeername(newsock, sin, &slen); 878 err = kernel_getpeername(newsock, sin, &slen);
882 if (err < 0) { 879 if (err < 0) {
883 if (net_ratelimit()) 880 net_warn_ratelimited("%s: peername failed (err %d)!\n",
884 printk(KERN_WARNING "%s: peername failed (err %d)!\n", 881 serv->sv_name, -err);
885 serv->sv_name, -err);
886 goto failed; /* aborted connection or whatever */ 882 goto failed; /* aborted connection or whatever */
887 } 883 }
888 884
@@ -1012,19 +1008,15 @@ static int svc_tcp_recv_record(struct svc_sock *svsk, struct svc_rqst *rqstp)
1012 * bit set in the fragment length header. 1008 * bit set in the fragment length header.
1013 * But apparently no known nfs clients send fragmented 1009 * But apparently no known nfs clients send fragmented
1014 * records. */ 1010 * records. */
1015 if (net_ratelimit()) 1011 net_notice_ratelimited("RPC: multiple fragments per record not supported\n");
1016 printk(KERN_NOTICE "RPC: multiple fragments "
1017 "per record not supported\n");
1018 goto err_delete; 1012 goto err_delete;
1019 } 1013 }
1020 1014
1021 svsk->sk_reclen &= RPC_FRAGMENT_SIZE_MASK; 1015 svsk->sk_reclen &= RPC_FRAGMENT_SIZE_MASK;
1022 dprintk("svc: TCP record, %d bytes\n", svsk->sk_reclen); 1016 dprintk("svc: TCP record, %d bytes\n", svsk->sk_reclen);
1023 if (svsk->sk_reclen > serv->sv_max_mesg) { 1017 if (svsk->sk_reclen > serv->sv_max_mesg) {
1024 if (net_ratelimit()) 1018 net_notice_ratelimited("RPC: fragment too large: 0x%08lx\n",
1025 printk(KERN_NOTICE "RPC: " 1019 (unsigned long)svsk->sk_reclen);
1026 "fragment too large: 0x%08lx\n",
1027 (unsigned long)svsk->sk_reclen);
1028 goto err_delete; 1020 goto err_delete;
1029 } 1021 }
1030 } 1022 }
@@ -1556,7 +1548,7 @@ static struct svc_xprt *svc_create_socket(struct svc_serv *serv,
1556 (char *)&val, sizeof(val)); 1548 (char *)&val, sizeof(val));
1557 1549
1558 if (type == SOCK_STREAM) 1550 if (type == SOCK_STREAM)
1559 sock->sk->sk_reuse = 1; /* allow address reuse */ 1551 sock->sk->sk_reuse = SK_CAN_REUSE; /* allow address reuse */
1560 error = kernel_bind(sock, sin, len); 1552 error = kernel_bind(sock, sin, len);
1561 if (error < 0) 1553 if (error < 0)
1562 goto bummer; 1554 goto bummer;
diff --git a/net/sunrpc/timer.c b/net/sunrpc/timer.c
index dd824341c349..08881d0c9672 100644
--- a/net/sunrpc/timer.c
+++ b/net/sunrpc/timer.c
@@ -34,7 +34,7 @@
34void rpc_init_rtt(struct rpc_rtt *rt, unsigned long timeo) 34void rpc_init_rtt(struct rpc_rtt *rt, unsigned long timeo)
35{ 35{
36 unsigned long init = 0; 36 unsigned long init = 0;
37 unsigned i; 37 unsigned int i;
38 38
39 rt->timeo = timeo; 39 rt->timeo = timeo;
40 40
@@ -57,7 +57,7 @@ EXPORT_SYMBOL_GPL(rpc_init_rtt);
57 * NB: When computing the smoothed RTT and standard deviation, 57 * NB: When computing the smoothed RTT and standard deviation,
58 * be careful not to produce negative intermediate results. 58 * be careful not to produce negative intermediate results.
59 */ 59 */
60void rpc_update_rtt(struct rpc_rtt *rt, unsigned timer, long m) 60void rpc_update_rtt(struct rpc_rtt *rt, unsigned int timer, long m)
61{ 61{
62 long *srtt, *sdrtt; 62 long *srtt, *sdrtt;
63 63
@@ -106,7 +106,7 @@ EXPORT_SYMBOL_GPL(rpc_update_rtt);
106 * read, write, commit - A+4D 106 * read, write, commit - A+4D
107 * other - timeo 107 * other - timeo
108 */ 108 */
109unsigned long rpc_calc_rto(struct rpc_rtt *rt, unsigned timer) 109unsigned long rpc_calc_rto(struct rpc_rtt *rt, unsigned int timer)
110{ 110{
111 unsigned long res; 111 unsigned long res;
112 112
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c
index b97a3dd9a60a..fddcccfcdf76 100644
--- a/net/sunrpc/xdr.c
+++ b/net/sunrpc/xdr.c
@@ -1204,7 +1204,7 @@ xdr_process_buf(struct xdr_buf *buf, unsigned int offset, unsigned int len,
1204 int (*actor)(struct scatterlist *, void *), void *data) 1204 int (*actor)(struct scatterlist *, void *), void *data)
1205{ 1205{
1206 int i, ret = 0; 1206 int i, ret = 0;
1207 unsigned page_len, thislen, page_offset; 1207 unsigned int page_len, thislen, page_offset;
1208 struct scatterlist sg[1]; 1208 struct scatterlist sg[1];
1209 1209
1210 sg_init_table(sg, 1); 1210 sg_init_table(sg, 1);
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index 0cbcd1ab49ab..6fe2dcead150 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -783,7 +783,7 @@ static void xprt_update_rtt(struct rpc_task *task)
783{ 783{
784 struct rpc_rqst *req = task->tk_rqstp; 784 struct rpc_rqst *req = task->tk_rqstp;
785 struct rpc_rtt *rtt = task->tk_client->cl_rtt; 785 struct rpc_rtt *rtt = task->tk_client->cl_rtt;
786 unsigned timer = task->tk_msg.rpc_proc->p_timer; 786 unsigned int timer = task->tk_msg.rpc_proc->p_timer;
787 long m = usecs_to_jiffies(ktime_to_us(req->rq_rtt)); 787 long m = usecs_to_jiffies(ktime_to_us(req->rq_rtt));
788 788
789 if (timer) { 789 if (timer) {