Skip to content

Commit 49dfbc7

Browse files
committed
Update runtime-spec, drop deprecated RDT fields
Drop IntelRdt.EnableCMT and EnableMBM, and switch to EnableMonitoring to match upstream runtime-spec. Signed-off-by: Antti Kervinen <[email protected]>
1 parent 271fea3 commit 49dfbc7

File tree

10 files changed

+30
-35
lines changed

10 files changed

+30
-35
lines changed

cmd/cdi/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.20
44

55
require (
66
github.com/fsnotify/fsnotify v1.5.1
7-
github.com/opencontainers/runtime-spec v1.1.0
7+
github.com/opencontainers/runtime-spec v1.2.2-0.20250804081626-bfdffd548aa6
88
github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626
99
github.com/spf13/cobra v1.6.0
1010
gopkg.in/yaml.v3 v3.0.1

cmd/cdi/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLf
1818
github.com/mndrix/tap-go v0.0.0-20171203230836-629fa407e90b/go.mod h1:pzzDgJWZ34fGzaAZGFW22KVZDfyrYW+QABMrWnJBnSs=
1919
github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ=
2020
github.com/opencontainers/runtime-spec v1.0.3-0.20220825212826-86290f6a00fb/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
21-
github.com/opencontainers/runtime-spec v1.1.0 h1:HHUyrt9mwHUjtasSbXSMvs4cyFxh+Bll4AjJ9odEGpg=
22-
github.com/opencontainers/runtime-spec v1.1.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
21+
github.com/opencontainers/runtime-spec v1.2.2-0.20250804081626-bfdffd548aa6 h1:6S6r1L8VO9b1UfgIQi+nteqlElma9KDlzZw/nM3ctI0=
22+
github.com/opencontainers/runtime-spec v1.2.2-0.20250804081626-bfdffd548aa6/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
2323
github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626 h1:DmNGcqH3WDbV5k8OJ+esPWbqUOX5rMLR2PMvziDMJi0=
2424
github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626/go.mod h1:BRHJJd0E+cx42OybVYSgUvZmU0B8P9gZuRXlZUP7TKI=
2525
github.com/opencontainers/selinux v1.9.1/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI=

cmd/validate/go.sum

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
33
github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
44
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
55
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
6-
github.com/opencontainers/runtime-spec v1.1.0 h1:HHUyrt9mwHUjtasSbXSMvs4cyFxh+Bll4AjJ9odEGpg=
6+
github.com/opencontainers/runtime-spec v1.2.2-0.20250804081626-bfdffd548aa6 h1:6S6r1L8VO9b1UfgIQi+nteqlElma9KDlzZw/nM3ctI0=
77
github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626 h1:DmNGcqH3WDbV5k8OJ+esPWbqUOX5rMLR2PMvziDMJi0=
88
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
99
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.20
44

55
require (
66
github.com/fsnotify/fsnotify v1.5.1
7-
github.com/opencontainers/runtime-spec v1.1.0
7+
github.com/opencontainers/runtime-spec v1.2.2-0.20250804081626-bfdffd548aa6
88
github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626
99
github.com/stretchr/testify v1.7.0
1010
golang.org/x/sys v0.19.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9
1515
github.com/mndrix/tap-go v0.0.0-20171203230836-629fa407e90b/go.mod h1:pzzDgJWZ34fGzaAZGFW22KVZDfyrYW+QABMrWnJBnSs=
1616
github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ=
1717
github.com/opencontainers/runtime-spec v1.0.3-0.20220825212826-86290f6a00fb/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
18-
github.com/opencontainers/runtime-spec v1.1.0 h1:HHUyrt9mwHUjtasSbXSMvs4cyFxh+Bll4AjJ9odEGpg=
19-
github.com/opencontainers/runtime-spec v1.1.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
18+
github.com/opencontainers/runtime-spec v1.2.2-0.20250804081626-bfdffd548aa6 h1:6S6r1L8VO9b1UfgIQi+nteqlElma9KDlzZw/nM3ctI0=
19+
github.com/opencontainers/runtime-spec v1.2.2-0.20250804081626-bfdffd548aa6/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
2020
github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626 h1:DmNGcqH3WDbV5k8OJ+esPWbqUOX5rMLR2PMvziDMJi0=
2121
github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626/go.mod h1:BRHJJd0E+cx42OybVYSgUvZmU0B8P9gZuRXlZUP7TKI=
2222
github.com/opencontainers/selinux v1.9.1/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI=

pkg/cdi/container-edits_test.go

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -524,21 +524,19 @@ func TestApplyContainerEdits(t *testing.T) {
524524
spec: &oci.Spec{},
525525
edits: &cdi.ContainerEdits{
526526
IntelRdt: &cdi.IntelRdt{
527-
ClosID: "clos-1",
528-
L3CacheSchema: "L3:0=ff;1=ff",
529-
MemBwSchema: "MB:0=50;1=50",
530-
EnableCMT: true,
531-
EnableMBM: true,
527+
ClosID: "clos-1",
528+
L3CacheSchema: "L3:0=ff;1=ff",
529+
MemBwSchema: "MB:0=50;1=50",
530+
EnableMonitoring: true,
532531
},
533532
},
534533
result: &oci.Spec{
535534
Linux: &oci.Linux{
536535
IntelRdt: &oci.LinuxIntelRdt{
537-
ClosID: "clos-1",
538-
L3CacheSchema: "L3:0=ff;1=ff",
539-
MemBwSchema: "MB:0=50;1=50",
540-
EnableCMT: true,
541-
EnableMBM: true,
536+
ClosID: "clos-1",
537+
L3CacheSchema: "L3:0=ff;1=ff",
538+
MemBwSchema: "MB:0=50;1=50",
539+
EnableMonitoring: true,
542540
},
543541
},
544542
},
@@ -548,11 +546,10 @@ func TestApplyContainerEdits(t *testing.T) {
548546
spec: &oci.Spec{
549547
Linux: &oci.Linux{
550548
IntelRdt: &oci.LinuxIntelRdt{
551-
ClosID: "clos-1",
552-
L3CacheSchema: "L3:0=ff",
553-
MemBwSchema: "MB:0=100",
554-
EnableCMT: true,
555-
EnableMBM: true,
549+
ClosID: "clos-1",
550+
L3CacheSchema: "L3:0=ff",
551+
MemBwSchema: "MB:0=100",
552+
EnableMonitoring: true,
556553
},
557554
},
558555
},

pkg/cdi/oci.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,9 @@ func (d *DeviceNode) toOCI() spec.LinuxDevice {
5656
// toOCI returns the opencontainers runtime Spec LinuxIntelRdt for this IntelRdt config.
5757
func (i *IntelRdt) toOCI() *spec.LinuxIntelRdt {
5858
return &spec.LinuxIntelRdt{
59-
ClosID: i.ClosID,
60-
L3CacheSchema: i.L3CacheSchema,
61-
MemBwSchema: i.MemBwSchema,
62-
EnableCMT: i.EnableCMT,
63-
EnableMBM: i.EnableMBM,
59+
ClosID: i.ClosID,
60+
L3CacheSchema: i.L3CacheSchema,
61+
MemBwSchema: i.MemBwSchema,
62+
EnableMonitoring: i.EnableMonitoring,
6463
}
6564
}

schema/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ require (
1313
require (
1414
github.com/davecgh/go-spew v1.1.1 // indirect
1515
github.com/fsnotify/fsnotify v1.5.1 // indirect
16-
github.com/opencontainers/runtime-spec v1.1.0 // indirect
16+
github.com/opencontainers/runtime-spec v1.2.2-0.20250804081626-bfdffd548aa6 // indirect
1717
github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626 // indirect
1818
github.com/pmezard/go-difflib v1.0.0 // indirect
1919
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect

schema/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9
1515
github.com/mndrix/tap-go v0.0.0-20171203230836-629fa407e90b/go.mod h1:pzzDgJWZ34fGzaAZGFW22KVZDfyrYW+QABMrWnJBnSs=
1616
github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ=
1717
github.com/opencontainers/runtime-spec v1.0.3-0.20220825212826-86290f6a00fb/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
18-
github.com/opencontainers/runtime-spec v1.1.0 h1:HHUyrt9mwHUjtasSbXSMvs4cyFxh+Bll4AjJ9odEGpg=
19-
github.com/opencontainers/runtime-spec v1.1.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
18+
github.com/opencontainers/runtime-spec v1.2.2-0.20250804081626-bfdffd548aa6 h1:6S6r1L8VO9b1UfgIQi+nteqlElma9KDlzZw/nM3ctI0=
19+
github.com/opencontainers/runtime-spec v1.2.2-0.20250804081626-bfdffd548aa6/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
2020
github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626 h1:DmNGcqH3WDbV5k8OJ+esPWbqUOX5rMLR2PMvziDMJi0=
2121
github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626/go.mod h1:BRHJJd0E+cx42OybVYSgUvZmU0B8P9gZuRXlZUP7TKI=
2222
github.com/opencontainers/selinux v1.9.1/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI=

specs-go/config.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,8 @@ type Hook struct {
6464

6565
// IntelRdt describes the Linux IntelRdt parameters to set in the OCI spec.
6666
type IntelRdt struct {
67-
ClosID string `json:"closID,omitempty" yaml:"closID,omitempty"`
68-
L3CacheSchema string `json:"l3CacheSchema,omitempty" yaml:"l3CacheSchema,omitempty"`
69-
MemBwSchema string `json:"memBwSchema,omitempty" yaml:"memBwSchema,omitempty"`
70-
EnableCMT bool `json:"enableCMT,omitempty" yaml:"enableCMT,omitempty"`
71-
EnableMBM bool `json:"enableMBM,omitempty" yaml:"enableMBM,omitempty"`
67+
ClosID string `json:"closID,omitempty" yaml:"closID,omitempty"`
68+
L3CacheSchema string `json:"l3CacheSchema,omitempty" yaml:"l3CacheSchema,omitempty"`
69+
MemBwSchema string `json:"memBwSchema,omitempty" yaml:"memBwSchema,omitempty"`
70+
EnableMonitoring bool `json:"enableMonitoring,omitempty" yaml:"enableMonitoring,omitempty"`
7271
}

0 commit comments

Comments
 (0)