Use structure assignment instead of memcpy
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest32 patches 9 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/32 | devtools/cocci: prefer structure assignment over memcpydevtools/ | +15 | 0 replies | |
| 2/32 | app/testpmd: replace memcpy with assignmentapp/ | +1 | 0 replies | |
| 3/32 | app/graph: replace memcpy with structure assignmentapp/ | +1 | 0 replies | |
| 4/32 | crypto/dpaa_sec: replace memcpy with assignmentdrivers/ | +1 | 1 reply | |
| 5/32 | dma/dpaa2: replace memcpy with assignmentdrivers/ | +1 | 1 reply | |
| 6/32 | eventdev: replace memcpy with assignmentlib/ lib/ | +2 | 0 replies | |
| 7/32 | event/dpaa2: replace memcpy with structure assignmentdrivers/ | +3 | 1 reply | |
| 8/32 | event/dsw: replace memcpy with assignmentdrivers/ | +1 | 1 reply | |
| 9/32 | ml/cnxk: replace memcpy with assignmentdrivers/ | +1 | 0 replies | |
| 10/32 | examples: replace memcpy with assignmentexamples/ examples/ examples/ | +3 | 0 replies | |
| 11/32 | node: replace memcpy with assignmentlib/ lib/ lib/ | +3 | 0 replies | |
| 12/32 | pipeline: replace memcpy with assignmentexamples/ lib/ lib/ +2 more | +18 | 0 replies | |
| 13/32 | sched: replace memcpy with structure assignmentlib/ | +1 | 0 replies | |
| 14/32 | table: replace memcpy with structure assignmentlib/ | +1 | 0 replies | |
| 15/32 | net/ntnic: replace memcpy with structure assignmentdrivers/ drivers/ | +3 | 0 replies | |
| 16/32 | net/bnxt: replace memcpy with structure assignmentdrivers/ drivers/ drivers/ | +4 | 1 reply | |
| 17/32 | crypto/qat: replace memcpy with structure assignmentdrivers/ drivers/ | +2 | 0 replies | |
| 18/32 | mempool/cnxk: replace memcpy with structure assignmentdrivers/ | +1 | 0 replies | |
| 19/32 | net/dpaa2: replace memcpy with assignmentdrivers/ | +1 | 1 reply | |
| 20/32 | net/enic: replace memcpy with assignmentdrivers/ | +1 | 0 replies | |
| 21/32 | net/intel/i40e: replace memcpy with structure assignmentdrivers/ drivers/ drivers/ +2 more | +6 | 0 replies | |
| 22/32 | net/nfp: replace memcpy with assignmentdrivers/ | +1 | 1 reply | |
| 23/32 | net/txgbe: replace memcpy with assignmentdrivers/ | +1 | 0 replies | |
| 24/32 | net/bnx2x: replace memcpy with structure assignmentdrivers/ | +1 | 0 replies | |
| 25/32 | net/dpaa2: replace memcpy with structure assignmentdrivers/ drivers/ | +5 | 1 reply | |
| 26/32 | net/bonding: replace memcpy with structure assignmentdrivers/ | +1 | 0 replies | |
| 27/32 | net/cnxk: replace memcpy with structure assignmentdrivers/ | +1 | 0 replies | |
| 28/32 | net/enic: replace memcpy with structure assignmentdrivers/ | +1 | 0 replies | |
| 29/32 | net/iavf: replace memcpy with structure assignmentdrivers/ | +1 | 0 replies | |
| 30/32 | net/ice: replace memcpy with structure assignmentdrivers/ | +2 | 0 replies | |
| 31/32 | test: replace memcpy with structure assignmentapp/ app/ app/ | +23 | 0 replies | |
| 32/32 | test/cryptodev: replace memcpy with structure assignmentapp/ | +1 | 0 replies |
Reviews trailers per patch
8 of 32 patches have a Reviewed-by or Acked-by.
| Patch | Chaoyong He | Somnath Kotur | Hemant Agrawal | Mattias Rönnblom |
|---|---|---|---|---|
| 1/32 | ||||
| 2/32 | ||||
| 3/32 | ||||
| 4/32 | A-b | |||
| 5/32 | A-b | |||
| 6/32 | ||||
| 7/32 | A-b | |||
| 8/32 | A-b | |||
| 9/32 | ||||
| 10/32 | ||||
| 11/32 | ||||
| 12/32 | ||||
| 13/32 | ||||
| 14/32 | ||||
| 15/32 | ||||
| 16/32 | A-b | |||
| 17/32 | ||||
| 18/32 | ||||
| 19/32 | A-b | |||
| 20/32 | ||||
| 21/32 | ||||
| 22/32 | A-b | |||
| 23/32 | ||||
| 24/32 | ||||
| 25/32 | A-b | |||
| 26/32 | ||||
| 27/32 | ||||
| 28/32 | ||||
| 29/32 | ||||
| 30/32 | ||||
| 31/32 | ||||
| 32/32 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH 00/32] Use structure assignment instead of memcpy
This patch series reduces use of memcpy and rte_memcpy in DPDK. It changes memcpy to a simple assignment operator which easier to read, generates the same code, and keeps type safety.
Historically memcpy was used in textbooks because there was no structure assignement in original K&R C.
Stephen Hemminger (32):
devtools/cocci: prefer structure assignment over memcpy app/testpmd: replace memcpy with assignment app/graph: replace memcpy with structure assignment crypto/dpaa_sec: replace memcpy with assignment dma/dpaa2: replace memcpy with assignment
eventdev: replace memcpy with assignment event/dpaa2: replace memcpy with structure assignment event/dsw: replace memcpy with assignment ml/cnxk: replace memcpy with assignment
examples: replace memcpy with assignment
node: replace memcpy with assignment
pipeline: replace memcpy with assignment
sched: replace memcpy with structure assignment
table: replace memcpy with structure assignment net/ntnic: replace memcpy with structure assignment net/bnxt: replace memcpy with structure assignment crypto/qat: replace memcpy with structure assignment mempool/cnxk: replace memcpy with structure assignment net/dpaa2: replace memcpy with assignment net/enic: replace memcpy with assignment net/intel/i40e: replace memcpy with structure assignment net/nfp: replace memcpy with assignment net/txgbe: replace memcpy with assignment net/bnx2x: replace memcpy with structure assignment net/dpaa2: replace memcpy with structure assignment net/bonding: replace memcpy with structure assignment net/cnxk: replace memcpy with structure assignment net/enic: replace memcpy with structure assignment net/iavf: replace memcpy with structure assignment net/ice: replace memcpy with structure assignment
test: replace memcpy with structure assignment test/cryptodev: replace memcpy with structure assignment
app/graph/ethdev.c | 2 +- app/test-pmd/cmdline_flow.c | 2 +- app/test/test_acl.c | 5 ++- app/test/test_compressdev.c | 36 +++++++------------ app/test/test_cryptodev.c | 3 +- app/test/test_security_inline_proto.c | 23 +++++------- devtools/cocci/struct-assign.cocci | 15 ++++++++ drivers/crypto/dpaa_sec/dpaa_sec.c | 2 +- drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c | 3 +- drivers/crypto/qat/dev/qat_crypto_pmd_gen5.c | 3 +- drivers/dma/dpaa2/dpaa2_qdma.c | 4 +-- drivers/event/dpaa2/dpaa2_eventdev.c | 7 ++-- drivers/event/dsw/dsw_event.c | 3 +- drivers/mempool/cnxk/cnxk_mempool_ops.c | 2 +- drivers/ml/cnxk/cnxk_ml_ops.c | 2 +- drivers/net/bnx2x/bnx2x_stats.c | 2 +- drivers/net/bnxt/bnxt_hwrm.c | 3 +- drivers/net/bnxt/tf_core/tf_rm.c | 8 ++--- drivers/net/bnxt/tf_ulp/ulp_tun.c | 3 +- drivers/net/bonding/rte_eth_bond_pmd.c | 2 +- drivers/net/cnxk/cnxk_ethdev_cman.c | 2 +- drivers/net/dpaa2/dpaa2_ethdev.c | 5 ++- drivers/net/dpaa2/dpaa2_flow.c | 9 ++--- drivers/net/dpaa2/dpaa2_mux.c | 2 +- drivers/net/enic/enic_fm_flow.c | 2 +- drivers/net/enic/enic_main.c | 2 +- drivers/net/intel/i40e/i40e_ethdev.c | 6 ++-- drivers/net/intel/i40e/i40e_fdir.c | 3 +- drivers/net/intel/i40e/i40e_flow.c | 3 +- drivers/net/intel/i40e/rte_pmd_i40e.c | 3 +- drivers/net/intel/iavf/iavf_ipsec_crypto.c | 3 +- drivers/net/intel/ice/ice_hash.c | 6 ++-- drivers/net/intel/ixgbe/ixgbe_flow.c | 4 +-- .../net/nfp/flower/nfp_flower_representor.c | 2 +- .../net/ntnic/nthw/flow_api/flow_id_table.c | 4 +-- .../profile_inline/flow_api_profile_inline.c | 2 +- drivers/net/txgbe/txgbe_flow.c | 4 +-- examples/bbdev_app/main.c | 2 +- examples/ip_pipeline/parser.c | 2 +- examples/l2fwd-cat/cat.c | 3 +- examples/ptpclient/ptpclient.c | 4 +-- lib/eventdev/rte_event_dma_adapter.c | 2 +- lib/eventdev/rte_event_timer_adapter.c | 2 +- lib/node/ethdev_rx.c | 2 +- lib/node/ip4_reassembly.c | 2 +- lib/node/kernel_rx.c | 2 +- lib/pipeline/rte_pipeline.c | 6 ++-- lib/pipeline/rte_swx_ctl.c | 2 +- lib/pipeline/rte_swx_ipsec.c | 2 +- lib/pipeline/rte_swx_pipeline_spec.c | 36 +++++++------------ lib/sched/rte_sched.c | 2 +- lib/table/rte_swx_table_selector.c | 2 +- 52 files changed, 108 insertions(+), 155 deletions(-) create mode 100644 devtools/cocci/struct-assign.cocci
Signature · 1 line
2.47.2