port: Eventdev port support added in the rte_port library
PATCH v3 1/1 port: Eventdev port support added in the rte_port library
Adding a new port type called eventdev to therte_port library.
--- lib/librte_port/Makefile | 4 +- lib/librte_port/meson.build | 8 +- lib/librte_port/rte_port_eventdev.c | 585 +++++++++++++++++++++++++++ lib/librte_port/rte_port_eventdev.h | 100 +++++ lib/librte_port/rte_port_version.map | 9 + 5 files changed, 702 insertions(+), 4 deletions(-) create mode 100644 lib/librte_port/rte_port_eventdev.c create mode 100644 lib/librte_port/rte_port_eventdev.h
lib/librte_port/Makefile +3 -1
@@ -11,7 +11,7 @@ ifeq ($(CONFIG_RTE_PORT_PCAP),y) LDLIBS += -lpcap endif LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev -LDLIBS += -lrte_ip_frag -lrte_sched -lrte_cryptodev +LDLIBS += -lrte_ip_frag -lrte_sched -lrte_cryptodev -lrte_eventdev ifeq ($(CONFIG_RTE_LIBRTE_KNI),y) LDLIBS += -lrte_kni endif
@@ -39,6 +39,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_PORT) += rte_port_kni.c endif SRCS-$(CONFIG_RTE_LIBRTE_PORT) += rte_port_source_sink.c SRCS-$(CONFIG_RTE_LIBRTE_PORT) += rte_port_sym_crypto.c +SRCS-$(CONFIG_RTE_LIBRTE_PORT) += rte_port_eventdev.c # install includes SYMLINK-$(CONFIG_RTE_LIBRTE_PORT)-include += rte_port.h
@@ -55,5 +56,6 @@ SYMLINK-$(CONFIG_RTE_LIBRTE_PORT)-include += rte_port_kni.h endif SYMLINK-$(CONFIG_RTE_LIBRTE_PORT)-include += rte_port_source_sink.h SYMLINK-$(CONFIG_RTE_LIBRTE_PORT)-include += rte_port_sym_crypto.h +SYMLINK-$(CONFIG_RTE_LIBRTE_PORT)-include += rte_port_eventdev.h include $(RTE_SDK)/mk/rte.lib.mk
lib/librte_port/meson.build +5 -3
@@ -10,7 +10,8 @@ sources = files( 'rte_port_ring.c', 'rte_port_sched.c', 'rte_port_source_sink.c', - 'rte_port_sym_crypto.c') + 'rte_port_sym_crypto.c', + 'rte_port_eventdev.c') headers = files( 'rte_port_ethdev.h', 'rte_port_fd.h',
@@ -20,8 +21,9 @@ headers = files( 'rte_port_ring.h', 'rte_port_sched.h', 'rte_port_source_sink.h', - 'rte_port_sym_crypto.h') -deps += ['ethdev', 'sched', 'ip_frag', 'cryptodev'] + 'rte_port_sym_crypto.h', + 'rte_port_eventdev.h') +deps += ['ethdev', 'sched', 'ip_frag', 'cryptodev', 'eventdev'] if dpdk_conf.has('RTE_LIBRTE_KNI') sources += files('rte_port_kni.c')
lib/librte_port/rte_port_eventdev.c new file +585 -0
585 lines not on this page · raw message
lib/librte_port/rte_port_eventdev.h new file +100 -0
100 lines not on this page · raw message
lib/librte_port/rte_port_version.map +9 -0
@@ -60,3 +60,12 @@ DPDK_18.11 { rte_port_sym_crypto_writer_nodrop_ops; } DPDK_16.11; + +EXPERIMENTAL { + global: + + rte_port_eventdev_reader_ops; + rte_port_eventdev_writer_ops; + rte_port_eventdev_writer_nodrop_ops; + +};
Signature · 1 line
2.20.1
01/10/2019 20:05, Rahul Shah:
Quoted 4 lines
Adding a new port type called eventdev to the
rte_portlibrary.Signed-off-by Rahul Shah <[email protected]>
Quoted 9 lines
--- lib/librte_port/Makefile | 4 +- lib/librte_port/meson.build | 8 +- lib/librte_port/rte_port_eventdev.c | 585 +++++++++++++++++++++++++++ lib/librte_port/rte_port_eventdev.h | 100 +++++ lib/librte_port/rte_port_version.map | 9 + 5 files changed, 702 insertions(+), 4 deletions(-) create mode 100644 lib/librte_port/rte_port_eventdev.c create mode 100644 lib/librte_port/rte_port_eventdev.h
Cristian, Jasvinder, your review would very welcome here :)
Quoted 20 lines
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Friday, October 25, 2019 4:35 PM
To: Dumitrescu, Cristian <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]; Shah, Rahul R <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v3] port: Eventdev port support added in therte_portlibrary01/10/2019 20:05, Rahul Shah:
Quoted 8 lines
Adding a new port type called eventdev to the
rte_portlibrary.Signed-off-by Rahul Shah <[email protected]>--- lib/librte_port/Makefile | 4 +- lib/librte_port/meson.build | 8 +- lib/librte_port/rte_port_eventdev.c | 585
Quoted 9 lines
+++++++++++++++++++++++++++
Quoted 5 lines
lib/librte_port/rte_port_eventdev.h | 100 +++++ lib/librte_port/rte_port_version.map | 9 + 5 files changed, 702 insertions(+), 4 deletions(-) create mode 100644 lib/librte_port/rte_port_eventdev.c create mode 100644 lib/librte_port/rte_port_eventdev.hCristian, Jasvinder, your review would very welcome here :)
Done, sorry for my delay.
Hi Rahul,
Thank you for your work!
Quoted 11 lines
-----Original Message-----
From: Shah, Rahul R
Sent: Tuesday, October 1, 2019 7:05 PM
To: Dumitrescu, Cristian <[email protected]>
Cc: [email protected]
Subject: [PATCH v3] port: Eventdev port support added in therte_portlibraryAdding a new port type called eventdev to the
rte_portlibrary.
Quoted 6 lines
Signed-off-by Rahul Shah <[email protected]>--- lib/librte_port/Makefile | 4 +- lib/librte_port/meson.build | 8 +- lib/librte_port/rte_port_eventdev.c | 585+++++++++++++++++++++++++++
The only cosmetic change I would suggest is for the name of the patch, which can be made shorter:
Port: add eventdev port type
Regards,
Cristian
Thomas Monjalon
Applied25/10/2019 17:39, Dumitrescu, Cristian:
Quoted 11 lines
From: Shah, Rahul R
Quoted 5 lines
Adding a new port type called eventdev to the
rte_portlibrary.Signed-off-by Rahul Shah <[email protected]>The only cosmetic change I would suggest is for the name of the patch, which can be made shorter:
Port: add eventdev port type
I fixed a compilation issue when RTE_PORT_STATS_COLLECT is set. I also fixed the Copyright dates and an indent in the .map.
Applied, thanks
Quoted 19 lines · Rahul Shah
Adding a new port type called eventdev to the
rte_portlibrary.Signed-off-by Rahul Shah <[email protected]>--- lib/librte_port/Makefile | 4 +- lib/librte_port/meson.build | 8 +- lib/librte_port/rte_port_eventdev.c | 585 +++++++++++++++++++++++++++ lib/librte_port/rte_port_eventdev.h | 100 +++++ lib/librte_port/rte_port_version.map | 9 + 5 files changed, 702 insertions(+), 4 deletions(-) create mode 100644 lib/librte_port/rte_port_eventdev.c create mode 100644 lib/librte_port/rte_port_eventdev.hlib/librte_port/Makefile +0
-0
lib/librte_port/Makefile ifeq ($(CONFIG_RTE_PORT_PCAP),y) · line 14
Quoted 5 lines
lib/librte_port/Makefile +1
-1@@ -11,7 +11,7 @@ ifeq ($(CONFIG_RTE_PORT_PCAP),y) LDLIBS += -lpcap endif LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev -LDLIBS += -lrte_ip_frag -lrte_sched -lrte_cryptodev +LDLIBS += -lrte_ip_frag -lrte_sched -lrte_cryptodev -lrte_eventdev
This creates a dependency form 'librte_port' to 'librte_eventdev', this dependency should be reflected to the build system, so that 'librte_eventdev' have built before 'librte_port'
This is done via 'lib/Makefile' in make build but not sure how to do in meson.
Can you please send a fix for this?
Quoted 15 lines · Ferruh Yigit
Quoted 14 lines · Rahul Shah
Adding a new port type called eventdev to the
rte_portlibrary.Signed-off-by Rahul Shah <[email protected]>--- lib/librte_port/Makefile | 4 +- lib/librte_port/meson.build | 8 +- lib/librte_port/rte_port_eventdev.c | 585 +++++++++++++++++++++++++++ lib/librte_port/rte_port_eventdev.h | 100 +++++ lib/librte_port/rte_port_version.map | 9 + 5 files changed, 702 insertions(+), 4 deletions(-) create mode 100644 lib/librte_port/rte_port_eventdev.c create mode 100644 lib/librte_port/rte_port_eventdev.h
Quoted 16 lines
lib/librte_port/Makefile ifeq ($(CONFIG_RTE_PORT_PCAP),y) · line 14
Quoted 10 lines
lib/librte_port/Makefile +1
-1@@ -11,7 +11,7 @@ ifeq ($(CONFIG_RTE_PORT_PCAP),y) LDLIBS += -lpcap endif LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev -LDLIBS += -lrte_ip_frag -lrte_sched -lrte_cryptodev +LDLIBS += -lrte_ip_frag -lrte_sched -lrte_cryptodev -lrte_eventdevThis creates a dependency form '
librte_port' to 'librte_eventdev', this dependency should be reflected to the build system, so that 'librte_eventdev' have built before 'librte_port'
This is done via 'lib/Makefile' in make build but not sure how to do in meson.
1. Ensure that eventdev is listed before port in the libs/meson.build file. Since there is no parallelism in meson runs, only when using ninja, you just need to place the libs in the order you want them processed.
2. To have the library linkage and header path setup correct, add "eventdev" to the "deps" variable in the librte_port/meson.build file.
/Bruce
Hi Ferruh,
I was checking the lib/Makefile for cryptodev example which is similar to eventdev patch I have added (i.e. there is a dependency on librte_cryptodev library)
DIRS-$(CONFIG_RTE_LIBRTE_PORT) += librte_port DEPDIRS-librte_port := librte_eal librte_mempool librte_mbuf librte_ethdev DEPDIRS-librte_port += librte_ip_frag librte_sched
ifeq ($(CONFIG_RTE_LIBRTE_KNI),y)
DEPDIRS-librte_port += librte_kni
Endif
This is how it is added in lib/Makefile. I don’t see cryptodev added here.
Thanks,
Rahul
-----Original Message-----
From: Yigit, Ferruh
Sent: Thursday, October 31, 2019 10:33 PM
To: Shah, Rahul R <[email protected]>; Dumitrescu, Cristian <[email protected]>
Cc: [email protected]; Singh, Jasvinder <[email protected]>; Thomas Monjalon <[email protected]>; Richardson, Bruce <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v3] port: Eventdev port support added in the rte_port library
Quoted 19 lines · Rahul Shah
Adding a new port type called eventdev to the
rte_portlibrary.Signed-off-by Rahul Shah <[email protected]>--- lib/librte_port/Makefile | 4 +- lib/librte_port/meson.build | 8 +- lib/librte_port/rte_port_eventdev.c | 585 +++++++++++++++++++++++++++ lib/librte_port/rte_port_eventdev.h | 100 +++++ lib/librte_port/rte_port_version.map | 9 + 5 files changed, 702 insertions(+), 4 deletions(-) create mode 100644 lib/librte_port/rte_port_eventdev.c create mode 100644 lib/librte_port/rte_port_eventdev.hlib/librte_port/Makefile index renamed from lib/librte_port/Makefile +0
-0
1b83f6f2b..de6f0428a100644lib/librte_port/Makefile +0
-0@@ -11,7 +11,7 @@ ifeq ($(CONFIG_RTE_PORT_PCAP),y) LDLIBS += -lpcapendif LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev
lib/librte_port/Makefile ifeq ($(CONFIG_RTE_PORT_PCAP),y) · line 14
Quoted 2 lines
lib/librte_port/Makefile +1
-1-LDLIBS += -lrte_ip_frag -lrte_sched -lrte_cryptodev +LDLIBS += -lrte_ip_frag -lrte_sched -lrte_cryptodev -lrte_eventdev
This creates a dependency form 'librte_port' to 'librte_eventdev', this dependency should be reflected to the build system, so that 'librte_eventdev' have built before 'librte_port'
This is done via 'lib/Makefile' in make build but not sure how to do in meson.
Can you please send a fix for this?
Thanks Bruce,
I confirmed both points.
1. eventdev is listed before port
2. librte_port/meson.build file has this patch added already.
Thanks,
Rahul
-----Original Message-----
From: Bruce Richardson [mailto:[email protected]]
Sent: Monday, November 4, 2019 4:54 PM
To: Yigit, Ferruh <[email protected]>
Cc: Shah, Rahul R <[email protected]>; Dumitrescu, Cristian <[email protected]>; [email protected]; Singh, Jasvinder <[email protected]>; Thomas Monjalon <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v3] port: Eventdev port support added in the rte_port library
Quoted 14 lines · Ferruh Yigit
Quoted 13 lines · Rahul Shah
Adding a new port type called eventdev to the
rte_portlibrary.Signed-off-by Rahul Shah <[email protected]>--- lib/librte_port/Makefile | 4 +- lib/librte_port/meson.build | 8 +- lib/librte_port/rte_port_eventdev.c | 585 +++++++++++++++++++++++++++ lib/librte_port/rte_port_eventdev.h | 100 +++++ lib/librte_port/rte_port_version.map | 9 + 5 files changed, 702 insertions(+), 4 deletions(-) create mode 100644 lib/librte_port/rte_port_eventdev.c create mode 100644 lib/librte_port/rte_port_eventdev.h
Quoted 14 lines
lib/librte_port/Makefile ifeq ($(CONFIG_RTE_PORT_PCAP),y) · line 14
Quoted 8 lines
lib/librte_port/Makefile +0
-0@@ -11,7 +11,7 @@ ifeq ($(CONFIG_RTE_PORT_PCAP),y) LDLIBS += -lpcapendif LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev
lib/librte_port/Makefile +1
-1-LDLIBS += -lrte_ip_frag -lrte_sched -lrte_cryptodev +LDLIBS += -lrte_ip_frag -lrte_sched -lrte_cryptodev -lrte_eventdevThis creates a dependency form '
librte_port' to 'librte_eventdev', this dependency should be reflected to the build system, so that 'librte_eventdev' have built before 'librte_port'
This is done via 'lib/Makefile' in make build but not sure how to do in meson.
1. Ensure that eventdev is listed before port in the libs/meson.build file. Since there is no parallelism in meson runs, only when using ninja, you just need to place the libs in the order you want them processed.
2. To have the library linkage and header path setup correct, add "eventdev" to the "deps" variable in the librte_port/meson.build file.
/Bruce
Quoted 4 lines · Rahul R
Hi Ferruh,
I was checking the lib/Makefile for cryptodev example which is similar to eventdev patch I have added (i.e. there is a dependency on
librte_cryptodevlibrary)
Quoted 8 lines
DIRS-$(CONFIG_RTE_LIBRTE_PORT) +=
librte_portDEPDIRS-librte_port :=librte_eallibrte_mempoollibrte_mbuflibrte_ethdevDEPDIRS-librte_port +=librte_ip_fraglibrte_sched
ifeq ($(CONFIG_RTE_LIBRTE_KNI),y)
DEPDIRS-librte_port +=librte_kni
EndifThis is how it is added in lib/Makefile. I don’t see cryptodev added here.
Hi Rahul,
I didn't get your point, is cryptodev dependency also missing? If so can you please fix that too?
Quoted 41 lines
Thanks,
Rahul-----Original Message-----
From: Yigit, Ferruh
Sent: Thursday, October 31, 2019 10:33 PM
To: Shah, Rahul R <[email protected]>; Dumitrescu, Cristian <[email protected]>
Cc: [email protected]; Singh, Jasvinder <[email protected]>; Thomas Monjalon <[email protected]>; Richardson, Bruce <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v3] port: Eventdev port support added in therte_portlibraryQuoted 19 lines · Rahul Shah
Adding a new port type called eventdev to the
rte_portlibrary.Signed-off-by Rahul Shah <[email protected]>--- lib/librte_port/Makefile | 4 +- lib/librte_port/meson.build | 8 +- lib/librte_port/rte_port_eventdev.c | 585 +++++++++++++++++++++++++++ lib/librte_port/rte_port_eventdev.h | 100 +++++ lib/librte_port/rte_port_version.map | 9 + 5 files changed, 702 insertions(+), 4 deletions(-) create mode 100644 lib/librte_port/rte_port_eventdev.c create mode 100644 lib/librte_port/rte_port_eventdev.hlib/librte_port/Makefile index renamed from lib/librte_port/Makefile +0
-0
1b83f6f2b..de6f0428a100644lib/librte_port/Makefile +0
-0@@ -11,7 +11,7 @@ ifeq ($(CONFIG_RTE_PORT_PCAP),y) LDLIBS += -lpcapendif LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev
lib/librte_port/Makefile ifeq ($(CONFIG_RTE_PORT_PCAP),y) · line 14
Quoted 2 lines
lib/librte_port/Makefile +1
-1-LDLIBS += -lrte_ip_frag -lrte_sched -lrte_cryptodev +LDLIBS += -lrte_ip_frag -lrte_sched -lrte_cryptodev -lrte_eventdevThis creates a dependency form '
librte_port' to 'librte_eventdev', this dependency should be reflected to the build system, so that 'librte_eventdev' have built before 'librte_port'
This is done via 'lib/Makefile' in make build but not sure how to do in meson.Can you please send a fix for this?
No, As Bruce explained I confirmed it is being already built before librte_port library as highlighted below.
# process all libraries equally, as far as possible
# "core" libs first, then others alphebetically as far as possible
# NOTE: for speed of meson runs, the dependencies in the subdirectories
# sometimes skip deps that would be implied by others, e.g. if mempool is
# given as a dep, no need to mention ring. This is especially true for the
# core libs which are widely reused, so their deps are kept to a minimum.
libraries = [
'kvargs', # eal depends on kvargs
'eal', # everything depends on eal
'ring', 'mempool', 'mbuf', 'net', 'meter', 'ethdev', 'pci', # core
'cmdline',
'metrics', # bitrate/latency stats depends on this
'hash', # efd depends on this
'timer', # eventdev depends on this
'acl', 'bbdev', 'bitratestats', 'cfgfile',
'compressdev', 'cryptodev',
'distributor', 'efd', 'eventdev',
'gro', 'gso', 'ip_frag', 'jobstats',
'kni', 'latencystats', 'lpm', 'member',
'power', 'pdump', 'rawdev',
'rcu', 'reorder', 'sched', 'security', 'stack', 'vhost',
# ipsec lib depends on net, crypto and security
'ipsec',
# add pkt framework libs which use other libs from above
'port', 'table', 'pipeline',
# flow_classify lib depends on pkt framework table lib
'flow_classify', 'bpf', 'telemetry']-----Original Message-----
From: Yigit, Ferruh
Sent: Tuesday, November 5, 2019 9:29 PM
To: Shah, Rahul R <[email protected]>; Dumitrescu, Cristian <[email protected]>
Cc: [email protected]; Singh, Jasvinder <[email protected]>; Thomas Monjalon <[email protected]>; Richardson, Bruce <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v3] port: Eventdev port support added in the rte_port library
Quoted 16 lines · Rahul R
Hi Ferruh,
I was checking the lib/Makefile for cryptodev example which is similar
to eventdev patch I have added (i.e. there is a dependency on
librte_cryptodevlibrary)DIRS-$(CONFIG_RTE_LIBRTE_PORT) +=
librte_portDEPDIRS-librte_port :=
librte_eallibrte_mempoollibrte_mbuflibrte_ethdev
Quoted 7 lines
DEPDIRS-librte_port +=
librte_ip_fraglibrte_schedifeq($(CONFIG_RTE_LIBRTE_KNI),y) DEPDIRS-librte_port +=
librte_kniEndifThis is how it is added in lib/Makefile. I don’t see cryptodev added here.
Hi Rahul,
I didn't get your point, is cryptodev dependency also missing?
If so can you please fix that too?
Quoted 91 lines
Thanks,
Rahul
-----Original Message-----
From: Yigit, Ferruh
Sent: Thursday, October 31, 2019 10:33 PM
To: Shah, Rahul R <[email protected]<mailto:[email protected]>>; Dumitrescu, Cristian
<[email protected]<mailto:[email protected]>>
Cc [email protected]<mailto:[email protected]>; Singh, Jasvinder <[email protected]<mailto:[email protected]>>; ThomasMonjalon <[email protected]<mailto:[email protected]>>; Richardson, Bruce
<[email protected]<mailto:[email protected]>>
Subject: Re: [dpdk-dev] [PATCH v3] port: Eventdev port support added
in the
rte_portlibraryQuoted 40 lines · Rahul Shah
Adding a new port type called eventdev to the
rte_portlibrary.Signed-off-by Rahul Shah <[email protected]<mailto:[email protected]>>---
lib/librte_port/Makefile | 4 +-lib/librte_port/meson.build | 8 +-lib/librte_port/rte_port_eventdev.c | 585+++++++++++++++++++++++++++
lib/librte_port/rte_port_eventdev.h|+++++++++++++++++++++++++++ 100 +++++
lib/librte_port/rte_port_version.map | 9 +5 files changed, 702 insertions(+), 4 deletions(-) create mode100644
lib/librte_port/rte_port_eventdev.ccreate mode 100644 lib/librte_port/rte_port_eventdev.hlib/librte_port/Makefile +0
-0index
1b83f6f2b..de6f0428a100644--- a/lib/librte_port/Makefile
+++ b/lib/librte_port/Makefile
lib/librte_port/Makefile +0
-0@@ -11,7 +11,7 @@ ifeq ($(CONFIG_RTE_PORT_PCAP),y) LDLIBS += -lpcapendif LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev
lib/librte_port/Makefile ifeq ($(CONFIG_RTE_PORT_PCAP),y) · line 14
Quoted 3 lines
lib/librte_port/Makefile +1
-1-LDLIBS += -lrte_ip_frag -lrte_sched -lrte_cryptodev +LDLIBS += -lrte_ip_frag -lrte_sched -lrte_cryptodev -lrte_eventdevThis creates a dependency form '
librte_port' to 'librte_eventdev', this dependency should be reflected to the build system, so that 'librte_eventdev'have built before '
librte_port'This is done via 'lib/Makefile' in make build but not sure how to do in meson.
Can you please send a fix for this?
Quoted 2 lines · Rahul R
No, As Bruce explained I confirmed it is being already built before
librte_portlibrary as highlighted below.
Got it, so meson doesn't need fixing. Can you please fix the make part?