On Mon, Apr 20, 2020 at 04:01:54PM +0200, Jan Tluka wrote:
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
docs/source/config_mixins.rst | 28 +++++++++++++++++++
.../ConfigMixins/CoalescingHWConfigMixin.py | 18 ++++++++++++
.../ConfigMixins/CommonHWSubConfigMixin.py | 6 ++++
.../ConfigMixins/DevInterruptHWConfigMixin.py | 16 +++++++++++
.../DisablePauseFramesHWConfigMixin.py | 10 +++++++
.../ENRT/ConfigMixins/MTUHWConfigMixin.py | 13 +++++++++
.../ConfigMixins/OffloadSubConfigMixin.py | 13 +++++++++
.../ParallelStreamQDiscHWConfigMixin.py | 14 ++++++++++
8 files changed, 118 insertions(+)
diff --git a/docs/source/config_mixins.rst b/docs/source/config_mixins.rst
index 66119b6e..57ef199d 100644
--- a/docs/source/config_mixins.rst
+++ b/docs/source/config_mixins.rst
@@ -1,3 +1,31 @@
.. ENRT Config Mixins
.. automodule:: lnst.Recipes.ENRT.ConfigMixins
+
+.. autoclass::
lnst.Recipes.ENRT.ConfigMixins.OffloadSubConfigMixin.OffloadSubConfigMixin
+ :members:
+ :show-inheritance:
+
+.. autoclass::
lnst.Recipes.ENRT.ConfigMixins.CommonHWSubConfigMixin.CommonHWSubConfigMixin
+ :members:
+ :show-inheritance:
+
+.. autoclass:: lnst.Recipes.ENRT.ConfigMixins.MTUHWConfigMixin.MTUHWConfigMixin
+ :members:
+ :show-inheritance:
+
+.. autoclass::
lnst.Recipes.ENRT.ConfigMixins.CoalescingHWConfigMixin.CoalescingHWConfigMixin
+ :members:
+ :show-inheritance:
+
+.. autoclass::
lnst.Recipes.ENRT.ConfigMixins.DevInterruptHWConfigMixin.DevInterruptHWConfigMixin
+ :members:
+ :show-inheritance:
+
+.. autoclass::
lnst.Recipes.ENRT.ConfigMixins.ParallelStreamQDiscHWConfigMixin.ParallelStreamQDiscHWConfigMixin
+ :members:
+ :show-inheritance:
+
+.. autoclass::
lnst.Recipes.ENRT.ConfigMixins.DisablePauseFramesHWConfigMixin.DisablePauseFramesHWConfigMixin
+ :members:
+ :show-inheritance:
I think it may be better to split this into multiple files - similar to
how the specific_scenarios.rst is written.
When I open the generated html for the config_mixins.rst it's not very
easy to read with how the inheritance is displayed...
We can add a sub-directory docs/source/config_mixin_classes/ that will
contain the individual files for these "autoclass" directives and just
link them into the config_mixins.rst doc.
-Ondrej
diff --git
a/lnst/Recipes/ENRT/ConfigMixins/CoalescingHWConfigMixin.py
b/lnst/Recipes/ENRT/ConfigMixins/CoalescingHWConfigMixin.py
index 23fb2085..0e8807af 100644
--- a/lnst/Recipes/ENRT/ConfigMixins/CoalescingHWConfigMixin.py
+++ b/lnst/Recipes/ENRT/ConfigMixins/CoalescingHWConfigMixin.py
@@ -4,11 +4,29 @@ from lnst.Recipes.ENRT.ConfigMixins.BaseHWConfigMixin import
BaseHWConfigMixin
class CoalescingHWConfigMixin(BaseHWConfigMixin):
+ """
+ This class is an extension to the :any:`BaseEnrtRecipe` class that enables
+ adaptive coalescing configuration on the devices defined by
+ :attr:`coalescing_hw_config_dev_list` property.
+
+ :param adaptive_tx_coalescing:
+ (optional test parameter) boolean to enable/disable TX adaptive
+ coalescing on the devices
+ :param adaptive_rx_coalescing:
+ (optional test parameter) boolean to enable/disable RX adaptive
+ coalescing on the devices
+ """
+
adaptive_rx_coalescing = BoolParam(mandatory=False)
adaptive_tx_coalescing = BoolParam(mandatory=False)
@property
def coalescing_hw_config_dev_list(self):
+ """
+ The value of this property is a list of devices for which the
+ adaptive coalescing features should be configured. It has to be
+ defined by a derived class.
+ """
return []
def hw_config(self, config):
diff --git a/lnst/Recipes/ENRT/ConfigMixins/CommonHWSubConfigMixin.py
b/lnst/Recipes/ENRT/ConfigMixins/CommonHWSubConfigMixin.py
index c73f8ea7..f1f9599d 100644
--- a/lnst/Recipes/ENRT/ConfigMixins/CommonHWSubConfigMixin.py
+++ b/lnst/Recipes/ENRT/ConfigMixins/CommonHWSubConfigMixin.py
@@ -22,6 +22,12 @@ class CommonHWSubConfigMixin(
MTUHWConfigMixin,
BaseSubConfigMixin,
):
+ """
+ This class groups few related :any:`BaseSubConfigMixin` s for user's
+ convenience. For more details, see the documentation of the individual
+ ancestor classes.
+ """
+
def apply_sub_configuration(self, config):
super().apply_sub_configuration(config)
self.hw_config(config)
diff --git a/lnst/Recipes/ENRT/ConfigMixins/DevInterruptHWConfigMixin.py
b/lnst/Recipes/ENRT/ConfigMixins/DevInterruptHWConfigMixin.py
index 57f2543c..1f8f5e8e 100644
--- a/lnst/Recipes/ENRT/ConfigMixins/DevInterruptHWConfigMixin.py
+++ b/lnst/Recipes/ENRT/ConfigMixins/DevInterruptHWConfigMixin.py
@@ -7,10 +7,26 @@ from lnst.Recipes.ENRT.ConfigMixins.BaseHWConfigMixin import
BaseHWConfigMixin
class DevInterruptHWConfigMixin(BaseHWConfigMixin):
+ """
+ This class is an extension to the :any:`BaseEnrtRecipe` class that enables
+ the CPU affinity (CPU pinning) of the test device IRQs. The test devices
+ are defined by :attr:`dev_interrupt_hw_config_dev_list` property.
+
+ .. note::
+ Note that this Mixin also stops the irqbalance service.
+
+ :param dev_intr_cpu:
+ (optional test parameter) CPU id to which the device IRQs should be pinned
+ """
+
dev_intr_cpu = IntParam(mandatory=False)
@property
def dev_interrupt_hw_config_dev_list(self):
+ """
+ The value of this property is a list of devices for which the IRQ CPU
+ affinity should be configured. It has to be defined by a derived class.
+ """
return []
def hw_config(self, config):
diff --git a/lnst/Recipes/ENRT/ConfigMixins/DisablePauseFramesHWConfigMixin.py
b/lnst/Recipes/ENRT/ConfigMixins/DisablePauseFramesHWConfigMixin.py
index 72857cff..a08e324e 100644
--- a/lnst/Recipes/ENRT/ConfigMixins/DisablePauseFramesHWConfigMixin.py
+++ b/lnst/Recipes/ENRT/ConfigMixins/DisablePauseFramesHWConfigMixin.py
@@ -3,8 +3,18 @@ from lnst.Recipes.ENRT.ConfigMixins.BaseHWConfigMixin import
BaseHWConfigMixin
class DisablePauseFramesHWConfigMixin(BaseHWConfigMixin):
+ """
+ This class is an extension to the :any:`BaseEnrtRecipe` class to turn off
+ the Ethernet pause frames on the devices defined by
+ the :attr:`no_pause_frames_dev_list` property.
+ """
+
@property
def no_pause_frames_dev_list(self):
+ """
+ The value of this property is a list of devices for which the pause
+ frames should be disabled. It has to be defined by a derived class.
+ """
return []
def hw_config(self, config):
diff --git a/lnst/Recipes/ENRT/ConfigMixins/MTUHWConfigMixin.py
b/lnst/Recipes/ENRT/ConfigMixins/MTUHWConfigMixin.py
index 143c0eaf..cbd7d62e 100644
--- a/lnst/Recipes/ENRT/ConfigMixins/MTUHWConfigMixin.py
+++ b/lnst/Recipes/ENRT/ConfigMixins/MTUHWConfigMixin.py
@@ -4,10 +4,23 @@ from lnst.Recipes.ENRT.ConfigMixins.BaseHWConfigMixin import
BaseHWConfigMixin
class MTUHWConfigMixin(BaseHWConfigMixin):
+ """
+ This class is an extension to the :any:`BaseEnrtRecipe` class that enables
+ MTU configuration on the devices defined by the :attr:`mtu_hw_config_dev_list`
+ property.
+
+ :param mtu:
+ (optional test parameter) MTU value to be configured on the devices
+ """
+
mtu = IntParam(mandatory=False)
@property
def mtu_hw_config_dev_list(self):
+ """
+ The value of this property is a list of devices for which the MTU
+ should be configured. It has to be defined by a derived class.
+ """
return []
def hw_config(self, config):
diff --git a/lnst/Recipes/ENRT/ConfigMixins/OffloadSubConfigMixin.py
b/lnst/Recipes/ENRT/ConfigMixins/OffloadSubConfigMixin.py
index f50a165e..989743a8 100644
--- a/lnst/Recipes/ENRT/ConfigMixins/OffloadSubConfigMixin.py
+++ b/lnst/Recipes/ENRT/ConfigMixins/OffloadSubConfigMixin.py
@@ -6,12 +6,25 @@ from lnst.Recipes.ENRT.ConfigMixins.BaseSubConfigMixin import
BaseSubConfigMixin
class OffloadSubConfigMixin(BaseSubConfigMixin):
+ """
+ This class is an extension to the :any:`BaseEnrtRecipe` class that enables
+ offload configuration on the devices defined by :attr:`offload_nics`.
+
+ :param offload_combinations:
+ (optional test parameter) defines the offload features to be enabled
+ or disabled on the devices
+ """
+
offload_combinations = Param(
default=(dict(gro="on", gso="on", tso="on",
tx="on", rx="on"),)
)
@property
def offload_nics(self):
+ """
+ The value of this property is a list of devices for which the offload
+ settings should be configured. It has to be defined by a derived class.
+ """
raise NotImplementedError("Subclass must implement this property")
def generate_sub_configurations(self, config):
diff --git a/lnst/Recipes/ENRT/ConfigMixins/ParallelStreamQDiscHWConfigMixin.py
b/lnst/Recipes/ENRT/ConfigMixins/ParallelStreamQDiscHWConfigMixin.py
index dc6e0116..63b697be 100644
--- a/lnst/Recipes/ENRT/ConfigMixins/ParallelStreamQDiscHWConfigMixin.py
+++ b/lnst/Recipes/ENRT/ConfigMixins/ParallelStreamQDiscHWConfigMixin.py
@@ -2,8 +2,22 @@ from lnst.Recipes.ENRT.ConfigMixins.BaseHWConfigMixin import
BaseHWConfigMixin
class ParallelStreamQDiscHWConfigMixin(BaseHWConfigMixin):
+ """
+ This class is an extension to the :any:`BaseEnrtRecipe` class that enables
+ the mq (multiqueing) qdisc configuration on the devices defined by
+ :attr:`parallel_stream_qdisc_hw_config_dev_list` property.
+
+ The qdisc is configured when the :any:`BaseEnrtRecipe`'s
*perf_parallel_streams*
+ test parameter is set.
+
+ """
+
@property
def parallel_stream_qdisc_hw_config_dev_list(self):
+ """
+ The value of this property is a list of devices for which the
+ mq qdisc should be configured. It has to be defined by a derived class.
+ """
return []
def hw_config(self, config):
--
2.21.1
_______________________________________________
LNST-developers mailing list -- lnst-developers(a)lists.fedorahosted.org
To unsubscribe send an email to lnst-developers-leave(a)lists.fedorahosted.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedorahosted.org/archives/list/lnst-developers@lists.fedora...