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
c47ddd2a
Commit
c47ddd2a
authored
Jul 19, 2018
by
Vraliens
Committed by
li hongming
Jul 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to merge proposed_master.
parent
ba69f77a
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
275 additions
and
278 deletions
+275
-278
arp.c
lib/arp.c
+25
-26
ipv4.c
lib/ipv4.c
+3
-3
cmd_init.c
shell/cmd_init.c
+0
-1
unique-error
tools/build-random/unique-error
+1
-2
unique-warning
tools/build-random/unique-warning
+1
-2
pfilter-builder.c
tools/pfilter-builder.c
+243
-243
wrc_main.c
wrc_main.c
+2
-1
No files found.
lib/arp.c
View file @
c47ddd2a
...
...
@@ -53,7 +53,6 @@ static int process_arp(uint8_t * buf, int len)
{
memcpy
(
hisMAC
,
buf
+
ARP_SHA
,
6
);
memcpy
(
hisIP
,
buf
+
ARP_SPA
,
4
);
// ------------- ARP ------------
// HW ethernet
buf
[
ARP_HTYPE
+
0
]
=
0
;
...
...
lib/ipv4.c
View file @
c47ddd2a
shell/cmd_init.c
View file @
c47ddd2a
...
...
@@ -28,7 +28,6 @@ static int cmd_init(const char *args[])
shell_show_build_init
();
storage_init_show
();
}
else
if
(
args
[
0
]
&&
!
strcasecmp
(
args
[
0
],
"boot"
))
{
spll_very_init
();
shell_boot_script
();
}
...
...
tools/build-random/unique-error
View file @
c47ddd2a
...
...
@@ -2,12 +2,11 @@
declare
-A
err
HOW
=
"grep -wi error
$file
"
for
n
in
ko-build
*
;
do
test
-d
$n
||
continue
file
=
$n
/build
S
=
$(
$HOW
|
sort
|
md5sum
|
awk
'{print $1}'
)
S
=
$(
grep
-wi
error
$file
|
sort
|
md5sum
|
awk
'{print $1}'
)
err[
$S
]=
$n
done
for
n
in
${
err
[*]
}
;
do
...
...
tools/build-random/unique-warning
View file @
c47ddd2a
...
...
@@ -3,12 +3,11 @@
declare
-A
warn
HOW
=
"grep -wi warning
$file
"
for
n
in
warn-build
*
;
do
test
-d
$n
||
continue
file
=
$n
/build
S
=
$(
$HOW
|
sort
|
md5sum
|
awk
'{print $1}'
)
S
=
$(
grep
-wi
warning
$file
|
sort
|
md5sum
|
awk
'{print $1}'
)
warn[
$S
]=
$n
done
for
n
in
${
warn
[*]
}
;
do
...
...
tools/pfilter-builder.c
View file @
c47ddd2a
...
...
@@ -108,8 +108,6 @@
1.3. LOGIC2 Rd, Ra, <oper>, Rb
-----------------------------------------
* LOGIC2 Rd, Ra, OPER Rb - 2 argument logic (Rd = Ra OPER Rb). If the operation is MOV or NOT, Ra is
taken as the source register.
* Rd = Ra <oper> Rb
...
...
@@ -222,7 +220,6 @@ enum pf_symbolic_regs {
FRAME_TYPE_ARP
,
FRAME_ICMP
,
FRAME_UDP
,
FRAME_TCP
,
PORT_UDP_HOST
,
PORT_UDP_ETHERBONE
,
R_TMP
,
...
...
@@ -398,6 +395,10 @@ void pfilter_init_novlan(char *fname)
pfilter_logic3
(
FRAME_MAC_OK
,
FRAME_MAC_PTP
,
AND
,
R_TMP
,
OR
,
FRAME_MAC_OK
);
/* Tagged is dropped. We'll invert the check in the vlan rule-set */
pfilter_cmp
(
6
,
0x8100
,
0xffff
,
MOV
,
R_TMP
);
pfilter_logic2
(
R_DROP
,
R_TMP
,
MOV
,
R_ZERO
);
/* Identify some Ethertypes used later -- type latency is 0xcafe */
pfilter_cmp
(
6
,
0x88f7
,
0xffff
,
MOV
,
FRAME_TYPE_PTP2
);
pfilter_cmp
(
6
,
0xcafe
,
0xffff
,
OR
,
FRAME_TYPE_PTP2
);
...
...
@@ -410,26 +411,26 @@ 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
);
pfilter_logic2
(
FRAME_UDP
,
FRAME_UDP
,
AND
,
FRAME_IP_OK
);
/* For CPU: arp or icmp unicast or ptp (or latency) */
pfilter_logic2
(
FRAME_FOR_CPU
,
FRAME_TYPE_ARP
,
OR
,
FRAME_TYPE_PTP2
);
pfilter_logic3
(
R_CLASS
(
0
)
,
FRAME_IP_OK
,
AND
,
FRAME_ICMP
,
OR
,
FRAME_FOR_CPU
);
pfilter_logic3
(
FRAME_FOR_CPU
,
FRAME_IP_OK
,
AND
,
FRAME_ICMP
,
OR
,
FRAME_FOR_CPU
);
/* Now look in UDP ports: at offset 18 (14 + 20 + 8 = 36) */
pfilter_logic2
(
FRAME_UDP
,
FRAME_UDP
,
AND
,
FRAME_IP_OK
);
pfilter_cmp
(
18
,
0x0000
,
0xff00
,
MOV
,
PORT_UDP_HOST
);
/* ports 0-255 */
pfilter_cmp
(
18
,
0x0100
,
0xff00
,
OR
,
PORT_UDP_HOST
);
/* ports 256-511 */
pfilter_cmp
(
18
,
0xebd0
,
0xffff
,
MOV
,
PORT_UDP_ETHERBONE
);
/* ports 60368 */
/* 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
);
pfilter_logic3
(
R_CLASS
(
0
),
FRAME_UDP
,
AND
,
PORT_UDP_HOST
,
OR
,
FRAME_FOR_CPU
);
/* 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: 4 etherbone, 6 for anything else */
pfilter_logic2
(
R_CLASS
(
4
),
FRAME_UDP
,
AND
,
PORT_UDP_ETHERBONE
);
/* and now copy out fabric selections: 7 etherbone, 6 for anything else */
pfilter_logic2
(
R_CLASS
(
7
),
FRAME_UDP
,
AND
,
PORT_UDP_ETHERBONE
);
pfilter_logic2
(
R_CLASS
(
6
),
FRAME_UDP
,
NAND
,
PORT_UDP_ETHERBONE
);
pfilter_logic3
(
R_CLASS
(
6
),
PORT_UDP_HOST
,
OR
,
PORT_UDP_ETHERBONE
,
NAND
,
FRAME_UDP
);
pfilter_logic2
(
R_CLASS
(
7
),
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
...
...
@@ -512,7 +513,6 @@ void pfilter_init_vlan(char *fname)
pfilter_logic2
(
R_CLASS
(
6
),
R_TMP
,
AND
,
FRAME_OUR_VLAN
);
pfilter_output
(
fname
);
}
int
main
(
int
argc
,
char
**
argv
)
/* no arguments used currently */
...
...
wrc_main.c
View file @
c47ddd2a
...
...
@@ -63,7 +63,9 @@ static void wrc_initialize(void)
timer_init
(
1
);
get_hw_name
(
wrc_hw_name
);
#ifdef CONFIG_SDB_STORAGE
storage_read_hdl_cfg
();
#endif
wrpc_w1_init
();
wrpc_w1_bus
.
detail
=
ONEWIRE_PORT
;
w1_scan_bus
(
&
wrpc_w1_bus
);
...
...
@@ -91,7 +93,6 @@ static void wrc_initialize(void)
net_rst
();
ep_init
(
mac_addr
);
/* Sleep for 1s to make sure WRS v4.2 always realizes that
* the link is down */
timer_delay_ms
(
200
);
...
...
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