import pprintimport pyroute2
device = "test_tap_tbf"ip = pyroute2.IPRoute()
idx = ip.link_lookup(ifname=device)[0]ip.tc("replace", 'tbf', idx, 0, rate='1024kbit', latency='50ms', burst=1540)
qdiscs = ip.get_qdiscs(idx)pprint.pprint(qdiscs)
[{'attrs': [('TCA_KIND', 'tbf'), ('TCA_OPTIONS', {'attrs': [('TCA_TBF_PARMS', {'rate___reserved': 1, 'rate_mpu': 0, 'buffer': 187984, 'rate_cell_align': 0, 'peak_overhead': 0, 'rate': 128000, 'rate_overhead': 0, 'peak_cell_align': 0, 'peak_cell_log': 0, 'rate_cell_log': 0, 'limit': 7940, 'mtu': 0, 'peak_mpu': 0, 'peak___reserved': 0, 'peak': 0})]}), ('TCA_STATS2', {'attrs': [('TCA_STATS_BASIC', {'packets': 0, 'bytes': 0}), ('TCA_STATS_QUEUE', {'qlen': 0, 'requeues': 0, 'overlimits': 0, 'drops': 0, 'backlog': 0})]}), ('TCA_STATS', {'pps': 0, 'qlen': 0, 'bytes': 0, 'drop': 0, 'packets': 0, 'overlimits': 0, 'bps': 0, 'backlog': 0})], 'event': 'RTM_NEWQDISC', 'family': 0, 'handle': 2150825984, 'header': {'error': None, 'flags': 2, 'length': 180, 'pid': 19331, 'sequence_number': 257, 'type': 36}, 'index': 27636, 'info': 2, 'pad1': 0, 'pad2': 0, 'parent': 4294967295}]
--
You received this message because you are subscribed to the Google Groups "pyroute2-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyroute2-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
When I check it with "tc" CLI tool it gives me burst value properly so I am pretty sure that kernel returns this value somehow :)
To unsubscribe from this group and stop receiving emails from it, send an email to pyroute2-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.