From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 73F258D8F for ; Thu, 31 Dec 2015 02:44:24 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 30 Dec 2015 17:44:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,503,1444719600"; d="scan'208";a="851042430" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga001.jf.intel.com with ESMTP; 30 Dec 2015 17:44:22 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 30 Dec 2015 17:44:22 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.57]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.111]) with mapi id 14.03.0248.002; Thu, 31 Dec 2015 09:44:20 +0800 From: "Wang, Zhihong" To: "Ananyev, Konstantin" , "dev@dpdk.org" Thread-Topic: [PATCH v4 3/3] examples/l3fwd: Handle SIGINT and SIGTERM in l3fwd Thread-Index: AQHRQsuy2TDIgAnKN0u50QqUV1TYK57jAuMAgAFN3pA= Date: Thu, 31 Dec 2015 01:44:20 +0000 Message-ID: <8F6C2BD409508844A0EFC19955BE094186474F@SHSMSX103.ccr.corp.intel.com> References: <1451011032-83106-1-git-send-email-zhihong.wang@intel.com> <1451431644-98362-1-git-send-email-zhihong.wang@intel.com> <1451431644-98362-4-git-send-email-zhihong.wang@intel.com> <2601191342CEEE43887BDE71AB97725836ADF284@irsmsx105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB97725836ADF284@irsmsx105.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTA2ZDg0M2ItOWI4ZC00NWIxLWFmYWQtZGM1ODE3ZTYzYTI3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjQuMTAuMTkiLCJUcnVzdGVkTGFiZWxIYXNoIjoib25RdEJZOEVRa3ZrNDA1V0l3YlhHN3RUK1pnNDJmTWtGaHNCNFdHVmtxMD0ifQ== x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4 3/3] examples/l3fwd: Handle SIGINT and SIGTERM in l3fwd X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2015 01:44:25 -0000 > > +#define PORT_IDLE 0 > > +#define PORT_INIT 1 > > +#define PORT_WORK 2 > > +#define PORT_STOP 3 > > +#define PORT_QUIT 4 >=20 > 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 serve as an example on how = to do this in other cases, like where stop might be called before or during= init. > Konstantin