From ee7ba6cb1eb5b143f0336fd13ab14a91559d49b1 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Fri, 18 Feb 2022 16:13:37 +0200 Subject: [PATCH] configs/validate: looser validation for RDT 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 (cherry picked from commit 1d5c331042acbce433e48a2f3a277f8e08fe998c) Signed-off-by: Kir Kolyshkin --- libcontainer/configs/validate/validator.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libcontainer/configs/validate/validator.go b/libcontainer/configs/validate/validator.go index 6493124a3f2..627621a58d8 100644 --- a/libcontainer/configs/validate/validator.go +++ b/libcontainer/configs/validate/validator.go @@ -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) }