Commit a589b6d7 authored by Joanne Hugé's avatar Joanne Hugé

Clean up and enforce ecpri_period parameter

parent c4fba315
......@@ -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
......@@ -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 $@
......
......@@ -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 $@ $<
......
......@@ -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);
}
......
......@@ -4,4 +4,5 @@ cd ..;
make;
cd ecpri-tests;
make all;
export LD_LIBRARY_PATH="/root/ecpri-priv:$LD_LIBRARY_PATH"
./test-dpdk-ecpri
chrt -f 97 taskset -c 39 phc2sys -m -c ens9f1 -s CLOCK_REALTIME -O0 -f $HOME/linuxptp/configs/G.8275.1.cfg
chrt -f 97 taskset -c 39 phc2sys -m -c ens5f0 -s CLOCK_REALTIME -O0 -f $HOME/linuxptp/configs/G.8275.1.cfg
chrt -f 97 taskset -c 38 ptp4l -H -i ens9f1 -m -f $HOME/linuxptp/configs/G.8275.1.cfg
chrt -f 97 taskset -c 38 ptp4l -H -i ens5f0 -m -f $HOME/linuxptp/configs/G.8275.1.cfg
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment