[dpdk-dev] [PATCH v4 3/3] examples/l3fwd: Handle SIGINT and SIGTERM in l3fwd

2015-12-31 Thread Wang, Zhihong
> -Original Message- > From: Stephen Hemminger [mailto:stephen at networkplumber.org] > Sent: Thursday, December 31, 2015 10:09 AM > To: Wang, Zhihong > Cc: Ananyev, Konstantin ; dev at dpdk.org; > Qiu, > Michael > Subject: Re: [PATCH v4 3/3] examples/l3fwd: Handle SIGINT and SIGTERM i

[dpdk-dev] [PATCH v4 3/3] examples/l3fwd: Handle SIGINT and SIGTERM in l3fwd

2015-12-31 Thread Wang, Zhihong
> > +#define PORT_IDLE 0 > > +#define PORT_INIT 1 > > +#define PORT_WORK 2 > > +#define PORT_STOP 3 > > +#define PORT_QUIT 4 > > Seems ok, but over-complicated. > I think all you need is just IDLE, INIT, QUIT. Yes for l2/l3fwd 3 states are enough. I implement a full state machine so it can also s

[dpdk-dev] [PATCH v4 3/3] examples/l3fwd: Handle SIGINT and SIGTERM in l3fwd

2015-12-30 Thread Stephen Hemminger
On Thu, 31 Dec 2015 01:44:20 + "Wang, Zhihong" wrote: > > > +#define PORT_IDLE 0 > > > +#define PORT_INIT 1 > > > +#define PORT_WORK 2 > > > +#define PORT_STOP 3 > > > +#define PORT_QUIT 4 > > > > Seems ok, but over-complicated. > > I think all you need is just IDLE, INIT, QUIT. > > Yes

[dpdk-dev] [PATCH v4 3/3] examples/l3fwd: Handle SIGINT and SIGTERM in l3fwd

2015-12-30 Thread Ananyev, Konstantin
> -Original Message- > From: Wang, Zhihong > Sent: Tuesday, December 29, 2015 11:27 PM > To: dev at dpdk.org > Cc: Ananyev, Konstantin; stephen at networkplumber.org; Qiu, Michael; Wang, > Zhihong > Subject: [PATCH v4 3/3] examples/l3fwd: Handle SIGINT and SIGTERM in l3fwd > > Handle SI

[dpdk-dev] [PATCH v4 3/3] examples/l3fwd: Handle SIGINT and SIGTERM in l3fwd

2015-12-29 Thread Zhihong Wang
Handle SIGINT and SIGTERM in l3fwd. Signed-off-by: Zhihong Wang Acked-by: Michael Qiu --- examples/l3fwd/main.c | 167 +++--- 1 file changed, 145 insertions(+), 22 deletions(-) diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index 5b0c2dd.