diff mbox series

[ovs-dev,v2,1/6] dpif-netdev: Rename pmd-maxsleep config option.

Message ID 20230621092604.634945-2-ktraynor@redhat.com
State Superseded
Headers show
Series PMD load based sleep updates and per-pmd config. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test fail github build: failed

Commit Message

Kevin Traynor June 21, 2023, 9:25 a.m. UTC
other_config:pmd-maxsleep is a config option to allow
PMD thread cores to sleep under low or no load conditions.

Rename it to 'pmd-sleep-max' to allow a more structured
name and so that additional options or command can follow
the 'pmd-sleep-xyz' pattern.

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
 Documentation/topics/dpdk/pmd.rst |  2 +-
 NEWS                              |  1 +
 lib/dpif-netdev.c                 |  2 +-
 tests/pmd.at                      | 12 ++++++------
 vswitchd/vswitch.xml              |  2 +-
 5 files changed, 10 insertions(+), 9 deletions(-)

Comments

David Marchand July 7, 2023, 12:48 p.m. UTC | #1
On Wed, Jun 21, 2023 at 11:26 AM Kevin Traynor <ktraynor@redhat.com> wrote:
>
> other_config:pmd-maxsleep is a config option to allow
> PMD thread cores to sleep under low or no load conditions.
>
> Rename it to 'pmd-sleep-max' to allow a more structured
> name and so that additional options or command can follow
> the 'pmd-sleep-xyz' pattern.
>
> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>

I don't have a strong opinion against this name change.
Having a clear prefix for this feature params and using this same
prefix for appctl commands (later in this series) seems a good thing
to me.

Reviewed-by: David Marchand <david.marchand@redhat.com>
diff mbox series

Patch

diff --git a/Documentation/topics/dpdk/pmd.rst b/Documentation/topics/dpdk/pmd.rst
index e70986d16..b261e9254 100644
--- a/Documentation/topics/dpdk/pmd.rst
+++ b/Documentation/topics/dpdk/pmd.rst
@@ -335,5 +335,5 @@  This can be enabled by setting the max requested sleep time (in microseconds)
 for a PMD thread::
 
-    $ ovs-vsctl set open_vswitch . other_config:pmd-maxsleep=50
+    $ ovs-vsctl set open_vswitch . other_config:pmd-sleep-max=50
 
 With a non-zero max value a PMD may request to sleep by an incrementing amount
diff --git a/NEWS b/NEWS
index 66d5a4ea3..f445377ad 100644
--- a/NEWS
+++ b/NEWS
@@ -41,4 +41,5 @@  Post-v3.1.0
        interfaces that support it.  See the 'status' column in the 'interface'
        table to check the status.
+     * Rename 'pmd-maxsleep' other_config to 'pmd-sleep-max'.
 
 
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index abe63412e..5b53717e0 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -4983,5 +4983,5 @@  dpif_netdev_set_config(struct dpif *dpif, const struct smap *other_config)
     set_pmd_auto_lb(dp, autolb_state, log_autolb);
 
-    pmd_max_sleep = smap_get_ullong(other_config, "pmd-maxsleep", 0);
+    pmd_max_sleep = smap_get_ullong(other_config, "pmd-sleep-max", 0);
     pmd_max_sleep = MIN(PMD_RCU_QUIESCE_INTERVAL, pmd_max_sleep);
     atomic_read_relaxed(&dp->pmd_max_sleep, &cur_pmd_max_sleep);
diff --git a/tests/pmd.at b/tests/pmd.at
index 48f3d432d..374ad7217 100644
--- a/tests/pmd.at
+++ b/tests/pmd.at
@@ -1266,5 +1266,5 @@  OVS_WAIT_UNTIL([tail ovs-vswitchd.log | grep "PMD load based sleeps are disabled
 dnl Check low value max sleep
 get_log_next_line_num
-AT_CHECK([ovs-vsctl set open_vswitch . other_config:pmd-maxsleep="1"])
+AT_CHECK([ovs-vsctl set open_vswitch . other_config:pmd-sleep-max="1"])
 OVS_WAIT_UNTIL([tail -n +$LINENUM ovs-vswitchd.log | grep "PMD max sleep request is 1 usecs."])
 OVS_WAIT_UNTIL([tail -n +$LINENUM ovs-vswitchd.log | grep "PMD load based sleeps are enabled."])
@@ -1272,5 +1272,5 @@  OVS_WAIT_UNTIL([tail -n +$LINENUM ovs-vswitchd.log | grep "PMD load based sleeps
 dnl Check high value max sleep
 get_log_next_line_num
-AT_CHECK([ovs-vsctl set open_vswitch . other_config:pmd-maxsleep="10000"])
+AT_CHECK([ovs-vsctl set open_vswitch . other_config:pmd-sleep-max="10000"])
 OVS_WAIT_UNTIL([tail -n +$LINENUM ovs-vswitchd.log | grep "PMD max sleep request is 10000 usecs."])
 OVS_WAIT_UNTIL([tail -n +$LINENUM ovs-vswitchd.log | grep "PMD load based sleeps are enabled."])
@@ -1278,5 +1278,5 @@  OVS_WAIT_UNTIL([tail -n +$LINENUM ovs-vswitchd.log | grep "PMD load based sleeps
 dnl Check setting max sleep to zero
 get_log_next_line_num
-AT_CHECK([ovs-vsctl set open_vswitch . other_config:pmd-maxsleep="0"])
+AT_CHECK([ovs-vsctl set open_vswitch . other_config:pmd-sleep-max="0"])
 OVS_WAIT_UNTIL([tail -n +$LINENUM ovs-vswitchd.log | grep "PMD max sleep request is 0 usecs."])
 OVS_WAIT_UNTIL([tail -n +$LINENUM ovs-vswitchd.log | grep "PMD load based sleeps are disabled."])
@@ -1284,5 +1284,5 @@  OVS_WAIT_UNTIL([tail -n +$LINENUM ovs-vswitchd.log | grep "PMD load based sleeps
 dnl Check above high value max sleep
 get_log_next_line_num
-AT_CHECK([ovs-vsctl set open_vswitch . other_config:pmd-maxsleep="10001"])
+AT_CHECK([ovs-vsctl set open_vswitch . other_config:pmd-sleep-max="10001"])
 OVS_WAIT_UNTIL([tail -n +$LINENUM ovs-vswitchd.log | grep "PMD max sleep request is 10000 usecs."])
 OVS_WAIT_UNTIL([tail -n +$LINENUM ovs-vswitchd.log | grep "PMD load based sleeps are enabled."])
@@ -1290,10 +1290,10 @@  OVS_WAIT_UNTIL([tail -n +$LINENUM ovs-vswitchd.log | grep "PMD load based sleeps
 dnl Check rounding
 get_log_next_line_num
-AT_CHECK([ovs-vsctl set open_vswitch . other_config:pmd-maxsleep="490"])
+AT_CHECK([ovs-vsctl set open_vswitch . other_config:pmd-sleep-max="490"])
 OVS_WAIT_UNTIL([tail -n +$LINENUM ovs-vswitchd.log | grep "PMD max sleep request is 490 usecs."])
 OVS_WAIT_UNTIL([tail -n +$LINENUM ovs-vswitchd.log | grep "PMD load based sleeps are enabled."])
 dnl Check rounding
 get_log_next_line_num
-AT_CHECK([ovs-vsctl set open_vswitch . other_config:pmd-maxsleep="499"])
+AT_CHECK([ovs-vsctl set open_vswitch . other_config:pmd-sleep-max="499"])
 OVS_WAIT_UNTIL([tail -n +$LINENUM ovs-vswitchd.log | grep "PMD max sleep request is 499 usecs."])
 OVS_WAIT_UNTIL([tail -n +$LINENUM ovs-vswitchd.log | grep "PMD load based sleeps are enabled."])
diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
index 59c404bbb..fe5f89154 100644
--- a/vswitchd/vswitch.xml
+++ b/vswitchd/vswitch.xml
@@ -803,5 +803,5 @@ 
         </p>
       </column>
-      <column name="other_config" key="pmd-maxsleep"
+      <column name="other_config" key="pmd-sleep-max"
               type='{"type": "integer",
                      "minInteger": 0, "maxInteger": 10000}'>