[ovs-git] [openvswitch/ovs] 4c47dd: netdev-dpdk: fix ingress_policer leak on error pat...

GitHub noreply at github.com
Fri Jan 19 20:46:19 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 4c47ddde34b3828df7a1f64e381426caa1669129
      https://github.com/openvswitch/ovs/commit/4c47ddde34b3828df7a1f64e381426caa1669129
  Author: zhangliping <zhangliping02 at baidu.com>
  Date:   2018-01-17 (Wed, 17 Jan 2018)

  Changed paths:
    M lib/netdev-dpdk.c

  Log Message:
  -----------
  netdev-dpdk: fix ingress_policer leak on error path

Fix memory leak by freeing the policer if rte_meter_srtcm_config fails.

Fixes: 9509913aa722 ("netdev-dpdk.c: Add ingress-policing functionality.")
Signed-off-by: zhangliping <zhangliping02 at baidu.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>


  Commit: 82a48ead4e6d03a7a9438ba02e50249674e220bb
      https://github.com/openvswitch/ovs/commit/82a48ead4e6d03a7a9438ba02e50249674e220bb
  Author: Jan Scheurich <jan.scheurich at ericsson.com>
  Date:   2018-01-17 (Wed, 17 Jan 2018)

  Changed paths:
    M lib/automake.mk
    A lib/dpif-netdev-perf.c
    A lib/dpif-netdev-perf.h
    M lib/dpif-netdev.c
    M tests/pmd.at

  Log Message:
  -----------
  dpif-netdev: Refactor PMD performance into dpif-netdev-perf

Add module dpif-netdev-perf to host all PMD performance-related
data structures and functions in dpif-netdev. Refactor the PMD
stats handling in dpif-netdev and delegate whatever possible into
the new module, using clean interfaces to shield dpif-netdev from
the implementation details. Accordingly, the all PMD statistics
members are moved from the main struct dp_netdev_pmd_thread into
a dedicated member of type struct pmd_perf_stats.

Include Darrel's prior refactoring of PMD stats contained in
[PATCH v5,2/3] dpif-netdev: Refactor some pmd stats:

1. The cycles per packet counts are now based on packets
received rather than packet passes through the datapath.

2. Packet counters are now kept for packets received and
packets recirculated. These are kept as separate counters for
maintainability reasons. The cost of incrementing these counters
is negligible.  These new counters are also displayed to the user.

3. A display statistic is added for the average number of
datapath passes per packet. This should be useful for user
debugging and understanding of packet processing.

4. The user visible 'miss' counter is used for successful upcalls,
rather than the sum of sucessful and unsuccessful upcalls. Hence,
this becomes what user historically understands by OVS 'miss upcall'.
The user display is annotated to make this clear as well.

5. The user visible 'lost' counter remains as failed upcalls, but
is annotated to make it clear what the meaning is.

6. The enum pmd_stat_type is annotated to make the usage of the
stats counters clear.

7. The subtable lookup stats is renamed to make it clear that it
relates to masked lookups.

8. The PMD stats test is updated to handle the new user stats of
packets received, packets recirculated and average number of datapath
passes per packet.

On top of that introduce a "-pmd <core>" option to the PMD info
commands to filter the output for a single PMD.

Made the pmd-stats-show output a bit more readable by adding a blank
between colon and value.

Signed-off-by: Jan Scheurich <jan.scheurich at ericsson.com>
Co-authored-by: Darrell Ball <dlu998 at gmail.com>
Signed-off-by: Darrell Ball <dlu998 at gmail.com>
Acked-by: Ilya Maximets <i.maximets at samsung.com>
Acked-by: Billy O'Mahony <billy.o.mahony at intel.com>
Signed-off: Ian Stokes <ian.stokes at intel.com>


  Commit: a19896abe5e0b3cba3da7193779b979148b5c60c
      https://github.com/openvswitch/ovs/commit/a19896abe5e0b3cba3da7193779b979148b5c60c
  Author: Jan Scheurich <jan.scheurich at ericsson.com>
  Date:   2018-01-17 (Wed, 17 Jan 2018)

  Changed paths:
    M lib/dpif-netdev-perf.h
    M lib/dpif-netdev.c

  Log Message:
  -----------
  dpif-netdev: Refactor cycle counting

Simplify the historically grown TSC cycle counting in PMD threads.
Cycles are currently counted for the following purposes:

1. Measure PMD ustilization

PMD utilization is defined as ratio of cycles spent in busy iterations
(at least one packet received or sent) over the total number of cycles.

This is already done in pmd_perf_start_iteration() and
pmd_perf_end_iteration() based on a TSC timestamp saved in current
iteration at start_iteration() and the actual TSC at end_iteration().
No dependency on intermediate cycle accounting.

2. Measure the processing load per RX queue

This comprises cycles spend on polling and processing packets received
from the rx queue and the cycles spent on delayed sending of these packets
to tx queues (with time-based batching).

The previous scheme using cycles_count_start(), cycles_count_intermediate()
and cycles-count_end() originally introduced to simplify cycle counting
and saving calls to rte_get_tsc_cycles() was rather obscuring things.

Replace by a nestable cycle_timer with with start and stop functions to
embrace a code segment to be timed. The timed code may contain arbitrary
nested cycle_timers. The duration of nested timers is excluded from the
outer timer.

The caller must ensure that each call to cycle_timer_start() is
followed by a call to cycle_timer_end(). Failure to do so will lead to
assertion failure or a memory leak.

The new cycle_timer is used to measure the processing cycles per rx queue.
This is not yet strictly necessary but will be made use of in a subsequent
commit.

All cycle count functions and data are relocated to module
dpif-netdev-perf.

Signed-off-by: Jan Scheurich <jan.scheurich at ericsson.com>
Acked-by: Ilya Maximets <i.maximets at samsung.com>
Acked-by: Billy O'Mahony <billy.o.mahony at intel.com>
Signed-off: Ian Stokes <ian.stokes at intel.com>


  Commit: 05f9e707e19431bac8bea1d6f0c68ffc2f75b229
      https://github.com/openvswitch/ovs/commit/05f9e707e19431bac8bea1d6f0c68ffc2f75b229
  Author: Ilya Maximets <i.maximets at samsung.com>
  Date:   2018-01-17 (Wed, 17 Jan 2018)

  Changed paths:
    M lib/dpif-netdev.c

  Log Message:
  -----------
  dpif-netdev: Use microsecond granularity.

Upcoming time-based output batching will require microsecond
granularity for it's flexible configuration.

Acked-by: Jan Scheurich <jan.scheurich at ericsson.com>
Acked-by: Ian Stokes <ian.stokes at intel.com>
Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>


  Commit: 58ed6df04805077ebcd64d372c3c23f478b0ba6f
      https://github.com/openvswitch/ovs/commit/58ed6df04805077ebcd64d372c3c23f478b0ba6f
  Author: Ilya Maximets <i.maximets at samsung.com>
  Date:   2018-01-17 (Wed, 17 Jan 2018)

  Changed paths:
    M lib/dpif-netdev.c

  Log Message:
  -----------
  dpif-netdev: Count cycles on per-rxq basis.

Upcoming time-based output batching will allow to collect in a single
output batch packets from different RX queues. Lets keep the list of
RX queues for each output packet and collect cycles for them on send.

Tested-by: Jan Scheurich <jan.scheurich at ericsson.com>
Acked-by: Jan Scheurich <jan.scheurich at ericsson.com>
Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>


  Commit: c71ea3c4a7b66927d1374ef3cc40d2ada208df1c
      https://github.com/openvswitch/ovs/commit/c71ea3c4a7b66927d1374ef3cc40d2ada208df1c
  Author: Ilya Maximets <i.maximets at samsung.com>
  Date:   2018-01-17 (Wed, 17 Jan 2018)

  Changed paths:
    M lib/dpif-netdev.c
    M vswitchd/vswitch.xml

  Log Message:
  -----------
  dpif-netdev: Time based output batching.

This allows to collect packets from more than one RX burst
and send them together with a configurable intervals.

'other_config:tx-flush-interval' can be used to configure
time that a packet can wait in output batch for sending.

'tx-flush-interval' has microsecond resolution.

Tested-by: Jan Scheurich <jan.scheurich at ericsson.com>
Acked-by: Jan Scheurich <jan.scheurich at ericsson.com>
Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>


  Commit: 00adb8d7c8aead689e86f66859615365c843b2c3
      https://github.com/openvswitch/ovs/commit/00adb8d7c8aead689e86f66859615365c843b2c3
  Author: Ilya Maximets <i.maximets at samsung.com>
  Date:   2018-01-17 (Wed, 17 Jan 2018)

  Changed paths:
    M Documentation/intro/install/dpdk.rst

  Log Message:
  -----------
  docs: Describe output packet batching in DPDK guide.

Added information about output packet batching and a way to
configure 'tx-flush-interval'.

Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
Co-authored-by: Jan Scheurich <jan.scheurich at ericsson.com>
Signed-off-by: Jan Scheurich <jan.scheurich at ericsson.com>
Acked-by: Jan Scheurich <jan.scheurich at ericsson.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>


  Commit: 06ee1d3e06f7d45948b321149fef2f0226bce28c
      https://github.com/openvswitch/ovs/commit/06ee1d3e06f7d45948b321149fef2f0226bce28c
  Author: Ilya Maximets <i.maximets at samsung.com>
  Date:   2018-01-17 (Wed, 17 Jan 2018)

  Changed paths:
    M NEWS

  Log Message:
  -----------
  NEWS: Mark output packet batching support.

New feature should be mentioned in news, especially because it has
user-visible configuration options.

Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
Acked-by: Jan Scheurich <jan.scheurich at ericsson.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>


  Commit: 4f5d13e241ba3e7c7591e57561837b4d61f828d0
      https://github.com/openvswitch/ovs/commit/4f5d13e241ba3e7c7591e57561837b4d61f828d0
  Author: Kevin Traynor <ktraynor at redhat.com>
  Date:   2018-01-17 (Wed, 17 Jan 2018)

  Changed paths:
    M lib/dpif-netdev.c

  Log Message:
  -----------
  dpif-netdev: Reset the rxq current cycle counter on reload.

An rxq may have processing cycles counted in the current
counter when a reload happens. That could temporarily create
a small skew on the stats for an rxq. Reset the counter after
reload.

Fixes: 4809891b2e01 ("dpif-netdev: Count the rxq processing cycles for an rxq.")
Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>


  Commit: 2a2c67b43599e90f0dda17a62bcc2b5e7334e934
      https://github.com/openvswitch/ovs/commit/2a2c67b43599e90f0dda17a62bcc2b5e7334e934
  Author: Kevin Traynor <ktraynor at redhat.com>
  Date:   2018-01-17 (Wed, 17 Jan 2018)

  Changed paths:
    M Documentation/howto/dpdk.rst
    M NEWS
    M lib/dpif-netdev.c
    M tests/pmd.at

  Log Message:
  -----------
  dpif-netdev: Add percentage of pmd/core used by each rxq.

It is based on the length of history that is stored about an
rxq (currently 1 min).

$ ovs-appctl dpif-netdev/pmd-rxq-show
pmd thread numa_id 0 core_id 4:
  isolated : false
  port: dpdkphy1         queue-id:  0    pmd usage: 70 %
  port: dpdkvhost0       queue-id:  0    pmd usage:  0 %
pmd thread numa_id 0 core_id 6:
  isolated : false
  port: dpdkphy0         queue-id:  0    pmd usage: 64 %
  port: dpdkvhost1       queue-id:  0    pmd usage:  0 %

These values are what would be used as part of rxq to pmd
assignment due to a reconfiguration event e.g. adding pmds,
adding rxqs or with the command:

ovs-appctl dpif-netdev/pmd-rxq-rebalance

Signed-off-by: Jan Scheurich <jan.scheurich at ericsson.com>
Co-authored-by: Jan Scheurich <jan.scheurich at ericsson.com>
Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>


  Commit: c190e2ada5de0c2e9319b8280ada88f64e064d5b
      https://github.com/openvswitch/ovs/commit/c190e2ada5de0c2e9319b8280ada88f64e064d5b
  Author: Kevin Traynor <ktraynor at redhat.com>
  Date:   2018-01-17 (Wed, 17 Jan 2018)

  Changed paths:
    M NEWS

  Log Message:
  -----------
  NEWS: Add entry for new appctl dpif-netdev/pmd-rxq-rebalance.

This feature was added earlier but we thought it better to
advertise in NEWS after there was stats provided to help
the user decide whether they should use it.

Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>


  Commit: b2e8b12f8a821905c25295e04b843c0592a44339
      https://github.com/openvswitch/ovs/commit/b2e8b12f8a821905c25295e04b843c0592a44339
  Author: Flavio Leitner <fbl at sysclose.org>
  Date:   2018-01-17 (Wed, 17 Jan 2018)

  Changed paths:
    M NEWS
    M lib/netdev-dpdk.c

  Log Message:
  -----------
  netdev-dpdk: add vhost-user get_status.

Expose relevant vhost-user information in status.

Signed-off-by: Flavio Leitner <fbl at sysclose.org>
Tested-by: Kevin Traynor <ktraynor at redhat.com>
Acked-by: Kevin Traynor <ktraynor at redhat.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>


  Commit: 70bbaa46492d25d94154bebd4563d14d3e629068
      https://github.com/openvswitch/ovs/commit/70bbaa46492d25d94154bebd4563d14d3e629068
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2018-01-19 (Fri, 19 Jan 2018)

  Changed paths:
    M Documentation/howto/dpdk.rst
    M Documentation/intro/install/dpdk.rst
    M NEWS
    M lib/automake.mk
    A lib/dpif-netdev-perf.c
    A lib/dpif-netdev-perf.h
    M lib/dpif-netdev.c
    M lib/netdev-dpdk.c
    M tests/pmd.at
    M vswitchd/vswitch.xml

  Log Message:
  -----------
  Merge branch 'dpdk_merge' of https://github.com/istokes/ovs into HEAD


Compare: https://github.com/openvswitch/ovs/compare/2927a4730b1f...70bbaa46492d


More information about the git mailing list