Skip to content

move mbuf definition into a separate file

Konstantin Ananyev dpdk-dev 2 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. v2 Latest3 patches 6 repliesApplied
  2. v13 patches 3 repliesSuperseded

Changes in v2 from the cover letter

As per Michel comments included <generic/rte_atomic.h> into rte_mbuf_core.h

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3eal: move CACHE and IOVA related definitionslib/librte_eal/common/include/rte_common.h lib/librte_eal/common/include/rte_memory.h+44 -381 reply
2/3mbuf: move mbuf definition into a separate filelib/librte_mbuf/Makefile lib/librte_mbuf/meson.build lib/librte_mbuf/rte_mbuf.h +1 more+800 -7393 replies
3/3examples/bpf: remove duplicate mbuf definitionexamples/bpf/mbuf.h examples/bpf/t2.c examples/bpf/t3.c+3 -6081 reply

Reviews trailers per patch

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

PatchAndrew RybchenkoMichel MachadoOlivier Matz
1/3A-b
2/3A-b A-b A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [dpdk-dev] [PATCH v2 0/3] move mbuf definition into a separate file

v1 -> v2
As per Michel comments included <generic/rte_atomic.h> into rte_mbuf_core.h

Right now inclusion of rte_mbuf.h header can cause inclusion of some arch/os specific headers.
That prevents it to be included directly by some
non-DPDK (but related) entities: KNI, BPF programs, etc.
To overcome that problem usually a separate definitions of rte_mbuf structure is created within these entities.
That aproach has a lot of drawbacks: code duplication, error prone, etc. This series moves rte_mbuf structure definition (and some related macros) into a separate file that can be included by both rte_mbuf.h and other non-DPDK entities.

Note that these moves shouldn't introduce any change for current DPDK code.

Konstantin Ananyev (3):
eal: move CACHE and IOVA related definitions
mbuf: move mbuf definition into a separate file
examples/bpf: remove duplicate mbuf definition

 examples/bpf/t2.c                             |   4 +-
 examples/bpf/t3.c                             |   2 +-
 lib/librte_eal/common/include/rte_common.h    |  44 ++
 lib/librte_eal/common/include/rte_memory.h    |  38 -
 lib/librte_mbuf/Makefile                      |   5 +-
 lib/librte_mbuf/meson.build                   |   3 +-
 lib/librte_mbuf/rte_mbuf.h                    | 738 +-----------------
 .../mbuf.h => lib/librte_mbuf/rte_mbuf_core.h | 558 ++++++++-----
 8 files changed, 427 insertions(+), 965 deletions(-)
 rename examples/bpf/mbuf.h => lib/librte_mbuf/rte_mbuf_core.h (51%)
Signature · 1 line
2.17.1