Lines Matching +full:convert +full:- +full:channels
2 # SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
17 Verify and convert command-line arguments to the ynl-compatible request.
20 valid_attrs.remove('header') # not user-provided
44 Pretty-print a set of fields from the reply. desc specifies the
69 Print out the speed-like strings from the value dict.
71 speed_re = re.compile(r'[0-9]+base[^/]+/.+')
81 'dev-name': args.device,
98 if msg['header']['dev-name'] == args.device:
110 Convert ynl-formatted bitmask to a dict of bit=value.
127 parser.add_argument('--json', action=argparse.BooleanOptionalAction)
128 parser.add_argument('--show-priv-flags', action=argparse.BooleanOptionalAction)
129 parser.add_argument('--set-priv-flags', action=argparse.BooleanOptionalAction)
130 parser.add_argument('--show-eee', action=argparse.BooleanOptionalAction)
131 parser.add_argument('--set-eee', action=argparse.BooleanOptionalAction)
132 parser.add_argument('-a', '--show-pause', action=argparse.BooleanOptionalAction)
133 parser.add_argument('-A', '--set-pause', action=argparse.BooleanOptionalAction)
134 parser.add_argument('-c', '--show-coalesce', action=argparse.BooleanOptionalAction)
135 parser.add_argument('-C', '--set-coalesce', action=argparse.BooleanOptionalAction)
136 parser.add_argument('-g', '--show-ring', action=argparse.BooleanOptionalAction)
137 parser.add_argument('-G', '--set-ring', action=argparse.BooleanOptionalAction)
138 parser.add_argument('-k', '--show-features', action=argparse.BooleanOptionalAction)
139 parser.add_argument('-K', '--set-features', action=argparse.BooleanOptionalAction)
140 parser.add_argument('-l', '--show-channels', action=argparse.BooleanOptionalAction)
141 parser.add_argument('-L', '--set-channels', action=argparse.BooleanOptionalAction)
142 parser.add_argument('-T', '--show-time-stamping', action=argparse.BooleanOptionalAction)
143 parser.add_argument('-S', '--statistics', action=argparse.BooleanOptionalAction)
144 # TODO: --show-tunnels tunnel-info-get
145 # TODO: --show-module module-get
146 # TODO: --get-plca-cfg plca-get
147 # TODO: --get-plca-status plca-get-status
148 # TODO: --show-mm mm-get
149 # TODO: --show-fec fec-get
150 # TODO: --dump-module-eerpom module-eeprom-get
151 # TODO: pse-get
152 # TODO: rss-get
162 '../../../Documentation/netlink/genetlink-legacy.yaml')
172 return doit(ynl, args, 'eee-set')
175 return doit(ynl, args, 'pause-set')
178 return doit(ynl, args, 'coalesce-set')
186 return doit(ynl, args, 'channels-set')
189 return doit(ynl, args, 'rings-set')
192 flags = bits_to_dict(dumpit(ynl, args, 'privflags-get')['flags'])
197 eee = dumpit(ynl, args, 'eee-get')
198 ours = bits_to_dict(eee['modes-ours'])
199 peer = bits_to_dict(eee['modes-peer'])
204 status = status + ' - active'
206 status = status + ' - inactive'
211 print_field(eee, ('tx-lpi-timer', 'Tx LPI'))
218 print_field(dumpit(ynl, args, 'pause-get'),
225 print_field(dumpit(ynl, args, 'coalesce-get'))
229 reply = dumpit(ynl, args, 'features-get')
256 reply = dumpit(ynl, args, 'channels-get')
259 print(f'Pre-set maximums:')
261 ('rx-max', 'RX'),
262 ('tx-max', 'TX'),
263 ('other-max', 'Other'),
264 ('combined-max', 'Combined'))
268 ('rx-count', 'RX'),
269 ('tx-count', 'TX'),
270 ('other-count', 'Other'),
271 ('combined-count', 'Combined'))
276 reply = dumpit(ynl, args, 'channels-get')
280 print(f'Pre-set maximums:')
282 ('rx-max', 'RX'),
283 ('rx-mini-max', 'RX Mini'),
284 ('rx-jumbo-max', 'RX Jumbo'),
285 ('tx-max', 'TX'))
290 ('rx-mini', 'RX Mini'),
291 ('rx-jumbo', 'RX Jumbo'),
295 ('rx-buf-len', 'RX Buf Len'),
296 ('cqe-size', 'CQE Size'),
297 ('tx-push', 'TX Push', 'bool'))
305 strset = dumpit(ynl, args, 'strset-get')
315 #{ 'name': 'eth-phy', 'value': True },
316 { 'name': 'eth-mac', 'value': True },
317 #{ 'name': 'eth-ctrl', 'value': True },
324 rsp = dumpit(ynl, args, 'stats-get', req)
335 tsinfo = dumpit(ynl, args, 'tsinfo-get', req)
342 print(f'PTP Hardware Clock: {tsinfo["phc-index"]}')
345 [print(f'\t{v}') for v in bits_to_dict(tsinfo['tx-types'])]
348 [print(f'\t{v}') for v in bits_to_dict(tsinfo['rx-filters'])]
355 linkmodes = dumpit(ynl, args, 'linkmodes-get')
365 print_field(ours, ('Autoneg', 'Supports auto-negotiation', 'yn'))
392 print(f'Auto-negotiation: {autoneg}')
403 linkinfo = dumpit(ynl, args, 'linkinfo-get')
418 mdix = mdix_ctrl.get(linkinfo['tp-mdix-ctrl'], None)
422 mdix = mdix_ctrl.get(linkinfo['tp-mdix'], 'Unknown (auto)')
423 print(f'MDI-X: {mdix}')
425 debug = dumpit(ynl, args, 'debug-get')
429 linkstate = dumpit(ynl, args, 'linkstate-get')
434 # TODO: wol-get