Lines Matching full:pool
16 objects, pool, tcbind and portpool. Provide an interface to get random
18 1. Pool:
22 - random pool number
30 for pool in pools:
31 self._pools.append(pool)
47 def _get_th(self, pool): argument
50 if pool["thtype"] == "dynamic":
58 for pool in self._pools:
59 if pool["type"] == "ingress":
60 ing_pools.append(pool)
62 egr_pools.append(pool)
70 if isinstance(objid, Pool):
71 if objid["pool"] in [4, 8, 9, 10]:
81 pool = self._get_pool(objid["type"])
82 th = self._get_th(pool)
83 pool_n = pool["pool"]
86 pool_n = objid["pool"]
87 pool = self._pools[pool_n]
88 assert pool["pool"] == pool_n
89 th = self._get_th(pool)
100 objects, pool and tcbind. Provide an interface to get the stored values per
109 if isinstance(objid, Pool) and objid["pool"] in [4, 8, 9, 10]:
172 class Pool(CommonItem): class
176 run_cmd("devlink sb pool set {} sb {} pool {} size {} thtype {}".format(dlname, self["sb"],
177 self["pool"],
186 d = run_json_cmd("devlink sb pool show -j")
188 for pooldict in d["pool"][dlname]:
190 pools.append(Pool(pooldict))
195 for pool in pools:
198 (size, thtype) = vp.get_value(pool)
201 pool.dl_set(dlname, size, thtype)
203 pool = post_pools.get_by(pool)
206 if pool["size"] != size:
207 err_msg = "Incorrect pool size (got {}, expected {})".format(pool["size"], size)
208 if pool["thtype"] != thtype:
209 … err_msg = "Incorrect pool threshold type (got {}, expected {})".format(pool["thtype"], thtype)
211 pre_pools.del_by(pool)
212 post_pools.del_by(pool)
214 err_msg = "Other pool setup changed as well"
215 log_test("pool {} of sb {} set verification".format(pool["pool"],
216 pool["sb"]), err_msg)
223 # For each pool, set random size and static threshold type
231 varitems = ["pool", "threshold"]
237 def dl_set(self, pool, th): argument
238 … run_cmd("devlink sb tc bind set {} sb {} tc {} type {} pool {} th {}".format(self["dlportname"],
242 pool, th))
268 (pool, th) = vp.get_value(tcbind)
271 tcbind.dl_set(pool, th)
276 if tcbind["pool"] != pool:
277 err_msg = "Incorrect pool (got {}, expected {})".format(tcbind["pool"], pool)
296 # Bind each port and unicast TC (TCs < 8) to a random pool and a random
312 run_cmd("devlink sb port pool set {} sb {} pool {} th {}".format(self["dlportname"],
314 self["pool"], th))
322 d = run_json_cmd("devlink sb port pool -j -n")
327 err_msg = "No port pool for port"
332 log_test("port pool existence for port {} verification".format(port.name), err_msg)
351 err_msg = "Other port pool setup changed as well"
352 log_test("port pool {}-{} of sb {} set verification".format(portpool["dlportname"],
353 portpool["pool"],
363 # For each port pool, set a random threshold