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
a589b6d7
Commit
a589b6d7
authored
Jan 25, 2022
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up and enforce ecpri_period parameter
parent
c4fba315
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
177 additions
and
159 deletions
+177
-159
.gitignore
.gitignore
+3
-0
Makefile
Makefile
+4
-2
ecpri-tests/Makefile
ecpri-tests/Makefile
+2
-2
ecpri-tests/test-dpdk-ecpri.c
ecpri-tests/test-dpdk-ecpri.c
+5
-10
ecpri-tests/test.sh
ecpri-tests/test.sh
+1
-0
launch-phc2sys
launch-phc2sys
+1
-1
launch-ptp
launch-ptp
+1
-1
trx_ecpri_dpdk.c
trx_ecpri_dpdk.c
+160
-143
No files found.
.gitignore
View file @
a589b6d7
...
...
@@ -9,3 +9,6 @@ raw-socket-test/raw_socket
raw-socket-test/raw_socket.d
raw-socket-test/raw_socket.o
dpdk-test/build
*.so
*.o
*.d
Makefile
View file @
a589b6d7
...
...
@@ -3,7 +3,7 @@
CC
=
gcc
-m64
-msse4
.1
CXX
=
g++
-m64
-msse4
.1
CFLAGS
=
-fno-strict-aliasing
-Wall
-pedantic
CFLAGS
=
-
O2
-
fno-strict-aliasing
-Wall
-pedantic
CFLAGS
+=
-D_GNU_SOURCE
-D_FILE_OFFSET_BITS
=
64
-D_LARGEFILE_SOURCE
CFLAGS
+=
-DALLOW_EXPERIMENTAL_API
CFLAGS
+=
-MMD
-g
...
...
@@ -32,7 +32,9 @@ LDFLAGS = -l:libpthread.a -l:libm.a
all
:
$(LIB)
$(LIB)
:
$(APP).o
$(CC)
-shared
$(LDFLAGS)
$(LDFLAGS_STATIC)
-o
$@
$<
$(CC)
-shared
-o
$@
$<
-lm
-lpthread
$(LDFLAGS_SHARED)
#$(LIB): $(APP).o
# $(CC) -shared $(LDFLAGS) $(LDFLAGS_STATIC) -o $@ $<
%.o
:
%.c
$(CC)
$(CFLAGS)
$
(
SRCS-y
)
-fpic
-c
-o
$@
...
...
ecpri-tests/Makefile
View file @
a589b6d7
...
...
@@ -8,7 +8,7 @@ CFLAGS +=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
CFLAGS
+=
-DALLOW_EXPERIMENTAL_API
CXXFLAGS
=
$(CFLAGS)
LIB
=
trx_ecpri_dpdk
LIBDIR
=
/root/ecpri
/trx-ecpri
-priv
LIBDIR
=
/root/ecpri-priv
LDFLAGS
=
-l
$(LIB)
PROG
=
test-dpdk-ecpri
...
...
@@ -16,7 +16,7 @@ PROG=test-dpdk-ecpri
all
:
$(PROG)
$(PROG)
:
$(PROG).o
$(CC)
-o
$@
$<
$(LDFLAGS)
$(CC)
-
L
$(LIBDIR)
-
o
$@
$<
$(LDFLAGS)
%.o
:
%.c
$(CC)
$(CFLAGS)
-c
-o
$@
$<
...
...
ecpri-tests/test-dpdk-ecpri.c
View file @
a589b6d7
...
...
@@ -85,16 +85,11 @@ int main(int argc, char * argv[]) {
s
=
malloc
(
sizeof
(
TRXEcpriState
));
memset
(
s
,
0
,
sizeof
(
*
s
));
#if 1
s
->
rec_mac
=
"b8:59:9f:07:7d:da"
;
s
->
rec_mac
=
"b8:59:9f:07:86:42"
;
s
->
re_mac
=
"04:09:a5:0f:9f:4c"
;
s
->
rec_if
=
"ens9f0np0"
;
#else
s
->
rec_mac
=
"b8:ce:f6:4b:00:22"
;
s
->
re_mac
=
"b8:ce:f6:4b:00:23"
;
s
->
rec_if
=
"ens5f0np0"
;
#endif
s
->
rec_if
=
"ens9f0"
;
s
->
recv_affinity
=
39
;
s
->
send_affinity
=
38
;
s
->
prepare_affinity
=
37
;
...
...
@@ -109,7 +104,7 @@ int main(int argc, char * argv[]) {
startdpdk
(
s
);
for
(
int
i
=
0
;
i
<
1000
;
i
++
)
{
for
(
;;
)
{
sleep
(
1
);
}
...
...
ecpri-tests/test.sh
View file @
a589b6d7
...
...
@@ -4,4 +4,5 @@ cd ..;
make
;
cd
ecpri-tests
;
make all
;
export
LD_LIBRARY_PATH
=
"/root/ecpri-priv:
$LD_LIBRARY_PATH
"
./test-dpdk-ecpri
launch-phc2sys
View file @
a589b6d7
chrt -f 97 taskset -c 39 phc2sys -m -c ens
9f1
-s CLOCK_REALTIME -O0 -f $HOME/linuxptp/configs/G.8275.1.cfg
chrt -f 97 taskset -c 39 phc2sys -m -c ens
5f0
-s CLOCK_REALTIME -O0 -f $HOME/linuxptp/configs/G.8275.1.cfg
launch-ptp
View file @
a589b6d7
chrt -f 97 taskset -c 38 ptp4l -H -i ens
9f1
-m -f $HOME/linuxptp/configs/G.8275.1.cfg
chrt -f 97 taskset -c 38 ptp4l -H -i ens
5f0
-m -f $HOME/linuxptp/configs/G.8275.1.cfg
trx_ecpri_dpdk.c
View file @
a589b6d7
This diff is collapsed.
Click to expand it.
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