Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
White Rabbit Trigger Distribution
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
White Rabbit Trigger Distribution
Commits
615fdc5a
Commit
615fdc5a
authored
1 year ago
by
Tristan Gingold
Browse files
Options
Downloads
Patches
Plain Diff
wrtd-rt-common.h: add an option to use VLAN
For
#11
parent
bb136ef2
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
software/firmware/include/wrtd-rt-common.h
+13
-1
13 additions, 1 deletion
software/firmware/include/wrtd-rt-common.h
with
13 additions
and
1 deletion
software/firmware/include/wrtd-rt-common.h
+
13
−
1
View file @
615fdc5a
...
...
@@ -23,6 +23,7 @@
* #define WRTD_NET_TX x // 1 if transmit events to the network
* #define WRTD_LOCAL_RX x // 1 if consume events
* #define WRTD_LOCAL_TX x // 1 if generate events
* #define WRTD_NET_VLAN // Define to tag tx frames (with vlan 0)
* #include "wrtd-rt-common.h"
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*
...
...
@@ -465,6 +466,11 @@ static void wrtd_log_discard(struct wrtd_rule *rule,
}
#if WRTD_NET_TX > 0
#ifdef WRTD_NET_VLAN
#define FILTER_TX (TRTL_EP_FILTER_VLAN)
#else
#define FILTER_TX 0
#endif
static
void
wrtd_init_tx
(
void
)
{
static
const
struct
trtl_ep_eth_address
addr
=
{
...
...
@@ -474,7 +480,7 @@ static void wrtd_init_tx(void)
.
dst_port
=
WRTD_UDP_PORT
,
.
src_port
=
WRTD_UDP_PORT
,
.
ethertype
=
0x800
,
/* IPv4 */
.
filter
=
0
/* only the TX path of the endpoint is used */
.
filter
=
FILTER_TX
};
rmq_bind_out
(
WRTD_RMQ
,
TRTL_EP_ETH
,
&
addr
);
}
...
...
@@ -688,6 +694,11 @@ static void wrtd_route_in(struct wrtd_event *ev)
#endif
#if WRTD_NET_RX > 0
#ifdef WRTD_NET_VLAN
#define FILTER_RX (TRTL_EP_FILTER_VLAN_DIS)
#else
#define FILTER_RX 0
#endif
static
void
wrtd_init_rx
(
void
)
{
static
const
struct
trtl_ep_eth_address
addr
=
{
...
...
@@ -699,6 +710,7 @@ static void wrtd_init_rx(void)
|
TRTL_EP_FILTER_DST_PORT
|
TRTL_EP_FILTER_ETHERTYPE
|
TRTL_EP_FILTER_DST_IP
|
FILTER_RX
|
TRTL_EP_FILTER_ENABLE
)
};
rmq_bind_in
(
WRTD_RMQ
,
TRTL_EP_ETH
,
&
addr
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment