From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhihong Wang Subject: [PATCH v5 0/3] Handle SIGINT and SIGTERM in DPDK examples Date: Wed, 30 Dec 2015 16:59:48 -0500 Message-ID: <1451512791-5442-1-git-send-email-zhihong.wang@intel.com> References: <1451011032-83106-1-git-send-email-zhihong.wang@intel.com> To: dev@dpdk.org Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 1CDDA5A72 for ; Thu, 31 Dec 2015 06:03:08 +0100 (CET) In-Reply-To: <1451011032-83106-1-git-send-email-zhihong.wang@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch handles SIGINT and SIGTERM in testpmd, l2fwd, and l3fwd, make sure all ports are properly stopped and closed. For virtual ports, the stop and close function may deal with resource cleanup, such as socket files unlinking. -------------- Changes in v5: 1. Get rid of over complicated logic in l2fwd and l3fwd -------------- Changes in v4: 1. Add port status control in l2fwd and l3fwd -------------- Changes in v3: 1. Make sure correct port operations regarding status 2. Small fixes to make the code clearer -------------- Changes in v2: 1. Make sure graceful exit for all running phases 2. Make sure program exits with the right status Zhihong Wang (3): app/test-pmd: Handle SIGINT and SIGTERM in testpmd examples/l2fwd: Handle SIGINT and SIGTERM in l2fwd examples/l3fwd: Handle SIGINT and SIGTERM in l3fwd app/test-pmd/cmdline.c | 20 +++++++++++++------- app/test-pmd/testpmd.c | 39 +++++++++++++++++++++++++++++++++------ app/test-pmd/testpmd.h | 1 + examples/l2fwd/main.c | 43 +++++++++++++++++++++++++++++++++++++++---- examples/l3fwd/main.c | 46 ++++++++++++++++++++++++++++++++++++++++++---- 5 files changed, 128 insertions(+), 21 deletions(-) -- 2.5.0