cmd: add --rdt-class command line option
A new option for setting the RDT class (or CLOS) from the command line. Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
This commit is contained in:
		@@ -193,6 +193,10 @@ var (
 | 
			
		||||
			Name:  "apparmor-profile",
 | 
			
		||||
			Usage: "enable AppArmor with an existing custom profile",
 | 
			
		||||
		},
 | 
			
		||||
		cli.StringFlag{
 | 
			
		||||
			Name:  "rdt-class",
 | 
			
		||||
			Usage: "name of the RDT class to associate the container with. Specifies a Class of Service (CLOS) for cache and memory bandwidth management.",
 | 
			
		||||
		},
 | 
			
		||||
	}
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -324,6 +324,10 @@ func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli
 | 
			
		||||
				return nil
 | 
			
		||||
			})
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if c := context.String("rdt-class"); c != "" {
 | 
			
		||||
			opts = append(opts, oci.WithRdt(c, "", ""))
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	runtimeOpts, err := getRuntimeOptions(context)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user