netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL nf-next 00/84] Second Round of IPVS Updates for v4.4
@ 2015-09-24  0:51 Simon Horman
  2015-09-24  0:51 ` [PATCH nf-next 01/84] ipvs: Hoist computation of ipvs earlier in sctp_conn_schedule Simon Horman
                   ` (84 more replies)
  0 siblings, 85 replies; 89+ messages in thread
From: Simon Horman @ 2015-09-24  0:51 UTC (permalink / raw)
  To: Pablo Neira Ayuso
  Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang,
	Julian Anastasov, Eric W. Biederman, Simon Horman

Hi Pablo,

please consider these bug fixes and extensive clean-ups of IPVS
from Eric Biederman for v4.4.

His excellent description of the changes, which is part of an even larger
set of clean-up work, is as follows:

  I am gradually working my way through the netfilter stack passing struct
  down into the netfilter hooks and from the netfilter hooks and from there
  down into the functions that actually care.  This removes the need for
  netfilter functions to guess how to figure out how to compute which
  network namespace they are in and instead provides a simple and reliable
  method to do so.

  The cleanups stand on their own but this is part of a larger effort to
  have routes with an output device that is not in the current network
  namespace.

  The IPVS code has been a bit more of a challenge than most.  Just passing
  struct net through to where it is needed did not feel clean to me.  The
  practical issue is that the ipvs code in most places actually wants
  struct netns_ipvs and not struct net.

  So as part of this process I have turned the relationship between struct
  net and the structs netns_ipvs, ip_vs_conn_param, ip_vs_conn, and
  ip_vs_service inside out.  I have modified the ipvs functions to take a
  struct netns_ipvs not a struct net.  The net is code with fewer
  conversions from one type of structure to another.  I did wind up adding
  a struct netns_ipvs parameter to quite a few functions that did not have
  it before so I could pass the structure down from the netfilter hooks to
  where it is actually needed to avoid guessing.

  I have broken up the work in a bunch of small patches so there is at
  least a chance and reviewing that each step I took is correct.  The
  series compiles at each step so bisecting it should not be a problem if
  something weird comes up.

  The first two changes in this series are actually bug fixes.  The first
  is a compile fix for a bug in sctp that came in, in the last round of
  ipvs changes merged into nf-next.  The second fixes an older bug where in
  pathological circumstances the wrong network namespace could be used when
  a proc file is written to.

  The rest of the patchset is a bunch of boring changes getting pushing
  struct netns_ipvs (and by extension ipvs->net) where it needs to be.
  Either by replacing struct net pointers or adding new struct netns_ipvs
  pointers.  With a handful of other minor cleanups (like removing
  skb_net).

I have decided include the bug fixes in this pull request. Patch one
relates to a bug that was added to nf-next recently and is thus not
applicable to nf . Patch two could arguably be promoted to a fix for v4.3
and stable though it does not appear to be severe enough to warrant that
course of action; let me know if you would like me to reconsider.


The following changes since commit 227b9e8708b14a8a26ef67bbbe19b13626df4a35:

  usbnet: remove invalid check (2015-09-22 16:14:32 -0700)

are available in the git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git tags/ipvs2-for-v4.4

for you to fetch changes up to 57781c1ceead5a3c1cd3ae11834226ef1de21cb5:

  ipvs: Pass ipvs into ip_vs_gather_frags (2015-09-24 09:34:43 +0900)

----------------------------------------------------------------
Eric W. Biederman (84):
      ipvs: Hoist computation of ipvs earlier in sctp_conn_schedule
      ipvs: Don't use current in proc_do_defense_mode
      ipvs: Use state->net in the ipvs forward functions
      ipvs: Store ipvs not net in struct ip_vs_conn
      ipvs: Store ipvs not net in struct ip_vs_conn_param
      ipvs: Pass ipvs not net to ip_vs_fill_conn
      ipvs: Store ipvs not net in struct ip_vs_service
      ipvs: Pass ipvs not net to ip_vs_svc_fwm_hashkey
      ipvs: Pass ipvs not net to __ip_vs_svc_fwm_find
      ipvs: Pass ipvs not net to ip_vs_svc_hashkey
      ipvs: Pass ipvs not net to __ip_vs_service_find
      ipvs: Pass ipvs not net to ip_vs_service_find
      ipvs: Pass ipvs not net to ip_vs_has_real_service
      ipvs: Pass ipvs not net to ip_vs_find_dest
      ipvs: Pass ipvs not net to ip_vs_trash_cleanup
      ipvs: Pass ipvs not net to __ip_vs_del_dest
      ipvs: Pass ipvs not net to ip_vs_dest_trash_expire
      ipvs: Cache ipvs in ip_vs_genl_set_cmd
      ipvs: Pass ipvs not net to ip_vs_add_service
      ipvs: Pass ipvs not net to ip_vs_flush
      ipvs: Pass ipvs not net to ip_vs_service_net_cleanup
      ipvs: Pass ipvs not net to ip_vs_zero_all
      ipvs: Cache ipvs in ip_vs_in_icmp and ip_vs_in_icmp_v6
      ipvs: Pass ipvs not net to ip_vs_proto_data_get
      ipvs: Pass ipvs not net to ip_vs_set_timeout
      ipvs: Pass ipvs not net to __ip_vs_get_service_entries
      ipvs: Pass ipvs not net to __ip_vs_get_dest_entries
      ipvs: Pass ipvs not net to __ip_vs_get_timeouts
      ipvs: Pass ipvs not net to ip_vs_genl_parse_service
      ipvs: Pass ipvs not net to ip_vs_genl_find_service
      ipvs: Pass ipvs not net to ip_vs_genl_new_daemon
      ipvs: Pass ipvs not net to ip_vs_genl_del_daemon
      ipvs: Pass ipvs not net to start_sync_thread
      ipvs: Pass ipvs not net to stop_sync_thread
      ipvs: Pass ipvs not net to make_send_sock
      ipvs: Pass ipvs not net to make_receive_sock
      ipvs: Store ipvs not net in struct ip_vs_sync_thread_data
      ipvs: Pass ipvs not net to ip_vs_process_message
      ipvs: Pass ipvs not net to ip_vs_sync_conn_v0
      ipvs: Pass ipvs not net to ip_vs_sync_conn
      ipvs: Pass ipvs not net to ip_vs_proc_conn
      ipvs: Pass ipvs not net to ip_vs_proc_sync_conn
      ipvs: Pass ipvs not net to ip_vs_sync_net_init
      ipvs: Pass ipvs not net to ip_vs_sync_net_cleanup
      ipvs: Pass ipvs not net to ip_vs_genl_set_config
      ipvs: Pass ipvs not net to ip_vs_start_estimator aned ip_vs_stop_estimator
      ipvs: Pass ipvs not net to ip_vs_random_drop_entry
      ipvs: Pass ipvs not net to ip_vs_control_net_(init|cleanup)_sysctl
      ipvs: Pass ipvs not net into ip_vs_control_net_(init|cleanup)
      ipvs: Pass ipvs not net to estimation_timer
      ipvs: Pass ipvs not net to ip_vs_estimator_net_init and ip_vs_estimator_cleanup
      ipvs: Pass ipvs not net into register_app and unregister_app
      ipvs: Pass ipvs not net into ip_vs_app_inc_new
      ipvs: Pass ipvs not net to register_ip_vs_app_inc
      ipvs: Pass ipvs not net to register_ip_vs_app and unregister_ip_vs_app
      ipvs: Pass ipvs not net into ip_vs_app_inc_release
      ipvs: Pass ipvs not net into ip_vs_app_net_init and ip_vs_app_net_cleanup
      ipvs: Pass ipvs not net into [un]register_ip_vs_proto_netns
      ipvs: Pass ipvs not net into init_netns and exit_netns
      ipvs: Pass ipvs into ip_vs_conn_fill_param_proto
      ipvs: Pass ipvs into .conn_in_get and ip_vs_conn_in_get_proto
      ipvs: Pass ipvs into conn_out_get
      ipvs: Pass ipvs not net to ip_vs_conn_hashkey
      ipvs: Pass ipvs not net into ip_vs_conn_net_flush
      ipvs: Pass ipvs not net into ip_vs_conn_net_init and ip_vs_conn_net_cleanup
      ipvs: Pass ipvs into .conn_schedule and ip_vs_try_to_schedule
      ipvs: Better derivation of ipvs in ip_vs_tunnel_xmit
      ipvs: Pass ipvs into __ip_vs_get_out_rt
      ipvs: Pass ipvs into __ip_vs_get_out_rt_v6
      ipvs: Pass ipvs into ensure_mtu_is adequate
      ipvs: Better derivation of ipvs in ip_vs_in_stats and ip_vs_out_stats
      ipvs: Wrap sysctl_cache_bypass and remove ifdefs in ip_vs_leave
      ipvs: Simplify ipvs and net access in ip_vs_leave
      ipvs: Pass ipvs not net into sysctl_nat_icmp_send
      ipvs: Pass ipvs into ip_vs_out
      ipvs: Pass ipvs into ip_vs_in
      ipvs: Pass ipvs into ip_vs_in_icmp and ip_vs_in_icmp_v6
      ipvs: Pass ipvs into ip_vs_out_icmp and ip_vs_out_icmp_v6
      ipvs: Pass ipvs through ip_vs_route_me_harder into sysctl_snat_reroute
      ipvs: Remove net argument from ip_vs_tcp_conn_listen
      ipvs: Pass ipvs not net to ip_vs_protocol_net_(init|cleanup)
      ipvs: Remove skb_net
      ipvs: Remove skb_sknet
      ipvs: Pass ipvs into ip_vs_gather_frags

 include/net/ip_vs.h                     | 179 +++++++--------------
 net/netfilter/ipvs/ip_vs_app.c          |  36 ++---
 net/netfilter/ipvs/ip_vs_conn.c         |  76 ++++-----
 net/netfilter/ipvs/ip_vs_core.c         | 228 ++++++++++++--------------
 net/netfilter/ipvs/ip_vs_ctl.c          | 276 ++++++++++++++++----------------
 net/netfilter/ipvs/ip_vs_est.c          |  20 +--
 net/netfilter/ipvs/ip_vs_ftp.c          |  27 ++--
 net/netfilter/ipvs/ip_vs_lblc.c         |   3 +-
 net/netfilter/ipvs/ip_vs_lblcr.c        |   3 +-
 net/netfilter/ipvs/ip_vs_nfct.c         |   5 +-
 net/netfilter/ipvs/ip_vs_proto.c        |  33 ++--
 net/netfilter/ipvs/ip_vs_proto_ah_esp.c |  19 ++-
 net/netfilter/ipvs/ip_vs_proto_sctp.c   |  28 ++--
 net/netfilter/ipvs/ip_vs_proto_tcp.c    |  33 ++--
 net/netfilter/ipvs/ip_vs_proto_udp.c    |  28 ++--
 net/netfilter/ipvs/ip_vs_sync.c         |  87 +++++-----
 net/netfilter/ipvs/ip_vs_xmit.c         |  55 ++++---
 net/netfilter/xt_ipvs.c                 |   3 +-
 18 files changed, 501 insertions(+), 638 deletions(-)

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

end of thread, other threads:[~2015-09-29  0:55 UTC | newest]

Thread overview: 89+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-24  0:51 [GIT PULL nf-next 00/84] Second Round of IPVS Updates for v4.4 Simon Horman
2015-09-24  0:51 ` [PATCH nf-next 01/84] ipvs: Hoist computation of ipvs earlier in sctp_conn_schedule Simon Horman
2015-09-24  0:51 ` [PATCH nf-next 02/84] ipvs: Don't use current in proc_do_defense_mode Simon Horman
2015-09-24  0:51 ` [PATCH nf-next 03/84] ipvs: Use state->net in the ipvs forward functions Simon Horman
2015-09-24  0:51 ` [PATCH nf-next 04/84] ipvs: Store ipvs not net in struct ip_vs_conn Simon Horman
2015-09-24  0:51 ` [PATCH nf-next 05/84] ipvs: Store ipvs not net in struct ip_vs_conn_param Simon Horman
2015-09-24  0:51 ` [PATCH nf-next 06/84] ipvs: Pass ipvs not net to ip_vs_fill_conn Simon Horman
2015-09-24  0:51 ` [PATCH nf-next 07/84] ipvs: Store ipvs not net in struct ip_vs_service Simon Horman
2015-09-24  0:51 ` [PATCH nf-next 08/84] ipvs: Pass ipvs not net to ip_vs_svc_fwm_hashkey Simon Horman
2015-09-24  0:51 ` [PATCH nf-next 09/84] ipvs: Pass ipvs not net to __ip_vs_svc_fwm_find Simon Horman
2015-09-24  0:51 ` [PATCH nf-next 10/84] ipvs: Pass ipvs not net to ip_vs_svc_hashkey Simon Horman
2015-09-24  0:51 ` [PATCH nf-next 11/84] ipvs: Pass ipvs not net to __ip_vs_service_find Simon Horman
2015-09-24  0:51 ` [PATCH nf-next 12/84] ipvs: Pass ipvs not net to ip_vs_service_find Simon Horman
2015-09-24  0:51 ` [PATCH nf-next 13/84] ipvs: Pass ipvs not net to ip_vs_has_real_service Simon Horman
2015-09-24  0:51 ` [PATCH nf-next 14/84] ipvs: Pass ipvs not net to ip_vs_find_dest Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 15/84] ipvs: Pass ipvs not net to ip_vs_trash_cleanup Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 16/84] ipvs: Pass ipvs not net to __ip_vs_del_dest Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 17/84] ipvs: Pass ipvs not net to ip_vs_dest_trash_expire Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 18/84] ipvs: Cache ipvs in ip_vs_genl_set_cmd Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 19/84] ipvs: Pass ipvs not net to ip_vs_add_service Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 20/84] ipvs: Pass ipvs not net to ip_vs_flush Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 21/84] ipvs: Pass ipvs not net to ip_vs_service_net_cleanup Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 22/84] ipvs: Pass ipvs not net to ip_vs_zero_all Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 23/84] ipvs: Cache ipvs in ip_vs_in_icmp and ip_vs_in_icmp_v6 Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 24/84] ipvs: Pass ipvs not net to ip_vs_proto_data_get Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 25/84] ipvs: Pass ipvs not net to ip_vs_set_timeout Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 26/84] ipvs: Pass ipvs not net to __ip_vs_get_service_entries Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 27/84] ipvs: Pass ipvs not net to __ip_vs_get_dest_entries Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 28/84] ipvs: Pass ipvs not net to __ip_vs_get_timeouts Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 29/84] ipvs: Pass ipvs not net to ip_vs_genl_parse_service Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 30/84] ipvs: Pass ipvs not net to ip_vs_genl_find_service Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 31/84] ipvs: Pass ipvs not net to ip_vs_genl_new_daemon Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 32/84] ipvs: Pass ipvs not net to ip_vs_genl_del_daemon Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 33/84] ipvs: Pass ipvs not net to start_sync_thread Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 34/84] ipvs: Pass ipvs not net to stop_sync_thread Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 35/84] ipvs: Pass ipvs not net to make_send_sock Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 36/84] ipvs: Pass ipvs not net to make_receive_sock Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 37/84] ipvs: Store ipvs not net in struct ip_vs_sync_thread_data Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 38/84] ipvs: Pass ipvs not net to ip_vs_process_message Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 39/84] ipvs: Pass ipvs not net to ip_vs_sync_conn_v0 Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 40/84] ipvs: Pass ipvs not net to ip_vs_sync_conn Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 41/84] ipvs: Pass ipvs not net to ip_vs_proc_conn Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 42/84] ipvs: Pass ipvs not net to ip_vs_proc_sync_conn Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 43/84] ipvs: Pass ipvs not net to ip_vs_sync_net_init Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 44/84] ipvs: Pass ipvs not net to ip_vs_sync_net_cleanup Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 45/84] ipvs: Pass ipvs not net to ip_vs_genl_set_config Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 46/84] ipvs: Pass ipvs not net to ip_vs_start_estimator aned ip_vs_stop_estimator Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 47/84] ipvs: Pass ipvs not net to ip_vs_random_drop_entry Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 48/84] ipvs: Pass ipvs not net to ip_vs_control_net_(init|cleanup)_sysctl Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 49/84] ipvs: Pass ipvs not net into ip_vs_control_net_(init|cleanup) Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 50/84] ipvs: Pass ipvs not net to estimation_timer Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 51/84] ipvs: Pass ipvs not net to ip_vs_estimator_net_init and ip_vs_estimator_cleanup Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 52/84] ipvs: Pass ipvs not net into register_app and unregister_app Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 53/84] ipvs: Pass ipvs not net into ip_vs_app_inc_new Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 54/84] ipvs: Pass ipvs not net to register_ip_vs_app_inc Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 55/84] ipvs: Pass ipvs not net to register_ip_vs_app and unregister_ip_vs_app Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 56/84] ipvs: Pass ipvs not net into ip_vs_app_inc_release Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 57/84] ipvs: Pass ipvs not net into ip_vs_app_net_init and ip_vs_app_net_cleanup Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 58/84] ipvs: Pass ipvs not net into [un]register_ip_vs_proto_netns Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 59/84] ipvs: Pass ipvs not net into init_netns and exit_netns Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 60/84] ipvs: Pass ipvs into ip_vs_conn_fill_param_proto Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 61/84] ipvs: Pass ipvs into .conn_in_get and ip_vs_conn_in_get_proto Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 62/84] ipvs: Pass ipvs into conn_out_get Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 63/84] ipvs: Pass ipvs not net to ip_vs_conn_hashkey Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 64/84] ipvs: Pass ipvs not net into ip_vs_conn_net_flush Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 65/84] ipvs: Pass ipvs not net into ip_vs_conn_net_init and ip_vs_conn_net_cleanup Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 66/84] ipvs: Pass ipvs into .conn_schedule and ip_vs_try_to_schedule Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 67/84] ipvs: Better derivation of ipvs in ip_vs_tunnel_xmit Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 68/84] ipvs: Pass ipvs into __ip_vs_get_out_rt Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 69/84] ipvs: Pass ipvs into __ip_vs_get_out_rt_v6 Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 70/84] ipvs: Pass ipvs into ensure_mtu_is adequate Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 71/84] ipvs: Better derivation of ipvs in ip_vs_in_stats and ip_vs_out_stats Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 72/84] ipvs: Wrap sysctl_cache_bypass and remove ifdefs in ip_vs_leave Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 73/84] ipvs: Simplify ipvs and net access " Simon Horman
2015-09-24  0:52 ` [PATCH nf-next 74/84] ipvs: Pass ipvs not net into sysctl_nat_icmp_send Simon Horman
2015-09-24  0:53 ` [PATCH nf-next 75/84] ipvs: Pass ipvs into ip_vs_out Simon Horman
2015-09-24  0:53 ` [PATCH nf-next 76/84] ipvs: Pass ipvs into ip_vs_in Simon Horman
2015-09-24  0:53 ` [PATCH nf-next 77/84] ipvs: Pass ipvs into ip_vs_in_icmp and ip_vs_in_icmp_v6 Simon Horman
2015-09-24  0:53 ` [PATCH nf-next 78/84] ipvs: Pass ipvs into ip_vs_out_icmp and ip_vs_out_icmp_v6 Simon Horman
2015-09-24  0:53 ` [PATCH nf-next 79/84] ipvs: Pass ipvs through ip_vs_route_me_harder into sysctl_snat_reroute Simon Horman
2015-09-24  0:53 ` [PATCH nf-next 80/84] ipvs: Remove net argument from ip_vs_tcp_conn_listen Simon Horman
2015-09-24  0:53 ` [PATCH nf-next 81/84] ipvs: Pass ipvs not net to ip_vs_protocol_net_(init|cleanup) Simon Horman
2015-09-24  0:53 ` [PATCH nf-next 82/84] ipvs: Remove skb_net Simon Horman
2015-09-24  0:53 ` [PATCH nf-next 83/84] ipvs: Remove skb_sknet Simon Horman
2015-09-24  0:53 ` [PATCH nf-next 84/84] ipvs: Pass ipvs into ip_vs_gather_frags Simon Horman
2015-09-25  0:01 ` [GIT PULL nf-next 00/84] Second Round of IPVS Updates for v4.4 Pablo Neira Ayuso
2015-09-28 15:23   ` [PATCH] ipvs: Don't protect ip_vs_addr_is_unicast with CONFIG_SYSCTL Eric W. Biederman
2015-09-28 18:45     ` Julian Anastasov
2015-09-29  0:55       ` Simon Horman

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