Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
f5ddce71
Commit
f5ddce71
authored
Aug 28, 2017
by
hongming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify the ext config.
parent
eb065b94
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
234 additions
and
262 deletions
+234
-262
ext_config.c
dev/ext_config.c
+0
-26
pfilter-builder.c
tools/pfilter-builder.c
+234
-236
No files found.
dev/ext_config.c
View file @
f5ddce71
...
...
@@ -39,32 +39,6 @@ void ext_config(unsigned char *IP)
tmp
=
0xFFFFFF00
;
*
ext_tmp
=
tmp
;
ext_tmp
=
(
unsigned
int
*
)(
BASE_EXT_CFG
+
EXT_UDP_RX_PORT
);
tmp
=
60000
;
*
ext_tmp
=
tmp
;
ext_tmp
=
(
unsigned
int
*
)(
BASE_EXT_CFG
+
EXT_UDP_TX_SRC_PORT
);
tmp
=
60001
;
*
ext_tmp
=
tmp
;
ext_tmp
=
(
unsigned
int
*
)(
BASE_EXT_CFG
+
EXT_UDP_TX_DST_PORT
);
tmp
=
60002
;
*
ext_tmp
=
tmp
;
ext_tmp
=
(
unsigned
int
*
)(
BASE_EXT_CFG
+
EXT_UDP_TX_DST_IP
);
tmp
=
0xC0A80001
;
*
ext_tmp
=
tmp
;
ext_tmp
=
(
unsigned
int
*
)(
BASE_EXT_CFG
+
EXT_UDP_TX_DST_MAC_HIGH16
);
//tmp = 0x9890;
tmp
=
0x8cae
;
*
ext_tmp
=
tmp
;
ext_tmp
=
(
unsigned
int
*
)(
BASE_EXT_CFG
+
EXT_UDP_TX_DST_MAC_LOW32
);
//tmp = 0x96aa9e04;
tmp
=
0x4b002f40
;
*
ext_tmp
=
tmp
;
ext_tmp
=
(
unsigned
int
*
)(
BASE_EXT_CFG
+
EXT_TCP_LOCAL_PORT
);
tmp
=
8000
;
*
ext_tmp
=
tmp
;
...
...
tools/pfilter-builder.c
View file @
f5ddce71
...
...
@@ -409,6 +409,7 @@ void pfilter_init_novlan(char *fname)
/* Ethernet = 14 bytes, Offset to type in IP: 8 bytes = 22/2 = 11 */
pfilter_cmp
(
11
,
0x0001
,
0x00ff
,
MOV
,
FRAME_ICMP
);
pfilter_cmp
(
11
,
0x0011
,
0x00ff
,
MOV
,
FRAME_UDP
);
pfilter_cmp
(
11
,
0x0006
,
0x00ff
,
MOV
,
FRAME_TCP
);
/* For CPU: arp or icmp unicast or ptp (or latency) */
pfilter_logic2
(
FRAME_FOR_CPU
,
FRAME_TYPE_ARP
,
OR
,
FRAME_TYPE_PTP2
);
...
...
@@ -422,12 +423,9 @@ void pfilter_init_novlan(char *fname)
/* The CPU gets those ports in a proper UDP frame, plus the previous selections */
pfilter_logic2
(
R_CLASS
(
1
),
FRAME_UDP
,
AND
,
PORT_UDP_HOST
);
/* Etherbone is UDP at port 0xebd0, let's "or" in the last move */
pfilter_cmp
(
18
,
0xebd0
,
0xffff
,
MOV
,
PORT_UDP_ETHERBONE
);
/* and now copy out fabric selections: 7 etherbone, 6 for anything else */
pfilter_logic2
(
R_CLASS
(
5
),
FRAME_UDP
,
AND
,
PORT_UDP_ETHERBONE
);
pfilter_logic2
(
R_CLASS
(
7
),
FRAME_UDP
,
NAND
,
PORT_UDP_ETHERBONE
);
pfilter_logic3
(
R_CLASS
(
5
),
PORT_UDP_HOST
,
NOT
,
R_ZERO
,
AND
,
FRAME_UDP
);
pfilter_logic2
(
R_CLASS
(
6
),
FRAME_TCP
,
AND
,
FRAME_IP_OK
);
/*
* Note that earlier we used to be more strict in ptp ethtype (only proper multicast),
* but since we want to accept peer-delay sooner than later, we'd better avoid the checks
...
...
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