From patchwork Wed Jul 3 15:45:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 142093 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4640145562; Wed, 3 Jul 2024 17:47:24 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0F7D242E5A; Wed, 3 Jul 2024 17:47:20 +0200 (CEST) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mails.dpdk.org (Postfix) with ESMTP id 3E5D540F16 for ; Wed, 3 Jul 2024 17:47:18 +0200 (CEST) Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1fa244db0b2so44763615ad.3 for ; Wed, 03 Jul 2024 08:47:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1720021637; x=1720626437; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PktQPsiNr3yn2laDOVgagY3gKznLHn4FO/k3AzDdvl8=; b=k0+TS2GRieIaX4/LjJV2139qBpArgr2HZtR3CCw6UfMQXqN/UqWNjGfZ1RngJpn0bd S7xiN3nFFGL7Zu+3/dsRiBNmcpB8prWjhMpCXCbSB4TNqTPSawPLc7Pcxpro6wD/Uuch /OzQ4NCe3N0Ad23huINsIwxKK4WA25quIkz2BXMdkcP1F5Bxih7XM4r6QwMMf5fh0Rq+ +QJx/wuUrKNm9m3gM/CBVzl+XXrVlEXHUUXrZk0FaCvCHMY2z2ypCmhKY+nx5SViF1BU mwm37TNVdVrfBinrUChpdFRf5doWTu2na17UaMeU58qrhdFiDLV8uaDsevDmcfPguZQc Jy/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720021637; x=1720626437; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PktQPsiNr3yn2laDOVgagY3gKznLHn4FO/k3AzDdvl8=; b=lNPggJ09B5GM4umLAUmkAjfAWXNP9m1QBQIotlg9+7kUpDoCPs7q6NHswppMVcRSgX BFOOaptrUOgqGTgdzkkYENUclf1CLbks9ueWudhx/3pA38Ttb7QciWnftVVYCoo65CGQ tP8rI5+YO/1pUvMXliE1YqWV3TuiTEpMJ2pdhhicwzEnJ6yIfn3mRixtP89Df6UDkio7 6TCeeaZEfrRR0RkryMaK3mnorh5Mha9FgxAuEtLQK9+rBJx0E9EL8Khv7M7OTbaxEesZ 9rl/EQTbyvcmBoh0OKjEri+ThO/UM2FjEchh31eC87hF7BrDBx+OcKBtluK2iDprRgIq 7cZg== X-Gm-Message-State: AOJu0YyLOWMLXv9v0sZBSoo4kCfQyK6253ifEty2lKoP3YzWHkf6FKzr 4CPS/WbbiNUpFyYeb8VH1lpYJKMdRr+6solvHvhgPhompyAvSJopnrel7IzNTLW42OWNbO/1szX NcnU= X-Google-Smtp-Source: AGHT+IGw5JJFw+i4NYxjvCiUQNvc4TaRXUbz0DGUzSJcfO2DrYkniNXHBtrrIyozCG1YfxafORfgRQ== X-Received: by 2002:a17:902:d489:b0:1f9:c508:acdf with SMTP id d9443c01a7336-1fadbc686f0mr83621385ad.13.1720021637376; Wed, 03 Jul 2024 08:47:17 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fb0bd80588sm24653345ad.7.2024.07.03.08.47.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 08:47:16 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Reshma Pattan Subject: [PATCH v3 1/3] app/dumpcap: handle SIGTERM and SIGHUP Date: Wed, 3 Jul 2024 08:45:43 -0700 Message-ID: <20240703154705.19192-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240703154705.19192-1-stephen@networkplumber.org> References: <20240529160933.282846-1-stephen@networkplumber.org> <20240703154705.19192-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org If the dumpcap is killed it does not cleanup which leaves the ring buffer and the memory pool behind. Until resource are exhausted devices will continue to fill the ring. Fix by having the application handle SIGTERM, SIGHUP, and SIGPIPE. These are the same signals handled in same way by the wireshark dumpcap application. Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application") Signed-off-by: Stephen Hemminger --- app/dumpcap/main.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c index b25b95e2fc..ba91ca94d0 100644 --- a/app/dumpcap/main.c +++ b/app/dumpcap/main.c @@ -936,6 +936,11 @@ int main(int argc, char **argv) { struct rte_ring *r; struct rte_mempool *mp; + struct sigaction action = { + .sa_flags = SA_RESTART, + .sa_handler = signal_handler, + }; + struct sigaction origaction; dumpcap_out_t out; char *p; @@ -961,8 +966,13 @@ int main(int argc, char **argv) compile_filters(); - signal(SIGINT, signal_handler); - signal(SIGPIPE, SIG_IGN); + sigemptyset(&action.sa_mask); + sigaction(SIGTERM, &action, NULL); + sigaction(SIGINT, &action, NULL); + sigaction(SIGPIPE, &action, NULL); + sigaction(SIGHUP, NULL, &origaction); + if (origaction.sa_handler == SIG_DFL) + sigaction(SIGHUP, &action, NULL); enable_primary_monitor(); From patchwork Wed Jul 3 15:45:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 142094 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D0E1945562; Wed, 3 Jul 2024 17:47:53 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BB6C242E5D; Wed, 3 Jul 2024 17:47:53 +0200 (CEST) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mails.dpdk.org (Postfix) with ESMTP id 1F3AD42E5D for ; Wed, 3 Jul 2024 17:47:52 +0200 (CEST) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1fa9ecfb321so35726775ad.0 for ; Wed, 03 Jul 2024 08:47:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1720021671; x=1720626471; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aUbR1QuF5VEjLqtQHnxRH2cT49VK+//tGuQs4vv7YHI=; b=xdLacqVPFVdyoOQkjEF6f43ctMDzJj8a9cBSxURYhNmBU88EyEBYQqaxW7AK/gZTZt WiQnAvRrH/HilzcrAXxrmzEolAEDvJqU6Os3lDeVFpmXpRUfT7zlEetXFQyLUO96bWBr nOHwVZeVTDc/2ewY1syYbAC/vgkgGvEQ8tqsvy1MYsSPnyiy3DUW6cHjjdnNokLixr1o RmJxQCacFpeeCwY6yVN4rnEGYaHb2k3QlgnJgyVWeiTCbR2ixpfwxMm6Tnvi2wt+nWMs 1bgaEVOB5hY5eyyroX1ceflmQ3/cgeBi/8zDYg90QVP2A91W5RD75WN0E9cUrkW24dMY 7ACg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720021671; x=1720626471; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aUbR1QuF5VEjLqtQHnxRH2cT49VK+//tGuQs4vv7YHI=; b=qo99+W89CQUwYcCa0n0CDFKkWKi1PQxb0qjTmGGJUB/RBXOaja1KW/VvnkvsIkjuSl 4arevWwWDwTIUZvHuMIii71K7mPdwybzs/D/upyemdfHaCHhe2LO9BTBzr3b8YKcB6fK SMx3sz00/FM8M57m4kT8oheoaYLQI56bDCM7gYqCosek6z+jKm4EfF6Z7TQltmD0LNec 4s+1U8ndaLarWt0c46sHt0ReuhYqGqw7yF4GDYAl9ddlrhCY96jzcVYJf8jDpz2eHsrO BYOaWSHLHN1m58yj03Y9BzXO3t7u0wRTEcmwPVK4vtvKsbHXIXlLtITrKw6DYPM7naSd 2BJQ== X-Gm-Message-State: AOJu0YwqGmvfK/Q3iDwEtvNqNE0fyp+y/ybt4LjsyE0dEuqouQ17piQC H3lcQR5ZcGG93zRxEz1xd14PHoRV+NWsbEWaaDy9VntyWmUcqO218N73kEQ8vQTy9cy0QqajgrG ZNnc= X-Google-Smtp-Source: AGHT+IHXB9Dgfu9rST1LYdD/SRwDYNe+hgRwlRLNp4iac/AoNw+t9bUBsy+JayPbrJ5CThPCCuus/A== X-Received: by 2002:a17:902:d50c:b0:1fa:b511:5d44 with SMTP id d9443c01a7336-1fadbce6591mr74951525ad.46.1720021671196; Wed, 03 Jul 2024 08:47:51 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fb0bd80588sm24653345ad.7.2024.07.03.08.47.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 08:47:50 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Reshma Pattan Subject: [PATCH v3 2/3] app/pdump: handle SIGTERM and SIGHUP Date: Wed, 3 Jul 2024 08:45:44 -0700 Message-ID: <20240703154705.19192-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240703154705.19192-1-stephen@networkplumber.org> References: <20240529160933.282846-1-stephen@networkplumber.org> <20240703154705.19192-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The pdump application will leak ring and memory pool if killed by SIGTERM. Like dumpcap, the pdump process should cleanup if process terminates due to being killed or hangup. Fixes: caa7028276b8 ("app/pdump: add tool for packet capturing") Signed-off-by: Stephen Hemminger --- app/pdump/main.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/app/pdump/main.c b/app/pdump/main.c index 3bdbb8dc78..fa85859703 100644 --- a/app/pdump/main.c +++ b/app/pdump/main.c @@ -571,11 +571,9 @@ disable_primary_monitor(void) } static void -signal_handler(int sig_num) +signal_handler(int sig_num __rte_unused) { - if (sig_num == SIGINT) { - quit_signal = 1; - } + quit_signal = 1; } static inline int @@ -975,6 +973,11 @@ enable_primary_monitor(void) int main(int argc, char **argv) { + struct sigaction action = { + .sa_flags = SA_RESTART, + .sa_handler = signal_handler, + }; + struct sigaction origaction; int diag; int ret; int i; @@ -983,8 +986,14 @@ main(int argc, char **argv) char mp_flag[] = "--proc-type=secondary"; char *argp[argc + 2]; - /* catch ctrl-c so we can print on exit */ - signal(SIGINT, signal_handler); + /* catch ctrl-c so we can cleanup on exit */ + sigemptyset(&action.sa_mask); + sigaction(SIGTERM, &action, NULL); + sigaction(SIGINT, &action, NULL); + sigaction(SIGPIPE, &action, NULL); + sigaction(SIGHUP, NULL, &origaction); + if (origaction.sa_handler == SIG_DFL) + sigaction(SIGHUP, &action, NULL); argp[0] = argv[0]; argp[1] = n_flag; From patchwork Wed Jul 3 15:45:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 142095 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3D4B645562; Wed, 3 Jul 2024 17:47:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0979842E76; Wed, 3 Jul 2024 17:47:55 +0200 (CEST) Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by mails.dpdk.org (Postfix) with ESMTP id CEFD742E15 for ; Wed, 3 Jul 2024 17:47:52 +0200 (CEST) Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-652fd0bb5e6so3799073a12.0 for ; Wed, 03 Jul 2024 08:47:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1720021672; x=1720626472; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xZDHLywVJ28uH0pRrlxCp+zb/kEUptYdBsqa5147arU=; b=XVKvPnctuuxDTtu0TDHq9XV3B7/bjaqEqSHVI1Xo/3uVyKXYQQsobn0Xa9XuqS7YC0 ghUy7NTy7vubmPKhFfJAPyt3NbwvIM87SyMmQw2GxP5iJDKFjdo/6JyNBCN8wtaPiCtK yRhg7Odqhhgt5LGfcgDFPv89cVYvqzsALaFan2zdT+SIzy89IkOov1lx/W/2pAskFUl1 K9hNHg2yD7xcCVP28e5tjZ+cCYZhNUcnyNU8c6GWAkgbeK+ANvLl5lXgYjD4pPc9Rdcf MgDDldF+Y0lsuaVi3PK9rZyvcIay+sQzq8HoD4HX77i6Qk/1zQu+5kkAXPnYvy/ohPLt F3xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720021672; x=1720626472; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xZDHLywVJ28uH0pRrlxCp+zb/kEUptYdBsqa5147arU=; b=wFh4mdzH06I4bmoQsNdq11LjPUnecdEztkD2J+TOUVPUDkeLlRhFQRZfAi2izyhHxZ nBYRHNUKM9HNcTKoKUfs2HRcclQiim2fgBr0i/UzxcG3YI8ikQE5oj32+cGnAeAvrZfN aNEBIdsurFspLYmIe/wjRfG7HH/ssnSbBtmqV5mnd+dXjGlLp9uZbUr8nnaM5HA79WQx 57PxEWbdyJEK7m+CprReN7nOgEBevMqfeSbK5ZnWU7wBORtNna6JFDWg8e1nJ+RjQMDH DEe/YpIEZ8kISp+iY2eiCR34FkCvg8KTWeRenzZAtzZ4j3foWuig0+lZoIyxd+WdKqAC pmTg== X-Gm-Message-State: AOJu0YyPbo49jV+2C6T3vvjuiU1101j+ISjecQio9DU7ToRMG5tnIvwQ n2QJVbWlcbLlPGKFXlqd3r89azZBOdw/Xix3z2joebmB5ug5a76IPgIBfgGElC76LIUHH+H96E9 gEe0= X-Google-Smtp-Source: AGHT+IE1MvEprtjVbWaGvRhQx7UjYD6KlFVAOrYjsFyWONwalnunkZ6EHk1biy4TdTIZZbpKLuhBCg== X-Received: by 2002:a05:6a20:9f99:b0:1be:c1c0:b8de with SMTP id adf61e73a8af0-1bef6217106mr14330527637.42.1720021671930; Wed, 03 Jul 2024 08:47:51 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fb0bd80588sm24653345ad.7.2024.07.03.08.47.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 08:47:51 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Reshma Pattan Subject: [PATCH v3 3/3] dumpcap: add lcores option Date: Wed, 3 Jul 2024 08:45:45 -0700 Message-ID: <20240703154705.19192-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240703154705.19192-1-stephen@networkplumber.org> References: <20240529160933.282846-1-stephen@networkplumber.org> <20240703154705.19192-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The dumpcap application is reading from ring and writing to the kernel. By default the EAL init will cause the main thread to bound to the first lcore (cpu 0). Add a command line option to select the lcore to use; or if no lcores are specified then just be a normal process and let the CPU scheduler handle it. Letting scheduler is likely to work well for process doint I/O with kernel. Signed-off-by: Stephen Hemminger --- app/dumpcap/main.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c index ba91ca94d0..cb2a439f79 100644 --- a/app/dumpcap/main.c +++ b/app/dumpcap/main.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -60,6 +61,7 @@ static const char *tmp_dir = "/tmp"; static unsigned int ring_size = 2048; static const char *capture_comment; static const char *file_prefix; +static const char *lcore_arg; static bool dump_bpf; static bool show_interfaces; static bool print_stats; @@ -143,6 +145,7 @@ static void usage(void) " (default: /tmp)\n" "\n" "Miscellaneous:\n" + " --lcore= cpu core to run on (default: any)\n" " --file-prefix= prefix to use for multi-process\n" " -q don't report packet capture counts\n" " -v, --version print version information and exit\n" @@ -343,6 +346,7 @@ static void parse_opts(int argc, char **argv) { "ifdescr", required_argument, NULL, 0 }, { "ifname", required_argument, NULL, 0 }, { "interface", required_argument, NULL, 'i' }, + { "lcore", required_argument, NULL, 0 }, { "list-interfaces", no_argument, NULL, 'D' }, { "no-promiscuous-mode", no_argument, NULL, 'p' }, { "output-file", required_argument, NULL, 'w' }, @@ -369,6 +373,8 @@ static void parse_opts(int argc, char **argv) if (!strcmp(longopt, "capture-comment")) { capture_comment = optarg; + } else if (!strcmp(longopt, "lcore")) { + lcore_arg = optarg; } else if (!strcmp(longopt, "file-prefix")) { file_prefix = optarg; } else if (!strcmp(longopt, "temp-dir")) { @@ -608,12 +614,16 @@ static void dpdk_init(void) "--log-level", "notice" }; int eal_argc = RTE_DIM(args); + rte_cpuset_t cpuset = { }; char **eal_argv; unsigned int i; if (file_prefix != NULL) eal_argc += 2; + if (lcore_arg != NULL) + eal_argc += 2; + /* DPDK API requires mutable versions of command line arguments. */ eal_argv = calloc(eal_argc + 1, sizeof(char *)); if (eal_argv == NULL) @@ -623,6 +633,11 @@ static void dpdk_init(void) for (i = 1; i < RTE_DIM(args); i++) eal_argv[i] = strdup(args[i]); + if (lcore_arg != NULL) { + eal_argv[i++] = strdup("--lcores"); + eal_argv[i++] = strdup(lcore_arg); + } + if (file_prefix != NULL) { eal_argv[i++] = strdup("--file-prefix"); eal_argv[i++] = strdup(file_prefix); @@ -633,8 +648,24 @@ static void dpdk_init(void) rte_panic("No memory\n"); } + /* + * Need to get the original cpuset, before EAL init changes + * the affinity of this thread (main lcore). + */ + if (lcore_arg == NULL && + rte_thread_get_affinity_by_id(rte_thread_self(), &cpuset) != 0) + rte_panic("rte_thread_getaffinity failed\n"); + if (rte_eal_init(eal_argc, eal_argv) < 0) rte_exit(EXIT_FAILURE, "EAL init failed: is primary process running?\n"); + + /* + * If no lcore argument was specified, then run this program as a normal process + * which can be scheduled on any non-isolated CPU. + */ + if (lcore_arg == NULL && + rte_thread_set_affinity_by_id(rte_thread_self(), &cpuset) != 0) + rte_exit(EXIT_FAILURE, "Can not restore original cpu affinity\n"); } /* Create packet ring shared between callbacks and process */