From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 80D03432E9; Thu, 9 Nov 2023 18:16:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4D1344026B; Thu, 9 Nov 2023 18:16:13 +0100 (CET) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mails.dpdk.org (Postfix) with ESMTP id D16934021E for ; Thu, 9 Nov 2023 18:16:12 +0100 (CET) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1ccbb7f79cdso9402175ad.3 for ; Thu, 09 Nov 2023 09:16:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1699550172; x=1700154972; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=TD1M0mVy4aoBSJNsOqDur/PtU5MP3F495+LbdcjlGnM=; b=NTo0+cLojFjvbLk73Wr1tAnoVm7oil5AgQod8Ww9ZbVdHUcW3BzwocvBVY7BYlW2b3 8GjZpYGZiTzHZ3fkgnHDGQ/fof9FbBsGdl+1U88XJkSOmaLsDGmfdzSUAVg3DMNMn2/e hvIKwgQQ4/t/xls8h8bnlnWfvge0ZofZtXvsi7JKDzvB9U/EXAAdZxFDDstKtiTPbg2D OBEji8FBwWuD/JlGWu4SyHpE2DnUtdMxMksG0m/Yg+1TcOPEOuGwvqKVNporgaSp74sv iClZCPqxLTAjIlWsuRzK/LwzmcLF3PqPmbLfKf+CNByqoYtfOQCm6A9f1BGjF/z1b0xh 6qJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699550172; x=1700154972; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TD1M0mVy4aoBSJNsOqDur/PtU5MP3F495+LbdcjlGnM=; b=Q7ClnKknrXlXJ2a7Tz9/1tRmCBUkeMi+NDkOrG62m6lbwMM84KH7f1gkauFyMwHYBu vpjjSm4smjjchbeAwGsowYYmSB0tzlBAkRjV/tJiKGVEzH755dh/ykdNse/ipK7y85Ty nsaeJvHwIJP8nuFr3MsQSkIvh+dYNXeKtLtSv/Fh9TLyQPCiTU6ILsikQaimgywTkH0J RIWixNUf+6sQgxFU10ymLq/opAhCSqTh2EMahu1A0V4ZyYefQwM2kuZpqB1cuJQumsfd T1xNragBZ5cr9MhVeaSeGNA5Ytb2qmTKFNsYFrni6KEGj71vXj8bzxrFUG70AMvqndwU WdQw== X-Gm-Message-State: AOJu0YxxUBi7t8fPbncF9p2gkFgG7bGXxU773TNAk4gRNSUzo9f/gcuH h8AyL53AV6fechDcdmKI5J+3Ng== X-Google-Smtp-Source: AGHT+IEGYKqueVl55AJUorJSr6mPQ1+G2iY7N+Gdsm5ElT+ZS0MLmeqduL1RVrlPyPnqiVicZJW6dQ== X-Received: by 2002:a17:902:7d87:b0:1ca:8419:1855 with SMTP id a7-20020a1709027d8700b001ca84191855mr4955293plm.69.1699550171726; Thu, 09 Nov 2023 09:16:11 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id x1-20020a1709029a4100b001c60c3f9508sm3783893plv.230.2023.11.09.09.16.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 09:16:11 -0800 (PST) Date: Thu, 9 Nov 2023 09:16:09 -0800 From: Stephen Hemminger To: Morten =?UTF-8?B?QnLDuHJ1cA==?= Cc: , "Isaac Boukris" Subject: Re: [PATCH v3 2/5] dumpcap: allow multiple invocations Message-ID: <20231109091609.5c3fd3c0@hermes.local> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9EFFA@smartserver.smartshare.dk> References: <20230921042349.104150-1-stephen@networkplumber.org> <20231108183557.381955-1-stephen@networkplumber.org> <20231108183557.381955-3-stephen@networkplumber.org> <98CBD80474FA8B44BF855DF32C47DC35E9EFFA@smartserver.smartshare.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 On Thu, 9 Nov 2023 08:50:10 +0100 Morten Br=C3=B8rup wrote: > > rte_exit(EXIT_FAILURE, > > "Packet dump enable on %u:%s failed %s\n", > > intf->port, intf->name, > > - rte_strerror(-ret)); > > + rte_strerror(rte_errno)); =20 >=20 > This bugfix (the line above, not the patch itself) supports Tyler's propo= sal to standardize on returning -1 with rte_errno set on failure, instead o= f some functions returning -errno. Our dual convention for function return = values will cause many bugs like this. The error case here is when rte_pdump_enable_bpf() fails. This is return from pdump_enable in pdump library. The library does follow the rte_errno convention correctly. But the error message wasn't reporting correctly which would lead to confus= ing error in case where multiple invocations failed. It is not possible to do multiple captures on same interface. And not worth= modifying the library (would require multiple copies and ref counts) to handle this case.