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>
(cherry picked from commit 1d5c331)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
  • Loading branch information
marquiz authored and kolyshkin committed Mar 14, 2022
1 parent a3765fb commit ee7ba6c
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions libcontainer/configs/validate/validator.go
Expand Up @@ -229,10 +229,6 @@ func (v *ConfigValidator) sysctl(config *configs.Config) error {

func (v *ConfigValidator) intelrdt(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 ee7ba6c

Please sign in to comment.