Message ID | 20230114134242.3737446-2-steen.hegelund@microchip.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp289050wrn; Sat, 14 Jan 2023 05:45:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXus+UE7Z/wJSaQiqSF6VqNmX8SR0FyZalA4imC/VQ/1lsQzvTJbI4xyABxf/RicdS0BjHF3 X-Received: by 2002:a17:90a:d253:b0:229:45d5:f8da with SMTP id o19-20020a17090ad25300b0022945d5f8damr2936975pjw.48.1673703909588; Sat, 14 Jan 2023 05:45:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673703909; cv=none; d=google.com; s=arc-20160816; b=IIhNeh/LO1I64TwUPLJTZ9d51MIzf/c/Gt3A/BHW93jRZgOno5ha9vyXONI6QLaRQm r2R3JU25SwfCtXQyB/JbmdXqAcoYUXLUWbzByyZ82T4bLkoAzNUZmp2zignYopYQ4yCA d0ZmeTLU9hZ+5SJfP0jbDSkrpneVMVMSS/A25TwD3D5ZjXN9bcwYQW8fR0fw4258+NRr 8Buu+xUkQYNWfE3uhR7y3TcrQnMmohkZIpFr4yfn7XaArvTfYnW8GgsOQ9fVzu9EQInO K+6IqfNaxZNSac5AhXMOzYviLT4wB0wzUE7op/a9L+9nIgyEcbqrJ6WZ/GEUV/p8EHjf MhiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zFPW+/Nha/JjDHUcOojstXkToOObmc/0pCMOybzhjho=; b=BcJ66oFAoy6r22rmT9Pv9DWeEdWmhX5ItBdDrDZy2CazDB0MhIx5pZpq8ZdFe1qjyP mMy8XBIFCTxf1qWFXmH5TA79IhhC1MtipMXQJ6edsQ7kxBILpwF6n+WPzEL2ffz7jJEE MWm5KcWdPsgp6ZNrmeqUc2rScBa/elQK5x9IdKk1t6Cm1rcEUvunQwD+pcEqkTcrkpKC aLVIQ2JlXBtIIo+H8RbpHw7ewWGgyDmDhEAzDAwMTtGbljXFFQ2sIOy9PF6BPWoSTUOb H8dgwl5TQXCp+4/Z3x9X/eLt2qnj+XOKQd7Rqll/4oyVEGOW8G+J+QT2f9R22pcpXj5R 4DSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=laVHcM7E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a19-20020a630b53000000b004774d8c6191si23802509pgl.413.2023.01.14.05.44.57; Sat, 14 Jan 2023 05:45:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=laVHcM7E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230013AbjANNnH (ORCPT <rfc822;limurcpp@gmail.com> + 99 others); Sat, 14 Jan 2023 08:43:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229989AbjANNm7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 14 Jan 2023 08:42:59 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E74B5277; Sat, 14 Jan 2023 05:42:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1673703775; x=1705239775; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CSSQa3dD4gybR3nOez6pDisJkzG2bVCeG3CLX4+Xp4Q=; b=laVHcM7ErbSfZF9R3yZWmMuuHwZuDNTXmLqlrD/z8leYXPTCW2vzYmSJ Ipu5D0JW9iVMrv3ue5QacUV+l7JkAtldFyTYQSt6R2Tzv0ndLdXQfyvMg Dm7GU9qHUVftGOjOHodZeQiyTJ7q0kpjpGrurzH/9DhAX84+WWRSVFjGf 5q7POkkM7aqc4yVcIg1rmiw/ITK2hoZagfgfYAUeJawdMucSjL46p6XnJ mXKszD2jFF7KDGrq8vKH2at+ZDsN8pZadkmVRnJvyyGoNZYzj1/pEDJ2S 4VSRR5QygGG3ZdJTqnB4L92diFy4FeUsm/FzBrBH5icINQK0avxFynriA g==; X-IronPort-AV: E=Sophos;i="5.97,216,1669100400"; d="scan'208";a="196798566" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 14 Jan 2023 06:42:55 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Sat, 14 Jan 2023 06:42:53 -0700 Received: from den-dk-m31857.microchip.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Sat, 14 Jan 2023 06:42:50 -0700 From: Steen Hegelund <steen.hegelund@microchip.com> To: "David S . Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com> CC: Steen Hegelund <steen.hegelund@microchip.com>, <UNGLinuxDriver@microchip.com>, Randy Dunlap <rdunlap@infradead.org>, "Casper Andersson" <casper.casan@gmail.com>, Russell King <rmk+kernel@armlinux.org.uk>, Wan Jiabing <wanjiabing@vivo.com>, "Nathan Huckleberry" <nhuck@google.com>, <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, "Steen Hegelund" <Steen.Hegelund@microchip.com>, Daniel Machon <daniel.machon@microchip.com>, Horatiu Vultur <horatiu.vultur@microchip.com>, Lars Povlsen <lars.povlsen@microchip.com>, Dan Carpenter <error27@gmail.com>, Michael Walle <michael@walle.cc> Subject: [PATCH net-next v4 1/8] net: microchip: vcap api: Erase VCAP cache before encoding rule Date: Sat, 14 Jan 2023 14:42:35 +0100 Message-ID: <20230114134242.3737446-2-steen.hegelund@microchip.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230114134242.3737446-1-steen.hegelund@microchip.com> References: <20230114134242.3737446-1-steen.hegelund@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755005750540150616?= X-GMAIL-MSGID: =?utf-8?q?1755005750540150616?= |
Series |
Add support for two classes of VCAP rules
|
|
Commit Message
Steen Hegelund
Jan. 14, 2023, 1:42 p.m. UTC
For consistency the VCAP cache area is erased just before the new rule is
being encoded.
Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com>
---
drivers/net/ethernet/microchip/vcap/vcap_api.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/microchip/vcap/vcap_api.c b/drivers/net/ethernet/microchip/vcap/vcap_api.c index 664aae3e2acd..b9b6432f4094 100644 --- a/drivers/net/ethernet/microchip/vcap/vcap_api.c +++ b/drivers/net/ethernet/microchip/vcap/vcap_api.c @@ -1823,6 +1823,7 @@ int vcap_add_rule(struct vcap_rule *rule) } if (move.count > 0) vcap_move_rules(ri, &move); + vcap_erase_cache(ri); ret = vcap_encode_rule(ri); if (ret) { pr_err("%s:%d: rule encoding error: %d\n", __func__, __LINE__, ret); @@ -1885,7 +1886,6 @@ struct vcap_rule *vcap_alloc_rule(struct vcap_control *vctrl, ri->vctrl = vctrl; /* refer to the client */ if (vcap_set_rule_id(ri) == 0) goto out_free; - vcap_erase_cache(ri); return (struct vcap_rule *)ri; out_free: