From patchwork Wed Apr 24 12:16:21 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: 13641774 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 7901515ADA7; Wed, 24 Apr 2024 12:16:52 +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=1713961014; cv=none; b=JRnwKCyZoOL8QIrUwR2Blto4GNJ7/57Gj4iqa7hjwyhXq9EEzw1hiEiuEW9iTtP7Kti1nnUsInZ34bEHjvDgyW1HPv1yyvzCMI7QsoPtdQZPTxaEEcrxOLayReCDSfapYlmQZ1NKfnTF0/WJ5LBkDS0NCTxTcXtMqqX82PN3P2E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713961014; c=relaxed/simple; bh=PJ0CzHqB5rokxbMzRyma4HaJ9uYEAg9hicxRy4R6kL0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=LmGY8/+MuGsMDDnczV21v44vPM3PETnemHu4K7yR4H8+hbniaVqleIIBrkVq/764YQAp+UWvH0oofIAwnGIc09++si9apzTMPrv7JucPat6zbUaZZu3ADd/B6LgPBDe40/TjTlvPmAO0OBcvi28Jd171Cy6bMA+BNcWJK0ay0UU= 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=iVCChsq/; 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="iVCChsq/" Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id 08B87600B1; Wed, 24 Apr 2024 12:16:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1713961004; bh=PJ0CzHqB5rokxbMzRyma4HaJ9uYEAg9hicxRy4R6kL0=; h=From:To:Cc:Subject:Date:From; b=iVCChsq/jXVH+cUrfMJr5PWDGOkRubmamTZ/AZKRLIsRLW5T/4zOyXIv3gEUSDouB ve42GV5naBSDS9+nSHvq5Vbc8SxYF5ci1lDigOffovf5vhEw9AD9QAs2q5N82TG1fy qnJ+1MxdKbBbmPl+1xL7KEGJ9l/WXu7ATP8i4+tyrW3U3eABZMbMNQ2dTB3j8IhM+s kWggGd0nzN6Bl1YQXfnMyqgRJMUdSAUFGQiVwmja1VGABbe9yLrbKKZD6oqjuA4gsC aTshduVJs57zHNJMFgzQBdywB0uTmYUMZ+QYv65pXFUMRllXLa2jAPtpPqejKY0sLY LNEbG59p+zLNg== Received: by x201s (Postfix, from userid 1000) id 55AD7204B37; Wed, 24 Apr 2024 12:16:35 +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?= , Steen Hegelund , Lars Povlsen , Daniel Machon , UNGLinuxDriver@microchip.com, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org, Jiri Pirko , Simon Horman Subject: [PATCH net-next v2 0/4] net: sparx5: flower: validate control flags Date: Wed, 24 Apr 2024 12:16:21 +0000 Message-ID: <20240424121632.459022-1-ast@fiberby.net> X-Mailer: git-send-email 2.43.0 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 This series adds flower control flags validation to the sparx5 driver, and changes it from assuming that it handles all control flags, to instead reject rules if they have masked any unknown/unsupported control flags. Reviewed-by: Daniel Machon Tested-by: Daniel Machon --- Changelog: v2: * Split first patch into 3 (requested by Jiri) * Convert a missed extack usage (noticed by Daniel) * Added cover letter (requested by Simon and Daniel) v1: https://lore.kernel.org/netdev/20240423102728.228765-1-ast@fiberby.net/ Asbjørn Sloth Tønnesen (4): net: sparx5: flower: only do lookup if fragment flags are set net: sparx5: flower: add extack to sparx5_tc_flower_handler_control_usage() net: sparx5: flower: remove goto in sparx5_tc_flower_handler_control_usage() net: sparx5: flower: check for unsupported control flags .../microchip/sparx5/sparx5_tc_flower.c | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-)