From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: therbert@google.com, netdev@vger.kernel.org
Subject: Re: [PATCH] rps: tcp: fix rps_sock_flow_table table updates
Date: Fri, 04 Jun 2010 15:57:34 -0700 (PDT) [thread overview]
Message-ID: <20100604.155734.260106618.davem@davemloft.net> (raw)
In-Reply-To: <1275591838.2533.37.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 03 Jun 2010 21:03:58 +0200
> I believe a moderate SYN flood attack can corrupt RFS flow table
> (rps_sock_flow_table), making RPS/RFS much less effective.
>
> Even in a normal situation, server handling short lived sessions suffer
> from bad steering for the first data packet of a session, if another SYN
> packet is received for another session.
>
> We do following action in tcp_v4_rcv() :
>
> sock_rps_save_rxhash(sk, skb->rxhash);
>
> We should _not_ do this if sk is a LISTEN socket, as about each
> packet received on a LISTEN socket has a different rxhash than
> previous one.
> -> RPS_NO_CPU markers are spread all over rps_sock_flow_table.
>
> Also, it makes sense to protect sk->rxhash field changes with socket
> lock (We currently can change it even if user thread owns the lock
> and might use rxhash)
>
> This patch moves sock_rps_save_rxhash() to a sock locked section,
> and only for non LISTEN sockets.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied.
prev parent reply other threads:[~2010-06-04 22:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-03 19:03 [PATCH] rps: tcp: fix rps_sock_flow_table table updates Eric Dumazet
2010-06-04 3:07 ` David Miller
2010-06-04 15:15 ` Tom Herbert
2010-06-04 22:57 ` David Miller [this message]
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=20100604.155734.260106618.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).