Skip to content

refactor and cleanup of rte_ring

Bruce Richardson dpdk-dev 5 versions – Applied

Status from this message: Applied, thanks

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest14 patches 5 repliesApplied
  2. v414 patches 1 replySuperseded
  3. v314 patches 8 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v214 patches9 repliesSuperseded
v114 patches18 repliesSuperseded

Changes in V4 from the cover letter

* Fixed errors in the crypto PMDs due to missed updates to their enqueue/dequeue calls (p8 & p9).
* Updated quota_watermarks documentation to match changed code (p10)

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/14ring: remove split cacheline build settingconfig/common_base doc/guides/rel_notes/release_17_05.rst lib/librte_ring/rte_ring.c +1 more+17 -90 replies
2/14ring: create common structure for prod and cons metadatalib/librte_pdump/rte_pdump.c lib/librte_port/rte_port_ring.c lib/librte_ring/rte_ring.c +1 more+28 -310 replies
3/14ring: eliminate duplication of size and mask fieldslib/librte_ring/rte_ring.c lib/librte_ring/rte_ring.h test/test/test_ring.c+29 -290 replies
4/14ring: remove debug settingconfig/common_base doc/guides/prog_guide/ring_lib.rst doc/guides/rel_notes/release_17_05.rst +3 more+13 -5440 replies
5/14ring: remove the yield when waiting for tail updateconfig/common_base doc/guides/prog_guide/env_abstraction_layer.rst doc/guides/rel_notes/release_17_05.rst +1 more+7 -350 replies
6/14ring: remove watermark supportdoc/guides/prog_guide/ring_lib.rst doc/guides/rel_notes/release_17_05.rst examples/Makefile +5 more+8 -2930 replies
7/14ring: make bulk and burst fn return vals consistentdoc/guides/rel_notes/release_17_05.rst doc/guides/sample_app_ug/server_node_efd.rst examples/load_balancer/runtime.c +11 more+106 -1302 replies
8/14ring: allow enqueue fns to return free space valuedoc/guides/rel_notes/release_17_05.rst doc/guides/sample_app_ug/server_node_efd.rst drivers/crypto/armv8/rte_armv8_pmd.c +25 more+169 -1280 replies
9/14ring: allow dequeue fns to return remaining entry countapp/pdump/main.c doc/guides/prog_guide/writing_efficient_code.rst doc/guides/rel_notes/release_17_05.rst +32 more+173 -1240 replies
10/14examples/quota_watermark: use ring space for watermarksdoc/guides/sample_app_ug/quota_watermark.rst examples/Makefile examples/quota_watermark/qw/init.c +5 more+106 -730 replies
11/14ring: reduce scope of local variableslib/librte_ring/rte_ring.h+2 -40 replies
12/14ring: separate out head index manipulation for enq/deqlib/librte_ring/rte_ring.c lib/librte_ring/rte_ring.h+149 -1830 replies
13/14ring: create common function for updating tail idxlib/librte_ring/rte_ring.h+17 -170 replies
14/14ring: make ring struct and enq/deq macros type agnosticlib/librte_ring/rte_ring.h+36 -320 replies

Reviews trailers per patch

All 14 patches have a Reviewed-by or Acked-by.

PatchYuanhan LiuOlivier Matz
1/14R-b A-b
2/14R-b A-b
3/14R-b A-b
4/14R-b A-b
5/14R-b A-b
6/14R-b A-b
7/14R-b A-b
8/14R-b A-b
9/14R-b A-b
10/14R-b A-b
11/14R-b A-b
12/14R-b A-b
13/14R-b A-b
14/14R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 00/14] refactor and cleanup of rte_ring

This patchset make a set of, sometimes non-backward compatible, cleanup changes to the rte_ring code in order to improve it. The resulting code is shorter, since the existing functions are restructured to reduce code duplication, as well as being more consistent in behaviour. The specific changes made are explained in each patch which makes that change.

Changes in V5, p8 & p9 only:
* Fixed errors in performance-thread sample app due to missed updates to enqueue/dequeue calls.
* Added in missing doxygen comments for new API parameters

Changes in V4:
* Fixed errors in the crypto PMDs due to missed updates to their enqueue/dequeue calls (p8 & p9).
* Updated quota_watermarks documentation to match changed code (p10)

Changes in V3:
* removed anonymous union for sp_enqueue and sc_dequeue variables (p2)
* fixed parameter to dequeue function which was mistakenly named is_mp instead of is_sc (as described in the comments) (p12)
* skipped unneeded check in tail pointer update fn for sp/sc operation (p13)

Changes in V2:
* Eliminated extra cacheline padding where cachelines are 128B
* Renamed rte_ring_ht_ptr struct to rte_ring_headtail
* Removed missed references to ring watermarks in test code and docs

This patchset is largely the same as that posted previously on-list as an RFC:

        http://dpdk.org/ml/archives/dev/2017-February/thread.html#56982

Changes in V1 from RFC:
* Included release notes updates as changes are made in each patch
* Fixed some missed comment updates when changing the code
* Separated some initial fixup patches from this set to send separately
* Dropped the final two patches for an rte_event_ring, as not relevant for this set. That can be done as a separate set later.
* The macros for copying the pointers have an extra parameter added, indicating the start of the ring buffer itself. This allows more flexibility for reusing them in other ring implementations.

Bruce Richardson (14):
ring: remove split cacheline build setting
ring: create common structure for prod and cons metadata
ring: eliminate duplication of size and mask fields
ring: remove debug setting
ring: remove the yield when waiting for tail update
ring: remove watermark support
ring: make bulk and burst fn return vals consistent
ring: allow enqueue fns to return free space value
ring: allow dequeue fns to return remaining entry count examples/quota_watermark: use ring space for watermarks
ring: reduce scope of local variables
ring: separate out head index manipulation for enq/deq
ring: create common function for updating tail idx
ring: make ring struct and enq/deq macros type agnostic

 app/pdump/main.c                                   |   2 +-
 config/common_base                                 |   3 -
 doc/guides/prog_guide/env_abstraction_layer.rst    |   5 -
 doc/guides/prog_guide/ring_lib.rst                 |  15 -
 doc/guides/prog_guide/writing_efficient_code.rst   |   2 +-
 doc/guides/rel_notes/release_17_05.rst             |  33 +
 doc/guides/sample_app_ug/quota_watermark.rst       | 148 ++--
 doc/guides/sample_app_ug/server_node_efd.rst       |   2 +-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c           |   2 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c         |   2 +-
 drivers/crypto/armv8/rte_armv8_pmd.c               |   8 +-
 drivers/crypto/kasumi/rte_kasumi_pmd.c             |   6 +-
 drivers/crypto/null/null_crypto_pmd.c              |   2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c           |   2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd.c             |   6 +-
 drivers/crypto/zuc/rte_zuc_pmd.c                   |   4 +-
 drivers/net/bonding/rte_eth_bond_pmd.c             |   3 +-
 drivers/net/ring/rte_eth_ring.c                    |   4 +-
 examples/distributor/main.c                        |   5 +-
 examples/load_balancer/runtime.c                   |  34 +-
 .../client_server_mp/mp_client/client.c            |   9 +-
 .../client_server_mp/mp_server/main.c              |   2 +-
 examples/packet_ordering/main.c                    |  13 +-
 examples/performance-thread/l3fwd-thread/main.c    |   8 +-
 examples/qos_sched/app_thread.c                    |  14 +-
 examples/quota_watermark/qw/init.c                 |   5 +-
 examples/quota_watermark/qw/main.c                 |  21 +-
 examples/quota_watermark/qw/main.h                 |   1 +
 examples/quota_watermark/qwctl/commands.c          |   4 +-
 examples/quota_watermark/qwctl/qwctl.c             |   2 +
 examples/quota_watermark/qwctl/qwctl.h             |   1 +
 examples/server_node_efd/node/node.c               |   2 +-
 examples/server_node_efd/server/main.c             |   2 +-
 lib/librte_hash/rte_cuckoo_hash.c                  |   5 +-
 lib/librte_mempool/rte_mempool_ring.c              |  12 +-
 lib/librte_pdump/rte_pdump.c                       |   4 +-
 lib/librte_port/rte_port_frag.c                    |   3 +-
 lib/librte_port/rte_port_ras.c                     |   2 +-
 lib/librte_port/rte_port_ring.c                    |  46 +-
 lib/librte_ring/rte_ring.c                         |  76 +-
 lib/librte_ring/rte_ring.h                         | 795 ++++++++-------------
 test/test-pipeline/pipeline_hash.c                 |   5 +-
 test/test-pipeline/runtime.c                       |  19 +-
 test/test/autotest_test_funcs.py                   |   7 -
 test/test/commands.c                               |  52 --
 test/test/test_link_bonding_mode4.c                |   6 +-
 test/test/test_pmd_ring_perf.c                     |  12 +-
 test/test/test_ring.c                              | 704 ++----------------
 test/test/test_ring_perf.c                         |  36 +-
 test/test/test_table_acl.c                         |   2 +-
 test/test/test_table_pipeline.c                    |   2 +-
 test/test/test_table_ports.c                       |  12 +-
 test/test/virtual_pmd.c                            |   8 +-
 53 files changed, 704 insertions(+), 1476 deletions(-)
Signature · 1 line
2.9.3