Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Trigger Distribution
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
White Rabbit Trigger Distribution
Commits
615fdc5a
Commit
615fdc5a
authored
Apr 06, 2023
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrtd-rt-common.h: add an option to use VLAN
For
#11
parent
bb136ef2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
wrtd-rt-common.h
software/firmware/include/wrtd-rt-common.h
+13
-1
No files found.
software/firmware/include/wrtd-rt-common.h
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
);
...
...
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