Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp553988lqo; Wed, 8 May 2024 07:57:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWQmZhv5uKgIFSRfmTnKRAIq0iFTIEq1lyqjIZow6WcLtgrwNTgXVZmIo76bPWY2PgEqUh2sKTcWRYW8g01SOqWEPd1uN6BkBRpH/tncA== X-Google-Smtp-Source: AGHT+IFJMxwIOYsXAmUy3qJEgVupVkxbaRBUjeplOQtOj5ZAhhGYEjNLVwZ91FxexA2uq+UGjYH+ X-Received: by 2002:a05:6a20:9f88:b0:1ad:6c5:4ea1 with SMTP id adf61e73a8af0-1afc8db5479mr3689147637.41.1715180237821; Wed, 08 May 2024 07:57:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715180237; cv=pass; d=google.com; s=arc-20160816; b=vbucSLMt/RjfGn0wg6g4ofEBTkQIouw233LlyPYUQsfay3l2WPp1zjruFj3KCTlVVL FT+mmPfoz6YZKJtMV27QS+hG5bMj+5eK26+eOGrr6PAWUo0SazbUw0Y3q1UceFhcgNLQ hAoPoyon8A+1YCvDTQyt6FGoEblE6KeW08Iaa5osEiX28cjf71HT3VmLBP32mlitW/Gw jHynk//BwNZ+BaCZkkvjDx1Ssok4w/SeQ79yaQKBKFp4qGYSLTI7DLZjMxdrxLw4vH2o JdhhtDpI/U+a7/+5+QdBeUXAx/HHDk4I30/26L1ukhEb+q8rrhVTrCRjqp46S0NwZ/Zs 0w0Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=VnfTHfy3OAGEjSpjrG3kSU9KxOnYUqHWnYlv/AVzh4s=; fh=rqK/kbiHXEsDhCYp7FUmdresDQTW1BsTvC4AiyDFYWc=; b=iXwMLxpN/PFubQuA/rwUvCQJUEA/JmJsC8DMRj/XeEB9MVBENQHfBuexqx4mo0QeBd /iZviMzUSWLSxB87DFqTRI1SF/76+LH/pZYm/yR0Yz3G4uFjtgTp532Kv92OtOVn1vEB NISUKyhSnmeSklUvc1YFPStn3SFyfdDEdrUVYzRjLWk8qsAbORqm+MeF5m356Og5jxhc wGNWWB5ASwh8KIz7+LSUhNw3y1FymyzuSuXoZbtOzx8ZyxtY3lEjPrgz/JxM+c5WEb3n 5RX2KcC68pLnbeQuxdXbThf5RCOfA++WKWus6XVkJ6GGwCEdYYCmlBQ0OH/3TCGVUHt7 oFEw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@fiberby.net header.s=202008 header.b=nbz75mml; arc=pass (i=1 spf=pass spfdomain=fiberby.net dkim=pass dkdomain=fiberby.net dmarc=pass fromdomain=fiberby.net); spf=pass (google.com: domain of linux-kernel+bounces-173428-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173428-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fiberby.net Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id p18-20020a056a000b5200b006e6b1833736si10258284pfo.215.2024.05.08.07.57.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 07:57:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173428-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@fiberby.net header.s=202008 header.b=nbz75mml; arc=pass (i=1 spf=pass spfdomain=fiberby.net dkim=pass dkdomain=fiberby.net dmarc=pass fromdomain=fiberby.net); spf=pass (google.com: domain of linux-kernel+bounces-173428-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173428-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fiberby.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C1861B26A8C for ; Wed, 8 May 2024 14:43:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1F30D86AC4; Wed, 8 May 2024 14:43:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fiberby.net header.i=@fiberby.net header.b="nbz75mml" Received: from mail1.fiberby.net (mail1.fiberby.net [193.104.135.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0EAEF8625D; Wed, 8 May 2024 14:43:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.104.135.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715179393; cv=none; b=uiWnnb0ukATEXgZ+VhaJ9nMEnbHUpjzW5bqAeG8drxRZMwOxWqEpaWsDH29An5X4vreJyaagxG2+lUezCQ2tUUBfBaHW/k+V7ikf2STd+ViUyWLnGhEDubkl6eKhtUkZvSg01xelzTXZ4NGqf0bGUSnuFQ5rBaoluQDWH4vr5CI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715179393; c=relaxed/simple; bh=kSyTfrfXcWri7MyzitgNTa72sX8B8JLhvaUFNBJ+jQs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=D3XToruNN9eH2oi++vDkIpuw1qqj4509NHhQa+M4hitNR/4pmpOzgMDrH8eqy7Fu0Vys4+ftP7maOONE/a1p0yGnCi9j84rnZPV83/0o+o7ptJxdUsEtIiVIpLURX4LzaDWz/QHFaDEKWnd1WA58UJX9bStVP38rEmkLfVukX28= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=fiberby.net; spf=pass smtp.mailfrom=fiberby.net; dkim=pass (2048-bit key) header.d=fiberby.net header.i=@fiberby.net header.b=nbz75mml; arc=none smtp.client-ip=193.104.135.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=fiberby.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fiberby.net Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id 964F3600B6; Wed, 8 May 2024 14:34:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715178867; bh=kSyTfrfXcWri7MyzitgNTa72sX8B8JLhvaUFNBJ+jQs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nbz75mmlI4cNyt4jH82Dj+4VGBN24aXTr1WBV0cRC7BzbPG2jcFM8wNHFpiLzLWAn RayF/jYBiSR4PkMhrqmfP5Kw+RUN0MkvqXD8/DyEm3aitkVn3PKC4KTTu7bnPA7d2W QfA2ERx2A5qdqUM/xfqOvazqS3zlc+YhO1dfTSDY+BJ8ud9Zw/7FAZVOEKE8JBUkSX 8ipRW8goW3orGP0Xppy1Nrcv2BuuSDUXmxf1tka/mRgmXYMpHGnH1C5lYpWol1aNOu x9xqe+3GmbMCRb0CVOek9eu3hNL7SMasPctaRYcDPOzYJpWckiimT+87AItQpaHMMv 13VYpHZT3picQ== Received: by x201s (Postfix, from userid 1000) id CD43320472D; Wed, 08 May 2024 14:34:05 +0000 (UTC) From: =?UTF-8?q?Asbj=C3=B8rn=20Sloth=20T=C3=B8nnesen?= To: netdev@vger.kernel.org Cc: =?UTF-8?q?Asbj=C3=B8rn=20Sloth=20T=C3=B8nnesen?= , linux-kernel@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Manish Chopra , Przemek Kitszel Subject: [PATCH net-next v2 04/14] net: qede: use extack in qede_flow_parse_v6_common() Date: Wed, 8 May 2024 14:33:52 +0000 Message-ID: <20240508143404.95901-5-ast@fiberby.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240508143404.95901-1-ast@fiberby.net> References: <20240508143404.95901-1-ast@fiberby.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Convert qede_flow_parse_v6_common() to take extack, and drop the edev argument. Convert DP_NOTICE call to use NL_SET_ERR_MSG_MOD instead. Pass extack in calls to qede_flow_parse_ports() and qede_set_v6_tuple_to_profile(). In calls to qede_flow_parse_v6_common(), use NULL as extack for now, until a subsequent patch makes extack available. Only compile tested. Signed-off-by: Asbjørn Sloth Tønnesen --- drivers/net/ethernet/qlogic/qede/qede_filter.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c b/drivers/net/ethernet/qlogic/qede/qede_filter.c index 6f4c4a5d6c77..f5f8bbe8a64c 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_filter.c +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c @@ -1722,8 +1722,9 @@ qede_flow_parse_ports(struct flow_rule *rule, struct qede_arfs_tuple *t, } static int -qede_flow_parse_v6_common(struct qede_dev *edev, struct flow_rule *rule, - struct qede_arfs_tuple *t) +qede_flow_parse_v6_common(struct flow_rule *rule, + struct qede_arfs_tuple *t, + struct netlink_ext_ack *extack) { struct in6_addr zero_addr, addr; int err; @@ -1739,8 +1740,8 @@ qede_flow_parse_v6_common(struct qede_dev *edev, struct flow_rule *rule, memcmp(&match.mask->src, &addr, sizeof(addr))) || (memcmp(&match.key->dst, &zero_addr, sizeof(addr)) && memcmp(&match.mask->dst, &addr, sizeof(addr)))) { - DP_NOTICE(edev, - "Do not support IPv6 address prefix/mask\n"); + NL_SET_ERR_MSG_MOD(extack, + "Do not support IPv6 address prefix/mask"); return -EINVAL; } @@ -1748,11 +1749,11 @@ qede_flow_parse_v6_common(struct qede_dev *edev, struct flow_rule *rule, memcpy(&t->dst_ipv6, &match.key->dst, sizeof(addr)); } - err = qede_flow_parse_ports(rule, t, NULL); + err = qede_flow_parse_ports(rule, t, extack); if (err) return err; - return qede_set_v6_tuple_to_profile(t, &zero_addr, NULL); + return qede_set_v6_tuple_to_profile(t, &zero_addr, extack); } static int @@ -1789,7 +1790,7 @@ qede_flow_parse_tcp_v6(struct qede_dev *edev, struct flow_rule *rule, tuple->ip_proto = IPPROTO_TCP; tuple->eth_proto = htons(ETH_P_IPV6); - return qede_flow_parse_v6_common(edev, rule, tuple); + return qede_flow_parse_v6_common(rule, tuple, NULL); } static int @@ -1809,7 +1810,7 @@ qede_flow_parse_udp_v6(struct qede_dev *edev, struct flow_rule *rule, tuple->ip_proto = IPPROTO_UDP; tuple->eth_proto = htons(ETH_P_IPV6); - return qede_flow_parse_v6_common(edev, rule, tuple); + return qede_flow_parse_v6_common(rule, tuple, NULL); } static int -- 2.43.0