From patchwork Mon May 23 09:41:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wojciech Drewek X-Patchwork-Id: 1634483 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Z2HuyZwM; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4L6C6p6Rf4z9sG0 for ; Mon, 23 May 2022 19:42:42 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 5478F40B0D; Mon, 23 May 2022 09:42:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cUvYYe7O-uPS; Mon, 23 May 2022 09:42:39 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 7C16240B35; Mon, 23 May 2022 09:42:39 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 2E5C21BF378 for ; Mon, 23 May 2022 09:42:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 1CA8483E1A for ; Mon, 23 May 2022 09:42:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=intel.com Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TFbgmF60MAaX for ; Mon, 23 May 2022 09:42:36 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by smtp1.osuosl.org (Postfix) with ESMTPS id 912CF8332A for ; Mon, 23 May 2022 09:42:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653298956; x=1684834956; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=ICZySgEhFf7hhJcW7RsWj3f4H97EWZbzDAnNMM3Dwx8=; b=Z2HuyZwM4XvTdjmEU6rNKCn8H5JnRKW7GJ7M6BV4NtJL3J8MAIk+nt4Z 7hqjBy1JW2p/x0Rdg/dmxBcR6EXQVTPl3LIUvTr4CwjMvU07AF09u7mGS MmaozMH3KJnXcNOLK4yrGoFWXcGKbenw6jOplQBPfMe6oZossb3lWQF0g 6T3xPjZClcVw7OQ+LU0MTOWLpvK1VQw6MBt8JxD+NKZGaJWTxZ+y9q9Ko +Ki9AQRydY0dFPlMawWmN08F5WY47muvHPGSRma7DYrRCCoI89cWihCHD MRV7rpvFmWBrjc1chIc7KlrvaFGhshlXn4qEAtKJChiPKMq0Wo1CJ/ZQm w==; X-IronPort-AV: E=McAfee;i="6400,9594,10355"; a="273286306" X-IronPort-AV: E=Sophos;i="5.91,246,1647327600"; d="scan'208";a="273286306" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2022 02:42:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,246,1647327600"; d="scan'208";a="572000300" Received: from irvmail001.ir.intel.com ([10.43.11.63]) by orsmga007.jf.intel.com with ESMTP; 23 May 2022 02:42:35 -0700 Received: from switcheroo.igk.intel.com (switcheroo.igk.intel.com [172.22.229.137]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id 24N9gY99001338 for ; Mon, 23 May 2022 10:42:34 +0100 From: Wojciech Drewek To: intel-wired-lan@lists.osuosl.org Date: Mon, 23 May 2022 11:41:55 +0200 Message-Id: <20220523094155.388032-1-wojciech.drewek@intel.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [Intel-wired-lan] [PATCH net v2] ice: Fix switchdev rules book keeping X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Adding two filters with same matching criteria ends up with one rule in hardware with act = ICE_FWD_TO_VSI_LIST. In order to remove them properly we have to keep the information about vsi handle which is used in VSI bitmap (ice_adv_fltr_mgmt_list_entry::vsi_list_info::vsi_map). Fixes: 0d08a441fb1a ("ice: ndo_setup_tc implementation for PF") Reported-by: Sridhar Samudrala Signed-off-by: Wojciech Drewek Tested-by: Sandeep Penigalapati --- v2: compile issue fixed --- drivers/net/ethernet/intel/ice/ice_tc_lib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/intel/ice/ice_tc_lib.c b/drivers/net/ethernet/intel/ice/ice_tc_lib.c index 3acd9f921c44..4abf914a3b3e 100644 --- a/drivers/net/ethernet/intel/ice/ice_tc_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_tc_lib.c @@ -524,6 +524,7 @@ ice_eswitch_add_tc_fltr(struct ice_vsi *vsi, struct ice_tc_flower_fltr *fltr) */ fltr->rid = rule_added.rid; fltr->rule_id = rule_added.rule_id; + fltr->dest_id = rule_added.vsi_handle; exit: kfree(list);