From patchwork Fri Mar 1 17:57:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 137766 X-Patchwork-Delegate: david.marchand@redhat.com 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 03D5843BCF; Fri, 1 Mar 2024 18:59:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AA647433B0; Fri, 1 Mar 2024 18:58:57 +0100 (CET) Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by mails.dpdk.org (Postfix) with ESMTP id 71CFA43356 for ; Fri, 1 Mar 2024 18:58:55 +0100 (CET) Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-5cddfe0cb64so1744800a12.0 for ; Fri, 01 Mar 2024 09:58:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1709315934; x=1709920734; 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=lGQdDTVn0PvkRIF4u+Q6CDCVKPY8i2MnOJieV6tbf/Y=; b=VYHTYTCxWtfYw1AAFi6f0SsLHgc72qAqbs3t/wNd95o2RRazpcQvp/O/GzwkyUNb/L oqBS50A2p9E+YEzPnJxmy5AvR+9+oq4abBN75CogfuEU8Eb4Fw+uV0IYKbcby8OcSBnX aMWJHCeFAnNPihWnw02zAXAWT/WSnTdWp8JONGlCnbwQGx8YDFsQkEDoxs70wsB6jqga FTTZuC9h4cF3kfNmv8qBvu7Y11S2imFKoAwQa5wZ1FTMb60ByoYFRLS90jefv/PlsBtW vskckuuH5JV+MpLeqVSelMm/7Vja9TyHjM9vn6vQqecGt2+DVz11tpGCFx6JYp6IdpA3 JCUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709315934; x=1709920734; 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=lGQdDTVn0PvkRIF4u+Q6CDCVKPY8i2MnOJieV6tbf/Y=; b=Bl9uclfmlfrPNtcwtn9LepeaVhGu3i6hS99Iw68mIQ69Xgih3q+e+rRm6KkCA+a1Be smFSc6ZmMxipfXuvJFrCc7l5wgH7vcJ8KnSUD07rS5m26q1gnnly8qOFSnxpCpUZxaOR tgHV/V+J7Fn/zfUx895BIuSBU9zCPFdjMHiD2t94zRiF1mogUXZ1D1avlK9Cw2ld5ZZ1 WKnW5G3vNHrQTxmZPaTnG5/eYwOvQ9ZQFdCRoiYI3Dw1HlpowJnGKgQwzHPqwZkiUpwt iipRjsw+7//h1fwCubX1+hLYqFSNFtDAZ1X+ABp7/dPAmblh2YEdF7WWa8ck4XlUMLwF vg1Q== X-Gm-Message-State: AOJu0YyrqELpnN8QC7sa3jinIB/86dI4QYYJt8hEqy7bi6TsX3aCZ3fo QpteFBdCCZ19i1RrJWupGIns53Iqh83sJjb3mHSualmxVBlXMR/Xc12Tf/NiKH0S666q0Y9Bl5v 7V2KKgg== X-Google-Smtp-Source: AGHT+IFbvWZx9n1kOVk+Y8YiRHlmFyCmtA/cf3GnWOflaU51BKAu03doKltUnGV5edZUj0chlDQHxQ== X-Received: by 2002:a05:6a20:7f99:b0:1a0:f3d0:15af with SMTP id d25-20020a056a207f9900b001a0f3d015afmr2182029pzj.34.1709315934607; Fri, 01 Mar 2024 09:58:54 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id bw7-20020a056a02048700b005e438ea2a5asm2938828pgb.53.2024.03.01.09.58.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 09:58:54 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Keith Wiles Subject: [PATCH 2/6] net/tap: log if netlink ext ack not possible Date: Fri, 1 Mar 2024 09:57:07 -0800 Message-ID: <20240301175842.159967-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240301175842.159967-1-stephen@networkplumber.org> References: <20240301175842.159967-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 kernel doesn't support external ack, log that to aide in any problem diagnosis. Coverity issue: 362848 Fixes: 647909bcf34b ("net/tap: use netlink extended ack support") Signed-off-by: Stephen Hemminger --- drivers/net/tap/tap_netlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/tap/tap_netlink.c b/drivers/net/tap/tap_netlink.c index 75af3404b035..d9c260127d52 100644 --- a/drivers/net/tap/tap_netlink.c +++ b/drivers/net/tap/tap_netlink.c @@ -72,7 +72,8 @@ tap_nl_init(uint32_t nl_groups) #ifdef NETLINK_EXT_ACK /* Ask for extended ACK response. on older kernel will ignore request. */ - setsockopt(fd, SOL_NETLINK, NETLINK_EXT_ACK, &one, sizeof(one)); + if (setsockopt(fd, SOL_NETLINK, NETLINK_EXT_ACK, &one, sizeof(one)) < 0) + TAP_LOG(NOTICE, "Unable to request netlink error information"); #endif if (bind(fd, (struct sockaddr *)&local, sizeof(local)) < 0) {