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
79d897db
Commit
79d897db
authored
Nov 06, 2011
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ep_pfilter.c: added rules to drop unused traffic
parent
85f14f87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
ep_pfilter.c
dev/ep_pfilter.c
+8
-6
No files found.
dev/ep_pfilter.c
View file @
79d897db
...
...
@@ -216,6 +216,9 @@ void pfilter_load()
- redirects broadcasts and PTP packets to the WR Core
- redirects unicasts addressed to self with ethertype 0xa0a0 to the external fabric */
#define R_CLASS(x) (24 + x)
#define R_DROP 23
void
pfilter_init_default
()
{
pfilter_new
();
...
...
@@ -230,14 +233,13 @@ void pfilter_init_default()
pfilter_cmp
(
1
,
EP
->
MACL
>>
16
,
0xffff
,
AND
,
3
);
pfilter_cmp
(
2
,
EP
->
MACL
&
0xffff
,
0xffff
,
AND
,
3
);
/* r3 = 1 when the packet is unicast to our own MAC */
pfilter_cmp
(
6
,
0xa0a0
,
0xffff
,
MOV
,
4
);
/* r4 = 1 when ethertype = 0xa0a0 */
pfilter_cmp
(
5
,
0x88f8
,
0xffff
,
MOV
,
5
);
/* r5 = 1 when ethertype = PTPv2 */
/* Classes 0-3 go to the minic, 4-7 - to the external fabric */
pfilter_cmp
(
6
,
0x88f7
,
0xffff
,
MOV
,
5
);
/* r5 = 1 when ethertype = PTPv2 */
// pfilter_logic3(R_CLASS(0), 2, AND, 5, OR, 3); // class 0: (PTP or broadcast)
// pfilter_logic2(R_CLASS(1), 1, AND, 6); // class 1: minibone probes
pfilter_logic3
(
7
,
3
,
AND
,
4
,
OR
,
5
);
/* r5 = PTP or etherbone */
pfilter_logic2
(
R_DROP
,
7
,
NOT
,
0
);
/* Neither PTP or etherbone? drop */
pfilter_logic2
(
R_CLASS
(
7
),
3
,
AND
,
4
);
// class 7: minibone unicasts
pfilter_logic2
(
R_CLASS
(
0
),
5
,
MOV
,
0
);
// class 7: minibone unicasts
pfilter_logic2
(
30
,
3
,
AND
,
4
);
// class 7: minibone unicasts
pfilter_load
();
}
\ No newline at end of file
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