From patchwork Wed May 8 14:33:49 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: 13658847 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 D1E9885642; Wed, 8 May 2024 14:34:35 +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=1715178879; cv=none; b=h6FakU3Qt9+h73g0DBBCp9tywQOV1ua7J62e9evAjrAsFEgubmLP9eZftvoR5xh79b+a4WCSmmp8/n9u1/fVnjTvoKDr6ukxG/IGHXX/ig3ykhS57wHKLiew7gr+uAwrBJaC0T16vtyaMWBifjE8JltX4mdGPhn1b0C0T+fcUN4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715178879; c=relaxed/simple; bh=JtYb2sSoIpGyGZLEbk84W4BT0EJDsxPXBsQ4i3aaf5I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=QvE6SVwE6cYWMP09Gr85hdqSW8KJvtyYiwDN1fO8PAmHIHxs0ayfqypGsdAG5tpk4RPOazRZDWWwvK4ia2PZd0nuNP09Q2vcSfQD91V1LtLB9LMvlaoL453qA5UcAfi3+ijwHisUjvCH4ZSvGsVu4FjtEIf9JxhFWczMRbrUnpA= 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=L7f2szut; 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="L7f2szut" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id 8E58B600B4; 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=JtYb2sSoIpGyGZLEbk84W4BT0EJDsxPXBsQ4i3aaf5I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L7f2szutXPHy9lMTbLSdaRtSK+L5SjyUtuUGAG/PpbF24vDbsdAbRxEoKLdcY+Ioc hU6ekkWNbbo3GwB4W5hipPADAOAKUUgQvI0OpTn4e5U0F9pt+Ms5hg10ZwbIXOmo90 uE+BkCQSQ9SbUn6ieFhbyvtiImyH1AWOts8JqxaxqRFfbvOuwnZ6oU3nGO7tCjcbTA 6fJOgjFktW/T4GQZyASGn2vagy89DtF28p+I76HllIBWqDxcskMieNC4zcxdnd3N9g cScB7rl5fSi0/8o3C22YvEF43MLeqfFPU1TuWKkWasH32J1x9AJvN24hSy8a3aVak2 JiYH292a38cYA== Received: by x201s (Postfix, from userid 1000) id 30011203798; Wed, 08 May 2024 14:34:05 +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 , Przemek Kitszel Subject: [PATCH net-next v2 01/14] net: qede: use extack in qede_flow_parse_ports() Date: Wed, 8 May 2024 14:33:49 +0000 Message-ID: <20240508143404.95901-2-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: 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 Reviewed-by: Simon Horman --- drivers/net/ethernet/qlogic/qede/qede_filter.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c b/drivers/net/ethernet/qlogic/qede/qede_filter.c index ded48523c383..600b7dc7ad56 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_filter.c +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c @@ -1700,8 +1700,8 @@ static int qede_parse_actions(struct qede_dev *edev, } static int -qede_flow_parse_ports(struct qede_dev *edev, struct flow_rule *rule, - struct qede_arfs_tuple *t) +qede_flow_parse_ports(struct flow_rule *rule, struct qede_arfs_tuple *t, + struct netlink_ext_ack *extack) { if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_PORTS)) { struct flow_match_ports match; @@ -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(rule, t, NULL); 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(rule, t, NULL); if (err) return err; From patchwork Wed May 8 14:33:50 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: 13658841 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 9719E86257; Wed, 8 May 2024 14:34:36 +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=1715178878; cv=none; b=MjZUBLq2Uy8DMZPLqpa7LbCb+utj+lYKwFOrult+fN/b6jckik2z+jMJNUgTGQrcQzirJYGnXYNKZhRL7Rpx+ZxojKM3sfWT6aav6C8pXeiyIFmnb2JAlwa7wKbbXxv1cya+Zeiibz/QLqefH+2hLWV3uGa3o9waXGU9uq36hv0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715178878; c=relaxed/simple; bh=uSVPzv+OmAG08dwGOq8nQVutiO7NPZmEV+r3FDMWn0s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=r0kMpYiRSErWU7lp6V/X2tkFuoTG0uLhO2vuJ/ylYXsSU5vHrKpgtmSIhgKB/l1cVJxW+WM460Kh7SNZ7mJcPwtSA+z8H+4kEUp/Jt4/63ik5t3BA/PMoIditqsKaeZxYhXBB/Z05a7z9UzuxIcx1rkF8qkNo1OcAyc93KRpvWE= 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=aqfQgT43; 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="aqfQgT43" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id 98A7E600E4; Wed, 8 May 2024 14:34:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715178869; bh=uSVPzv+OmAG08dwGOq8nQVutiO7NPZmEV+r3FDMWn0s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aqfQgT43J3YA8SzXRMF4mYdKyKxBmT/phqWCswZJgRWPXnte34h+vQToj5p0apBNE 0fnSgAxSSyfMka18vwWCmZlEKuDL3QVKQBz8UyN7mr4BTWZmRt8gT/17O9j+GjbGWB w0HsgESw0Zmw5VHzdvc1hHwz2kIC/oVk+1i5ACasgrv0fwp5JxiwOp9DrAhHyfGRAD GsD2v0NSiEY64Dbe9DtlifDrv5Rd+ng4B67xFaAVitR6dPI785RcsKVK2G5dbvrD3F kPtkJ9Lj6m5ZMZpWl7PPDBsn+cafdK2kIvYXZpDWk6Bkrwm1/TaqBooA0ORDolcZ5F Wr7tiMcHc86YQ== Received: by x201s (Postfix, from userid 1000) id 6239A2039CD; Wed, 08 May 2024 14:34:05 +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 , Przemek Kitszel Subject: [PATCH net-next v2 02/14] net: qede: use extack in qede_set_v6_tuple_to_profile() Date: Wed, 8 May 2024 14:33:50 +0000 Message-ID: <20240508143404.95901-3-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: 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 Reviewed-by: Simon Horman --- drivers/net/ethernet/qlogic/qede/qede_filter.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c b/drivers/net/ethernet/qlogic/qede/qede_filter.c index 600b7dc7ad56..0f951d00b10e 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_filter.c +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c @@ -1549,9 +1549,9 @@ 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, - struct qede_arfs_tuple *t, - struct in6_addr *zaddr) +static int qede_set_v6_tuple_to_profile(struct qede_arfs_tuple *t, + struct in6_addr *zaddr, + struct netlink_ext_ack *extack) { /* We must have Only 4-tuples/l4 port/src ip/dst ip * as an input. @@ -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(t, &zero_addr, NULL); } static int From patchwork Wed May 8 14:33:51 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: 13658844 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 D1E153716F; Wed, 8 May 2024 14:34:35 +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=1715178878; cv=none; b=iE3NgeoZqXrED2PJqOW84D6l15vNgXY0T41NLdnSpirGFU9NcfktyN8a0pFjQ8mqENIc6AoPNJhDM+0+FqqUiTiUGvY2QT4aCwmKfPEBYp1GDs/1hp2NUXWVknXyVPMuWZY8BEkEdaq5/e51qB+QcBbUQ7xXNDi+NxvNCi5fALk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715178878; c=relaxed/simple; bh=L6tUtjjwEalXnyxEbR/SPQOiHRyaF0s5LZSjg+wvO3A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PpPK0MLLZfFGnF2mzvZY546dYhZMdvfnw2tVf9gwmE195alt0M7GI/4WO2DJrMDQPX4fG0TlAOWlFlBLLBSyeAmPt0hLwYaQSuH0pGiE4ZteXKwKqI0vIQ0dzTPGWwWtsUO84dxr4vddgfc5TaIX5okaXHdLrFzvxg+VGxaEJNg= 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=scwWq6c1; 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="scwWq6c1" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id 80DEF600B1; Wed, 8 May 2024 14:34:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715178869; bh=L6tUtjjwEalXnyxEbR/SPQOiHRyaF0s5LZSjg+wvO3A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=scwWq6c1Pt2/kLdr9IQpdlcytjQsMaV0PJAHX/D8+pczUSCm/GfHJ6yLDcM+kxwJ4 5buAArHU6cA87JtuUekyq4DO8CMZQL/mjhvDqh6aqz1mlt03a00jPERhTtj/WdyfON Qo5POi2mivtvgNIY2asomaEF7fK65OPb28zgQWhazsAybL2hq9sGUIxrmlYTFelEpo g5mCflG0Ca3vygMEQ46rMgv0EYTD36vci6tZDBXIKq+a6CYxAaY4LMPmyTLNOwRuhZ HBJqgUmMFsBHPXLp/NUyZ9t9ZF+ZMsJNephET094UhXvS1A+n7ZGELh235Lz/qzFlg Mvix4WMeplRxA== Received: by x201s (Postfix, from userid 1000) id 9E2FD203E4F; Wed, 08 May 2024 14:34:05 +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 , Przemek Kitszel Subject: [PATCH net-next v2 03/14] net: qede: use extack in qede_set_v4_tuple_to_profile() Date: Wed, 8 May 2024 14:33:51 +0000 Message-ID: <20240508143404.95901-4-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: 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 Reviewed-by: Simon Horman --- 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 0f951d00b10e..6f4c4a5d6c77 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_filter.c +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c @@ -1520,8 +1520,8 @@ 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, - struct qede_arfs_tuple *t) +static int qede_set_v4_tuple_to_profile(struct qede_arfs_tuple *t, + struct netlink_ext_ack *extack) { /* We must have Only 4-tuples/l4 port/src ip/dst ip * as an input. @@ -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(t, NULL); } static int From patchwork Wed May 8 14:33:52 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: 13658852 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 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fiberby.net header.i=@fiberby.net header.b="nbz75mml" 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_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 , 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: 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 Reviewed-by: Simon Horman --- 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 From patchwork Wed May 8 14:33:53 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: 13658855 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 0EB938626F; 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=1715179394; cv=none; b=W+iTB3svwFGbo6Gz/nEkVF8evCvmNoYFE/P3i2AiUyQdNVib0NCfx4n4llVUcAlEl5LBYgbUPwuHcmxQSEMOfswldvWiMgL0M1F3xeujehHICVxOy3oFBAsCQvter8197tmuPvuQuECZOfVrrIg9bPy8cLCwRaLp2Ux86A+YWwc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715179394; c=relaxed/simple; bh=iJRr2/PLcmsvTBiKIqdorvzZaAeypcrVtcIGQuFhQtQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=AUhtu2SbkFR+S7h9ruK9Y33l02mP9BSmwWQJeeKI5jRGNnzH25YAL6ttTKzmjEduICzbybVejsxyrCo/AvUNfUstGg6nF84sluNVAJZliA4AF8D9Xc/OZm2k+LPMdoI4S7aTNTZl5ne4ofG7ZerHNXG2JqwsONvBm7TnUuhWHmo= 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=Y7VKoefo; 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="Y7VKoefo" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id 2761B600A5; Wed, 8 May 2024 14:34:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715178866; bh=iJRr2/PLcmsvTBiKIqdorvzZaAeypcrVtcIGQuFhQtQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y7VKoefonm97HZ+cBF+duyVXXKm/nDbjVq8TIbg0qbjv0T6E57/7dwM1ZLVd1QbTL jp7f2rQUr3sz0Lc8cHkNK/+XW1jCEosdafv/o/8GioidypeXSfmXBavmt36uvXLsiq gn5OTlms4PAredJ+7Ul1hvgf3rKn8lN6Esx6uPR2eglkv8EuUKL2CfvagoSY2FvSuU lZnu1RMuX1dTE9IOgSvmt1JutYDEyTkjFUOjSlNfpIsTov1V+FcvQEnRMn4r6EiwuV WuADLCp+pRMJP0ATLLv4ESsqqJ0f6091NUn3n+AwH6atJUXun/OSaiwI8P0BBtCOaX YoEKl3tid/dqA== Received: by x201s (Postfix, from userid 1000) id 07293204DBA; Wed, 08 May 2024 14:34:06 +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 , Przemek Kitszel Subject: [PATCH net-next v2 05/14] net: qede: use extack in qede_flow_parse_v4_common() Date: Wed, 8 May 2024 14:33:53 +0000 Message-ID: <20240508143404.95901-6-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: 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 Reviewed-by: Simon Horman --- 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 f5f8bbe8a64c..28e4d54dbca1 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 flow_rule *rule, } 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 flow_rule *rule, + struct qede_arfs_tuple *t, + struct netlink_ext_ack *extack) { 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(rule, t, NULL); + err = qede_flow_parse_ports(rule, t, extack); if (err) return err; - return qede_set_v4_tuple_to_profile(t, NULL); + return qede_set_v4_tuple_to_profile(t, extack); } 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(rule, tuple, NULL); } 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(rule, tuple, NULL); } static int From patchwork Wed May 8 14:33:54 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: 13658849 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 84DC98625F; Wed, 8 May 2024 14:34:37 +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=1715178880; cv=none; b=JFq7HalzSs71lnpsbKAZn57He3/uzxN5DKhqrSz16/5iLU7OYqgPFbODCDy0PZiEvFHiGrwX9YHI6K9kHh3jMi0Xo+fCWbTthRpdWLsOPggbl+Lu5qiV+Wo78s6jHBOsdI8vpqPr/qYAOAWNaIwJtiUEM0fNuvps06sIHt2jMDg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715178880; c=relaxed/simple; bh=3Mx59MjfqLat4qcwGUo/G75JG9Raj6N8SRjjACLfc00=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dqLXmj4LNfRat3vvdhtW76oV5KiqmCxRaTd5hXXi4ob8zKgIPcXOaODsRh1vwm72AKlyXNmDAhk+Eyl1knYOhgM32lqeVwfALm3sfYa+tT4eeoPXuP8Ayw7b10RVA7irYhl2WLvDML+HoUGnqPFNNimPq5TGDkuYY19c881bSFg= 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=FQbkDhx3; 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="FQbkDhx3" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id 9E3AE600ED; Wed, 8 May 2024 14:34:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715178869; bh=3Mx59MjfqLat4qcwGUo/G75JG9Raj6N8SRjjACLfc00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FQbkDhx3y/oev0eWrSUECC0qkLlUYqZb5QMDUoyVz22X4HoCBw2rl0UpWWEMiox40 t4rTpvMwfUAR7paYQvd6SB4TCeeCkQDKzKVSNhvtdj2OBuSq5grCtagtZzXBoy9cOC 6zd4JqkpVuWdkdMuzJSHxJKRh9gqdZkrNDxJDW4wMkNXMXNHx68ZB9nVqC5+QELZ0E 94HrWox0XrVolIVHRmPU7ielw4fEa8iUZ/Nl5yLDq58BkWWWghWSedGP7P8jXzW9PG ATXToygNTfCFTtOhRd+74BYjwWvEHjNzD3xeshCMCSrPknTF+dvmaBrvDyrD0qU4vA 871f1O9VsFDJw== Received: by x201s (Postfix, from userid 1000) id 317A6204FCD; Wed, 08 May 2024 14:34:06 +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 , Przemek Kitszel Subject: [PATCH net-next v2 06/14] net: qede: use extack in qede_flow_parse_tcp_v6() Date: Wed, 8 May 2024 14:33:54 +0000 Message-ID: <20240508143404.95901-7-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: 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 Reviewed-by: Simon Horman --- 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 28e4d54dbca1..ddf1d6b0fc83 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 flow_rule *rule, } 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 flow_rule *rule, struct qede_arfs_tuple *tuple, + struct netlink_ext_ack *extack) { tuple->ip_proto = IPPROTO_TCP; tuple->eth_proto = htons(ETH_P_IPV6); - return qede_flow_parse_v6_common(rule, tuple, NULL); + return qede_flow_parse_v6_common(rule, tuple, extack); } 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(rule, tuple, NULL); 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 Wed May 8 14:33:55 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: 13658846 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 84D628625D; Wed, 8 May 2024 14:34:37 +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=1715178879; cv=none; b=lI3mR8XlRE6bFhQ83rIXnX39a1MSK9tohsn9Qx+VQU3Czn7cMmE6FvTFlKyRdnAOM/i4M9jhCbUBR6tmmREVeMaZ0+laYHrVXtk3qTNbHTb7zrcdYobuHMzjtl5uyTSBW8gd/S9nQW6YkCFTO3GiHzdOgeJj/710s8Ul7Un7b10= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715178879; c=relaxed/simple; bh=aMvLMv604BjIOtpjuNmzesCsS0tjefV5UKuS0i/vJVk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Tc9Bbi1lRm31VU07VNPI2k/XpQYf/7GYVz6UVjzXqXd2Ki5aSfQpQmQFoHH8HdltWKHUkDGwihsvZ8pGc5IECF0KuitME+NNsBTEhxhQYqsnn15peQff3qeWecnrcAauEOghv59bYm2dR6TTwjYDEzEBX6e7qPsGwVOowu35BWE= 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=k5Qtz+RQ; 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="k5Qtz+RQ" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id A65FF6016A; Wed, 8 May 2024 14:34:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715178869; bh=aMvLMv604BjIOtpjuNmzesCsS0tjefV5UKuS0i/vJVk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k5Qtz+RQFS11QPHCQd+usHXryIouu86sXAqfwQvgxnboODn6kOM7Nsen3/ryxOdEQ TKAhxnnDbSUmu/wYJTx2dXsEBXapnz9YtrwbJILt1nvk8bVvB8SEAUKfjesqOw/HiT IPI6mHrqBFfx/whMXyCTtYabvjTc/XbSN61lCI8HWoPhv7TaUpuyPNHino4NxP6hUT Cg7C9hhFmSnkgyLwCMwXHw6ioVKNeqgVZY9BsQlTnfFUstChzisdy/F4aBT+e1+NPF KFQwLOt2F5hV9298OEE4wXGaHR1s7ESLchow5WgirXuZcoG2vEVeKd5si7QlWq6ki/ PRkpreuuvjwUg== Received: by x201s (Postfix, from userid 1000) id 620B5206CC6; Wed, 08 May 2024 14:34:06 +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 , Przemek Kitszel Subject: [PATCH net-next v2 07/14] net: qede: use extack in qede_flow_parse_tcp_v4() Date: Wed, 8 May 2024 14:33:55 +0000 Message-ID: <20240508143404.95901-8-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: 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 Reviewed-by: Simon Horman --- 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 ddf1d6b0fc83..9fd08ee252ae 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 flow_rule *rule, struct qede_arfs_tuple *tuple, } 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 flow_rule *rule, struct qede_arfs_tuple *tuple, + struct netlink_ext_ack *extack) { tuple->ip_proto = IPPROTO_TCP; tuple->eth_proto = htons(ETH_P_IP); - return qede_flow_parse_v4_common(rule, tuple, NULL); + return qede_flow_parse_v4_common(rule, tuple, extack); } 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(rule, tuple, NULL); else if (ip_proto == IPPROTO_TCP && proto == htons(ETH_P_IPV6)) rc = qede_flow_parse_tcp_v6(rule, tuple, NULL); else if (ip_proto == IPPROTO_UDP && proto == htons(ETH_P_IP)) From patchwork Wed May 8 14:33:56 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: 13658840 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 060B486251; Wed, 8 May 2024 14:34:35 +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=1715178878; cv=none; b=ombPfrjlYfsr3YyjIUAVyIGSZnJ4F1VF65KN9il0jNeB9iWBJD6AT+qT2ds2ahXhtx7DidTFUmNXHgJwZ6l+bXP9NKufTyyXgZqkkTAyc06iO4xl3C/S+U6gLZ3X7eTp7yyM6qtMUvzBTRbQP5Ww/HuHh9qEI0FHPNhaVwx4H+s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715178878; c=relaxed/simple; bh=dIyCGWv88HPEo9u3w+G92ib5XEC84EWs54UjZI5zQEU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Rc8OgJud68odxiWiNBVg/OkrJ7Rmuf2o7DtvpBWYvfkamTuyR+OH9U2f/JwV2fvIqbH0MzKXaCYGhTembJWIDPxyj+q7E61lRqQtFjC/gQIxId9VnzRXwiAv17878uudohCmHXM99dhyWAVALFWTTlS2VcLhLcCytrPLg+yPVDw= 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=UsdR0ld2; 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="UsdR0ld2" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id 80DCC600A9; Wed, 8 May 2024 14:34:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715178869; bh=dIyCGWv88HPEo9u3w+G92ib5XEC84EWs54UjZI5zQEU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UsdR0ld2vq4o8ezPDGSaVgb5RULLAnn5Kb/YXjbMix8Jx7A7I35Yw43VHT8UDdTsU aCc6xHOfUIXgd1V39Ucz8xuIphYbGG8UmaW6SuctR5LOu5eVsQ7xycGofvLWvnkPd7 g4xj2aivn5fQC6wuaSnWP3pBdgrZL3drEx4zDy2CUg6Zn6CSqlv6eFnHbVOvIBLCNj ZYIU7Sgdm6fr6g1Z8PhQLoc0ZF2L8yW9nE05E5Z13N+5moy2yXs2SOQmfkezYBKbLv BVUxdwsqmgxElVYkb7jPtT2bTk8oez1zH87bVBVsWs+ySMwTWyQObiIgMV81QN/iIA y0Q2FhqGnhjEg== Received: by x201s (Postfix, from userid 1000) id 8ECC5207647; Wed, 08 May 2024 14:34:06 +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 , Przemek Kitszel Subject: [PATCH net-next v2 08/14] net: qede: use extack in qede_flow_parse_udp_v6() Date: Wed, 8 May 2024 14:33:56 +0000 Message-ID: <20240508143404.95901-9-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: 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 Reviewed-by: Simon Horman --- 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 9fd08ee252ae..abeb873f58f3 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 flow_rule *rule, struct qede_arfs_tuple *tuple, } 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 flow_rule *rule, struct qede_arfs_tuple *tuple, + struct netlink_ext_ack *extack) { tuple->ip_proto = IPPROTO_UDP; tuple->eth_proto = htons(ETH_P_IPV6); - return qede_flow_parse_v6_common(rule, tuple, NULL); + return qede_flow_parse_v6_common(rule, tuple, extack); } 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(rule, tuple, NULL); else DP_NOTICE(edev, "Invalid protocol request\n"); From patchwork Wed May 8 14:33:57 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: 13658845 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 D1E5954657; Wed, 8 May 2024 14:34:35 +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=1715178878; cv=none; b=FTsCkD68ACBsbAvuobjlAsfloK5p3+jqQb4zX+7naqIDLHh5N5ttzbTiClU7IC0WWFT1fZUGyVhPJWhMPouvxU1wWjWjZw4bb/lCAy8XemGWMWU0vd/CCDFBAmcAxT6QPHNfFDoFrgebADzX5ttAV/4E7wJno//r8lw95cOgNyI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715178878; c=relaxed/simple; bh=PZszkrspUV2m4L/nD/hefW+Kugt1rlhIPYkPxHe9k1M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=e8yi+qi40WZIdedACBL7tZlLnK6sHNfIrbwpF3SVaVlejS9BOfr++HEVx0YENsOUunKNHSMJd/BSG9FE1siesuIClQT1c/9poEdTj0uERBpRROU+boq87W/Ci1E0pH9doU3kRIMA2wpOWH+TmRqb/aLNzDIkvwd/Jvoc4Wt8FC0= 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=C2G2qSJu; 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="C2G2qSJu" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id 89B5B600B7; Wed, 8 May 2024 14:34:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715178869; bh=PZszkrspUV2m4L/nD/hefW+Kugt1rlhIPYkPxHe9k1M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C2G2qSJuAI1i3O46kcI5fxHmeRD5mqh1QdIXwQeV/tEzx/EpL2RCLtG/7gmadYRnV gj7D8LdGgzI9PkNcjA6ssdthJTUVMrKzyP6NXMQeLEa3ol8dRI4Ue0y3XXoS5R6PAY OJyrXdy1eYxA6Ov0vJG32MVeGLIjyPwv4BZ5nnIo6r60Zj6u8FZ11oFsZzpaHLgAcS eC8qPFEB7uJ/BusOQaMP123ekGoe6st0NSVgUJygz4xjDCNNTPUBKLKretcc+OHZ4r mqlvK0v0jr4mbIZbL2jjZW0HkAGu2O/uiPGwA1J34j2v1Zl5waDCz9QMAeNHfLHJHe eJ3qu1gtjde4A== Received: by x201s (Postfix, from userid 1000) id BC62220800F; Wed, 08 May 2024 14:34:06 +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 , Przemek Kitszel Subject: [PATCH net-next v2 09/14] net: qede: use extack in qede_flow_parse_udp_v4() Date: Wed, 8 May 2024 14:33:57 +0000 Message-ID: <20240508143404.95901-10-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: 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 Reviewed-by: Simon Horman --- 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 abeb873f58f3..69dbd615b653 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 flow_rule *rule, struct qede_arfs_tuple *tuple, } 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 flow_rule *rule, struct qede_arfs_tuple *tuple, + struct netlink_ext_ack *extack) { tuple->ip_proto = IPPROTO_UDP; tuple->eth_proto = htons(ETH_P_IP); - return qede_flow_parse_v4_common(rule, tuple, NULL); + return qede_flow_parse_v4_common(rule, tuple, extack); } 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(rule, tuple, NULL); 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(rule, tuple, NULL); else if (ip_proto == IPPROTO_UDP && proto == htons(ETH_P_IPV6)) rc = qede_flow_parse_udp_v6(rule, tuple, NULL); else From patchwork Wed May 8 14:33:58 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: 13658856 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 36A5D86621; Wed, 8 May 2024 14:43:10 +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=1715179394; cv=none; b=ieAKBv5rfT7xNiutlKzd8oXSCTsydZN4kE+RhCCell8lckKjeDZUACJJ2ISM3o02wy4MxZU8UWPgBxcBRCsydTDWsakK0Ap4F8ZFUj91v0m0IUEhkxs6goFUgshMNCAlmDSEjQBW2C+FuaAIZ+FiYBoNNFpmpoq8BmTCRGcLn7k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715179394; c=relaxed/simple; bh=4/NGqnq/P6W7DCZCCHJpFo8vOoNfYri66a2ARCZZTzk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tuA1ivODldT7MdN+XKsweILyePkPL7tBDJQ/pYvqnxTTEAgiPtZVp8RNrKRb0jz/0pFbLKfUo9FYqbB6hd0oX3s2oLcWh3Tpw4kQvANpmTCduJPjTK9F2bzRGYJ/QGsF/LNSSNZJHuwTs4rn0wNQ59/815rijPSTaH87Fu4oGLY= 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=bm5BYzmS; 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="bm5BYzmS" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id B1B88600AF; Wed, 8 May 2024 14:34:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715178867; bh=4/NGqnq/P6W7DCZCCHJpFo8vOoNfYri66a2ARCZZTzk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bm5BYzmS0A/WGy7fjQKTkxZnk36q+rM5E7xQXmeiuGeYPpG0Aq5uTuRXOucjw8Ecc PhTLoC6sM8ZgJP0mZJUdV0HrQAzW5vpjoWUbNrzg8GDpp5NentHJ4BvZYAau6rK5Jx UGgCkzb+m9m9s2mGNRGxckFftU3L20pLGZZsQTcNOWc/7eOTuOrfuYSP824riQD9t3 /z010XmUO5CwaymCeO4cmKlRqvYdu/OJuYULAxcjXurjGM7lutIm7VFXyJy82eHdgu ITcxufYOR0MuuVVbLF1gVXPfgnmDspwcrNgDHpGuRZ1/bvObWGZH2+wLQTDljt1GLK OIghNMKgn644w== Received: by x201s (Postfix, from userid 1000) id E4E7B2081D3; Wed, 08 May 2024 14:34:06 +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 , Przemek Kitszel Subject: [PATCH net-next v2 10/14] net: qede: add extack in qede_add_tc_flower_fltr() Date: Wed, 8 May 2024 14:33:58 +0000 Message-ID: <20240508143404.95901-11-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: 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 Reviewed-by: Simon Horman --- 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 69dbd615b653..09ffcb86924b 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 Wed May 8 14:33:59 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: 13658848 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 9712D86255; Wed, 8 May 2024 14:34:36 +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=1715178879; cv=none; b=ZhRRrfPDgbHwQZdHRceyU+sANsotld1+EbX9MllrzgVhzzOM4n/jsHiWR84Ol6eEN6QZ0v2+U731E78NIj6/EsRA/pE01rWpDqBKFj5mHo9GgM+VbXsfFrNL5tcw6YRwmvn7mejR5hwuieP9232K27NwAS6TQCoqzKZKpyUcD7Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715178879; c=relaxed/simple; bh=ZVoVECNiymr5am54JK0hcDsvILL7gVMo7nWXFwZf8nQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=N5DUxHcUFUClau3RVArxuz1O2Qgo7UKiASESfVBF6kRp8pjY1dk18o5Y3Y+szulzUg9CYtiHqPIyAN6hZBPOJgLjKJdGXvwaU/WmKJ4wMZbY0leYrnajLlkLE5QsTlAidckIlbDt1oj543y/MP5Jzv2hXefXPlVwsYVtfW1jRZg= 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=aeUe3Mj+; 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="aeUe3Mj+" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id 92477600C8; Wed, 8 May 2024 14:34:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715178869; bh=ZVoVECNiymr5am54JK0hcDsvILL7gVMo7nWXFwZf8nQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aeUe3Mj+rWMmjgCH3vJx6tGE8cSWbYqvTJi1Bdnw8HBhfWdWS9KWeWWlzTzT9/9UE OU/K0XRgeywbasD7eoxKyYGBPXl8v/gOYXaK9fQFJ5M0dmwQoZx4SmVWRgf3XbfL9n oOUBn4XcrqfR3TYooqqSA+4ktKLX4uGvdjeN0tbdcgW4i4Y6U4jQcGzFx4vGFmChJ6 z6ZOizXifnUgYbfXFpV1FqdxEeuu8zyWwwXghiMxwKzyR8NDPiIy7ROgk5uZQCyyFN yo8CoFsiBfuCgrnpv4Rlu/MxFsCmIjSrMbr8vC86uPyxJaJoUpC4XQH9r1ETqa5pkq 4RLLxbROQR+sA== Received: by x201s (Postfix, from userid 1000) id 1B8E42081D5; Wed, 08 May 2024 14:34:07 +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 , Przemek Kitszel Subject: [PATCH net-next v2 11/14] net: qede: use extack in qede_parse_flow_attr() Date: Wed, 8 May 2024 14:33:59 +0000 Message-ID: <20240508143404.95901-12-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: 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 Reviewed-by: Simon Horman --- .../net/ethernet/qlogic/qede/qede_filter.c | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c b/drivers/net/ethernet/qlogic/qede/qede_filter.c index 09ffcb86924b..8c1c15b73125 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_filter.c +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c @@ -1826,8 +1826,9 @@ qede_flow_parse_udp_v4(struct flow_rule *rule, struct qede_arfs_tuple *tuple, } static int -qede_parse_flow_attr(struct qede_dev *edev, __be16 proto, - struct flow_rule *rule, struct qede_arfs_tuple *tuple) +qede_parse_flow_attr(__be16 proto, struct flow_rule *rule, + struct qede_arfs_tuple *tuple, + struct netlink_ext_ack *extack) { struct flow_dissector *dissector = rule->match.dissector; int rc = -EINVAL; @@ -1841,14 +1842,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 +1862,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(rule, tuple, NULL); + rc = qede_flow_parse_tcp_v4(rule, tuple, extack); else if (ip_proto == IPPROTO_TCP && proto == htons(ETH_P_IPV6)) - rc = qede_flow_parse_tcp_v6(rule, tuple, NULL); + rc = qede_flow_parse_tcp_v6(rule, tuple, extack); else if (ip_proto == IPPROTO_UDP && proto == htons(ETH_P_IP)) - rc = qede_flow_parse_udp_v4(rule, tuple, NULL); + rc = qede_flow_parse_udp_v4(rule, tuple, extack); else if (ip_proto == IPPROTO_UDP && proto == htons(ETH_P_IPV6)) - rc = qede_flow_parse_udp_v6(rule, tuple, NULL); + rc = qede_flow_parse_udp_v6(rule, tuple, extack); else - DP_NOTICE(edev, "Invalid protocol request\n"); + NL_SET_ERR_MSG_MOD(extack, "Invalid protocol request"); return rc; } @@ -1889,7 +1891,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(proto, f->rule, &t, extack); if (rc) goto unlock; @@ -2015,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(edev, proto, flow->rule, t); + err = qede_parse_flow_attr(proto, flow->rule, t, NULL); if (err) goto err_out; From patchwork Wed May 8 14:34:00 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: 13658842 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 970C186254; Wed, 8 May 2024 14:34:36 +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=1715178878; cv=none; b=ENvFJLlYQoBXDdvpT+y+rjZQ5rXtLH12hItyn67VocswYFCEuLSWSnrUvvTkvKyFO9dpMpugUznKB27Ea21SXHK/IHd85pNsln+sEKEV5RybxU3kMZ9WnRuS6S9sAOz6KcFi7YoxvDYYdsBmCEi1vIljN6RSpVasZOSPD63hVIQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715178878; c=relaxed/simple; bh=SkoT0Uk0es2G81IY4lemOptjyc0r3NPOQ9SxNmgHgUo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=TcYWx3Qgq9bu2cZUI3VBIj0uX83Fj8JDuYJeYpIXbowt0zpwwzSbh0g3oS2KsEwM/q+vgigslS1KjNPEQvRKLb4MOT6Zz8wHZ264xZW/6rUfZc8v5NFOQMpjxTaXcU/GhXYmwiB9etnmhLdxNQmtITAh9yWdWMOklGHm2a6qqD0= 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=fiG++FY1; 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="fiG++FY1" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id 961A7600DC; Wed, 8 May 2024 14:34:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715178869; bh=SkoT0Uk0es2G81IY4lemOptjyc0r3NPOQ9SxNmgHgUo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fiG++FY1HFrnr8wnRZb5PucCL/uuXFhWSXsqPWx4rR+J9vrdCQZ2SCMdujUkHDZMY 1pw/58E+pCe0TsE3jik9EyMQWCSPj8P8Lk8SJpbT3XTSdN8LRpDW61UDSsBpNxfDF7 UGad2IJ5QnF/iWHqP9rNWav6RV4kec+x6R5BTOxNRRMKg0QKe65pII9OGhdMxj2FEi fYW1NiPUd9D7n6Nk/ozjuGoVtXyRJvx12BImpidhwapQTuGd5l3G/CHqwDdn/mF6Wf jORdob/eHPul0z5wdWa+3g2M7PyHIgkQlFmeDu4VMbTEXm8Yl3AUJgPr122vanYEoV 7WXcf8kiITIGQ== Received: by x201s (Postfix, from userid 1000) id 480FC208F1D; Wed, 08 May 2024 14:34:07 +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 , Przemek Kitszel Subject: [PATCH net-next v2 12/14] net: qede: use faked extack in qede_flow_spec_to_rule() Date: Wed, 8 May 2024 14:34:00 +0000 Message-ID: <20240508143404.95901-13-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: 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 Reviewed-by: Simon Horman --- 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 8c1c15b73125..b83432744a03 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_filter.c +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c @@ -1990,6 +1990,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; @@ -2017,7 +2018,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(proto, flow->rule, t, NULL); + err = qede_parse_flow_attr(proto, flow->rule, t, &extack); if (err) goto err_out; @@ -2025,6 +2026,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 Wed May 8 14:34:01 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: 13658843 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 B61DC8625B; Wed, 8 May 2024 14:34:36 +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=1715178878; cv=none; b=YdfvjXYaIm9aEvJBCh+xs6VjzLfKSBu+nIr+vrdCQp6ErbMimtLmKv0mIMjWL/b9FkzauAscKtkWfKIkZJjqNPNVpqckJ5Wh775YZbH/JyZJUeAkGv5F9+Kbhaw1HaiYrapiKJqIw5yxYwJ9KotwIIoOTG14yB7G0srcJUUStws= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715178878; c=relaxed/simple; bh=Mf879ORHeiN78yZ0qbPSxvvQFKSWRXMy6QgOVWZGZ/4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=SieUqlU6vcTg4s/9JYcBZkn8qLvAxcgZ3WCgLKuEiBkEkSpzRAbtkHIYIAbVzzeiZPRxOU3XsYGSikoLxacoSnjfv+NKcM1HJ7bx0jH+xUQ8zduz/nq2MPEluniSioofslR5/SvP4fSGFr5/n+5ibdrxYvtUBYJwsKOKsWSwvNc= 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=QTCGbw4b; 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="QTCGbw4b" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id A436660136; Wed, 8 May 2024 14:34:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715178869; bh=Mf879ORHeiN78yZ0qbPSxvvQFKSWRXMy6QgOVWZGZ/4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QTCGbw4bvuLg9MKqflYo3aHGsy2DeGhJ3t0g4pRplys3Mth9ORPabssqgjv1iAKyF nqW9j/1XAVR+YaSy3eN6Hgs6dIpARAuPzaTDGXoT9qEQ6nKC4x2xWw/ch+r0uP0XcX GARYYaTVP3OZa5MRy6f/OvOj//W2QrUjOyfws0xpHUc9v7DMUOe2FYe/KwUsEPHbWE PyaMoblQWYSeLCIfOBWTdR1jvp9krSJCqButNpC04hNA4zlRvYAiLCIfOWjrbfXCrd CwpKFKKVWjuK788o53s9sawCKYkNb0rqkqFGYX0H4llZYw/u4hmZ1ZQCHLo8mPGXeQ skf8LEK9DPV7w== Received: by x201s (Postfix, from userid 1000) id 6AA1C20912B; Wed, 08 May 2024 14:34:07 +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 , Przemek Kitszel Subject: [PATCH net-next v2 13/14] net: qede: propagate extack through qede_flow_spec_validate() Date: Wed, 8 May 2024 14:34:01 +0000 Message-ID: <20240508143404.95901-14-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: 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 Reviewed-by: Simon Horman --- drivers/net/ethernet/qlogic/qede/qede_filter.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c b/drivers/net/ethernet/qlogic/qede/qede_filter.c index b83432744a03..e616855d8891 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_filter.c +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c @@ -1953,7 +1953,8 @@ 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, - __u32 location) + __u32 location, + struct netlink_ext_ack *extack) { int err; @@ -1977,7 +1978,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; @@ -2024,7 +2025,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); + fs->location, &extack); err_out: if (extack._msg) DP_NOTICE(edev, "%s\n", extack._msg); From patchwork Wed May 8 14:34: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: 13658854 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 0EB2E8625F; 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=Vx/gJGvgCXSxUllV9geCWfb7It1wcRO9iTal28IoDgzOmkY5KPyU9g3J3CZaXYdQqnvGTbDpuB0oKMcz/vc43WwBCx6uHaJMcwufcJ//YsXD/hyf3pVDLZbPMjEYJslGHnFTNcS/KS/jFrp7A/c0xNwdVk8tChgq8yROYD1qcUU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715179393; c=relaxed/simple; bh=hRQM6pa4uOlYJlXbLpb90EuOE7VS+21UzKU3uMNSqcc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=f/9OqIQowo0jghQYu5ji14qhWr7Xe4Ybvci3TKBufsOiArATIlLfUQwhBWUxXHiFbCpJdRP0yNgPnyQWZZbjvYz8VnebT64oIsY0mMzdkVnlgQGOhjSew5xtBNeCgGHHlUZ6u5l62R6L1bNdqKTfpBBHd19c3zD8lcYH3KuZVTc= 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=XNGGDpS0; 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="XNGGDpS0" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id EBFE6600A2; Wed, 8 May 2024 14:34:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1715178866; bh=hRQM6pa4uOlYJlXbLpb90EuOE7VS+21UzKU3uMNSqcc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XNGGDpS0ikIorNWcFCAqFXZFSoEZobaoZZSuxKak2Ye1Lj3zeTwprjOGPhG6NumDJ ieUduAKpyFrteW8F7aWi/Clx84pVPFoN75sP1xSEiIUFjmmuTxCmD7PWyXe6bry8aQ kh5eobe2q0x4a/RIY6pCVsjNWGW4nPoYWg49547603FleV+AldkaZ+uRdEChz7xRfw Dm7pMGKYV/tnrfzTPRxnbQifaTifRYZ9EHW1Bf3RJ3NeOlHxPsyzHMbKUM06xO+yjB wzVQ7buMdNKkkbPGG7p4wJ2a9OMaynN0xlcgVHEhMkyXSdQ1g/f6ju7xQFLZzzNhMX thvhYwE9hJuoA== Received: by x201s (Postfix, from userid 1000) id 8F1AC20916D; Wed, 08 May 2024 14:34:07 +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 , Przemek Kitszel Subject: [PATCH net-next v2 14/14] net: qede: use extack in qede_parse_actions() Date: Wed, 8 May 2024 14:34:02 +0000 Message-ID: <20240508143404.95901-15-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: 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 Reviewed-by: Simon Horman --- 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 e616855d8891..9c72febc6a42 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;