Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
U
udpdk
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
ywj
udpdk
Commits
456006f6
Commit
456006f6
authored
Oct 06, 2020
by
Leonardo Lai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix arg parsing
parent
36b815a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
udpdk/udpdk_init.c
udpdk/udpdk_init.c
+10
-7
No files found.
udpdk/udpdk_init.c
View file @
456006f6
...
...
@@ -99,8 +99,13 @@ static int init_port(uint16_t port_num)
// TODO add support for multiple rings
const
struct
rte_eth_conf
port_conf
=
{
.
rxmode
=
{
.
mq_mode
=
ETH_MQ_RX_RSS
.
mq_mode
=
ETH_MQ_RX_RSS
,
}
/* TODO
.txmode = {
.offloads = DEV_TX_OFFLOAD_MULTI_SEGS,
}
*/
};
const
uint16_t
rx_rings
=
1
;
const
uint16_t
tx_rings
=
1
;
...
...
@@ -273,19 +278,17 @@ static int init_exchange_slots(void)
/* Initialize UDPDK */
int
udpdk_init
(
int
argc
,
char
*
argv
[])
{
int
retval
;
int
retval
,
args_consumed
;
// Start the secondary process
poller_pid
=
fork
();
if
(
poller_pid
!=
0
)
{
// parent -> application
// Initialize EAL (returns how many arguments it consumed)
retval
=
rte_eal_init
(
argc
,
argv
);
if
(
retval
<
0
)
{
args_consumed
=
rte_eal_init
(
argc
,
argv
);
if
(
args_consumed
<
0
)
{
RTE_LOG
(
ERR
,
INIT
,
"Cannot initialize EAL
\n
"
);
return
-
1
;
}
argc
-=
retval
;
argv
+=
retval
;
// Initialize pools of mbuf
retval
=
init_mbuf_pools
();
...
...
@@ -350,7 +353,7 @@ int udpdk_init(int argc, char *argv[])
poller_body
();
}
// The parent process (application) returns immediately from init; instead, poller doesn't till it dies (or error)
return
0
;
return
args_consumed
;
}
void
udpdk_interrupt
(
int
signum
)
...
...
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