Re: [PATCH v4] testpmd: cleanup cleanly from signal

2022-11-10 Thread Mattias Rönnblom
On 2022-11-10 17:14, Stephen Hemminger wrote: On Thu, 10 Nov 2022 08:50:40 +0100 Mattias Rönnblom wrote: Why is select() needed? Wouldn't a blocking read suffice? Or getchar(). On Linux, signal set SA_RESTART so a simple read is not interrupted. One option was to use sigaction() which allow

Re: [PATCH v4] testpmd: cleanup cleanly from signal

2022-11-09 Thread Mattias Rönnblom
On 2022-11-09 23:53, Stephen Hemminger wrote: On Wed, 9 Nov 2022 22:46:55 +0100 Mattias Rönnblom wrote: On 2022-11-09 05:10, Stephen Hemminger wrote: Do a clean shutdown of testpmd when a signal is received; instead of having testpmd kill itself. This fixes problem where a signal could be rec

Re: [PATCH v4] testpmd: cleanup cleanly from signal

2022-11-09 Thread Stephen Hemminger
On Wed, 9 Nov 2022 22:46:55 +0100 Mattias Rönnblom wrote: > On 2022-11-09 05:10, Stephen Hemminger wrote: > > Do a clean shutdown of testpmd when a signal is received; > > instead of having testpmd kill itself. > > This fixes problem where a signal could be received > > in the middle of a PMD and

Re: [PATCH v4] testpmd: cleanup cleanly from signal

2022-11-09 Thread Mattias Rönnblom
On 2022-11-09 05:10, Stephen Hemminger wrote: Do a clean shutdown of testpmd when a signal is received; instead of having testpmd kill itself. This fixes problem where a signal could be received in the middle of a PMD and then the signal handler would call PMD's close routine which could cause a

[PATCH v4] testpmd: cleanup cleanly from signal

2022-11-08 Thread Stephen Hemminger
Do a clean shutdown of testpmd when a signal is received; instead of having testpmd kill itself. This fixes problem where a signal could be received in the middle of a PMD and then the signal handler would call PMD's close routine which could cause a deadlock. Added benefit is it gets rid of Windo