[CRIU] [PATCH 0/4] c/r non-dev net syctls

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Thu Jun 30 08:52:16 PDT 2016


This is a first try to migrate /proc/sys/net static sysctls -
the ones on netns but not per-device. The same way can be applyed
to all other static sysctls, but they need to be put on proper
namespace image.

I added full path to sysctl entry in protobuf as it is easier than
hardcoding these entries in code, and I lookup them just before dump.

Actually the test is not yet full as we need to find the right
limits for a bunch of sysctls, now I use 0-default range for all,
so some "high" values will not get in.

/proc/sys/net/netfilter/nf_log/xx sysctls are hard to set - see
patch 2/4 so skiping it for now, might need ms kernel fix.

https://jira.sw.ru/browse/PSBM-48397

Pavel Tikhomirov (4):
  sysctl: append '\0' in sysctl_read_char
  net/sysctl: c/r all except *.conf.* and *.neigh.*
  zdtm: add irand_range helper and use it in netns-dev test
  zdtm/sysctls: test all net.xxx except conf and neigh

 criu/include/sysctl.h               |  16 ++
 criu/net.c                          | 211 +++++++++++++++++
 criu/sysctl.c                       | 125 +++++++++-
 images/netdev.proto                 |  14 +-
 images/sysctl.proto                 |   5 +
 test/zdtm/lib/Makefile              |   2 +-
 test/zdtm/lib/randrange.c           |  36 +++
 test/zdtm/lib/randrange.h           |  13 ++
 test/zdtm/static/Makefile           |   1 +
 test/zdtm/static/netns-dev.c        |  46 +---
 test/zdtm/static/netns-sysctls.c    | 442 ++++++++++++++++++++++++++++++++++++
 test/zdtm/static/netns-sysctls.desc |   1 +
 12 files changed, 867 insertions(+), 45 deletions(-)
 create mode 100644 test/zdtm/lib/randrange.c
 create mode 100644 test/zdtm/lib/randrange.h
 create mode 100644 test/zdtm/static/netns-sysctls.c
 create mode 100644 test/zdtm/static/netns-sysctls.desc

-- 
2.5.5



More information about the CRIU mailing list