From patchwork Tue May 7 10:44:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= X-Patchwork-Id: 13656619 X-Patchwork-Delegate: kuba@kernel.org 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 E875015665E; Tue, 7 May 2024 10:44:48 +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=1715078690; cv=none; b=TGkT+OWYsul7BG5QTEoLO0ftgcWH8cjfMFXWBe3vKBFCeljeLl3yG4X4DaJxq/053ikH+sepkF+rjvorg3UF0xdMiqfNSyeoox5cGbb19auaCzoCUgWxBtVbLvndlgHK+TSdyoe8xGrak6/osKpCgZkWgilYEg1wtJ+JSNsoeNU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715078690; c=relaxed/simple; bh=2aeTb4kDibVlX9ag4RZ1UVYwxrN6jOBKO27gkQzCgRM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=TeivseoLiUU2uLNF6h2g3oQS2JiZoLoHxvx0fzxlPmHBMP1RsE2ttKujnINarEnT7QfuNM606A8AMv9oreXh5F3g1az4fSNy2Z30Us4K8l9a3TZcILI6CZraNxu/UECYd4CEYhe9pA0jPj2+LThjRcQMuQldPzKZxURnG0J/44Y= 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=RR1oKyL3; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fiberby.net header.i=@fiberby.net header.b="RR1oKyL3" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id ADA516017A; Tue, 7 May 2024 10:44:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715078675; bh=2aeTb4kDibVlX9ag4RZ1UVYwxrN6jOBKO27gkQzCgRM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RR1oKyL3cL4XmEDIZ5FcfmN0u9rFwMZjXCAjurpU713yZo0KHWwN/9GAmKyXd0kt0 kpWqj5vvSdc+idm7KAmfBVr3ECel0Jq6ejcNmR6cSSw2wEeguKxcuejxfWf98tc9Z2 4EqaXFO1jkysJT9ixnC8gw77QoN4M8FQ8w2MV8JEU8mmRZgU9saoWWhL8l8rS5a0eR TlhoRKkiEZMxp+Bja+tHtJCVpTBujMhN1PMeQK7wy6SvCakjPcPsRJBfO1evuEVWEa vXs/Nrzsm9G3BWr71SFBcadp3YHJouQy0IdnqkaW02l81qbdZu4GHXbJ7RX5Rh0ZDk X1ZmFWxJRCpzA== Received: by x201s (Postfix, from userid 1000) id 7018F2032CC; Tue, 07 May 2024 10:44:22 +0000 (UTC) From: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= To: netdev@vger.kernel.org Cc: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= , linux-kernel@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Manish Chopra Subject: [PATCH net-next 01/14] net: qede: use extack in qede_flow_parse_ports() Date: Tue, 7 May 2024 10:44:02 +0000 Message-ID: <20240507104421.1628139-2-ast@fiberby.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240507104421.1628139-1-ast@fiberby.net> References: <20240507104421.1628139-1-ast@fiberby.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Convert qede_flow_parse_ports to use extack, and drop the edev argument. Convert DP_NOTICE call to use NL_SET_ERR_MSG_MOD instead. In calls to qede_flow_parse_ports(), 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 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c b/drivers/net/ethernet/qlogic/qede/qede_filter.c index ded48523c383..3995baa2daa6 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_filter.c +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c @@ -1700,7 +1700,7 @@ static int qede_parse_actions(struct qede_dev *edev, } static int -qede_flow_parse_ports(struct qede_dev *edev, struct flow_rule *rule, +qede_flow_parse_ports(struct netlink_ext_ack *extack, struct flow_rule *rule, struct qede_arfs_tuple *t) { if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_PORTS)) { @@ -1709,7 +1709,8 @@ qede_flow_parse_ports(struct qede_dev *edev, struct flow_rule *rule, flow_rule_match_ports(rule, &match); if ((match.key->src && match.mask->src != htons(U16_MAX)) || (match.key->dst && match.mask->dst != htons(U16_MAX))) { - DP_NOTICE(edev, "Do not support ports masks\n"); + NL_SET_ERR_MSG_MOD(extack, + "Do not support ports masks"); return -EINVAL; } @@ -1747,7 +1748,7 @@ 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(edev, rule, t); + err = qede_flow_parse_ports(NULL, rule, t); if (err) return err; @@ -1774,7 +1775,7 @@ qede_flow_parse_v4_common(struct qede_dev *edev, struct flow_rule *rule, t->dst_ipv4 = match.key->dst; } - err = qede_flow_parse_ports(edev, rule, t); + err = qede_flow_parse_ports(NULL, rule, t); if (err) return err; From patchwork Tue May 7 10:44:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= X-Patchwork-Id: 13656617 X-Patchwork-Delegate: kuba@kernel.org 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 4E69C152E15; Tue, 7 May 2024 10:44:48 +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=1715078690; cv=none; b=Z47oYswcZysh+ivKX10udSVX3x/GSyt9/1T//nb2zk5W6lJ5AwxM/fS3BUxVIKnMLxjG3ycTR5ejwr00eFkOhdaRjiPSfhXOn+r6zhAPAFDspJVEiao0sPVCyW87NPirG95MiC2fnHwDvoMwxGFeE+K9nzniqKMoTn/qL5NEhS4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715078690; c=relaxed/simple; bh=yKV+ra/o9RT6b8lN0TOrWt0cfArneZMIZQPZ6W8+EeQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ueclHdodDBH3mu+kdWpUgOZPI/KiVa0GmKdMuea0tXK3u0TOxWVtzoYayzDXfLyxlE/g3STEnDLXe2b+1ZCyr/akgbDGA0d36TNdDx/xrnF4cRECYC6XrmrVgVBdGLif4RzZXPFIBYP67jlF+EQagvosfPJb1jfVDsNvqjNQ8R4= 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=l3IOAuoR; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fiberby.net header.i=@fiberby.net header.b="l3IOAuoR" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id 324CA600B6; Tue, 7 May 2024 10:44:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715078675; bh=yKV+ra/o9RT6b8lN0TOrWt0cfArneZMIZQPZ6W8+EeQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l3IOAuoRpnw//T8YG3NOsMC5/VQ/ZleUrkU+FcyroZ9mBiaG73qyU7T5HZ5Ft0VHn J+3X5CZ2kkBtyUo+7ata5hB7RrehlmSL9Iu4Z670P3gYOS8/FO4YSNQ0J1nFvB+r+8 axE0ezBSAc3GmF3y/YvGlzTrAan6Y6r0OHZ/5dhjknWCORmqtPXNx+G4bCMOEUu9AB rUFIIGO7dl7Uozd7ty3pwTy59HPCbcejQeqnHgLwoX78bS84ZatUgDx6ZIVVs+RClK F1nNRd8aMjnNm9H9Shps9hN0vL6wd/oKh9ZKpvMlW89VnB4W+lg1i2YSmn4sliosVS Jqnkh3I2JLj+g== Received: by x201s (Postfix, from userid 1000) id B679A2034AF; Tue, 07 May 2024 10:44:22 +0000 (UTC) From: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= To: netdev@vger.kernel.org Cc: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= , linux-kernel@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Manish Chopra Subject: [PATCH net-next 02/14] net: qede: use extack in qede_set_v6_tuple_to_profile() Date: Tue, 7 May 2024 10:44:03 +0000 Message-ID: <20240507104421.1628139-3-ast@fiberby.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240507104421.1628139-1-ast@fiberby.net> References: <20240507104421.1628139-1-ast@fiberby.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Convert qede_set_v6_tuple_to_profile() to take extack, and drop the edev argument. Convert DP_INFO call to use NL_SET_ERR_MSG_MOD instead. In calls to qede_set_v6_tuple_to_profile(), 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c b/drivers/net/ethernet/qlogic/qede/qede_filter.c index 3995baa2daa6..19ffb0823d55 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_filter.c +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c @@ -1549,7 +1549,7 @@ static int qede_set_v4_tuple_to_profile(struct qede_dev *edev, return 0; } -static int qede_set_v6_tuple_to_profile(struct qede_dev *edev, +static int qede_set_v6_tuple_to_profile(struct netlink_ext_ack *extack, struct qede_arfs_tuple *t, struct in6_addr *zaddr) { @@ -1573,7 +1573,7 @@ static int qede_set_v6_tuple_to_profile(struct qede_dev *edev, !memcmp(&t->src_ipv6, zaddr, sizeof(struct in6_addr))) { t->mode = QED_FILTER_CONFIG_MODE_IP_DEST; } else { - DP_INFO(edev, "Invalid N-tuple\n"); + NL_SET_ERR_MSG_MOD(extack, "Invalid N-tuple"); return -EOPNOTSUPP; } @@ -1752,7 +1752,7 @@ qede_flow_parse_v6_common(struct qede_dev *edev, struct flow_rule *rule, if (err) return err; - return qede_set_v6_tuple_to_profile(edev, t, &zero_addr); + return qede_set_v6_tuple_to_profile(NULL, t, &zero_addr); } static int From patchwork Tue May 7 10:44:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= X-Patchwork-Id: 13656611 X-Patchwork-Delegate: kuba@kernel.org 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 9BD0614EC4D; Tue, 7 May 2024 10:44:43 +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=1715078686; cv=none; b=aTMQ2tzPMmHaUp9yaGijB+gFjAe6cenfkbFXoQG8XSyj23rqpZ24t88vOx36TiB6VfMvBKxARLXcRNilyE5NZ/GTot3K3PYEw2dJsFpWfB2Evg14bmInMR7hpB1vqzfON8+rW/HJYx5fswdiNLt+ZA4hCUaxRfqmDH3g10ypMMA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715078686; c=relaxed/simple; bh=Gwag9vXXeqdR/KFA9yZpAgXCO4O5UeNt+6Mvl0e8F8o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tC7jud1Gchqxz8UAOeGMcFdHV2odF9BFDeVyhp6maaNsgcOqE3GJwMQqO99k5pEBobo6BTU1AlRjwYoBQbpwUw2DlhL/IgDrn7knkqhJtd9bNdjc9XXsCpiXsNwXJ8XAWzPhtBysG1QSRLrktXbffog2lC+ds1iFUmatUmMbfGg= 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=LS130bTv; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fiberby.net header.i=@fiberby.net header.b="LS130bTv" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id CADD8600A2; Tue, 7 May 2024 10:44:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715078674; bh=Gwag9vXXeqdR/KFA9yZpAgXCO4O5UeNt+6Mvl0e8F8o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LS130bTvhWbU1xArtVuPbSmM6z2H5RnnbGvz+xt6SwnZPtxS3j5IRV3EpbhLoxkKS ptegN7THeHEmXHcvZeIeixGnTewK3lWwlM2iX6J0Kv1uSObYST2yaVH1fe7LKvSH7x ELXrvSDO9s6KnotITPmjXQzCjqMzfiiWDtWV7+lLKm0fTrtSvP4UhIQPg04oAQaNZL 0Kn4mhiGD0aCPGmEpujVM+K7aocs2XsiMu/J8YJ+ZWMZLPOIskEmtRSmDlRfsVqZFe tVKilKk4jaLUdNVneBC5IBLJjyCvN4ptamf6+SZBwXNMWxVVNHj3QUpt6hQNDu6gW1 U9GjN4h2qn/GQ== Received: by x201s (Postfix, from userid 1000) id 091382035F9; Tue, 07 May 2024 10:44:23 +0000 (UTC) From: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= To: netdev@vger.kernel.org Cc: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= , linux-kernel@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Manish Chopra Subject: [PATCH net-next 03/14] net: qede: use extack in qede_set_v4_tuple_to_profile() Date: Tue, 7 May 2024 10:44:04 +0000 Message-ID: <20240507104421.1628139-4-ast@fiberby.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240507104421.1628139-1-ast@fiberby.net> References: <20240507104421.1628139-1-ast@fiberby.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Convert qede_set_v4_tuple_to_profile() to take extack, and drop the edev argument. Convert DP_INFO call to use NL_SET_ERR_MSG_MOD instead. In calls to qede_set_v4_tuple_to_profile(), 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c b/drivers/net/ethernet/qlogic/qede/qede_filter.c index 19ffb0823d55..0d429f5b9c57 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_filter.c +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c @@ -1520,7 +1520,7 @@ static int qede_flow_spec_validate_unused(struct qede_dev *edev, return 0; } -static int qede_set_v4_tuple_to_profile(struct qede_dev *edev, +static int qede_set_v4_tuple_to_profile(struct netlink_ext_ack *extack, struct qede_arfs_tuple *t) { /* We must have Only 4-tuples/l4 port/src ip/dst ip @@ -1538,7 +1538,7 @@ static int qede_set_v4_tuple_to_profile(struct qede_dev *edev, t->dst_ipv4 && !t->src_ipv4) { t->mode = QED_FILTER_CONFIG_MODE_IP_DEST; } else { - DP_INFO(edev, "Invalid N-tuple\n"); + NL_SET_ERR_MSG_MOD(extack, "Invalid N-tuple"); return -EOPNOTSUPP; } @@ -1779,7 +1779,7 @@ qede_flow_parse_v4_common(struct qede_dev *edev, struct flow_rule *rule, if (err) return err; - return qede_set_v4_tuple_to_profile(edev, t); + return qede_set_v4_tuple_to_profile(NULL, t); } static int From patchwork Tue May 7 10:44:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= X-Patchwork-Id: 13656612 X-Patchwork-Delegate: kuba@kernel.org 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 DA32BAD5D; Tue, 7 May 2024 10:44:43 +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=1715078687; cv=none; b=GWep9ep/uq30zLWz0Phq13cSVFaQWTlBnHY+j06gqVOZE1HJqM78CibH9S5sKiGnsFhoM4TMqU2kxjSIZHDd78l/8CP3RNIE2l3kFeoLQVwHVoZbLxPcOr6mrlsrvJiyosWO01azCChW66rxPhD+5VjPvP2AGTCJYd6B854c1sk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715078687; c=relaxed/simple; bh=EpF0Wn59BtuNgD/0/x/C+iR8eVWPwcN13ZAKr2kNM2M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lAasTuObJTN5FjgD42fDu9HeZyMOZeaBvU1DN+nnHoh1WPcm9mtwPHIb5Ri7ImwCYQbR0OEF1aImESgrImfmOh/3K0sLskWuFZs9+eJg6oRLf9NsRSiQ7QY1d1KoE+PGcEp7ip4ieMvLVk4fE9YQU+FMfRTCD+4nK3jsUJa+eP8= 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=D7eB5DRe; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fiberby.net header.i=@fiberby.net header.b="D7eB5DRe" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id 3D014600DC; Tue, 7 May 2024 10:44:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715078675; bh=EpF0Wn59BtuNgD/0/x/C+iR8eVWPwcN13ZAKr2kNM2M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D7eB5DReVktLdgRHC9DMQ2aoVgHUk+Xq27OYF/abTr/kApJVxwJQ3MrhzWL7urCPD x5HZWtnS7BCDS5f+YKX7gUu46MHBd/b8mMT8lmkwq7SbwICQOMHgtBUQsjM58aqjaR 8k9LZCQjGjwXab+klo0VjOqt5fvi2JTZDQ7VFnX1vls0Dj29XbAlGZXjonAUZevmPX qR1Gvkak9/lMgzNROqgW8QiXY2QzogXtsxijb0ShwzEwYdkegvPFxnh65L2YJ+jAVE gQe37Yl4uAGAoKzB+MFOtGUh2UHWZYTKllZhjPYsWD4rT0e/UB4KUq11uiKqIMslml MGbBirh062OMA== Received: by x201s (Postfix, from userid 1000) id 43598203663; Tue, 07 May 2024 10:44:23 +0000 (UTC) From: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= To: netdev@vger.kernel.org Cc: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= , linux-kernel@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Manish Chopra Subject: [PATCH net-next 04/14] net: qede: use extack in qede_flow_parse_v6_common() Date: Tue, 7 May 2024 10:44:05 +0000 Message-ID: <20240507104421.1628139-5-ast@fiberby.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240507104421.1628139-1-ast@fiberby.net> References: <20240507104421.1628139-1-ast@fiberby.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org 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 | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c b/drivers/net/ethernet/qlogic/qede/qede_filter.c index 0d429f5b9c57..d151b64a0436 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_filter.c +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c @@ -1722,7 +1722,8 @@ qede_flow_parse_ports(struct netlink_ext_ack *extack, struct flow_rule *rule, } static int -qede_flow_parse_v6_common(struct qede_dev *edev, struct flow_rule *rule, +qede_flow_parse_v6_common(struct netlink_ext_ack *extack, + struct flow_rule *rule, struct qede_arfs_tuple *t) { struct in6_addr zero_addr, addr; @@ -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(NULL, rule, t); + err = qede_flow_parse_ports(extack, rule, t); if (err) return err; - return qede_set_v6_tuple_to_profile(NULL, t, &zero_addr); + return qede_set_v6_tuple_to_profile(extack, t, &zero_addr); } 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(NULL, rule, tuple); } 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(NULL, rule, tuple); } static int From patchwork Tue May 7 10:44:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= X-Patchwork-Id: 13656623 X-Patchwork-Delegate: kuba@kernel.org 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 D533315664F; Tue, 7 May 2024 10:44:48 +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=1715078691; cv=none; b=nGIENnQ6Uy1eTUlAqLXxSE4QmklKWG9ZGWqJhB2fiQWqIpUENqTCjvIQRC+15adLBkJwnTjroupnIKO68xnPvrk7ScVYf4Rcs3bx7P1MmPVCdbRh0baFE7lIgGng9mukyE2sGMMFPBcEVYHEezrCAJjFuv1OyJUGeLIIcSsbnYY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715078691; c=relaxed/simple; bh=zY/EjcYVP/zTXYlcoTUN4av1Sp3C6so43ZjWoY3jWsE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=CZBH4kNltkkBePGaArgHAqWsfVMmaXFzY1IPf9YBlrz34yLr6ZB6Kio9JJOTe1U47iyYO5prpF2heebYAGSwZJaJVBWMY+278h6xRbd0Yrr4av6Cm03CBRVQW119Jeu41I4ZeKSV0Fz5HN6hxZ3VztsJMA4zle0Nw71easbpi9c= 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=D2sAopUp; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fiberby.net header.i=@fiberby.net header.b="D2sAopUp" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id AAD3760178; Tue, 7 May 2024 10:44:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715078675; bh=zY/EjcYVP/zTXYlcoTUN4av1Sp3C6so43ZjWoY3jWsE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D2sAopUpIaXtBeS63XlHyU7Ir1cOr0aBMmZ0Sivg+1KMVpIUP3x49BLUfFFUVvp8r Luzlps9rDdc4Z6t+1ExWK8dH44VMyyjHNEDRyLCGfZEHRxpOYvq151PpPC+Ie2hAkk Hpxndb5ZfvsOcErdviKKxX6vhWUesKwliFZHmrZfUaT9jQ9a7A6g/cVDw3RegNUpZb ENZELJUT6zuRnZCFCfl6zSVA5VZ2cLVNtF0CRxJnJvOCl6j0jz8PKhGCDwieh+boEi uXceSgaf/kwl9k/CGHTTAaVdMcV41cg+8KwxUfaQlYcy6/YWv6Gzdaw9bJf6HE6UFm sbfouEJJqLHRg== Received: by x201s (Postfix, from userid 1000) id 774C020372E; Tue, 07 May 2024 10:44:23 +0000 (UTC) From: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= To: netdev@vger.kernel.org Cc: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= , linux-kernel@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Manish Chopra Subject: [PATCH net-next 05/14] net: qede: use extack in qede_flow_parse_v4_common() Date: Tue, 7 May 2024 10:44:06 +0000 Message-ID: <20240507104421.1628139-6-ast@fiberby.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240507104421.1628139-1-ast@fiberby.net> References: <20240507104421.1628139-1-ast@fiberby.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Convert qede_flow_parse_v4_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_v4_tuple_to_profile(). In calls to qede_flow_parse_v4_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 | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c b/drivers/net/ethernet/qlogic/qede/qede_filter.c index d151b64a0436..056384362037 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_filter.c +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c @@ -1757,8 +1757,9 @@ qede_flow_parse_v6_common(struct netlink_ext_ack *extack, } static int -qede_flow_parse_v4_common(struct qede_dev *edev, struct flow_rule *rule, - struct qede_arfs_tuple *t) +qede_flow_parse_v4_common(struct netlink_ext_ack *extack, + struct flow_rule *rule, + struct qede_arfs_tuple *t) { int err; @@ -1768,7 +1769,8 @@ qede_flow_parse_v4_common(struct qede_dev *edev, struct flow_rule *rule, flow_rule_match_ipv4_addrs(rule, &match); if ((match.key->src && match.mask->src != htonl(U32_MAX)) || (match.key->dst && match.mask->dst != htonl(U32_MAX))) { - DP_NOTICE(edev, "Do not support ipv4 prefix/masks\n"); + NL_SET_ERR_MSG_MOD(extack, + "Do not support ipv4 prefix/masks"); return -EINVAL; } @@ -1776,11 +1778,11 @@ qede_flow_parse_v4_common(struct qede_dev *edev, struct flow_rule *rule, t->dst_ipv4 = match.key->dst; } - err = qede_flow_parse_ports(NULL, rule, t); + err = qede_flow_parse_ports(extack, rule, t); if (err) return err; - return qede_set_v4_tuple_to_profile(NULL, t); + return qede_set_v4_tuple_to_profile(extack, t); } static int @@ -1800,7 +1802,7 @@ qede_flow_parse_tcp_v4(struct qede_dev *edev, struct flow_rule *rule, tuple->ip_proto = IPPROTO_TCP; tuple->eth_proto = htons(ETH_P_IP); - return qede_flow_parse_v4_common(edev, rule, tuple); + return qede_flow_parse_v4_common(NULL, rule, tuple); } static int @@ -1820,7 +1822,7 @@ qede_flow_parse_udp_v4(struct qede_dev *edev, struct flow_rule *rule, tuple->ip_proto = IPPROTO_UDP; tuple->eth_proto = htons(ETH_P_IP); - return qede_flow_parse_v4_common(edev, rule, tuple); + return qede_flow_parse_v4_common(NULL, rule, tuple); } static int From patchwork Tue May 7 10:44:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= X-Patchwork-Id: 13656620 X-Patchwork-Delegate: kuba@kernel.org 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 D2905156645; Tue, 7 May 2024 10:44:48 +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=1715078690; cv=none; b=tJJdw7PtSgEL8kY7vxNn82E5TaxHnvZLPBiskAXvN/4gxYU+hwNhUP0XP3ltk3HFBgi2p02bMjWtLuN3XEG6JhUArAj9ioauj8idiDsSCwIeyLBjZfznCu/2vWQr3+6n0HA60nnUHjfsFBg2Z+ZLlvg6S2l1PxIsiFTeRH6r9uQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715078690; c=relaxed/simple; bh=fexZUMKg94UcObypKKVFWeyZLvhx3OcEH+Pt6uNVRzc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RPsby/nPKafQ5T7PUZiA5eC7STd1F7Ly9kZxIt8bIo8FvzhvURkBSmf1oyuOX5jDY+9/9PoMChMynaAfXYfdL2a9jfV681EbWhYpd0tjS/mopizUX/gPxGnPd84Rm9l1zgtyUDzf80Bui25Gd7G2G7gtCEdpZ1Sktvm2fbcHVYY= 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=RtHm+Yyc; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fiberby.net header.i=@fiberby.net header.b="RtHm+Yyc" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id 6648760173; Tue, 7 May 2024 10:44:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715078675; bh=fexZUMKg94UcObypKKVFWeyZLvhx3OcEH+Pt6uNVRzc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RtHm+YycOgIr3Y9uSch0Bdi4zbbt74gxiKWPpwlL9P/UIP+iBtj9LC1FzjeOs+1mR sv7YiblWMTZ3H7zoGQFfpWsmHLSVEaQXB9IDOE7bz3IZl2+5qiw2gGR6RzlDFfypP0 8MO+W85DuGaLa248WQNZodFG7lLSu15laztfODsgp1An550aB5dVL3T2dlqdDV0A6E c2FfGyAW4ETmCUJgQt9g5VCbCrIdwnnK3all/eWx8WfcrFaBl4udQVWrAwWjPcyCP9 HTxTxLEb2S8NFSLheAPR5/3SaKKcffIjH9JlYY99ncX1gDK6q9G3v3NvNFYYsmYmsJ s/mVDGkNQDsbw== Received: by x201s (Postfix, from userid 1000) id A50772037AE; Tue, 07 May 2024 10:44:23 +0000 (UTC) From: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= To: netdev@vger.kernel.org Cc: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= , linux-kernel@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Manish Chopra Subject: [PATCH net-next 06/14] net: qede: use extack in qede_flow_parse_tcp_v6() Date: Tue, 7 May 2024 10:44:07 +0000 Message-ID: <20240507104421.1628139-7-ast@fiberby.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240507104421.1628139-1-ast@fiberby.net> References: <20240507104421.1628139-1-ast@fiberby.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Convert qede_flow_parse_tcp_v6() to take extack, and drop the edev argument. Pass extack in call to qede_flow_parse_v6_common(). In call to qede_flow_parse_tcp_v6(), 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c b/drivers/net/ethernet/qlogic/qede/qede_filter.c index 056384362037..bc0e95ba1880 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_filter.c +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c @@ -1786,13 +1786,13 @@ qede_flow_parse_v4_common(struct netlink_ext_ack *extack, } static int -qede_flow_parse_tcp_v6(struct qede_dev *edev, struct flow_rule *rule, - struct qede_arfs_tuple *tuple) +qede_flow_parse_tcp_v6(struct netlink_ext_ack *extack, struct flow_rule *rule, + struct qede_arfs_tuple *tuple) { tuple->ip_proto = IPPROTO_TCP; tuple->eth_proto = htons(ETH_P_IPV6); - return qede_flow_parse_v6_common(NULL, rule, tuple); + return qede_flow_parse_v6_common(extack, rule, tuple); } static int @@ -1862,7 +1862,7 @@ qede_parse_flow_attr(struct qede_dev *edev, __be16 proto, if (ip_proto == IPPROTO_TCP && proto == htons(ETH_P_IP)) rc = qede_flow_parse_tcp_v4(edev, rule, tuple); else if (ip_proto == IPPROTO_TCP && proto == htons(ETH_P_IPV6)) - rc = qede_flow_parse_tcp_v6(edev, rule, tuple); + rc = qede_flow_parse_tcp_v6(NULL, rule, tuple); else if (ip_proto == IPPROTO_UDP && proto == htons(ETH_P_IP)) rc = qede_flow_parse_udp_v4(edev, rule, tuple); else if (ip_proto == IPPROTO_UDP && proto == htons(ETH_P_IPV6)) From patchwork Tue May 7 10:44:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= X-Patchwork-Id: 13656615 X-Patchwork-Delegate: kuba@kernel.org 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 4E72D152E1A; Tue, 7 May 2024 10:44:48 +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=1715078690; cv=none; b=ISAxOx9h1FC2uAneT11mb/HODta2QDUSXWBGesVry1KfduL4Q4JB1oRa0agNSpP0CYoWuS5f8oIfzFBlgZcweZW306uLSRXD5NIwy8PlTVdow1iOLeIXp/Ebe12aCtrjAH+X63M43BTBVadq8h6+olcn0tINCyw/DKiAIN96Cy4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715078690; c=relaxed/simple; bh=KwE2z5gtpz0YKaaeaNiJAhoZo0dGwsPTDh4T0pF6+aI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=k1eSflnDbIO9e0+WyZNi0/hGRJqJN+owbrMvNM9hjv9ReiGPMpbvjbWfU/eJVw5nl1lLpxn3MfPjGr/cQ+u3CAJc2HAZDsTv7/e+WMOBmeC4qNfaLeQZlqllEMFvKsMdSe6oIcEauhoRwicWIVLRaySxFK723noy/roABgR7Bvo= 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=Mw87Jy9m; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fiberby.net header.i=@fiberby.net header.b="Mw87Jy9m" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id 1FAD5600AF; Tue, 7 May 2024 10:44:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715078675; bh=KwE2z5gtpz0YKaaeaNiJAhoZo0dGwsPTDh4T0pF6+aI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mw87Jy9mq2zzgPnTycjIq/ewKs59JKKgof2ozFQJl4Gs2Xd2VH8/rNZ3qPXOb9pWt 47rFATEe3DDjmSlBQd02GUbYwlSVd1CjyYbZcJw9uZunfgG6bcfpyMVekmiekJsMw5 zqyP77vyWw1yI7So4PaCS5PEvCj7iqA+ClSv4qp+NW5OA/5BdHtY4mEeGX26TRnR/E 0ELT9XrwnrSs5z+KNq01ZB1SdTi8aqOBHK8/dcyDcTolH/v7dmAcAMw3b+XaI29+jQ koiJsO5jPDl65XnLtjtBM8nPCMBpEJhlNaRpI1RPbhqy2GbdS0Xnsl3fY3LiOqUhpP WiJckEpT9Au/g== Received: by x201s (Postfix, from userid 1000) id D05FB203931; Tue, 07 May 2024 10:44:23 +0000 (UTC) From: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= To: netdev@vger.kernel.org Cc: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= , linux-kernel@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Manish Chopra Subject: [PATCH net-next 07/14] net: qede: use extack in qede_flow_parse_tcp_v4() Date: Tue, 7 May 2024 10:44:08 +0000 Message-ID: <20240507104421.1628139-8-ast@fiberby.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240507104421.1628139-1-ast@fiberby.net> References: <20240507104421.1628139-1-ast@fiberby.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Convert qede_flow_parse_tcp_v4() to take extack, and drop the edev argument. Pass extack in call to qede_flow_parse_v4_common(). In call to qede_flow_parse_tcp_v4(), 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c b/drivers/net/ethernet/qlogic/qede/qede_filter.c index bc0e95ba1880..2c1f860d30e3 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_filter.c +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c @@ -1796,13 +1796,13 @@ qede_flow_parse_tcp_v6(struct netlink_ext_ack *extack, struct flow_rule *rule, } static int -qede_flow_parse_tcp_v4(struct qede_dev *edev, struct flow_rule *rule, - struct qede_arfs_tuple *tuple) +qede_flow_parse_tcp_v4(struct netlink_ext_ack *extack, struct flow_rule *rule, + struct qede_arfs_tuple *tuple) { tuple->ip_proto = IPPROTO_TCP; tuple->eth_proto = htons(ETH_P_IP); - return qede_flow_parse_v4_common(NULL, rule, tuple); + return qede_flow_parse_v4_common(extack, rule, tuple); } static int @@ -1860,7 +1860,7 @@ qede_parse_flow_attr(struct qede_dev *edev, __be16 proto, } if (ip_proto == IPPROTO_TCP && proto == htons(ETH_P_IP)) - rc = qede_flow_parse_tcp_v4(edev, rule, tuple); + rc = qede_flow_parse_tcp_v4(NULL, rule, tuple); else if (ip_proto == IPPROTO_TCP && proto == htons(ETH_P_IPV6)) rc = qede_flow_parse_tcp_v6(NULL, rule, tuple); else if (ip_proto == IPPROTO_UDP && proto == htons(ETH_P_IP)) From patchwork Tue May 7 10:44:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= X-Patchwork-Id: 13656610 X-Patchwork-Delegate: kuba@kernel.org 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 9BD6B14EC7E; Tue, 7 May 2024 10:44:43 +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=1715078686; cv=none; b=X7lVgNybmfCrX8MZAs5/8oVTH4FZoYsD9Fec7dAtIw1WL7bjaRd3375kTqWnxvdcbyrYqf7QqV2x+qjdJPgbSwXjLr2l+Ta9EVrqqdrV6X9E6ctIxOSWuRIvYlhiVXLtIsrT5F/BMSSK/RLFK0cZQlQzMjrCakdU4wGz0pmlLg8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715078686; c=relaxed/simple; bh=q9BQNm/ihZ/CfwkElHCQ6Teb3l9zBwR1XwqAUbRcuDI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=eYmOb95iZwY97bIzzdaYX1tZj5MJW6LPO0oxPLATiUNkbSXnoF46K+E+1WaSOLlMNWXOXIdm7zRZo/YAzGudsx7yWH3qmuTANeVgARfJx/xEw2DxUuMgAuQ1DoaeqI8mzb1EraUuthNI/c+ThtZnfuMtyZ9OzhIuo+c5+529fB8= 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=BEBSedbW; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fiberby.net header.i=@fiberby.net header.b="BEBSedbW" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id D5227600A5; Tue, 7 May 2024 10:44:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715078674; bh=q9BQNm/ihZ/CfwkElHCQ6Teb3l9zBwR1XwqAUbRcuDI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BEBSedbWn84/AfOqMmuy5Ld+h2Ucwiq4QhColSMPzRJq4ZGtktK8IzvA7Qk+WiPaS RrBPVLfa51mWHV1G9LhkK3VMme4+6f+inKOfsaOLXsN5yqu5WdIYfT7p6JgKu8cKx8 LCCsCMs2ZsHKdhb4RPrPVZnsN5Y2V2SSE/10gnNKBfhRN6Cx7jhBk7vriK96/r7wga pRX5kqVT/AUbuws91mv1FLy4ngAaGwa7Jbxoa6jg1iQGiDy8Ut4PQ9ZUjkL/V+qs3r ywCbM8h03SqQfsSuxzXuQKJRaElxbC1lfa70OUzogUMwzSto9ywobryF/seI8HbT7U HEe5ZG+jz6i1w== Received: by x201s (Postfix, from userid 1000) id 048B4203ABB; Tue, 07 May 2024 10:44:24 +0000 (UTC) From: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= To: netdev@vger.kernel.org Cc: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= , linux-kernel@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Manish Chopra Subject: [PATCH net-next 08/14] net: qede: use extack in qede_flow_parse_udp_v6() Date: Tue, 7 May 2024 10:44:09 +0000 Message-ID: <20240507104421.1628139-9-ast@fiberby.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240507104421.1628139-1-ast@fiberby.net> References: <20240507104421.1628139-1-ast@fiberby.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Convert qede_flow_parse_udp_v6() to take extack, and drop the edev argument. Pass extack in call to qede_flow_parse_v6_common(). In call to qede_flow_parse_udp_v6(), 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c b/drivers/net/ethernet/qlogic/qede/qede_filter.c index 2c1f860d30e3..e7b9aeef5a6f 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_filter.c +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c @@ -1806,13 +1806,13 @@ qede_flow_parse_tcp_v4(struct netlink_ext_ack *extack, struct flow_rule *rule, } static int -qede_flow_parse_udp_v6(struct qede_dev *edev, struct flow_rule *rule, - struct qede_arfs_tuple *tuple) +qede_flow_parse_udp_v6(struct netlink_ext_ack *extack, struct flow_rule *rule, + struct qede_arfs_tuple *tuple) { tuple->ip_proto = IPPROTO_UDP; tuple->eth_proto = htons(ETH_P_IPV6); - return qede_flow_parse_v6_common(NULL, rule, tuple); + return qede_flow_parse_v6_common(extack, rule, tuple); } static int @@ -1866,7 +1866,7 @@ qede_parse_flow_attr(struct qede_dev *edev, __be16 proto, else if (ip_proto == IPPROTO_UDP && proto == htons(ETH_P_IP)) rc = qede_flow_parse_udp_v4(edev, rule, tuple); else if (ip_proto == IPPROTO_UDP && proto == htons(ETH_P_IPV6)) - rc = qede_flow_parse_udp_v6(edev, rule, tuple); + rc = qede_flow_parse_udp_v6(NULL, rule, tuple); else DP_NOTICE(edev, "Invalid protocol request\n"); From patchwork Tue May 7 10:44:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= X-Patchwork-Id: 13656616 X-Patchwork-Delegate: kuba@kernel.org 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 74E7C154C05; Tue, 7 May 2024 10:44:48 +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=1715078690; cv=none; b=FTXnM2JnXOxd0yEzVq+aqXIABPWnN3C25NZJ3s2lGXubZe4/Klkb5R1+vPNzyvIiiESfnoJLlZAWTygtSub5HUw66/xdJ9HU5rHjNJGzMEc9KVMUCtI9uXSHGsXRr4dA6tafjjmwgwgzCpRbI0fpflkYQA4VLS/CYx5HuaQ6lQ8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715078690; c=relaxed/simple; bh=gpoxr0PXu/D1DRjyuxtdjhFXMSd2xA6w+2F/GrIHvy4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jtf/E285ioUjFV7aDJCgvYs7X9A+mF96BUqoSMzBMYxYs/Mbchzb7Fo9aQgS1CD/xlNeX+JImNW37hP+VI+U+WfF8ZQVqpucN+V2EA3pNwnDuVArmUGFgSxGUagAguzjC1vwyrzTUiGFFfVFMj90L2Gf3kvTnnOzotkSR0q2xwg= 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=ejKQLNTQ; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fiberby.net header.i=@fiberby.net header.b="ejKQLNTQ" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id 5B0AE60153; Tue, 7 May 2024 10:44:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715078675; bh=gpoxr0PXu/D1DRjyuxtdjhFXMSd2xA6w+2F/GrIHvy4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ejKQLNTQKgVk9u5NQzjetT6a7Z7HAZoa+Uiefu0VIwwyxXJlfSHGQeZZOShjB+fYd Hyw/hdYX4Nr6Vht0599UbhLBpcnDfvXMYCFiPJyZhlLw2wwar7D12RpUym+Zkyboi3 mImUt8yEfINbp60+iUEg6JFJa+orJZBGrLFNSdlm71+9VO2p6wP0DApiG+N8Z7gvdX 8uSBGlMy2H/5RK0zKXrLcZPkN1inW/3Xn0HdpRN1cGzUPOXN4VvMccZGMWMwNXcAn+ /cF//soS5HYCbk/pnWHBhA4LUfT4Gdv+OvzqJb+A3QvzPebXvaa+oxKkas/4JULPQV 5NN11DhYSAAgw== Received: by x201s (Postfix, from userid 1000) id 31FF6203B08; Tue, 07 May 2024 10:44:24 +0000 (UTC) From: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= To: netdev@vger.kernel.org Cc: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= , linux-kernel@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Manish Chopra Subject: [PATCH net-next 09/14] net: qede: use extack in qede_flow_parse_udp_v4() Date: Tue, 7 May 2024 10:44:10 +0000 Message-ID: <20240507104421.1628139-10-ast@fiberby.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240507104421.1628139-1-ast@fiberby.net> References: <20240507104421.1628139-1-ast@fiberby.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Convert qede_flow_parse_udp_v4() to take extack, and drop the edev argument. Pass extack in call to qede_flow_parse_v4_common(). In call to qede_flow_parse_udp_v4(), 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c b/drivers/net/ethernet/qlogic/qede/qede_filter.c index e7b9aeef5a6f..de6b9a60d4cf 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_filter.c +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c @@ -1816,13 +1816,13 @@ qede_flow_parse_udp_v6(struct netlink_ext_ack *extack, struct flow_rule *rule, } static int -qede_flow_parse_udp_v4(struct qede_dev *edev, struct flow_rule *rule, - struct qede_arfs_tuple *tuple) +qede_flow_parse_udp_v4(struct netlink_ext_ack *extack, struct flow_rule *rule, + struct qede_arfs_tuple *tuple) { tuple->ip_proto = IPPROTO_UDP; tuple->eth_proto = htons(ETH_P_IP); - return qede_flow_parse_v4_common(NULL, rule, tuple); + return qede_flow_parse_v4_common(extack, rule, tuple); } static int @@ -1864,7 +1864,7 @@ qede_parse_flow_attr(struct qede_dev *edev, __be16 proto, else if (ip_proto == IPPROTO_TCP && proto == htons(ETH_P_IPV6)) rc = qede_flow_parse_tcp_v6(NULL, rule, tuple); else if (ip_proto == IPPROTO_UDP && proto == htons(ETH_P_IP)) - rc = qede_flow_parse_udp_v4(edev, rule, tuple); + rc = qede_flow_parse_udp_v4(NULL, rule, tuple); else if (ip_proto == IPPROTO_UDP && proto == htons(ETH_P_IPV6)) rc = qede_flow_parse_udp_v6(NULL, rule, tuple); else From patchwork Tue May 7 10:44:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= X-Patchwork-Id: 13656618 X-Patchwork-Delegate: kuba@kernel.org 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 E8701156659; Tue, 7 May 2024 10:44:48 +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=1715078690; cv=none; b=FL83Gg5/bowfWsCLLefp6GyAJb3vKXWDrUYqcfWAugzQNWtMwpkuH39H/XnxIXIsUqzyTcxJljRRio6TvE2x93yMRv7bluSDGfmJ1/YaL9VuFAPuPdkuw7hh+034roCnctG6bvOvxWW5HoA8sGvXN25tleOG2zy1IBSc/ngU1MU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715078690; c=relaxed/simple; bh=TqqEncQeIs+s96w8FZhXyABuN/mKfbK8Vghx5jUdGiQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=odzMBDKUl5XNZY1npi+j4M/NpwoAJ1c35Nq5Mvr4xRKXfLr9Kk1AtA5TgFxp02dl5/BEOHRbDg3b3vhPmlc3jJjTUbP6lcfSfQ+XxkrzIpLnblakWqBFnPEiyVoYpT0sE3Ptqs9NLgGjpqoou3nJPpOxJjTE32Y+r89tkck6TDo= 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=PuYBL8O7; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fiberby.net header.i=@fiberby.net header.b="PuYBL8O7" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id ADAEF6017B; Tue, 7 May 2024 10:44:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715078675; bh=TqqEncQeIs+s96w8FZhXyABuN/mKfbK8Vghx5jUdGiQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PuYBL8O72Q0VHMn0O9KsL39Rgxm6MCpTeVNMudO/VAmkoVWHMuz2wnzfsYDegnUZk DkwiCXM9hJCVsM7eGtvlNf9vTGPo4KAlnaGLPU6wxX4+KEZhUrmqgR+qShQtBIkTCq +BVCpQKKZNGD7I1ew+NAcRNVbIE7JFo6c99JE8Vno5QoRgXAO3Ru7+YwNF2Rv4JleK vydWuMspdH6yI3MDQZ3mVVHB7qlXCCOx7C7KGEaXQ/268+L5gW2efi0WanThgCVrR0 8LdugpaZUtNOUNrkv7gr+1NKS8IRnuOXag+FkbTSa4unjBnzz4CPvF7h5iPqFCBa/A /mN0oMtRKp1rg== Received: by x201s (Postfix, from userid 1000) id 5EDC7203B79; Tue, 07 May 2024 10:44:24 +0000 (UTC) From: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= To: netdev@vger.kernel.org Cc: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= , linux-kernel@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Manish Chopra Subject: [PATCH net-next 10/14] net: qede: add extack in qede_add_tc_flower_fltr() Date: Tue, 7 May 2024 10:44:11 +0000 Message-ID: <20240507104421.1628139-11-ast@fiberby.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240507104421.1628139-1-ast@fiberby.net> References: <20240507104421.1628139-1-ast@fiberby.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Define extack locally, to reduce line lengths and aid future users. Only compile tested. Signed-off-by: Asbjørn Sloth Tønnesen --- drivers/net/ethernet/qlogic/qede/qede_filter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c b/drivers/net/ethernet/qlogic/qede/qede_filter.c index de6b9a60d4cf..5b353a160d15 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_filter.c +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c @@ -1876,6 +1876,7 @@ qede_parse_flow_attr(struct qede_dev *edev, __be16 proto, int qede_add_tc_flower_fltr(struct qede_dev *edev, __be16 proto, struct flow_cls_offload *f) { + struct netlink_ext_ack *extack = f->common.extack; struct qede_arfs_fltr_node *n; struct qede_arfs_tuple t; int min_hlen, rc; @@ -1903,7 +1904,7 @@ int qede_add_tc_flower_fltr(struct qede_dev *edev, __be16 proto, } /* parse tc actions and get the vf_id */ - rc = qede_parse_actions(edev, &f->rule->action, f->common.extack); + rc = qede_parse_actions(edev, &f->rule->action, extack); if (rc) goto unlock; From patchwork Tue May 7 10:44:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= X-Patchwork-Id: 13656613 X-Patchwork-Delegate: kuba@kernel.org 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 9BDB114F100; Tue, 7 May 2024 10:44:43 +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=1715078687; cv=none; b=BZdE17I4AYwFS2uOIjlVdjaes8ML9nMQu+8XOYjbDu6DRH/zrsBq5VPuV8mgL0Gm2cW4kc+ESlz9nn9aoPQLngkYixy8+rhfmC3Ra6p4BM5eRCODdvGbkGFgkb+AH8hwHir2DPVarJKLFDvjTuVDGCqiCBS7s0ig7WvCOGnUW+8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715078687; c=relaxed/simple; bh=ZztlPtdm5BgjIFka9qvM8fk/AJlWEYDvLqfkiSCDozU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=mPn1/1tgq2vY3HRf1+XhDfO2yvWjYApfJbcCZ9F8KQ8ulFE1xEcyrMSvj1cDcfbk6aBcSHC2UHyBs8vGa/V878xf+kIyWleLzYvC5NKhCvjPH6R0oTVroR7mfLu500S1Ec1bzT8LO3nZoOkEnkgEdLrolL7GD82O0AM0W0unzck= 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=SnbIGSu2; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fiberby.net header.i=@fiberby.net header.b="SnbIGSu2" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id 1DE05600A9; Tue, 7 May 2024 10:44:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715078675; bh=ZztlPtdm5BgjIFka9qvM8fk/AJlWEYDvLqfkiSCDozU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SnbIGSu2TJvGuW7/HvmGAe3wMVkDnQNVDZ12CbxnDNq1mY3c5oMzT+bWFnenFWLVs cR9qG5LQlnXRtLBnoeU+ZCmdJl9eGVaKdxEHYDwfhmYK3BGUa9VMtbCmrFLx8HGcnJ PYIslkvrl3W7RRuZUQjJwUeBDBNlMJIvPzJiuScl+tVkrGdnRSkn+TggAuwpXoX1l1 qYIn6lT73ojljmLhOpOwnqLpgEUj1vZSTVgxdNoZ5dYumKnEo9Q0lFGZcvWsPD6daM lJXITe1JzneXTj2kXaYsVoXZ6FYpL1uE9N38CTJnjeLkwLaryk1SPQvg/kScG7Fp4y NqmuXXFExisFg== Received: by x201s (Postfix, from userid 1000) id 8C122203D02; Tue, 07 May 2024 10:44:24 +0000 (UTC) From: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= To: netdev@vger.kernel.org Cc: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= , linux-kernel@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Manish Chopra Subject: [PATCH net-next 11/14] net: qede: use extack in qede_parse_flow_attr() Date: Tue, 7 May 2024 10:44:12 +0000 Message-ID: <20240507104421.1628139-12-ast@fiberby.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240507104421.1628139-1-ast@fiberby.net> References: <20240507104421.1628139-1-ast@fiberby.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Convert qede_parse_flow_attr() to take extack, and drop the edev argument. Convert DP_NOTICE calls to use NL_SET_ERR_MSG_* instead. Pass extack in calls to qede_flow_parse_{tcp,udp}_v{4,6}(). In calls to qede_parse_flow_attr(), if extack is unavailable, then use NULL for now, until a subsequent patch makes extack available. Only compile tested. Signed-off-by: Asbjørn Sloth Tønnesen --- .../net/ethernet/qlogic/qede/qede_filter.c | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c b/drivers/net/ethernet/qlogic/qede/qede_filter.c index 5b353a160d15..8734c864f324 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_filter.c +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c @@ -1826,7 +1826,7 @@ qede_flow_parse_udp_v4(struct netlink_ext_ack *extack, struct flow_rule *rule, } static int -qede_parse_flow_attr(struct qede_dev *edev, __be16 proto, +qede_parse_flow_attr(struct netlink_ext_ack *extack, __be16 proto, struct flow_rule *rule, struct qede_arfs_tuple *tuple) { struct flow_dissector *dissector = rule->match.dissector; @@ -1841,14 +1841,15 @@ qede_parse_flow_attr(struct qede_dev *edev, __be16 proto, BIT_ULL(FLOW_DISSECTOR_KEY_BASIC) | BIT_ULL(FLOW_DISSECTOR_KEY_IPV6_ADDRS) | BIT_ULL(FLOW_DISSECTOR_KEY_PORTS))) { - DP_NOTICE(edev, "Unsupported key set:0x%llx\n", - dissector->used_keys); + NL_SET_ERR_MSG_FMT_MOD(extack, "Unsupported key used: 0x%llx", + dissector->used_keys); return -EOPNOTSUPP; } if (proto != htons(ETH_P_IP) && proto != htons(ETH_P_IPV6)) { - DP_NOTICE(edev, "Unsupported proto=0x%x\n", proto); + NL_SET_ERR_MSG_FMT_MOD(extack, "Unsupported proto=0x%x", + proto); return -EPROTONOSUPPORT; } @@ -1860,15 +1861,15 @@ qede_parse_flow_attr(struct qede_dev *edev, __be16 proto, } if (ip_proto == IPPROTO_TCP && proto == htons(ETH_P_IP)) - rc = qede_flow_parse_tcp_v4(NULL, rule, tuple); + rc = qede_flow_parse_tcp_v4(extack, rule, tuple); else if (ip_proto == IPPROTO_TCP && proto == htons(ETH_P_IPV6)) - rc = qede_flow_parse_tcp_v6(NULL, rule, tuple); + rc = qede_flow_parse_tcp_v6(extack, rule, tuple); else if (ip_proto == IPPROTO_UDP && proto == htons(ETH_P_IP)) - rc = qede_flow_parse_udp_v4(NULL, rule, tuple); + rc = qede_flow_parse_udp_v4(extack, rule, tuple); else if (ip_proto == IPPROTO_UDP && proto == htons(ETH_P_IPV6)) - rc = qede_flow_parse_udp_v6(NULL, rule, tuple); + rc = qede_flow_parse_udp_v6(extack, rule, tuple); else - DP_NOTICE(edev, "Invalid protocol request\n"); + NL_SET_ERR_MSG_MOD(extack, "Invalid protocol request"); return rc; } @@ -1889,7 +1890,7 @@ int qede_add_tc_flower_fltr(struct qede_dev *edev, __be16 proto, } /* parse flower attribute and prepare filter */ - rc = qede_parse_flow_attr(edev, proto, f->rule, &t); + rc = qede_parse_flow_attr(extack, proto, f->rule, &t); if (rc) goto unlock; @@ -2015,7 +2016,7 @@ static int qede_flow_spec_to_rule(struct qede_dev *edev, if (IS_ERR(flow)) return PTR_ERR(flow); - err = qede_parse_flow_attr(edev, proto, flow->rule, t); + err = qede_parse_flow_attr(NULL, proto, flow->rule, t); if (err) goto err_out; From patchwork Tue May 7 10:44:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= X-Patchwork-Id: 13656622 X-Patchwork-Delegate: kuba@kernel.org 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 4E6F1152E18; Tue, 7 May 2024 10:44:48 +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=1715078691; cv=none; b=qzb/bO2QJBCSK6W/xS42BetoKpPFH8kutJikHlzdHYBjLYQhwx7yTc+m7Q9x8FtwlEBU9Ovx8CoWZO5VmZ//xMhlh7cgIOXT+rp00VNq78cHZwvFMoTadainVzkxqqAeSMOGuL0tpzf+lirxlhQX20NaVNtdIW8eep4D+07m+c0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715078691; c=relaxed/simple; bh=GSOXcR4bbFPjJZ3frmuY6IjJLkcw6hvn1PqSul/wOIw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=HXzx3FEMLP91JffP6zlnuVhY7BRYdLEvOcxZ6YN9AXwZKDwJcGLMy0OIgJ1+tZoJ7DGTauwimCbdHruIEeSzP+9y0fR+S/rqn4f09FcrhemGjsjC+O4LNSQMVyW4uQt22uJZbZUNkzlQ2+uQP+jhYKSNz4Sf5QOBLkcsnR5H0P8= 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=U32LXCVC; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fiberby.net header.i=@fiberby.net header.b="U32LXCVC" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id 33909600B7; Tue, 7 May 2024 10:44:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715078675; bh=GSOXcR4bbFPjJZ3frmuY6IjJLkcw6hvn1PqSul/wOIw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U32LXCVCnDhD6Lcvjt/wky2/xmMGL8Wzq9LX6Lnn/BR8c+J87p6cAhRKO/IrxzUk3 VGD8HcJ6q43QvVuVTikOUMaf6+8tBbQz5jcNtURUQ7wQajtfAn+9DfvB9gLpRMcxQQ hWwBjslbk8VUh3J0IUK1uIDhbpw8bqtKBkDM/iP46Z9j4VDuXP6xYrWHiiHLdpMPrX hb2MAYzBGatTLFnLuPuy4bxy2qajLAdhJVqJRQoOpO6KnVDlnoaNXj88E6Vs/YdmDs E0yrqw9QfYLC0+D49D2FWA0Hf57SRA+dmHeyVGLTi2A+dp/+uF8ukgffdJEsYAvR4h yR9+bO6hSGV6Q== Received: by x201s (Postfix, from userid 1000) id BA7B0203D5D; Tue, 07 May 2024 10:44:24 +0000 (UTC) From: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= To: netdev@vger.kernel.org Cc: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= , linux-kernel@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Manish Chopra Subject: [PATCH net-next 12/14] net: qede: use faked extack in qede_flow_spec_to_rule() Date: Tue, 7 May 2024 10:44:13 +0000 Message-ID: <20240507104421.1628139-13-ast@fiberby.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240507104421.1628139-1-ast@fiberby.net> References: <20240507104421.1628139-1-ast@fiberby.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Since qede_parse_flow_attr() now does error reporting through extack, then give it a fake extack and extract the error message afterwards if one was set. The extracted error message is then passed on through DP_NOTICE(), including messages that was earlier issued with DP_INFO(). This fake extack approach is already used by mlxsw_env_linecard_modules_power_mode_apply() in drivers/net/ethernet/mellanox/mlxsw/core_env.c Only compile tested. Signed-off-by: Asbjørn Sloth Tønnesen --- Note: Even through _msg is marked in include/linux/netlink.h as "don't access directly, use NL_SET_ERR_MSG", then the comment above NL_SET_ERR_MSG, seams to indicate that it should be fine to access it directly if for reading, as is done other places. I could also add a NL_GET_ERR_MSG but I would rather not do that in this series. drivers/net/ethernet/qlogic/qede/qede_filter.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c b/drivers/net/ethernet/qlogic/qede/qede_filter.c index 8734c864f324..3727ab5af088 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_filter.c +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c @@ -1989,6 +1989,7 @@ static int qede_flow_spec_to_rule(struct qede_dev *edev, { struct ethtool_rx_flow_spec_input input = {}; struct ethtool_rx_flow_rule *flow; + struct netlink_ext_ack extack; __be16 proto; int err; @@ -2016,7 +2017,7 @@ static int qede_flow_spec_to_rule(struct qede_dev *edev, if (IS_ERR(flow)) return PTR_ERR(flow); - err = qede_parse_flow_attr(NULL, proto, flow->rule, t); + err = qede_parse_flow_attr(&extack, proto, flow->rule, t); if (err) goto err_out; @@ -2024,6 +2025,8 @@ static int qede_flow_spec_to_rule(struct qede_dev *edev, err = qede_flow_spec_validate(edev, &flow->rule->action, t, fs->location); err_out: + if (extack._msg) + DP_NOTICE(edev, "%s\n", extack._msg); ethtool_rx_flow_rule_destroy(flow); return err; From patchwork Tue May 7 10:44:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= X-Patchwork-Id: 13656621 X-Patchwork-Delegate: kuba@kernel.org 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 74E41154450; Tue, 7 May 2024 10:44:48 +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=1715078691; cv=none; b=PHurapU6Gqvz0warILPkP1G13Z5oNuXaEpN1uEM9DhE75nAV7MnV7Wxu+aNe8BK/llAF1VNGrkbBB5zh0NGAfIx4nptKhiG6WlyK2PwaFJJK+Y6gLaklob7vcFMF5QrqjSp8qzDc8e5AII5v57WUTgzE/T1xcb0sLwGWeg69jdI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715078691; c=relaxed/simple; bh=BXkqTGf4ljiO8BNjQTNrgJXmlT/C/AanHIXAnkbe1W4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=C3AcZ7wX6mE4YieKvThv77iXyE393aIjTQdN3WXohHMyoZl6og1vVz6JWnrU1SOUd5RA2xkBKgm5bTpkbOFgw3xdgwXbUnzph54c6GR+FjJsQ+DyKuFDer5nF1TwLXeDchTl0DWypGZRMtu4c/o1JuYyDTRxbotn/yCSSoR+nCA= 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=CYz80e0s; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fiberby.net header.i=@fiberby.net header.b="CYz80e0s" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id 5B51B6016A; Tue, 7 May 2024 10:44:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715078675; bh=BXkqTGf4ljiO8BNjQTNrgJXmlT/C/AanHIXAnkbe1W4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CYz80e0sPA5wEw5rSIQ7nlHRJyjF8l9bjP7kzn8ComkDvhgPbyNxJ3Nc0JvTJL40a XTKsttYh8NjiKa68lZ5+bcTDa5VLtpwkCJcn7+3/dUkfKeb6FCxx0xEuuMXj2MUP8Y q67RMDRdChhGKufsUkHWEs5dYmNVd8Sjv5B79oALukd9jyDrZtif9vPamoq+kIq7/a ii5LsFILTX9z5+pnXYjFnhFGw3X8Ub/TYuZPPXNFRF2F4YgukfTSt2Wh/Eyd0FLQ+q lfWBJ9f5Z2SohloS4a0zCpCDFj8rlRJVsMRAslmit2krLqiV/CzZmkuvrtsNDsJapK GUszAd9QAKuow== Received: by x201s (Postfix, from userid 1000) id E9930203F6E; Tue, 07 May 2024 10:44:24 +0000 (UTC) From: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= To: netdev@vger.kernel.org Cc: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= , linux-kernel@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Manish Chopra Subject: [PATCH net-next 13/14] net: qede: propagate extack through qede_flow_spec_validate() Date: Tue, 7 May 2024 10:44:14 +0000 Message-ID: <20240507104421.1628139-14-ast@fiberby.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240507104421.1628139-1-ast@fiberby.net> References: <20240507104421.1628139-1-ast@fiberby.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Pass extack to qede_flow_spec_validate() when called in qede_flow_spec_to_rule(). Pass extack to qede_parse_actions(). Not converting qede_flow_spec_validate() to use extack for errors, as it's only called from qede_flow_spec_to_rule(), where extack is faked into a DP_NOTICE anyway, so opting to keep DP_VERBOSE/DP_NOTICE usage. Only compile tested. Signed-off-by: Asbjørn Sloth Tønnesen --- drivers/net/ethernet/qlogic/qede/qede_filter.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c b/drivers/net/ethernet/qlogic/qede/qede_filter.c index 3727ab5af088..7789a8b5b065 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_filter.c +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c @@ -1952,6 +1952,7 @@ int qede_add_tc_flower_fltr(struct qede_dev *edev, __be16 proto, static int qede_flow_spec_validate(struct qede_dev *edev, struct flow_action *flow_action, struct qede_arfs_tuple *t, + struct netlink_ext_ack *extack, __u32 location) { int err; @@ -1976,7 +1977,7 @@ static int qede_flow_spec_validate(struct qede_dev *edev, return -EINVAL; } - err = qede_parse_actions(edev, flow_action, NULL); + err = qede_parse_actions(edev, flow_action, extack); if (err) return err; @@ -2023,7 +2024,7 @@ static int qede_flow_spec_to_rule(struct qede_dev *edev, /* Make sure location is valid and filter isn't already set */ err = qede_flow_spec_validate(edev, &flow->rule->action, t, - fs->location); + &extack, fs->location); err_out: if (extack._msg) DP_NOTICE(edev, "%s\n", extack._msg); From patchwork Tue May 7 10:44:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= X-Patchwork-Id: 13656614 X-Patchwork-Delegate: kuba@kernel.org 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 4E6CC152E17; Tue, 7 May 2024 10:44:48 +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=1715078689; cv=none; b=mWbCRHjnYGMzVvK8Z5lEXFPe5Y8k/mQfeUAVQJb/qX1fjKfudVkOGP/Ji910cWzlwEJk7eJMtdQWxNvIKRNQ+jQjx9ziTzk4QbMxz0w+frGyoq9cmZBQGTYomErwi6XVt8GoNPTPV/7OWfmJsckbnP+ZHKMn6psOFWFrKLyTSYU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715078689; c=relaxed/simple; bh=JfbhjlW1KWkqWGqmmmMWFU0X6uUALH+EM6KsMRvG9vQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PhlB8T2uxPK5zhh6suNxm0DrMWtf2yZSfAbnRwGK4OGo8aPsGHVAtQvyday5u5BCX8NOIwUGanlRfudnDyzOebtFgOy5SaB8SHh5VHzbznvZa9xr+0j/n+g1TCMO/mZMC+mYFOVM8Pi76X3hnSikCKq525O9vz59ZcKOSnhIn7w= 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=fNk8CNL1; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fiberby.net header.i=@fiberby.net header.b="fNk8CNL1" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id 4311F600E4; Tue, 7 May 2024 10:44:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715078675; bh=JfbhjlW1KWkqWGqmmmMWFU0X6uUALH+EM6KsMRvG9vQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fNk8CNL1807Ra60OPGQxuklCAUAm6dekJmxkij1kciC0huXY4fT6Q34WKbXIJHHdq Zv4pR/SPAskXRVbWelf+DLyt49iECvFOQTBMkOlk+afU4gmWIEAQxFQeJdl4ZRrAlx l3sFBrlmMXIGE1dtXFvn5VvMBmwhyaUTR2Bkiq3e9qsZcJe5hEu3SElSQrRVYWrY/3 p15kFKgsQCrcCZk6d+FVRQ8G8j05D/cCWw6YeJpCoUmoGw0XJYl+fpJ9Jj5HEYzHwm /nDNqjtZ4S5nftIqbF5scbkVA/YT7MBqkX5xqF9VCRw3WLc+wwVHCbcX8XW85ntvVr qySbNBKOj3mZw== Received: by x201s (Postfix, from userid 1000) id 78A332040FE; Tue, 07 May 2024 10:44:25 +0000 (UTC) From: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= To: netdev@vger.kernel.org Cc: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= , linux-kernel@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Manish Chopra Subject: [PATCH net-next 14/14] net: qede: use extack in qede_parse_actions() Date: Tue, 7 May 2024 10:44:15 +0000 Message-ID: <20240507104421.1628139-15-ast@fiberby.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240507104421.1628139-1-ast@fiberby.net> References: <20240507104421.1628139-1-ast@fiberby.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Convert DP_NOTICE/DP_INFO to NL_SET_ERR_MSG_MOD. Keep edev around for use with QEDE_RSS_COUNT(). Only compile tested. Signed-off-by: Asbjørn Sloth Tønnesen --- drivers/net/ethernet/qlogic/qede/qede_filter.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c b/drivers/net/ethernet/qlogic/qede/qede_filter.c index 7789a8b5b065..5a3ce86fba1f 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_filter.c +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c @@ -1671,7 +1671,7 @@ static int qede_parse_actions(struct qede_dev *edev, int i; if (!flow_action_has_entries(flow_action)) { - DP_NOTICE(edev, "No actions received\n"); + NL_SET_ERR_MSG_MOD(extack, "No actions received"); return -EINVAL; } @@ -1687,7 +1687,8 @@ static int qede_parse_actions(struct qede_dev *edev, break; if (act->queue.index >= QEDE_RSS_COUNT(edev)) { - DP_INFO(edev, "Queue out-of-bounds\n"); + NL_SET_ERR_MSG_MOD(extack, + "Queue out-of-bounds"); return -EINVAL; } break;