mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
While reviewing the fix for unintentional u32 overflows in ets offload code, Jamal said: [...] > otherwise a tdc test should cover it fine (when you get to the > netdevsim change perhaps) Extend tdc to allow setting hw-tc-offload via ethtool, and add a test case to reproduce the division by zero fixed in [1]. [1] https://lore.kernel.org/all/CAM0EoMm17wsYZmdFLshH3_-GrZtzd=i0xnoO2yiVB=-N4761mw@mail.gmail.com/ Suggested-by: Jamal Hadi Salim <jhs@mojatatu.com> Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com> Co-developed-by: Victor Nogueira <victor@mojatatu.com> Signed-off-by: Victor Nogueira <victor@mojatatu.com> Signed-off-by: Davide Caratti <dcaratti@redhat.com> Link: https://patch.msgid.link/39129c374cbd00147b8c5afc04db59db62b50acc.1773945414.git.dcaratti@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
45 lines
1.1 KiB
Python
45 lines
1.1 KiB
Python
"""
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
tdc_config.py - tdc user-specified values
|
|
|
|
Copyright (C) 2017 Lucas Bates <lucasb@mojatatu.com>
|
|
"""
|
|
|
|
# Dictionary containing all values that can be substituted in executable
|
|
# commands.
|
|
NAMES = {
|
|
# Substitute your own tc path here
|
|
'TC': '/sbin/tc',
|
|
# Substitute your own ip path here
|
|
'IP': '/sbin/ip',
|
|
# Name of veth devices to be created for the namespace
|
|
'DEV0': 'v0p0',
|
|
'DEV1': 'v0p1',
|
|
'DEV2': '',
|
|
'DUMMY': 'dummy1',
|
|
'ETHTOOL': '/usr/sbin/ethtool',
|
|
'ETH': 'eth0',
|
|
'BATCH_FILE': './batch.txt',
|
|
'BATCH_DIR': 'tmp',
|
|
# Length of time in seconds to wait before terminating a command
|
|
'TIMEOUT': 24,
|
|
# Name of the namespace to use
|
|
'NS': 'tcut',
|
|
# Directory containing eBPF test programs
|
|
'EBPFDIR': './'
|
|
}
|
|
|
|
|
|
ENVIR = { }
|
|
|
|
# put customizations in tdc_config_local.py
|
|
try:
|
|
from tdc_config_local import *
|
|
except ImportError as ie:
|
|
pass
|
|
|
|
try:
|
|
NAMES.update(EXTRA_NAMES)
|
|
except NameError as ne:
|
|
pass
|