Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
trx-ecpri
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
trx-ecpri
Commits
494b9dae
Commit
494b9dae
authored
Jun 02, 2022
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: segfault
parent
f255cff5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
12 deletions
+3
-12
trx_ecpri_dpdk.c
trx_ecpri_dpdk.c
+3
-12
No files found.
trx_ecpri_dpdk.c
View file @
494b9dae
...
...
@@ -416,10 +416,6 @@ static void log_exit(const char * section, const char * msg, ...) {
#define TX_POOL_SIZE 16
#ifdef DPDK
#include "dpdk.c"
static
void
send_packets
(
int
port
)
{
}
/* DPDK */
#else
...
...
@@ -695,13 +691,8 @@ static void *send_thread(void *p) {
int
pkt_size
;
pkt
[
i
]
=
rte_pktmbuf_alloc
(
tx_mbuf_pool
);
eth_hdr
=
rte_pktmbuf_mtod
(
pkt
[
i
],
struct
rte_ether_hdr
*
);
if
(
port
)
{
eth_hdr
->
d_addr
=
s_addr
;
eth_hdr
->
s_addr
=
d_addr
;
}
else
{
eth_hdr
->
d_addr
=
d_addr
;
eth_hdr
->
s_addr
=
s_addr
;
}
eth_hdr
->
ether_type
=
htons
(
0xaefe
);
memcpy
(
rte_pktmbuf_mtod_offset
(
pkt
[
i
],
uint8_t
*
,
sizeof
(
struct
rte_ether_hdr
)),
RBUF_READ0
(
tx_rbuf
,
uint8_t
),
8
+
s
->
tx_n_channel
*
60
);
rbuf_update_read_index
(
&
tx_rbuf
);
...
...
@@ -711,7 +702,7 @@ static void *send_thread(void *p) {
}
while
(
nb_tx
<
TX_POOL_SIZE
)
{
int64_t
x
=
TX_POOL_SIZE
-
nb_tx
;
nb_tx
+=
rte_eth_tx_burst
(
port
,
0
,
pkt
+
nb_tx
,
x
>
BURST_SIZE
?
BURST_SIZE
:
x
);
nb_tx
+=
rte_eth_tx_burst
(
0
,
0
,
pkt
+
nb_tx
,
x
>
BURST_SIZE
?
BURST_SIZE
:
x
);
}
/* Free any unsent packets. */
...
...
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