From: Jesper Dangaard Brouer <brouer@redhat.com>
To: netdev@vger.kernel.org, Eric Dumazet <eric.dumazet@gmail.com>,
Jesper Dangaard Brouer <brouer@redhat.com>
Cc: xiyou.wangcong@gmail.com
Subject: [net-next PATCH 0/3] net: optimize ICMP-reply code path
Date: Mon, 09 Jan 2017 16:03:59 +0100 [thread overview]
Message-ID: <20170109150246.30215.63371.stgit@firesoul> (raw)
This patchset is optimizing the ICMP-reply code path, for ICMP packets
that gets rate limited. A remote party can easily trigger this code
path by sending packets to port number with no listening service.
Generally the patchset moves the sysctl_icmp_msgs_per_sec ratelimit
checking to earlier in the code path and removes an allocation.
Use-case: The specific case I experienced this being a bottleneck is,
sending UDP packets to a port with no listener, which obviously result
in kernel replying with ICMP Destination Unreachable (type:3), Port
Unreachable (code:3), which cause the bottleneck.
After Eric and Paolo optimized the UDP socket code, the kernels PPS
processing capabilities is lower for no-listen ports, than normal UDP
sockets. This is bad for capacity planning when restarting a service.
UDP no-listen benchmark 8xCPUs using pktgen_sample04_many_flows.sh:
Baseline: 6.6 Mpps
Patch: 14.7 Mpps
Driver mlx5 at 50Gbit/s.
---
Jesper Dangaard Brouer (3):
Revert "icmp: avoid allocating large struct on stack"
net: reduce cycles spend on ICMP replies that gets rate limited
net: for rate-limited ICMP replies save one atomic operation
net/ipv4/icmp.c | 125 +++++++++++++++++++++++++++++++++----------------------
net/ipv6/icmp.c | 68 +++++++++++++++++++++---------
2 files changed, 123 insertions(+), 70 deletions(-)
next reply other threads:[~2017-01-09 15:04 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-09 15:03 Jesper Dangaard Brouer [this message]
2017-01-09 15:04 ` [net-next PATCH 1/3] Revert "icmp: avoid allocating large struct on stack" Jesper Dangaard Brouer
2017-01-09 17:42 ` Cong Wang
2017-01-09 17:50 ` Eric Dumazet
2017-01-09 17:59 ` Cong Wang
2017-01-09 18:07 ` Eric Dumazet
2017-01-09 18:52 ` David Miller
2017-01-09 20:53 ` Jesper Dangaard Brouer
2017-01-10 18:06 ` Cong Wang
2017-01-10 18:12 ` David Miller
2017-01-10 18:44 ` Cong Wang
2017-01-10 18:48 ` Cong Wang
2017-01-10 18:54 ` David Miller
2017-01-12 22:46 ` Cong Wang
2017-01-10 20:08 ` Jesper Dangaard Brouer
2017-01-10 21:48 ` Eric Dumazet
2017-01-12 22:21 ` Cong Wang
2017-01-10 21:41 ` Joe Perches
2017-01-09 19:33 ` Joe Perches
2017-01-10 18:01 ` Cong Wang
2017-01-09 18:47 ` David Miller
2017-01-09 17:42 ` Eric Dumazet
2017-01-09 15:04 ` [net-next PATCH 2/3] net: reduce cycles spend on ICMP replies that gets rate limited Jesper Dangaard Brouer
2017-01-09 17:44 ` Eric Dumazet
2017-01-11 17:15 ` Eric Dumazet
2017-06-04 7:11 ` Florian Weimer
2017-06-04 14:38 ` Jesper Dangaard Brouer
2017-06-05 14:22 ` Florian Weimer
2017-01-09 15:04 ` [net-next PATCH 3/3] net: for rate-limited ICMP replies save one atomic operation Jesper Dangaard Brouer
2017-01-09 17:44 ` Eric Dumazet
2017-01-09 17:43 ` [net-next PATCH 0/3] net: optimize ICMP-reply code path Cong Wang
2017-01-09 17:56 ` Eric Dumazet
2017-01-09 20:49 ` David Miller
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=20170109150246.30215.63371.stgit@firesoul \
--to=brouer@redhat.com \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@gmail.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).