Bug 1194 - l3fwd-cat: calling unsafe functions from signal handler
Summary: l3fwd-cat: calling unsafe functions from signal handler
Status: UNCONFIRMED
Alias: None
Product: DPDK
Classification: Unclassified
Component: examples (show other bugs)
Version: unspecified
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: dev
URL:
Depends on:
Blocks:
 
Reported: 2023-03-20 18:08 CET by Stephen Hemminger
Modified: 2023-03-20 18:08 CET (History)
0 users



Attachments

Description Stephen Hemminger 2023-03-20 18:08:20 CET
The handling of SIGINT and SIGTERM in the l2fwd-cat example is unsafe and non-portable.  The signal handler could be called by any thread at any time.

The current method (copy/paste from testpmd?) is to call cat_exit() in the signal handler. This may race with other threads and cause problems.

The better solution is to set a flag in signal handler and then do the shutdown aft er the main loop exits.

Note You need to log in before you can comment on or make changes to this bug.