Re: [ovs-dev] [PATCH 2/8] doc: Add "PMD" topic document

2018-04-17 Thread Stokes, Ian
> On Mon, 2018-04-09 at 15:16 +, Stokes, Ian wrote:
> > > This continues the breakup of the huge DPDK "howto" into smaller
> > > components. There are a couple of related changes included, such as
> > > using "Rx queue" instead of "rxq" and noting how Tx queues cannot be
> configured.
> > >
> > > We enable the TODO directive, so we can actually start calling out
> > > some TODOs.
> > >
> > > Signed-off-by: Stephen Finucane 
> > > ---
> > >  Documentation/conf.py|   2 +-
> > >  Documentation/howto/dpdk.rst |  86 ---
> > >  Documentation/topics/dpdk/index.rst  |   1 +
> > >  Documentation/topics/dpdk/phy.rst|  10 +++
> > >  Documentation/topics/dpdk/pmd.rst| 139
> > > +++
> > >  Documentation/topics/dpdk/vhost-user.rst |  17 ++--
> > >  6 files changed, 159 insertions(+), 96 deletions(-)  create mode
> > > 100644 Documentation/topics/dpdk/pmd.rst
> > >
> > > diff --git a/Documentation/conf.py b/Documentation/conf.py index
> > > 6ab144c5d..babda21de 100644
> > > --- a/Documentation/conf.py
> > > +++ b/Documentation/conf.py
> > > @@ -32,7 +32,7 @@ needs_sphinx = '1.1'
> > >  # Add any Sphinx extension module names here, as strings. They can
> > > be  # extensions coming with Sphinx (named 'sphinx.ext.*') or your
> > > custom  # ones.
> > > -extensions = []
> > > +extensions = ['sphinx.ext.todo']
> > >
> > >  # Add any paths that contain templates here, relative to this
> directory.
> > >  templates_path = ['_templates']
> > > diff --git a/Documentation/howto/dpdk.rst
> > > b/Documentation/howto/dpdk.rst index d717d2ebe..c2324118d 100644
> > > --- a/Documentation/howto/dpdk.rst
> > > +++ b/Documentation/howto/dpdk.rst
> > > @@ -81,92 +81,6 @@ To stop ovs-vswitchd & delete bridge, run::
> > >  $ ovs-appctl -t ovsdb-server exit
> > >  $ ovs-vsctl del-br br0
> > >
> > > -PMD Thread Statistics
> > > --
> > > -
> > > -To show current stats::
> > > -
> > > -$ ovs-appctl dpif-netdev/pmd-stats-show
> > > -
> > > -To clear previous stats::
> > > -
> > > -$ ovs-appctl dpif-netdev/pmd-stats-clear
> > > -
> > > -Port/RXQ Assigment to PMD Threads
> > > --
> > > -
> > > -To show port/rxq assignment::
> > > -
> > > -$ ovs-appctl dpif-netdev/pmd-rxq-show
> > > -
> > > -To change default rxq assignment to pmd threads, rxqs may be
> > > manually pinned to -desired cores using::
> > > -
> > > -$ ovs-vsctl set Interface  \
> > > -other_config:pmd-rxq-affinity=
> > > -
> > > -where:
> > > -
> > > --  is a CSV list of ``:``
> > > values
> > > -
> > > -For example::
> > > -
> > > -$ ovs-vsctl set interface dpdk-p0 options:n_rxq=4 \
> > > -other_config:pmd-rxq-affinity="0:3,1:7,3:8"
> > > -
> > > -This will ensure:
> > > -
> > > -- Queue #0 pinned to core 3
> > > -- Queue #1 pinned to core 7
> > > -- Queue #2 not pinned
> > > -- Queue #3 pinned to core 8
> > > -
> > > -After that PMD threads on cores where RX queues was pinned will
> > > become - ``isolated``. This means that this thread will poll only
> pinned RX queues.
> > > -
> > > -.. warning::
> > > -  If there are no ``non-isolated`` PMD threads, ``non-pinned`` RX
> > > queues will
> > > -  not be polled. Also, if provided ``core_id`` is not available
> > > (ex. this
> > > -  ``core_id`` not in ``pmd-cpu-mask``), RX queue will not be polled
> > > by any PMD
> > > -  thread.
> > > -
> > > -If pmd-rxq-affinity is not set for rxqs, they will be assigned to
> > > pmds
> > > (cores) -automatically. The processing cycles that have been stored
> > > for each rxq -will be used where known to assign rxqs to pmd based
> > > on a round robin of the -sorted rxqs.
> > > -
> > > -For example, in the case where here there are 5 rxqs and 3 cores
> (e.g.
> > > 3,7,8) -available, and the measured usage of core cycles per rxq
> > > over the last -interval is seen to be:
> > > -
> > > -- Queue #0: 30%
> > > -- Queue #1: 80%
> > > -- Queue #3: 60%
> > > -- Queue #4: 70%
> > > -- Queue #5: 10%
> > > -
> > > -The rxqs will be assigned to cores 3,7,8 in the following order:
> > > -
> > > -Core 3: Q1 (80%) |
> > > -Core 7: Q4 (70%) | Q5 (10%)
> > > -core 8: Q3 (60%) | Q0 (30%)
> > > -
> > > -To see the current measured usage history of pmd core cycles for
> > > each
> > > rxq::
> > > -
> > > -$ ovs-appctl dpif-netdev/pmd-rxq-show
> > > -
> > > -.. note::
> > > -
> > > -  A history of one minute is recorded and shown for each rxq to
> > > allow for
> > > -  traffic pattern spikes. An rxq's pmd core cycles usage changes
> > > due to traffic
> > > -  pattern or reconfig changes will take one minute before they are
> > > fully
> > > -  reflected in the stats.
> > > -
> > > -Rxq to pmds assignment takes place whenever there are configuration
> > > changes -or can be triggered by using::
> > > -
> > > -$ ovs-appctl dpif-netdev/pmd-rxq-rebalance
> > > -
> > >  QoS
> > >  ---
> > >
> > > diff --git a/Docum

Re: [ovs-dev] [PATCH 2/8] doc: Add "PMD" topic document

2018-04-16 Thread Stephen Finucane
On Mon, 2018-04-09 at 15:16 +, Stokes, Ian wrote:
> > This continues the breakup of the huge DPDK "howto" into smaller
> > components. There are a couple of related changes included, such as using
> > "Rx queue" instead of "rxq" and noting how Tx queues cannot be configured.
> > 
> > We enable the TODO directive, so we can actually start calling out some
> > TODOs.
> > 
> > Signed-off-by: Stephen Finucane 
> > ---
> >  Documentation/conf.py|   2 +-
> >  Documentation/howto/dpdk.rst |  86 ---
> >  Documentation/topics/dpdk/index.rst  |   1 +
> >  Documentation/topics/dpdk/phy.rst|  10 +++
> >  Documentation/topics/dpdk/pmd.rst| 139
> > +++
> >  Documentation/topics/dpdk/vhost-user.rst |  17 ++--
> >  6 files changed, 159 insertions(+), 96 deletions(-)  create mode 100644
> > Documentation/topics/dpdk/pmd.rst
> > 
> > diff --git a/Documentation/conf.py b/Documentation/conf.py index
> > 6ab144c5d..babda21de 100644
> > --- a/Documentation/conf.py
> > +++ b/Documentation/conf.py
> > @@ -32,7 +32,7 @@ needs_sphinx = '1.1'
> >  # Add any Sphinx extension module names here, as strings. They can be  #
> > extensions coming with Sphinx (named 'sphinx.ext.*') or your custom  #
> > ones.
> > -extensions = []
> > +extensions = ['sphinx.ext.todo']
> > 
> >  # Add any paths that contain templates here, relative to this directory.
> >  templates_path = ['_templates']
> > diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst
> > index d717d2ebe..c2324118d 100644
> > --- a/Documentation/howto/dpdk.rst
> > +++ b/Documentation/howto/dpdk.rst
> > @@ -81,92 +81,6 @@ To stop ovs-vswitchd & delete bridge, run::
> >  $ ovs-appctl -t ovsdb-server exit
> >  $ ovs-vsctl del-br br0
> > 
> > -PMD Thread Statistics
> > --
> > -
> > -To show current stats::
> > -
> > -$ ovs-appctl dpif-netdev/pmd-stats-show
> > -
> > -To clear previous stats::
> > -
> > -$ ovs-appctl dpif-netdev/pmd-stats-clear
> > -
> > -Port/RXQ Assigment to PMD Threads
> > --
> > -
> > -To show port/rxq assignment::
> > -
> > -$ ovs-appctl dpif-netdev/pmd-rxq-show
> > -
> > -To change default rxq assignment to pmd threads, rxqs may be manually
> > pinned to -desired cores using::
> > -
> > -$ ovs-vsctl set Interface  \
> > -other_config:pmd-rxq-affinity=
> > -
> > -where:
> > -
> > --  is a CSV list of ``:``
> > values
> > -
> > -For example::
> > -
> > -$ ovs-vsctl set interface dpdk-p0 options:n_rxq=4 \
> > -other_config:pmd-rxq-affinity="0:3,1:7,3:8"
> > -
> > -This will ensure:
> > -
> > -- Queue #0 pinned to core 3
> > -- Queue #1 pinned to core 7
> > -- Queue #2 not pinned
> > -- Queue #3 pinned to core 8
> > -
> > -After that PMD threads on cores where RX queues was pinned will become -
> > ``isolated``. This means that this thread will poll only pinned RX queues.
> > -
> > -.. warning::
> > -  If there are no ``non-isolated`` PMD threads, ``non-pinned`` RX queues
> > will
> > -  not be polled. Also, if provided ``core_id`` is not available (ex. this
> > -  ``core_id`` not in ``pmd-cpu-mask``), RX queue will not be polled by
> > any PMD
> > -  thread.
> > -
> > -If pmd-rxq-affinity is not set for rxqs, they will be assigned to pmds
> > (cores) -automatically. The processing cycles that have been stored for
> > each rxq -will be used where known to assign rxqs to pmd based on a round
> > robin of the -sorted rxqs.
> > -
> > -For example, in the case where here there are 5 rxqs and 3 cores (e.g.
> > 3,7,8) -available, and the measured usage of core cycles per rxq over the
> > last -interval is seen to be:
> > -
> > -- Queue #0: 30%
> > -- Queue #1: 80%
> > -- Queue #3: 60%
> > -- Queue #4: 70%
> > -- Queue #5: 10%
> > -
> > -The rxqs will be assigned to cores 3,7,8 in the following order:
> > -
> > -Core 3: Q1 (80%) |
> > -Core 7: Q4 (70%) | Q5 (10%)
> > -core 8: Q3 (60%) | Q0 (30%)
> > -
> > -To see the current measured usage history of pmd core cycles for each
> > rxq::
> > -
> > -$ ovs-appctl dpif-netdev/pmd-rxq-show
> > -
> > -.. note::
> > -
> > -  A history of one minute is recorded and shown for each rxq to allow for
> > -  traffic pattern spikes. An rxq's pmd core cycles usage changes due to
> > traffic
> > -  pattern or reconfig changes will take one minute before they are fully
> > -  reflected in the stats.
> > -
> > -Rxq to pmds assignment takes place whenever there are configuration
> > changes -or can be triggered by using::
> > -
> > -$ ovs-appctl dpif-netdev/pmd-rxq-rebalance
> > -
> >  QoS
> >  ---
> > 
> > diff --git a/Documentation/topics/dpdk/index.rst
> > b/Documentation/topics/dpdk/index.rst
> > index 5f836a6e9..dfde88377 100644
> > --- a/Documentation/topics/dpdk/index.rst
> > +++ b/Documentation/topics/dpdk/index.rst
> > @@ -31,3 +31,4 @@ The DPDK Datapath
> > phy
> > vhost-user
> > ring
> > +   pmd
> > d

Re: [ovs-dev] [PATCH 2/8] doc: Add "PMD" topic document

2018-04-09 Thread Stokes, Ian
> This continues the breakup of the huge DPDK "howto" into smaller
> components. There are a couple of related changes included, such as using
> "Rx queue" instead of "rxq" and noting how Tx queues cannot be configured.
> 
> We enable the TODO directive, so we can actually start calling out some
> TODOs.
> 
> Signed-off-by: Stephen Finucane 
> ---
>  Documentation/conf.py|   2 +-
>  Documentation/howto/dpdk.rst |  86 ---
>  Documentation/topics/dpdk/index.rst  |   1 +
>  Documentation/topics/dpdk/phy.rst|  10 +++
>  Documentation/topics/dpdk/pmd.rst| 139
> +++
>  Documentation/topics/dpdk/vhost-user.rst |  17 ++--
>  6 files changed, 159 insertions(+), 96 deletions(-)  create mode 100644
> Documentation/topics/dpdk/pmd.rst
> 
> diff --git a/Documentation/conf.py b/Documentation/conf.py index
> 6ab144c5d..babda21de 100644
> --- a/Documentation/conf.py
> +++ b/Documentation/conf.py
> @@ -32,7 +32,7 @@ needs_sphinx = '1.1'
>  # Add any Sphinx extension module names here, as strings. They can be  #
> extensions coming with Sphinx (named 'sphinx.ext.*') or your custom  #
> ones.
> -extensions = []
> +extensions = ['sphinx.ext.todo']
> 
>  # Add any paths that contain templates here, relative to this directory.
>  templates_path = ['_templates']
> diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst
> index d717d2ebe..c2324118d 100644
> --- a/Documentation/howto/dpdk.rst
> +++ b/Documentation/howto/dpdk.rst
> @@ -81,92 +81,6 @@ To stop ovs-vswitchd & delete bridge, run::
>  $ ovs-appctl -t ovsdb-server exit
>  $ ovs-vsctl del-br br0
> 
> -PMD Thread Statistics
> --
> -
> -To show current stats::
> -
> -$ ovs-appctl dpif-netdev/pmd-stats-show
> -
> -To clear previous stats::
> -
> -$ ovs-appctl dpif-netdev/pmd-stats-clear
> -
> -Port/RXQ Assigment to PMD Threads
> --
> -
> -To show port/rxq assignment::
> -
> -$ ovs-appctl dpif-netdev/pmd-rxq-show
> -
> -To change default rxq assignment to pmd threads, rxqs may be manually
> pinned to -desired cores using::
> -
> -$ ovs-vsctl set Interface  \
> -other_config:pmd-rxq-affinity=
> -
> -where:
> -
> --  is a CSV list of ``:``
> values
> -
> -For example::
> -
> -$ ovs-vsctl set interface dpdk-p0 options:n_rxq=4 \
> -other_config:pmd-rxq-affinity="0:3,1:7,3:8"
> -
> -This will ensure:
> -
> -- Queue #0 pinned to core 3
> -- Queue #1 pinned to core 7
> -- Queue #2 not pinned
> -- Queue #3 pinned to core 8
> -
> -After that PMD threads on cores where RX queues was pinned will become -
> ``isolated``. This means that this thread will poll only pinned RX queues.
> -
> -.. warning::
> -  If there are no ``non-isolated`` PMD threads, ``non-pinned`` RX queues
> will
> -  not be polled. Also, if provided ``core_id`` is not available (ex. this
> -  ``core_id`` not in ``pmd-cpu-mask``), RX queue will not be polled by
> any PMD
> -  thread.
> -
> -If pmd-rxq-affinity is not set for rxqs, they will be assigned to pmds
> (cores) -automatically. The processing cycles that have been stored for
> each rxq -will be used where known to assign rxqs to pmd based on a round
> robin of the -sorted rxqs.
> -
> -For example, in the case where here there are 5 rxqs and 3 cores (e.g.
> 3,7,8) -available, and the measured usage of core cycles per rxq over the
> last -interval is seen to be:
> -
> -- Queue #0: 30%
> -- Queue #1: 80%
> -- Queue #3: 60%
> -- Queue #4: 70%
> -- Queue #5: 10%
> -
> -The rxqs will be assigned to cores 3,7,8 in the following order:
> -
> -Core 3: Q1 (80%) |
> -Core 7: Q4 (70%) | Q5 (10%)
> -core 8: Q3 (60%) | Q0 (30%)
> -
> -To see the current measured usage history of pmd core cycles for each
> rxq::
> -
> -$ ovs-appctl dpif-netdev/pmd-rxq-show
> -
> -.. note::
> -
> -  A history of one minute is recorded and shown for each rxq to allow for
> -  traffic pattern spikes. An rxq's pmd core cycles usage changes due to
> traffic
> -  pattern or reconfig changes will take one minute before they are fully
> -  reflected in the stats.
> -
> -Rxq to pmds assignment takes place whenever there are configuration
> changes -or can be triggered by using::
> -
> -$ ovs-appctl dpif-netdev/pmd-rxq-rebalance
> -
>  QoS
>  ---
> 
> diff --git a/Documentation/topics/dpdk/index.rst
> b/Documentation/topics/dpdk/index.rst
> index 5f836a6e9..dfde88377 100644
> --- a/Documentation/topics/dpdk/index.rst
> +++ b/Documentation/topics/dpdk/index.rst
> @@ -31,3 +31,4 @@ The DPDK Datapath
> phy
> vhost-user
> ring
> +   pmd
> diff --git a/Documentation/topics/dpdk/phy.rst
> b/Documentation/topics/dpdk/phy.rst
> index 1c18e4e3d..222fa3e9f 100644
> --- a/Documentation/topics/dpdk/phy.rst
> +++ b/Documentation/topics/dpdk/phy.rst
> @@ -109,3 +109,13 @@ tool::
>  For more information, refer to the `DPDK documentation `__.
> 
>  .. _dpdk-drivers: http://dpdk.org/doc/gui