Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: k8snetworkplumbingwg/sriov-network-operator
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: aed3c7bf1de6e5fc69ae8b5a055834b3983d672e
Choose a base ref
..
head repository: k8snetworkplumbingwg/sriov-network-operator
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a2c3ae9af3245cf52fa2b4ae1e45840b938a9d1d
Choose a head ref
Showing with 15,632 additions and 1,608 deletions.
  1. +1 −1 Dockerfile
  2. +1 −1 Dockerfile.sriov-network-config-daemon
  3. +1 −1 Dockerfile.webhook
  4. +2 −0 api/v1/sriovnetworknodepolicy_types.go
  5. +4 −0 config/crd/bases/sriovnetwork.openshift.io_sriovnetworknodepolicies.yaml
  6. +151 −119 controllers/sriovnetworknodepolicy_controller.go
  7. +43 −20 controllers/sriovnetworknodepolicy_controller_test.go
  8. +1 −0 deploy/configmap.yaml
  9. +4 −0 deployment/sriov-network-operator/crds/sriovnetwork.openshift.io_sriovnetworknodepolicies.yaml
  10. +1 −0 deployment/sriov-network-operator/templates/configmap.yaml
  11. +10 −7 deployment/sriov-network-operator/values.yaml
  12. +2 −0 doc/supported-hardware.md
  13. +12 −10 go.mod
  14. +25 −19 go.sum
  15. +3 −2 pkg/utils/utils.go
  16. +71 −38 pkg/webhook/validate.go
  17. +83 −20 pkg/webhook/validate_test.go
  18. +15 −0 test/conformance/test_suite_test.go
  19. +0 −3 vendor/github.com/go-logr/logr/.golangci.yaml
  20. +1 −31 vendor/github.com/go-logr/logr/discard.go
  21. +22 −5 vendor/github.com/go-logr/logr/funcr/funcr.go
  22. +103 −63 vendor/github.com/go-logr/logr/logr.go
  23. +14 −0 vendor/github.com/go-task/slim-sprig/.editorconfig
  24. +1 −0 vendor/github.com/go-task/slim-sprig/.gitattributes
  25. +2 −0 vendor/github.com/go-task/slim-sprig/.gitignore
  26. +364 −0 vendor/github.com/go-task/slim-sprig/CHANGELOG.md
  27. +19 −0 vendor/github.com/go-task/slim-sprig/LICENSE.txt
  28. +73 −0 vendor/github.com/go-task/slim-sprig/README.md
  29. +12 −0 vendor/github.com/go-task/slim-sprig/Taskfile.yml
  30. +24 −0 vendor/github.com/go-task/slim-sprig/crypto.go
  31. +152 −0 vendor/github.com/go-task/slim-sprig/date.go
  32. +163 −0 vendor/github.com/go-task/slim-sprig/defaults.go
  33. +118 −0 vendor/github.com/go-task/slim-sprig/dict.go
  34. +19 −0 vendor/github.com/go-task/slim-sprig/doc.go
  35. +317 −0 vendor/github.com/go-task/slim-sprig/functions.go
  36. +464 −0 vendor/github.com/go-task/slim-sprig/list.go
  37. +12 −0 vendor/github.com/go-task/slim-sprig/network.go
  38. +228 −0 vendor/github.com/go-task/slim-sprig/numeric.go
  39. +28 −0 vendor/github.com/go-task/slim-sprig/reflect.go
  40. +83 −0 vendor/github.com/go-task/slim-sprig/regex.go
  41. +189 −0 vendor/github.com/go-task/slim-sprig/strings.go
  42. +66 −0 vendor/github.com/go-task/slim-sprig/url.go
  43. +7 −1 vendor/github.com/golang/protobuf/jsonpb/decode.go
  44. +7 −0 vendor/github.com/google/pprof/AUTHORS
  45. +16 −0 vendor/github.com/google/pprof/CONTRIBUTORS
  46. +202 −0 vendor/github.com/google/pprof/LICENSE
  47. +567 −0 vendor/github.com/google/pprof/profile/encode.go
  48. +270 −0 vendor/github.com/google/pprof/profile/filter.go
  49. +64 −0 vendor/github.com/google/pprof/profile/index.go
  50. +315 −0 vendor/github.com/google/pprof/profile/legacy_java_profile.go
  51. +1,225 −0 vendor/github.com/google/pprof/profile/legacy_profile.go
  52. +481 −0 vendor/github.com/google/pprof/profile/merge.go
  53. +805 −0 vendor/github.com/google/pprof/profile/profile.go
  54. +370 −0 vendor/github.com/google/pprof/profile/proto.go
  55. +178 −0 vendor/github.com/google/pprof/profile/prune.go
  56. +1 −1 vendor/github.com/onsi/ginkgo/v2/.gitignore
  57. +212 −1 vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md
  58. +57 −4 vendor/github.com/onsi/ginkgo/v2/core_dsl.go
  59. +12 −2 vendor/github.com/onsi/ginkgo/v2/decorator_dsl.go
  60. +48 −13 vendor/github.com/onsi/ginkgo/v2/formatter/formatter.go
  61. +63 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/build/build_command.go
  62. +61 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/command/abort.go
  63. +50 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/command/command.go
  64. +182 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/command/program.go
  65. +48 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/boostrap_templates.go
  66. +133 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/bootstrap_command.go
  67. +259 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generate_command.go
  68. +41 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generate_templates.go
  69. +64 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generators_common.go
  70. +161 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/compile.go
  71. +237 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/profiles_and_reports.go
  72. +355 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/run.go
  73. +283 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/test_suite.go
  74. +86 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/utils.go
  75. +54 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/verify_version.go
  76. +123 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/labels/labels_command.go
  77. +58 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/main.go
  78. +302 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/ginkgo.go
  79. +65 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/import.go
  80. +110 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/outline.go
  81. +98 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/outline_command.go
  82. +232 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/run/run_command.go
  83. +186 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/unfocus/unfocus_command.go
  84. +22 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/delta.go
  85. +75 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/delta_tracker.go
  86. +92 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/dependencies.go
  87. +108 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/package_hash.go
  88. +85 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/package_hashes.go
  89. +87 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/suite.go
  90. +192 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/watch_command.go
  91. +8 −0 vendor/github.com/onsi/ginkgo/v2/ginkgo_cli_dependencies.go
  92. +56 −7 vendor/github.com/onsi/ginkgo/v2/ginkgo_t_dsl.go
  93. +29 −12 vendor/github.com/onsi/ginkgo/v2/internal/group.go
  94. +31 −16 vendor/github.com/onsi/ginkgo/v2/internal/interrupt_handler/interrupt_handler.go
  95. +38 −20 vendor/github.com/onsi/ginkgo/v2/internal/node.go
  96. +60 −17 vendor/github.com/onsi/ginkgo/v2/internal/ordering.go
  97. +11 −0 vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_unix.go
  98. +2 −0 vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/client_server.go
  99. +13 −0 vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/http_client.go
  100. +24 −5 vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/http_server.go
  101. +13 −0 vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_client.go
  102. +40 −15 vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/server_handler.go
  103. +5 −6 vendor/github.com/onsi/ginkgo/v2/internal/progress_report.go
  104. +79 −0 vendor/github.com/onsi/ginkgo/v2/internal/progress_reporter_manager.go
  105. +5 −48 vendor/github.com/onsi/ginkgo/v2/internal/spec_context.go
  106. +83 −34 vendor/github.com/onsi/ginkgo/v2/internal/suite.go
  107. +98 −16 vendor/github.com/onsi/ginkgo/v2/internal/testingtproxy/testing_t_proxy.go
  108. +1 −1 vendor/github.com/onsi/ginkgo/v2/internal/writer.go
  109. +32 −23 vendor/github.com/onsi/ginkgo/v2/reporters/default_reporter.go
  110. +22 −2 vendor/github.com/onsi/ginkgo/v2/reporters/junit_report.go
  111. +24 −4 vendor/github.com/onsi/ginkgo/v2/reporting_dsl.go
  112. +20 −13 vendor/github.com/onsi/ginkgo/v2/table_dsl.go
  113. +72 −5 vendor/github.com/onsi/ginkgo/v2/types/code_location.go
  114. +20 −2 vendor/github.com/onsi/ginkgo/v2/types/config.go
  115. +1 −1 vendor/github.com/onsi/ginkgo/v2/types/deprecation_support.go
  116. +14 −5 vendor/github.com/onsi/ginkgo/v2/types/errors.go
  117. +11 −0 vendor/github.com/onsi/ginkgo/v2/types/label_filter.go
  118. +8 −2 vendor/github.com/onsi/ginkgo/v2/types/types.go
  119. +1 −1 vendor/github.com/onsi/ginkgo/v2/types/version.go
  120. +2 −1 vendor/github.com/onsi/gomega/.gitignore
  121. +109 −0 vendor/github.com/onsi/gomega/CHANGELOG.md
  122. +6 −2 vendor/github.com/onsi/gomega/format/format.go
  123. +20 −10 vendor/github.com/onsi/gomega/gomega_dsl.go
  124. +168 −52 vendor/github.com/onsi/gomega/internal/async_assertion.go
  125. +17 −22 vendor/github.com/onsi/gomega/internal/gomega.go
  126. +21 −4 vendor/github.com/onsi/gomega/matchers.go
  127. +19 −10 vendor/github.com/onsi/gomega/matchers/consist_of.go
  128. +83 −0 vendor/github.com/onsi/gomega/matchers/have_exact_elements.go
  129. +1 −1 vendor/github.com/onsi/gomega/matchers/have_occurred_matcher.go
  130. +11 −1 vendor/github.com/onsi/gomega/matchers/match_error_matcher.go
  131. +10 −1 vendor/github.com/onsi/gomega/matchers/succeed_matcher.go
  132. +0 −8 vendor/github.com/onsi/gomega/tools
  133. +5 −4 vendor/github.com/onsi/gomega/types/types.go
  134. +15 −0 vendor/golang.org/x/net/html/doc.go
  135. +81 −0 vendor/golang.org/x/net/html/escape.go
  136. +1 −1 vendor/golang.org/x/net/html/render.go
  137. +5 −5 vendor/golang.org/x/net/html/token.go
  138. +1 −5 vendor/golang.org/x/net/http2/pipe.go
  139. +5 −2 vendor/golang.org/x/net/http2/server.go
  140. +6 −5 vendor/golang.org/x/net/http2/transport.go
  141. +1 −1 vendor/golang.org/x/sys/execabs/execabs.go
  142. +6 −0 vendor/golang.org/x/sys/execabs/execabs_go118.go
  143. +4 −0 vendor/golang.org/x/sys/execabs/execabs_go119.go
  144. +70 −0 vendor/golang.org/x/sys/unix/ioctl_signed.go
  145. +8 −13 vendor/golang.org/x/sys/unix/{ioctl.go → ioctl_unsigned.go}
  146. +9 −11 vendor/golang.org/x/sys/unix/ioctl_zos.go
  147. +2 −0 vendor/golang.org/x/sys/unix/mkerrors.sh
  148. +6 −0 vendor/golang.org/x/sys/unix/ptrace_darwin.go
  149. +6 −0 vendor/golang.org/x/sys/unix/ptrace_ios.go
  150. +3 −4 vendor/golang.org/x/sys/unix/syscall_aix.go
  151. +0 −1 vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
  152. +0 −1 vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
  153. +1 −2 vendor/golang.org/x/sys/unix/syscall_bsd.go
  154. +5 −10 vendor/golang.org/x/sys/unix/syscall_darwin.go
  155. +1 −0 vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
  156. +1 −0 vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
  157. +1 −1 vendor/golang.org/x/sys/unix/syscall_dragonfly.go
  158. +37 −7 vendor/golang.org/x/sys/unix/syscall_freebsd.go
  159. +5 −12 vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
  160. +5 −12 vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
  161. +4 −11 vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
  162. +4 −11 vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
  163. +4 −11 vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go
  164. +8 −0 vendor/golang.org/x/sys/unix/syscall_hurd.go
  165. +36 −10 vendor/golang.org/x/sys/unix/syscall_linux.go
  166. +0 −27 vendor/golang.org/x/sys/unix/syscall_linux_386.go
  167. +0 −1 vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
  168. +0 −27 vendor/golang.org/x/sys/unix/syscall_linux_arm.go
  169. +0 −10 vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
  170. +0 −5 vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
  171. +0 −1 vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
  172. +0 −27 vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
  173. +0 −27 vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
  174. +0 −1 vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
  175. +0 −1 vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
  176. +0 −1 vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
  177. +0 −1 vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
  178. +2 −5 vendor/golang.org/x/sys/unix/syscall_netbsd.go
  179. +1 −1 vendor/golang.org/x/sys/unix/syscall_openbsd.go
  180. +19 −17 vendor/golang.org/x/sys/unix/syscall_solaris.go
  181. +7 −0 vendor/golang.org/x/sys/unix/syscall_unix.go
  182. +3 −3 vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
  183. +19 −0 vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
  184. +19 −0 vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
  185. +8 −2 vendor/golang.org/x/sys/unix/zerrors_linux.go
  186. +4 −4 vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go
  187. +2 −2 vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go
  188. +4 −4 vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go
  189. +4 −4 vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go
  190. +4 −4 vendor/golang.org/x/sys/unix/zptrace_x86_linux.go
  191. +11 −12 vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
  192. +12 −12 vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
  193. +7 −10 vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
  194. +9 −9 vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
  195. +41 −14 vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
  196. +5 −6 vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
  197. +41 −14 vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
  198. +5 −6 vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
  199. +10 −10 vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
  200. +20 −10 vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
  201. +20 −10 vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
  202. +20 −10 vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
  203. +20 −10 vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
  204. +20 −10 vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go
  205. +10 −10 vendor/golang.org/x/sys/unix/zsyscall_linux.go
  206. +0 −10 vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
  207. +0 −10 vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
  208. +0 −10 vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
  209. +0 −10 vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
  210. +0 −10 vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
  211. +0 −10 vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
  212. +0 −10 vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
  213. +0 −10 vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
  214. +0 −10 vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
  215. +0 −10 vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
  216. +0 −10 vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
  217. +0 −10 vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
  218. +0 −10 vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
  219. +0 −10 vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
  220. +10 −10 vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
  221. +10 −10 vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
  222. +10 −10 vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
  223. +10 −10 vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
  224. +8 −14 vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
  225. +0 −5 vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s
  226. +8 −14 vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
  227. +0 −5 vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s
  228. +8 −14 vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
  229. +0 −5 vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s
  230. +8 −14 vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
  231. +0 −5 vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s
  232. +8 −14 vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
  233. +0 −5 vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s
  234. +8 −14 vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go
  235. +0 −6 vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s
  236. +8 −14 vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go
  237. +0 −5 vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s
  238. +12 −14 vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
  239. +11 −1 vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go
  240. +11 −0 vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
  241. +11 −0 vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
  242. +1 −1 vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
  243. +1 −1 vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
  244. +1 −1 vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
  245. +1 −1 vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
  246. +1 −1 vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go
  247. +99 −41 vendor/golang.org/x/sys/unix/ztypes_linux.go
  248. +1 −1 vendor/golang.org/x/sys/unix/ztypes_linux_386.go
  249. +1 −1 vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
  250. +1 −1 vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
  251. +1 −1 vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
  252. +1 −1 vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
  253. +1 −1 vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
  254. +1 −1 vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
  255. +1 −1 vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
  256. +1 −1 vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
  257. +1 −1 vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
  258. +1 −1 vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
  259. +1 −1 vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
  260. +1 −1 vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
  261. +1 −1 vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
  262. +1 −1 vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
  263. +4 −2 vendor/golang.org/x/sys/windows/syscall_windows.go
  264. +87 −2 vendor/golang.org/x/sys/windows/types_windows.go
  265. +27 −0 vendor/golang.org/x/sys/windows/zsyscall_windows.go
  266. +1 −1 vendor/golang.org/x/text/encoding/internal/internal.go
  267. +1 −1 vendor/golang.org/x/text/unicode/norm/forminfo.go
  268. +218 −0 vendor/golang.org/x/tools/go/ast/inspector/inspector.go
  269. +229 −0 vendor/golang.org/x/tools/go/ast/inspector/typeof.go
  270. +3 −3 vendor/golang.org/x/tools/internal/imports/fix.go
  271. +187 −1 vendor/golang.org/x/tools/internal/imports/zstdlib.go
  272. +0 −1 vendor/golang.org/x/tools/internal/typeparams/common.go
  273. +127 −0 vendor/k8s.io/apimachinery/pkg/util/rand/rand.go
  274. +29 −10 vendor/modules.txt
  275. +787 −0 vendor/sigs.k8s.io/controller-runtime/pkg/client/fake/client.go
  276. +38 −0 vendor/sigs.k8s.io/controller-runtime/pkg/client/fake/doc.go
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ WORKDIR /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator
COPY . .
RUN make _build-manager BIN_PATH=build/_output/cmd

FROM quay.io/centos/centos:stream8
FROM quay.io/centos/centos:stream9
COPY --from=builder /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/build/_output/cmd/manager /usr/bin/sriov-network-operator
COPY bindata /bindata
ENV OPERATOR_NAME=sriov-network-operator
2 changes: 1 addition & 1 deletion Dockerfile.sriov-network-config-daemon
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ WORKDIR /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator
COPY . .
RUN make _build-sriov-network-config-daemon BIN_PATH=build/_output/cmd

FROM quay.io/centos/centos:stream8
FROM quay.io/centos/centos:stream9
ARG MSTFLINT=mstflint
RUN ARCH_DEP_PKGS=$(if [ "$(uname -m)" != "s390x" ]; then echo -n ${MSTFLINT} ; fi) && yum -y install hwdata $ARCH_DEP_PKGS && yum clean all
LABEL io.k8s.display-name="sriov-network-config-daemon" \
2 changes: 1 addition & 1 deletion Dockerfile.webhook
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ WORKDIR /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator
COPY . .
RUN make _build-webhook BIN_PATH=build/_output/cmd

FROM quay.io/centos/centos:stream8
FROM quay.io/centos/centos:stream9
LABEL io.k8s.display-name="sriov-network-webhook" \
io.k8s.description="This is an admission controller webhook that mutates and validates customer resources of sriov network operator."
COPY --from=builder /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/build/_output/cmd/webhook /usr/bin/webhook
2 changes: 2 additions & 0 deletions api/v1/sriovnetworknodepolicy_types.go
Original file line number Diff line number Diff line change
@@ -57,6 +57,8 @@ type SriovNetworkNodePolicySpec struct {
// +kubebuilder:validation:Enum=virtio
// VDPA device type. Allowed value "virtio"
VdpaType string `json:"vdpaType,omitempty"`
// Exclude device's NUMA node when advertising this resource by SRIOV network device plugin. Default to false.
ExcludeTopology bool `json:"excludeTopology,omitempty"`
// don't create the virtual function only allocated them to the device plugin. Defaults to false.
ExternallyCreated bool `json:"externallyCreated,omitempty"`
}
Original file line number Diff line number Diff line change
@@ -49,6 +49,10 @@ spec:
- legacy
- switchdev
type: string
excludeTopology:
description: Exclude device's NUMA node when advertising this resource
by SRIOV network device plugin. Default to false.
type: boolean
externallyCreated:
description: don't create the virtual function only allocated them
to the device plugin. Defaults to false.
270 changes: 151 additions & 119 deletions controllers/sriovnetworknodepolicy_controller.go
Original file line number Diff line number Diff line change
@@ -588,135 +588,25 @@ func (r *SriovNetworkNodePolicyReconciler) renderDevicePluginConfigData(ctx cont
continue
}

found, i := resourceNameInList(p.Spec.ResourceName, &rcl)
netDeviceSelectors := dptypes.NetDeviceSelectors{}
if found {
if err := json.Unmarshal(*rcl.ResourceList[i].Selectors, &netDeviceSelectors); err != nil {
return rcl, err
}

if p.Spec.NicSelector.Vendor != "" && !sriovnetworkv1.StringInArray(p.Spec.NicSelector.Vendor, netDeviceSelectors.Vendors) {
netDeviceSelectors.Vendors = append(netDeviceSelectors.Vendors, p.Spec.NicSelector.Vendor)
}
if p.Spec.NicSelector.DeviceID != "" {
var deviceID string
if p.Spec.NumVfs == 0 {
deviceID = p.Spec.NicSelector.DeviceID
} else {
deviceID = sriovnetworkv1.GetVfDeviceID(p.Spec.NicSelector.DeviceID)
}
nodeState := &sriovnetworkv1.SriovNetworkNodeState{}
err := r.Get(ctx, types.NamespacedName{Namespace: namespace, Name: node.Name}, nodeState)
if err != nil {
return rcl, err
}

if !sriovnetworkv1.StringInArray(deviceID, netDeviceSelectors.Devices) && deviceID != "" {
netDeviceSelectors.Devices = append(netDeviceSelectors.Devices, deviceID)
}
}
if len(p.Spec.NicSelector.PfNames) > 0 {
netDeviceSelectors.PfNames = sriovnetworkv1.UniqueAppend(netDeviceSelectors.PfNames, p.Spec.NicSelector.PfNames...)
}
// vfio-pci device link type is not detectable
if p.Spec.DeviceType != constants.DeviceTypeVfioPci {
if p.Spec.LinkType != "" {
linkType := constants.LinkTypeEthernet
if strings.EqualFold(p.Spec.LinkType, constants.LinkTypeIB) {
linkType = constants.LinkTypeInfiniband
}
if !sriovnetworkv1.StringInArray(linkType, netDeviceSelectors.LinkTypes) {
netDeviceSelectors.LinkTypes = sriovnetworkv1.UniqueAppend(netDeviceSelectors.LinkTypes, linkType)
}
}
}
if len(p.Spec.NicSelector.RootDevices) > 0 {
netDeviceSelectors.RootDevices = sriovnetworkv1.UniqueAppend(netDeviceSelectors.RootDevices, p.Spec.NicSelector.RootDevices...)
}
// Removed driver constraint for "netdevice" DeviceType
if p.Spec.DeviceType == constants.DeviceTypeVfioPci {
netDeviceSelectors.Drivers = sriovnetworkv1.UniqueAppend(netDeviceSelectors.Drivers, p.Spec.DeviceType)
}
// Enable the selection of devices using NetFilter
if p.Spec.NicSelector.NetFilter != "" {
nodeState := &sriovnetworkv1.SriovNetworkNodeState{}
err := r.Get(ctx, types.NamespacedName{Namespace: namespace, Name: node.Name}, nodeState)
if err == nil {
// Loop through interfaces status to find a match for NetworkID or NetworkTag
for _, intf := range nodeState.Status.Interfaces {
if sriovnetworkv1.NetFilterMatch(p.Spec.NicSelector.NetFilter, intf.NetFilter) {
// Found a match add the Interfaces PciAddress
netDeviceSelectors.PciAddresses = sriovnetworkv1.UniqueAppend(netDeviceSelectors.PciAddresses, intf.PciAddress)
}
}
}
}
found, i := resourceNameInList(p.Spec.ResourceName, &rcl)

netDeviceSelectorsMarshal, err := json.Marshal(netDeviceSelectors)
if found {
err := updateDevicePluginResource(ctx, &rcl.ResourceList[i], &p, nodeState)
if err != nil {
return rcl, err
}
rawNetDeviceSelectors := json.RawMessage(netDeviceSelectorsMarshal)
rcl.ResourceList[i].Selectors = &rawNetDeviceSelectors
logger.Info("Update resource", "Resource", rcl.ResourceList[i])
} else {
rc := &dptypes.ResourceConfig{
ResourceName: p.Spec.ResourceName,
}
netDeviceSelectors.IsRdma = p.Spec.IsRdma
netDeviceSelectors.NeedVhostNet = p.Spec.NeedVhostNet
netDeviceSelectors.VdpaType = dptypes.VdpaType(p.Spec.VdpaType)

if p.Spec.NicSelector.Vendor != "" {
netDeviceSelectors.Vendors = append(netDeviceSelectors.Vendors, p.Spec.NicSelector.Vendor)
}
if p.Spec.NicSelector.DeviceID != "" {
var deviceID string
if p.Spec.NumVfs == 0 {
deviceID = p.Spec.NicSelector.DeviceID
} else {
deviceID = sriovnetworkv1.GetVfDeviceID(p.Spec.NicSelector.DeviceID)
}

if !sriovnetworkv1.StringInArray(deviceID, netDeviceSelectors.Devices) && deviceID != "" {
netDeviceSelectors.Devices = append(netDeviceSelectors.Devices, deviceID)
}
}
if len(p.Spec.NicSelector.PfNames) > 0 {
netDeviceSelectors.PfNames = append(netDeviceSelectors.PfNames, p.Spec.NicSelector.PfNames...)
}
// vfio-pci device link type is not detectable
if p.Spec.DeviceType != constants.DeviceTypeVfioPci {
if p.Spec.LinkType != "" {
linkType := constants.LinkTypeEthernet
if strings.EqualFold(p.Spec.LinkType, constants.LinkTypeIB) {
linkType = constants.LinkTypeInfiniband
}
netDeviceSelectors.LinkTypes = sriovnetworkv1.UniqueAppend(netDeviceSelectors.LinkTypes, linkType)
}
}
if len(p.Spec.NicSelector.RootDevices) > 0 {
netDeviceSelectors.RootDevices = append(netDeviceSelectors.RootDevices, p.Spec.NicSelector.RootDevices...)
}
// Removed driver constraint for "netdevice" DeviceType
if p.Spec.DeviceType == constants.DeviceTypeVfioPci {
netDeviceSelectors.Drivers = append(netDeviceSelectors.Drivers, p.Spec.DeviceType)
}
// Enable the selection of devices using NetFilter
if p.Spec.NicSelector.NetFilter != "" {
nodeState := &sriovnetworkv1.SriovNetworkNodeState{}
err := r.Get(ctx, types.NamespacedName{Namespace: namespace, Name: node.Name}, nodeState)
if err == nil {
// Loop through interfaces status to find a match for NetworkID or NetworkTag
for _, intf := range nodeState.Status.Interfaces {
if sriovnetworkv1.NetFilterMatch(p.Spec.NicSelector.NetFilter, intf.NetFilter) {
// Found a match add the Interfaces PciAddress
netDeviceSelectors.PciAddresses = sriovnetworkv1.UniqueAppend(netDeviceSelectors.PciAddresses, intf.PciAddress)
}
}
}
}
netDeviceSelectorsMarshal, err := json.Marshal(netDeviceSelectors)
rc, err := createDevicePluginResource(ctx, &p, nodeState)
if err != nil {
return rcl, err
}
rawNetDeviceSelectors := json.RawMessage(netDeviceSelectorsMarshal)
rc.Selectors = &rawNetDeviceSelectors
rcl.ResourceList = append(rcl.ResourceList, *rc)
logger.Info("Add resource", "Resource", *rc, "Resource list", rcl.ResourceList)
}
@@ -732,3 +622,145 @@ func resourceNameInList(name string, rcl *dptypes.ResourceConfList) (bool, int)
}
return false, 0
}

func createDevicePluginResource(
ctx context.Context,
p *sriovnetworkv1.SriovNetworkNodePolicy,
nodeState *sriovnetworkv1.SriovNetworkNodeState) (*dptypes.ResourceConfig, error) {
netDeviceSelectors := dptypes.NetDeviceSelectors{}

rc := &dptypes.ResourceConfig{
ResourceName: p.Spec.ResourceName,
}
netDeviceSelectors.IsRdma = p.Spec.IsRdma
netDeviceSelectors.NeedVhostNet = p.Spec.NeedVhostNet
netDeviceSelectors.VdpaType = dptypes.VdpaType(p.Spec.VdpaType)

if p.Spec.NicSelector.Vendor != "" {
netDeviceSelectors.Vendors = append(netDeviceSelectors.Vendors, p.Spec.NicSelector.Vendor)
}
if p.Spec.NicSelector.DeviceID != "" {
var deviceID string
if p.Spec.NumVfs == 0 {
deviceID = p.Spec.NicSelector.DeviceID
} else {
deviceID = sriovnetworkv1.GetVfDeviceID(p.Spec.NicSelector.DeviceID)
}

if !sriovnetworkv1.StringInArray(deviceID, netDeviceSelectors.Devices) && deviceID != "" {
netDeviceSelectors.Devices = append(netDeviceSelectors.Devices, deviceID)
}
}
if len(p.Spec.NicSelector.PfNames) > 0 {
netDeviceSelectors.PfNames = append(netDeviceSelectors.PfNames, p.Spec.NicSelector.PfNames...)
}
// vfio-pci device link type is not detectable
if p.Spec.DeviceType != constants.DeviceTypeVfioPci {
if p.Spec.LinkType != "" {
linkType := constants.LinkTypeEthernet
if strings.EqualFold(p.Spec.LinkType, constants.LinkTypeIB) {
linkType = constants.LinkTypeInfiniband
}
netDeviceSelectors.LinkTypes = sriovnetworkv1.UniqueAppend(netDeviceSelectors.LinkTypes, linkType)
}
}
if len(p.Spec.NicSelector.RootDevices) > 0 {
netDeviceSelectors.RootDevices = append(netDeviceSelectors.RootDevices, p.Spec.NicSelector.RootDevices...)
}
// Removed driver constraint for "netdevice" DeviceType
if p.Spec.DeviceType == constants.DeviceTypeVfioPci {
netDeviceSelectors.Drivers = append(netDeviceSelectors.Drivers, p.Spec.DeviceType)
}
// Enable the selection of devices using NetFilter
if p.Spec.NicSelector.NetFilter != "" {
// Loop through interfaces status to find a match for NetworkID or NetworkTag
for _, intf := range nodeState.Status.Interfaces {
if sriovnetworkv1.NetFilterMatch(p.Spec.NicSelector.NetFilter, intf.NetFilter) {
// Found a match add the Interfaces PciAddress
netDeviceSelectors.PciAddresses = sriovnetworkv1.UniqueAppend(netDeviceSelectors.PciAddresses, intf.PciAddress)
}
}
}

netDeviceSelectorsMarshal, err := json.Marshal(netDeviceSelectors)
if err != nil {
return nil, err
}
rawNetDeviceSelectors := json.RawMessage(netDeviceSelectorsMarshal)
rc.Selectors = &rawNetDeviceSelectors

rc.ExcludeTopology = p.Spec.ExcludeTopology

return rc, nil
}

func updateDevicePluginResource(
ctx context.Context,
rc *dptypes.ResourceConfig,
p *sriovnetworkv1.SriovNetworkNodePolicy,
nodeState *sriovnetworkv1.SriovNetworkNodeState) error {
netDeviceSelectors := dptypes.NetDeviceSelectors{}

if err := json.Unmarshal(*rc.Selectors, &netDeviceSelectors); err != nil {
return err
}

if p.Spec.NicSelector.Vendor != "" && !sriovnetworkv1.StringInArray(p.Spec.NicSelector.Vendor, netDeviceSelectors.Vendors) {
netDeviceSelectors.Vendors = append(netDeviceSelectors.Vendors, p.Spec.NicSelector.Vendor)
}
if p.Spec.NicSelector.DeviceID != "" {
var deviceID string
if p.Spec.NumVfs == 0 {
deviceID = p.Spec.NicSelector.DeviceID
} else {
deviceID = sriovnetworkv1.GetVfDeviceID(p.Spec.NicSelector.DeviceID)
}

if !sriovnetworkv1.StringInArray(deviceID, netDeviceSelectors.Devices) && deviceID != "" {
netDeviceSelectors.Devices = append(netDeviceSelectors.Devices, deviceID)
}
}
if len(p.Spec.NicSelector.PfNames) > 0 {
netDeviceSelectors.PfNames = sriovnetworkv1.UniqueAppend(netDeviceSelectors.PfNames, p.Spec.NicSelector.PfNames...)
}
// vfio-pci device link type is not detectable
if p.Spec.DeviceType != constants.DeviceTypeVfioPci {
if p.Spec.LinkType != "" {
linkType := constants.LinkTypeEthernet
if strings.EqualFold(p.Spec.LinkType, constants.LinkTypeIB) {
linkType = constants.LinkTypeInfiniband
}
if !sriovnetworkv1.StringInArray(linkType, netDeviceSelectors.LinkTypes) {
netDeviceSelectors.LinkTypes = sriovnetworkv1.UniqueAppend(netDeviceSelectors.LinkTypes, linkType)
}
}
}
if len(p.Spec.NicSelector.RootDevices) > 0 {
netDeviceSelectors.RootDevices = sriovnetworkv1.UniqueAppend(netDeviceSelectors.RootDevices, p.Spec.NicSelector.RootDevices...)
}
// Removed driver constraint for "netdevice" DeviceType
if p.Spec.DeviceType == constants.DeviceTypeVfioPci {
netDeviceSelectors.Drivers = sriovnetworkv1.UniqueAppend(netDeviceSelectors.Drivers, p.Spec.DeviceType)
}
// Enable the selection of devices using NetFilter
if p.Spec.NicSelector.NetFilter != "" {
// Loop through interfaces status to find a match for NetworkID or NetworkTag
for _, intf := range nodeState.Status.Interfaces {
if sriovnetworkv1.NetFilterMatch(p.Spec.NicSelector.NetFilter, intf.NetFilter) {
// Found a match add the Interfaces PciAddress
netDeviceSelectors.PciAddresses = sriovnetworkv1.UniqueAppend(netDeviceSelectors.PciAddresses, intf.PciAddress)
}
}
}

netDeviceSelectorsMarshal, err := json.Marshal(netDeviceSelectors)
if err != nil {
return err
}
rawNetDeviceSelectors := json.RawMessage(netDeviceSelectorsMarshal)
rc.Selectors = &rawNetDeviceSelectors

rc.ExcludeTopology = p.Spec.ExcludeTopology

return nil
}
Loading