Lines Matching +full:max +full:- +full:speed

2 # SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
14 Verify and convert command-line arguments to the ynl-compatible request.
17 valid_attrs.remove('header') # not user-provided
41 Pretty-print a set of fields from the reply. desc specifies the
66 Print out the speed-like strings from the value dict.
68 speed_re = re.compile(r'[0-9]+base[^/]+/.+')
69 speed = [ k for k, v in value.items() if v and speed_re.match(k) ]
70 print(f'{name}: {" ".join(speed)}')
78 'dev-name': args.device,
95 if msg['header']['dev-name'] == args.device:
107 Convert ynl-formatted bitmask to a dict of bit=value.
124 parser.add_argument('--json', action=argparse.BooleanOptionalAction)
125 parser.add_argument('--show-priv-flags', action=argparse.BooleanOptionalAction)
126 parser.add_argument('--set-priv-flags', action=argparse.BooleanOptionalAction)
127 parser.add_argument('--show-eee', action=argparse.BooleanOptionalAction)
128 parser.add_argument('--set-eee', action=argparse.BooleanOptionalAction)
129 parser.add_argument('-a', '--show-pause', action=argparse.BooleanOptionalAction)
130 parser.add_argument('-A', '--set-pause', action=argparse.BooleanOptionalAction)
131 parser.add_argument('-c', '--show-coalesce', action=argparse.BooleanOptionalAction)
132 parser.add_argument('-C', '--set-coalesce', action=argparse.BooleanOptionalAction)
133 parser.add_argument('-g', '--show-ring', action=argparse.BooleanOptionalAction)
134 parser.add_argument('-G', '--set-ring', action=argparse.BooleanOptionalAction)
135 parser.add_argument('-k', '--show-features', action=argparse.BooleanOptionalAction)
136 parser.add_argument('-K', '--set-features', action=argparse.BooleanOptionalAction)
137 parser.add_argument('-l', '--show-channels', action=argparse.BooleanOptionalAction)
138 parser.add_argument('-L', '--set-channels', action=argparse.BooleanOptionalAction)
139 parser.add_argument('-T', '--show-time-stamping', action=argparse.BooleanOptionalAction)
140 parser.add_argument('-S', '--statistics', action=argparse.BooleanOptionalAction)
141 # TODO: --show-tunnels tunnel-info-get
142 # TODO: --show-module module-get
143 # TODO: --get-plca-cfg plca-get
144 # TODO: --get-plca-status plca-get-status
145 # TODO: --show-mm mm-get
146 # TODO: --show-fec fec-get
147 # TODO: --dump-module-eerpom module-eeprom-get
148 # TODO: pse-get
149 # TODO: rss-get
156 schema = '../../../Documentation/netlink/genetlink-legacy.yaml'
166 return doit(ynl, args, 'eee-set')
169 return doit(ynl, args, 'pause-set')
172 return doit(ynl, args, 'coalesce-set')
180 return doit(ynl, args, 'channels-set')
183 return doit(ynl, args, 'rings-set')
186 flags = bits_to_dict(dumpit(ynl, args, 'privflags-get')['flags'])
191 eee = dumpit(ynl, args, 'eee-get')
192 ours = bits_to_dict(eee['modes-ours'])
193 peer = bits_to_dict(eee['modes-peer'])
198 status = status + ' - active'
200 status = status + ' - inactive'
205 print_field(eee, ('tx-lpi-timer', 'Tx LPI'))
212 print_field(dumpit(ynl, args, 'pause-get'),
219 print_field(dumpit(ynl, args, 'coalesce-get'))
223 reply = dumpit(ynl, args, 'features-get')
250 reply = dumpit(ynl, args, 'channels-get')
253 print(f'Pre-set maximums:')
255 ('rx-max', 'RX'),
256 ('tx-max', 'TX'),
257 ('other-max', 'Other'),
258 ('combined-max', 'Combined'))
262 ('rx-count', 'RX'),
263 ('tx-count', 'TX'),
264 ('other-count', 'Other'),
265 ('combined-count', 'Combined'))
270 reply = dumpit(ynl, args, 'channels-get')
274 print(f'Pre-set maximums:')
276 ('rx-max', 'RX'),
277 ('rx-mini-max', 'RX Mini'),
278 ('rx-jumbo-max', 'RX Jumbo'),
279 ('tx-max', 'TX'))
284 ('rx-mini', 'RX Mini'),
285 ('rx-jumbo', 'RX Jumbo'),
289 ('rx-buf-len', 'RX Buf Len'),
290 ('cqe-size', 'CQE Size'),
291 ('tx-push', 'TX Push', 'bool'))
299 strset = dumpit(ynl, args, 'strset-get')
309 #{ 'name': 'eth-phy', 'value': True },
310 { 'name': 'eth-mac', 'value': True },
311 #{ 'name': 'eth-ctrl', 'value': True },
318 rsp = dumpit(ynl, args, 'stats-get', req)
323 tsinfo = dumpit(ynl, args, 'tsinfo-get')
330 print(f'PTP Hardware Clock: {tsinfo["phc-index"]}')
333 [print(f'\t{v}') for v in bits_to_dict(tsinfo['tx-types'])]
336 [print(f'\t{v}') for v in bits_to_dict(tsinfo['rx-filters'])]
340 linkmodes = dumpit(ynl, args, 'linkmodes-get')
350 print_field(ours, ('Autoneg', 'Supports auto-negotiation', 'yn'))
360 speed = 'Unknown!'
361 if linkmodes['speed'] > 0 and linkmodes['speed'] < 0xffffffff:
362 speed = f'{linkmodes["speed"]}Mb/s'
363 print(f'Speed: {speed}')
377 print(f'Auto-negotiation: {autoneg}')
388 linkinfo = dumpit(ynl, args, 'linkinfo-get')
403 mdix = mdix_ctrl.get(linkinfo['tp-mdix-ctrl'], None)
407 mdix = mdix_ctrl.get(linkinfo['tp-mdix'], 'Unknown (auto)')
408 print(f'MDI-X: {mdix}')
410 debug = dumpit(ynl, args, 'debug-get')
414 linkstate = dumpit(ynl, args, 'linkstate-get')
419 # TODO: wol-get