From: Dan Williams <dan.j.williams@intel.com>
To: dmaengine@vger.kernel.org
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
netdev@vger.kernel.org, James Morris <jmorris@namei.org>,
"David S. Miller" <davem@davemloft.net>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
Patrick McHardy <kaber@trash.net>,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 3/4] net: make tcp_cleanup_rbuf private
Date: Thu, 09 Jan 2014 12:16:52 -0800 [thread overview]
Message-ID: <20140109201642.28381.82141.stgit@viggo.jf.intel.com> (raw)
In-Reply-To: <20140109201157.28381.94057.stgit@viggo.jf.intel.com>
net_dma was the only external user so this can become local to tcp.c
again.
Cc: James Morris <jmorris@namei.org>
Cc: Patrick McHardy <kaber@trash.net>
Cc: David S. Miller <davem@davemloft.net>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
New in v2
include/net/tcp.h | 1 -
net/ipv4/tcp.c | 10 +++++-----
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 084c163e9d40..571036b3bead 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -370,7 +370,6 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
void tcp_rcv_established(struct sock *sk, struct sk_buff *skb,
const struct tcphdr *th, unsigned int len);
void tcp_rcv_space_adjust(struct sock *sk);
-void tcp_cleanup_rbuf(struct sock *sk, int copied);
int tcp_twsk_unique(struct sock *sk, struct sock *sktw, void *twp);
void tcp_twsk_destructor(struct sock *sk);
ssize_t tcp_splice_read(struct socket *sk, loff_t *ppos,
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 8dc913dfbaef..70c905a7d2b8 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1332,7 +1332,7 @@ static int tcp_peek_sndq(struct sock *sk, struct msghdr *msg, int len)
* calculation of whether or not we must ACK for the sake of
* a window update.
*/
-void tcp_cleanup_rbuf(struct sock *sk, int copied)
+static void cleanup_rbuf(struct sock *sk, int copied)
{
struct tcp_sock *tp = tcp_sk(sk);
bool time_to_ack = false;
@@ -1507,7 +1507,7 @@ int tcp_read_sock(struct sock *sk, read_descriptor_t *desc,
/* Clean up data we have read: This will do ACK frames. */
if (copied > 0) {
tcp_recv_skb(sk, seq, &offset);
- tcp_cleanup_rbuf(sk, copied);
+ cleanup_rbuf(sk, copied);
}
return copied;
}
@@ -1658,7 +1658,7 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
}
}
- tcp_cleanup_rbuf(sk, copied);
+ cleanup_rbuf(sk, copied);
if (!sysctl_tcp_low_latency && tp->ucopy.task == user_recv) {
/* Install new reader */
@@ -1831,7 +1831,7 @@ skip_copy:
*/
/* Clean up data we have read: This will do ACK frames. */
- tcp_cleanup_rbuf(sk, copied);
+ cleanup_rbuf(sk, copied);
release_sock(sk);
return copied;
@@ -2494,7 +2494,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
(TCPF_ESTABLISHED | TCPF_CLOSE_WAIT) &&
inet_csk_ack_scheduled(sk)) {
icsk->icsk_ack.pending |= ICSK_ACK_PUSHED;
- tcp_cleanup_rbuf(sk, 1);
+ cleanup_rbuf(sk, 1);
if (!(val & 1))
icsk->icsk_ack.pingpong = 1;
}
next prev parent reply other threads:[~2014-01-09 20:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-09 20:12 [PATCH v2 0/4] net_dma removal, and dma debug extension Dan Williams
2014-01-09 20:16 ` [PATCH v2 1/4] net_dma: simple removal Dan Williams
2014-01-09 20:16 ` [PATCH v2 2/4] net_dma: revert 'copied_early' Dan Williams
2014-01-09 20:16 ` Dan Williams [this message]
2014-01-09 20:26 ` [PATCH v2 3/4] net: make tcp_cleanup_rbuf private Neal Cardwell
2014-01-09 20:33 ` Dan Williams
2014-01-09 20:42 ` David Miller
2014-01-10 10:38 ` David Laight
2014-01-09 20:17 ` [PATCH v2 4/4] dma debug: introduce debug_dma_assert_idle() Dan Williams
2014-01-10 0:38 ` Andrew Morton
2014-01-11 2:35 ` Dan Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140109201642.28381.82141.stgit@viggo.jf.intel.com \
--to=dan.j.williams@intel.com \
--cc=davem@davemloft.net \
--cc=dmaengine@vger.kernel.org \
--cc=jmorris@namei.org \
--cc=kaber@trash.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.