Skip to content

Commit

Permalink
configs/validate: looser validation for RDT
Browse files Browse the repository at this point in the history
Don't require CAT or MBA because we don't detect those correctly (we
don't support L2 or L3DATA/L3CODE for example, and in the future
possibly even more). With plain "ClosId mode" we don't really care: we
assign the container to a pre-configured CLOS without trying to do
anything smarter.

Moreover, this was a duplicate/redundant check anyway, as for CAT and
MBA there is another specific sanity check that is done if L3 or MB
is specified in the config.

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
  • Loading branch information
marquiz committed Feb 18, 2022
1 parent 2436322 commit 1d5c331
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions libcontainer/configs/validate/validator.go
Expand Up @@ -216,10 +216,6 @@ func sysctl(config *configs.Config) error {

func intelrdtCheck(config *configs.Config) error {
if config.IntelRdt != nil {
if !intelrdt.IsCATEnabled() && !intelrdt.IsMBAEnabled() {
return errors.New("intelRdt is specified in config, but Intel RDT is not supported or enabled")
}

if config.IntelRdt.ClosID == "." || config.IntelRdt.ClosID == ".." || strings.Contains(config.IntelRdt.ClosID, "/") {
return fmt.Errorf("invalid intelRdt.ClosID %q", config.IntelRdt.ClosID)
}
Expand Down

0 comments on commit 1d5c331

Please sign in to comment.