Lines Matching full:rings
16 rings = netnl.rings_get({'header': {'dev-index': cfg.ifindex}})
19 if 'tcp-data-split' not in rings:
21 return rings['tcp-data-split']
37 rings = netnl.rings_get({'header': {'dev-index': cfg.ifindex}})
41 if 'tx' not in rings:
45 ethtool(f"--disable-netlink -G {cfg.ifname} tx {rings['tx'] // 2}")
47 ethtool(f"--disable-netlink -G {cfg.ifname} tx {rings['tx'] * 2}")
48 defer(ethtool, f"-G {cfg.ifname} tx {rings['tx']}")
57 rings = netnl.rings_get({'header': {'dev-index': cfg.ifindex}})
60 if 'hds-thresh' not in rings:
64 def _hds_reset(cfg, netnl, rings) -> None: argument
68 if cur.get('tcp-data-split') != rings.get('tcp-data-split'):
74 if cur['tcp-data-split'] == rings['tcp-data-split']:
78 arg['tcp-data-split'] = rings['tcp-data-split']
79 if cur.get('hds-thresh') != rings.get('hds-thresh'):
80 arg['hds-thresh'] = rings['hds-thresh']
87 rings = netnl.rings_get({'header': {'dev-index': cfg.ifindex}})
88 if 'hds-thresh' in rings or 'tcp-data-split' in rings:
89 defer(_hds_reset, cfg, netnl, rings)
104 rings = netnl.rings_get({'header': {'dev-index': cfg.ifindex}})
107 if 'tcp-data-split' not in rings:
110 ksft_eq('enabled', rings['tcp-data-split'])
122 rings = netnl.rings_get({'header': {'dev-index': cfg.ifindex}})
125 if 'tcp-data-split' not in rings:
128 ksft_eq('disabled', rings['tcp-data-split'])
140 rings = netnl.rings_get({'header': {'dev-index': cfg.ifindex}})
143 if 'hds-thresh' not in rings:
146 ksft_eq(0, rings['hds-thresh'])
151 rings = netnl.rings_get({'header': {'dev-index': cfg.ifindex}})
154 if 'hds-thresh' not in rings:
156 if 'hds-thresh-max' not in rings:
159 if rings['hds-thresh-max'] < 2:
161 elif rings['hds-thresh-max'] == 2:
165 hds_thresh = random.randint(1, rings['hds-thresh-max'] - 1)
166 if hds_thresh != rings['hds-thresh']:
176 rings = netnl.rings_get({'header': {'dev-index': cfg.ifindex}})
177 ksft_eq(hds_thresh, rings['hds-thresh'])
182 rings = netnl.rings_get({'header': {'dev-index': cfg.ifindex}})
185 if 'hds-thresh' not in rings:
188 … netnl.rings_set({'header': {'dev-index': cfg.ifindex}, 'hds-thresh': rings['hds-thresh-max']})
194 rings = netnl.rings_get({'header': {'dev-index': cfg.ifindex}})
195 ksft_eq(rings['hds-thresh'], rings['hds-thresh-max'])
200 rings = netnl.rings_get({'header': {'dev-index': cfg.ifindex}})
203 if 'hds-thresh' not in rings:
205 if 'hds-thresh-max' not in rings:
207 hds_gt = rings['hds-thresh-max'] + 1