From patchwork Fri Jan 27 13:08:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steen Hegelund X-Patchwork-Id: 13118695 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DAF6EC54EAA for ; Fri, 27 Jan 2023 13:37:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3uDwe1VYs1cc1D/elV5jZ1ulLoNP2SGO7/ySTHBL3ZY=; b=Csv2gXRhVT7QAZ dMbUh3Q6KaK7W4+2tI0ePbgeKitM50G7Et4M/gqG6AF9aXDp5apo2wbXkWPeDSEme4fmeP6Y63fXn DaOvvAjOcP542FqM3EjkIqeIW9P3oOjcG63qBsO07908W6/yeMmx/0OF3hrxjig7LIfr98fPTfic0 pnpXu3KWxbdJ9oMbpYi//SF8ryd0A+NhgHwGWpXGBdYxPYAkFLTxLxQx3X+2b1mvow+itKR5RHTL2 vB/fboankN2LtXPjFNJbBHogf5Q4brD+wcltTEkurZG0ymgXf0H8UwdODbiqmlURzsz+3yFabizbA Mhbp5bViKumR1HrqdrTQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pLOtw-00F38Z-1N; Fri, 27 Jan 2023 13:36:21 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pLOTV-00Estv-Tl for linux-arm-kernel@lists.infradead.org; Fri, 27 Jan 2023 13:09:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1674824942; x=1706360942; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=u8DnF1t00zWzTonmr+R22MKl2bbsYSJ4oF8S7fYeWRI=; b=AdHno5/AdIca9nCsNtgMs+eATxG163R/76zIWxG7xY8TYiGWlfidb5yq tvtL3CDvnq3j9/7BXwlIAUWLyO9Z3ZNjCImT1gfV7WA+AkGFpIM4zWoS/ opWlFHEIbYryH1gs7hK6sTgSRTVlc82Zffv2Ocq2srnJ9q8NRJW5a0R2i 3AreT+w90Bfee/bUt6Ci+dIG9kWsLbeeZLoelnBVJL2nDN+4vts9IO9Qv GVmjCW9EivlshsWgGymqblSsq445i1dtxiCkCr77pyZCFKFMAR6SFHo1r q7nPEMh0PUyb/4crFH3ot10iqPGf4XyOD34CoGCJP5mvQu4I/FdCC+GAq g==; X-IronPort-AV: E=Sophos;i="5.97,251,1669100400"; d="scan'208";a="194150444" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 27 Jan 2023 06:09:01 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Fri, 27 Jan 2023 06:08:56 -0700 Received: from den-dk-m31857.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Fri, 27 Jan 2023 06:08:52 -0700 From: Steen Hegelund To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni CC: Steen Hegelund , , Randy Dunlap , "Casper Andersson" , Russell King , Wan Jiabing , "Nathan Huckleberry" , , , , "Steen Hegelund" , Daniel Machon , Horatiu Vultur , Lars Povlsen , Dan Carpenter , Michael Walle Subject: [PATCH net-next 3/8] net: microchip: sparx5: Improve error message when parsing CVLAN filter Date: Fri, 27 Jan 2023 14:08:25 +0100 Message-ID: <20230127130830.1481526-4-steen.hegelund@microchip.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230127130830.1481526-1-steen.hegelund@microchip.com> References: <20230127130830.1481526-1-steen.hegelund@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230127_050902_127132_1A44E93A X-CRM114-Status: GOOD ( 10.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This improves the error message when a TC filter with CVLAN tag is used and the selected VCAP instance does not support this. Signed-off-by: Steen Hegelund --- drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c b/drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c index 8982c434cf54..f9922b35ee33 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c @@ -325,8 +325,11 @@ sparx5_tc_flower_handler_cvlan_usage(struct sparx5_tc_flower_parse_usage *st) u16 tpid; int err; - if (st->admin->vtype != VCAP_TYPE_IS0) + if (st->admin->vtype != VCAP_TYPE_IS0) { + NL_SET_ERR_MSG_MOD(st->fco->common.extack, + "cvlan not supported in this VCAP"); return -EINVAL; + } flow_rule_match_cvlan(st->frule, &mt);