Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
trx-ecpri
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
trx-ecpri
Commits
ae54ba42
Commit
ae54ba42
authored
Oct 08, 2021
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Link static libraries to trx_ecpri_dpdk
parent
610210c8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
19 deletions
+12
-19
Makefile
Makefile
+9
-15
ecpri-tests/Makefile
ecpri-tests/Makefile
+0
-1
trx_ecpri_dpdk.c
trx_ecpri_dpdk.c
+3
-3
No files found.
Makefile
View file @
ae54ba42
...
...
@@ -3,8 +3,9 @@
CC
=
gcc
-m64
-msse4
.1
CXX
=
g++
-m64
-msse4
.1
CFLAGS
=
-
O2
-fno-strict-aliasing
-Wall
-pedantic
-std
=
gnu17
CFLAGS
=
-
fno-strict-aliasing
-Wall
-pedantic
CFLAGS
+=
-D_GNU_SOURCE
-D_FILE_OFFSET_BITS
=
64
-D_LARGEFILE_SOURCE
CFLAGS
+=
-DALLOW_EXPERIMENTAL_API
CFLAGS
+=
-MMD
-g
CXXFLAGS
=
$(CFLAGS)
...
...
@@ -22,23 +23,16 @@ ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
$(error
"no installation of DPDK found"
)
endif
all
:
$(LIB)
$(LIB)
:
$(APP).o
$(CC)
-shared
$(LDFLAGS)
$(LDFLAGS_SHARED)
-o
$@
$<
.PHONY
:
shared
shared
:
build/$(APP)-shared
ln
-sf
$(APP)
-shared
build/
$(APP)
PC_FILE
:=
$(
shell
$(PKGCONF)
--path
libdpdk 2>/dev/null
)
CFLAGS
+=
-O3
$(
shell
$(PKGCONF)
--cflags
libdpdk
)
LDFLAGS_SHARED
=
$(
shell
$(PKGCONF)
--libs
libdpdk
)
-lpthread
-lm
LDFLAGS_SHARED
=
$(
shell
$(PKGCONF)
--libs
libdpdk
)
LDFLAGS_STATIC
=
$(
shell
$(PKGCONF)
--static
--libs
libdpdk
)
LDFLAGS
=
-l
:libpthread.a
-l
:libm.a
CFLAGS
+=
-DALLOW_EXPERIMENTAL_API
all
:
$(LIB)
build/$(APP)-shared
:
$(SRCS-y) Makefile $(PC_FILE) | build
$(CC)
$(CFLAGS)
$
(
SRCS-y
)
-o
$@
$(LDFLAGS)
$(LDFLAGS_SHARED)
$(LIB)
:
$(APP).o
$(CC)
-shared
$(LDFLAGS)
$(LDFLAGS_STATIC)
-o
$@
$<
%.o
:
%.c
$(CC)
$(CFLAGS)
$
(
SRCS-y
)
-fpic
-c
-o
$@
...
...
@@ -46,7 +40,7 @@ build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
build
:
@
mkdir
-p
$@
.PHONY
:
clean
.PHONY
:
clean
shared
clean
:
rm
-rf
build
rm
-rf
$(LIB)
...
...
ecpri-tests/Makefile
View file @
ae54ba42
...
...
@@ -11,7 +11,6 @@ CXXFLAGS=$(CFLAGS)
LIB
=
trx_ecpri_dpdk
LIBDIR
=
/root/ecpri/trx-ecpri-priv
LDFLAGS
=
-l
$(LIB)
LDFLAGS
+=
-L
/usr/local/lib/x86_64-linux-gnu
-Wl
,--as-needed
-lrte_node
-lrte_graph
-lrte_bpf
-lrte_flow_classify
-lrte_pipeline
-lrte_table
-lrte_port
-lrte_fib
-lrte_ipsec
-lrte_vhost
-lrte_stack
-lrte_security
-lrte_sched
-lrte_reorder
-lrte_rib
-lrte_regexdev
-lrte_rawdev
-lrte_pdump
-lrte_power
-lrte_member
-lrte_lpm
-lrte_latencystats
-lrte_kni
-lrte_jobstats
-lrte_ip_frag
-lrte_gso
-lrte_gro
-lrte_eventdev
-lrte_efd
-lrte_distributor
-lrte_cryptodev
-lrte_compressdev
-lrte_cfgfile
-lrte_bitratestats
-lrte_bbdev
-lrte_acl
-lrte_timer
-lrte_hash
-lrte_metrics
-lrte_cmdline
-lrte_pci
-lrte_ethdev
-lrte_meter
-lrte_net
-lrte_mbuf
-lrte_mempool
-lrte_rcu
-lrte_ring
-lrte_eal
-lrte_telemetry
-lrte_kvargs
-lbsd
-lpthread
-lm
PROG
=
test-dpdk-ecpri
...
...
trx_ecpri_dpdk.c
View file @
ae54ba42
...
...
@@ -324,8 +324,6 @@ static void init_dpdk(int argc, char ** argv) {
if
(
port_init
(
0
,
mbuf_pool
)
!=
0
)
rte_exit
(
EXIT_FAILURE
,
"Cannot init port %"
PRIu8
"
\n
"
,
0
);
if
(
port_init
(
1
,
mbuf_pool
)
!=
0
)
rte_exit
(
EXIT_FAILURE
,
"Cannot init port %"
PRIu8
"
\n
"
,
1
);
}
static
void
send_packets
(
int
port
)
{
struct
rte_mbuf
*
pkt
[
BURST_SIZE
];
...
...
@@ -708,7 +706,7 @@ static int start_threads(TRXEcpriState * s) {
int
startdpdk
(
TRXEcpriState
*
s
)
{
uint8_t
ecpri_message
[
DATA_SIZE
];
#define ARGC
9
#define ARGC
11
#define ARGC_LEN 256
char
_argv
[
ARGC
][
ARGC_LEN
]
=
{
""
,
...
...
@@ -717,6 +715,8 @@ int startdpdk(TRXEcpriState * s) {
"-b"
,
"0000:04:00.0"
,
"-b"
,
"0000:3b:00.1"
,
"-b"
,
"0000:5e:00.0"
,
"-b"
,
"0000:5e:00.1"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment