netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 net-next 00/19] inet: frags: bring rhashtables to IP defrag
@ 2018-03-31 19:58 Eric Dumazet
  2018-03-31 19:58 ` [PATCH v4 net-next 01/19] ipv6: frag: remove unused field Eric Dumazet
                   ` (19 more replies)
  0 siblings, 20 replies; 34+ messages in thread
From: Eric Dumazet @ 2018-03-31 19:58 UTC (permalink / raw)
  To: David S . Miller
  Cc: netdev, Florian Westphal, Herbert Xu, Thomas Graf,
	Jesper Dangaard Brouer, Alexander Aring, Stefan Schmidt,
	Kirill Tkhai, Eric Dumazet, Eric Dumazet

IP defrag processing is one of the remaining problematic layer in linux.

It uses static hash tables of 1024 buckets, and up to 128 items per bucket.

A work queue is supposed to garbage collect items when host is under memory
pressure, and doing a hash rebuild, changing seed used in hash computations.

This work queue blocks softirqs for up to 25 ms when doing a hash rebuild,
occurring every 5 seconds if host is under fire.

Then there is the problem of sharing this hash table for all netns.

It is time to switch to rhashtables, and allocate one of them per netns
to speedup netns dismantle, since this is a critical metric these days.

Lookup is now using RCU, and 64bit hosts can now provision whatever amount
of memory needed to handle the expected workloads.

v2: Addressed Herbert and Kirill feedbacks
  (Use rhashtable_free_and_destroy(), and split the big patch into small units)

v3: Removed the extra add_frag_mem_limit(...) from inet_frag_create()
    Removed the refcount_inc_not_zero() call from inet_frags_free_cb(),
    as we can exploit del_timer() return value.

v4: kbuild robot feedback about one missing static (squashed)
    Additional patches :
      inet: frags: do not clone skb in ip_expire()
      ipv6: frags: rewrite ip6_expire_frag_queue()
      rhashtable: reorganize struct rhashtable layout
      inet: frags: reorganize struct netns_frags
      inet: frags: get rid of ipfrag_skb_cb/FRAG_CB
      ipv6: frags: get rid of ip6frag_skb_cb/FRAG6_CB
      inet: frags: get rid of nf_ct_frag6_skb_cb/NFCT_FRAG6_CB



Eric Dumazet (19):
  ipv6: frag: remove unused field
  inet: frags: change inet_frags_init_net() return value
  inet: frags: add a pointer to struct netns_frags
  inet: frags: refactor ipv6_frag_init()
  inet: frags: refactor lowpan_net_frag_init()
  inet: frags: refactor ipfrag_init()
  rhashtable: add schedule points
  inet: frags: use rhashtables for reassembly units
  inet: frags: remove some helpers
  inet: frags: get rif of inet_frag_evicting()
  inet: frags: remove inet_frag_maybe_warn_overflow()
  inet: frags: break the 2GB limit for frags storage
  inet: frags: do not clone skb in ip_expire()
  ipv6: frags: rewrite ip6_expire_frag_queue()
  rhashtable: reorganize struct rhashtable layout
  inet: frags: reorganize struct netns_frags
  inet: frags: get rid of ipfrag_skb_cb/FRAG_CB
  ipv6: frags: get rid of ip6frag_skb_cb/FRAG6_CB
  inet: frags: get rid of nf_ct_frag6_skb_cb/NFCT_FRAG6_CB

 Documentation/networking/ip-sysctl.txt  |  11 +-
 include/linux/rhashtable.h              |   8 +-
 include/linux/skbuff.h                  |   1 +
 include/net/inet_frag.h                 | 126 ++++-----
 include/net/ip.h                        |   1 -
 include/net/ipv6.h                      |  27 +-
 lib/rhashtable.c                        |   2 +
 net/ieee802154/6lowpan/6lowpan_i.h      |  26 +-
 net/ieee802154/6lowpan/reassembly.c     | 150 +++++-----
 net/ipv4/inet_fragment.c                | 362 +++++-------------------
 net/ipv4/ip_fragment.c                  | 247 ++++++++--------
 net/ipv4/proc.c                         |   6 +-
 net/ipv6/netfilter/nf_conntrack_reasm.c | 119 +++-----
 net/ipv6/proc.c                         |   5 +-
 net/ipv6/reassembly.c                   | 235 ++++++++-------
 15 files changed, 499 insertions(+), 827 deletions(-)

-- 
2.17.0.rc1.321.gba9d0f2565-goog

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2018-05-31 14:05 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-31 19:58 [PATCH v4 net-next 00/19] inet: frags: bring rhashtables to IP defrag Eric Dumazet
2018-03-31 19:58 ` [PATCH v4 net-next 01/19] ipv6: frag: remove unused field Eric Dumazet
2018-03-31 19:58 ` [PATCH v4 net-next 02/19] inet: frags: change inet_frags_init_net() return value Eric Dumazet
2018-03-31 19:58 ` [PATCH v4 net-next 03/19] inet: frags: add a pointer to struct netns_frags Eric Dumazet
2018-03-31 19:58 ` [PATCH v4 net-next 04/19] inet: frags: refactor ipv6_frag_init() Eric Dumazet
2018-03-31 19:58 ` [PATCH v4 net-next 05/19] inet: frags: refactor lowpan_net_frag_init() Eric Dumazet
2018-03-31 19:58 ` [PATCH v4 net-next 06/19] inet: frags: refactor ipfrag_init() Eric Dumazet
2018-03-31 19:58 ` [PATCH v4 net-next 07/19] rhashtable: add schedule points Eric Dumazet
2018-03-31 19:58 ` [PATCH v4 net-next 08/19] inet: frags: use rhashtables for reassembly units Eric Dumazet
2018-04-16 12:54   ` Stefan Schmidt
2018-03-31 19:58 ` [PATCH v4 net-next 09/19] inet: frags: remove some helpers Eric Dumazet
2018-03-31 19:58 ` [PATCH v4 net-next 10/19] inet: frags: get rif of inet_frag_evicting() Eric Dumazet
2018-03-31 19:58 ` [PATCH v4 net-next 11/19] inet: frags: remove inet_frag_maybe_warn_overflow() Eric Dumazet
2018-03-31 19:58 ` [PATCH v4 net-next 12/19] inet: frags: break the 2GB limit for frags storage Eric Dumazet
2018-03-31 19:58 ` [PATCH v4 net-next 13/19] inet: frags: do not clone skb in ip_expire() Eric Dumazet
2018-03-31 19:58 ` [PATCH v4 net-next 14/19] ipv6: frags: rewrite ip6_expire_frag_queue() Eric Dumazet
2018-03-31 19:58 ` [PATCH v4 net-next 15/19] rhashtable: reorganize struct rhashtable layout Eric Dumazet
2018-03-31 19:58 ` [PATCH v4 net-next 16/19] inet: frags: reorganize struct netns_frags Eric Dumazet
2018-03-31 19:58 ` [PATCH v4 net-next 17/19] inet: frags: get rid of ipfrag_skb_cb/FRAG_CB Eric Dumazet
2018-04-01  3:02   ` kbuild test robot
2018-03-31 19:58 ` [PATCH v4 net-next 18/19] ipv6: frags: get rid of ip6frag_skb_cb/FRAG6_CB Eric Dumazet
2018-03-31 19:59 ` [PATCH v4 net-next 19/19] inet: frags: get rid of nf_ct_frag6_skb_cb/NFCT_FRAG6_CB Eric Dumazet
2018-04-01  3:25 ` [PATCH v4 net-next 00/19] inet: frags: bring rhashtables to IP defrag David Miller
2018-05-28  9:12   ` Tariq Toukan
2018-05-28 14:52     ` Alexander Aring
2018-05-28 16:09       ` Eric Dumazet
2018-05-30  7:20         ` Tariq Toukan
2018-05-30  7:36           ` Eric Dumazet
2018-05-30 14:42             ` Tariq Toukan
2018-05-31 12:18           ` Moshe Shemesh
2018-05-31 14:05             ` Eric Dumazet
2018-05-30  9:20         ` Jesper Dangaard Brouer
2018-05-30 10:36           ` Eric Dumazet
2018-05-30 10:56             ` Eric Dumazet

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).