[ovs-dev] [PATCH v2 00/19] DPDK/pmd reconfiguration refactor and bugfixes

Daniele Di Proietto diproiettod at vmware.com
Sat Dec 3 02:13:59 UTC 2016


The first two commits of the series are trivial bugfixes for dpif-netdev.

Then the series fixes a long standing bug that caused a crash when the
admin link state of a port is changed while traffic is flowing.

The next part makes use of reconfiguration for port add: this makes
the operation twice as fast and reduce some code duplication.  This part
conflicts with the port naming change, so I'm willing to postpone it, unless
we find it to be useful for the port naming change.

The rest of the series refactors a lot of code if dpif-netdev:

* We no longer start pmd threads on demand for each numa node.  This made
  the code very complicated and introduced a lot of bugs.
* The pmd threads state is now internal to dpif-netdev and it's not stored in
  ovs-numa.
* There's now a single function that handles pmd threads/ports changes: this
  reduces code duplication and makes port reconfiguration faster, as we don't
  have to bring down the whole datapath.

v1->v2:

* Postpone cls deletion in dp_netdev_destroy_pmd()
* Allow ports to be in tnl_port_cache and send_port_cache at the same time
* Set counter to 1025 when reloading pmd without queues to be polled
* Rebased:
  * Allow 0x in pmd-cpu-mask
  * ...
* Don't duplicate get_core_by_core_id() in get_cpu_core()
* New commit for ovs-numa: don't use hmap_first_with_hash()
* Keep per numa count of cores in ovs_numa_dump
* Print queue id and port name in warning if there's no pmd thread
* Extract pmd_remove_stale_ports() from reconfigure_datapath()
* s/reload_all_pmds()/reload_affected_pmds()/
* Declare variables at the beginning of the block in rxq_scheduling()
* Use 'q' instead of 'port->rxqs[qid]' in a couple of places
* Unref pmd in rxq_scheduling()
* Simplify check for changed pmd threads
* Properly reset queues to unassigned in reconfigure_datapath()
* Optimize tx port insertion in pmd cache


Daniele Di Proietto (19):
  dpif-netdev: Fix memory leak.
  dpif-netdev: Take non_pmd_mutex to access tx cached ports.
  dpif-netdev: Don't try to output on a device without txqs.
  netdev-dpdk: Don't call rte_dev_stop() in update_flags().
  netdev-dpdk: Start the device only once on port-add.
  netdev-dpdk: Refactor construct and destruct.
  dpif-netdev: Use a boolean instead of pmd->port_seq.
  dpif-netdev: Block pmd threads if there are no ports.
  dpif-netdev: Create pmd threads for every numa node.
  dpif-netdev: Make 'static_tx_qid' const.
  dpctl: Avoid making assumptions on pmd threads.
  ovs-numa: New ovs_numa_dump_contains_core() function.
  ovs-numa: Add new dump types.
  ovs-numa: Don't use hmap_first_with_hash().
  ovs-numa: Add per numa and global counts in dump.
  dpif-netdev: core_id shouldn't be negative.
  dpif-netdev: Use hmap for poll_list in pmd threads.
  dpif-netdev: Centralized threads and queues handling code.
  ovs-numa: Remove unused functions.

 lib/dpctl.c       |  107 +---
 lib/dpif-netdev.c | 1444 +++++++++++++++++++++++++++++------------------------
 lib/dpif.c        |    6 +-
 lib/dpif.h        |   12 +-
 lib/netdev-dpdk.c |  173 +++----
 lib/netdev.c      |   41 +-
 lib/netdev.h      |    1 +
 lib/ovs-numa.c    |  281 +++++------
 lib/ovs-numa.h    |   35 +-
 tests/pmd.at      |   49 +-
 vswitchd/bridge.c |    2 +
 11 files changed, 1099 insertions(+), 1052 deletions(-)

-- 
2.10.2



More information about the dev mailing list