summaryrefslogtreecommitdiff
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2021-09-23 12:50:26 +0100
committerDavid S. Miller <davem@davemloft.net>2021-09-23 12:50:26 +0100
commit5146a574606ae6543adeb04471cc4903ee169fb6 (patch)
tree1976a34b63ebd315e6741ceb3bf582fe0e63a4bc /net/ipv4/tcp_ipv4.c
parentefe686ffce0145418b4e004f95c6d0c0200aedd2 (diff)
parentd8b81175e412c7abebdb5b37d8a84d5fd19b1aad (diff)
Merge branch 'remove-sk-skb-caches'
Paolo Abeni says: ==================== net: remove sk skb caches Eric noted we would be better off reverting the sk skb caches. MPTCP relies on such a feature, so we need a little refactor of the MPTCP tx path before the mentioned revert. The first patch exposes additional TCP helpers. The 2nd patch changes the MPTCP code to do locally the whole skb allocation and updating, so it does not rely anymore on core TCP helpers for that nor the sk skb cache. As a side effect, we can make the tcp_build_frag helper static. Finally, we can pull Eric's revert. RFC -> v1: - drop driver specific patch - no more needed after helper rename - rename skb_entail -> tcp_skb_entail (Eric) - preserve the tcp_build_frag helpwe, just make it static (Eric) ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r--net/ipv4/tcp_ipv4.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 2e62e0d6373a..29a57bd159f0 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1941,7 +1941,6 @@ static void tcp_v4_fill_cb(struct sk_buff *skb, const struct iphdr *iph,
int tcp_v4_rcv(struct sk_buff *skb)
{
struct net *net = dev_net(skb->dev);
- struct sk_buff *skb_to_free;
int sdif = inet_sdif(skb);
int dif = inet_iif(skb);
const struct iphdr *iph;
@@ -2082,17 +2081,12 @@ process:
tcp_segs_in(tcp_sk(sk), skb);
ret = 0;
if (!sock_owned_by_user(sk)) {
- skb_to_free = sk->sk_rx_skb_cache;
- sk->sk_rx_skb_cache = NULL;
ret = tcp_v4_do_rcv(sk, skb);
} else {
if (tcp_add_backlog(sk, skb))
goto discard_and_relse;
- skb_to_free = NULL;
}
bh_unlock_sock(sk);
- if (skb_to_free)
- __kfree_skb(skb_to_free);
put_and_return:
if (refcounted)