From patchwork Thu Jun 27 14:55:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Szycik X-Patchwork-Id: 1953333 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=oxhdbR45; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W91nR42BPz20XB for ; Fri, 28 Jun 2024 00:54:51 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 6667460E65; Thu, 27 Jun 2024 14:54:45 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id NlnIAqCY_pOK; Thu, 27 Jun 2024 14:54:44 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 170DA60E48 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1719500084; bh=Mz2Pu7dzToS+T//W7cb5ue/MB7V15amOSo6CToa/pic=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=oxhdbR45yoZJ5jcaSmlMI4Va5umSFXyA1SzEbyfJ9mltedj8hU/S6uC1UduTDPhc0 8nO6B1j1fVQEgrKNU5cxc1EstozLmB6Hv+YwvZKF8MTsFmKtgzSlse/PjnE6vH1llr EXEP4nEbeuVDhkIjSjFndB9LR21emQOd+dxuU4bPZgpjAAUE4EM4A+EdYjP13DXrdJ tuN7UANgHS0sQ+awsjH14MuQN2c0fwwHLXraIMsUvrX3uNcqzUycCq3bUSc4sDBW26 fz0CRoICxTEGAfXapeOmLm1k0IySGYL0F06yvVl7eBezp+r14IgVBmmsDQEyKZytD/ tFcGxJ2ds68Ew== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 170DA60E48; Thu, 27 Jun 2024 14:54:44 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 7F3461BF97A for ; Thu, 27 Jun 2024 14:54:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id B7A66415CE for ; Thu, 27 Jun 2024 14:54:36 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id wtuDdQ6EgyFh for ; Thu, 27 Jun 2024 14:54:35 +0000 (UTC) Received-SPF: None (mailfrom) identity=mailfrom; client-ip=192.198.163.12; helo=mgamail.intel.com; envelope-from=marcin.szycik@linux.intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org C384141610 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org C384141610 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by smtp4.osuosl.org (Postfix) with ESMTPS id C384141610 for ; Thu, 27 Jun 2024 14:54:34 +0000 (UTC) X-CSE-ConnectionGUID: 0FZe6qa0QVaqv2reji0X8A== X-CSE-MsgGUID: 98X5UaN6SPCYQ/rdf/hYDA== X-IronPort-AV: E=McAfee;i="6700,10204,11116"; a="20514963" X-IronPort-AV: E=Sophos;i="6.09,166,1716274800"; d="scan'208";a="20514963" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jun 2024 07:54:27 -0700 X-CSE-ConnectionGUID: ooTJe8jxTAudB/vZ6Ue4mQ== X-CSE-MsgGUID: aNqdOLZmTi6nQ5ICOw5I5Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,166,1716274800"; d="scan'208";a="67616389" Received: from irvmail002.ir.intel.com ([10.43.11.120]) by fmviesa002.fm.intel.com with ESMTP; 27 Jun 2024 07:54:26 -0700 Received: from mystra-4.igk.intel.com (mystra-4.igk.intel.com [10.123.220.40]) by irvmail002.ir.intel.com (Postfix) with ESMTP id 4659D27BBC; Thu, 27 Jun 2024 15:54:11 +0100 (IST) From: Marcin Szycik To: intel-wired-lan@lists.osuosl.org Date: Thu, 27 Jun 2024 16:55:41 +0200 Message-ID: <20240627145547.32621-2-marcin.szycik@linux.intel.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240627145547.32621-1-marcin.szycik@linux.intel.com> References: <20240627145547.32621-1-marcin.szycik@linux.intel.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719500075; x=1751036075; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=00WpGcsEMIsU9URS7/+Rk5iXtCeARQolpArF+UPgl5w=; b=VpxKlDmxvZYidkf1xW2FtstieWGiIYFnoTyDYOBPNOTWu2GgTAA9oxSP x0sKa2V7ddThxRgnR+y1YzV94wGE5lZBuNlSgWJi0zesfvSMk1QkC9Agn FbgH/QJcvicPxqEMyz9RJdDTCJOTEONtgUWJxS/S7Zx7eIK9JtiArTXAI PagmEz/FtqZpOBoiPnJIUU6daq42qohp4XTMsOz4K4B43U0UdVgY/bx0a sWF/9AmRMq/ptLTCniGXkmZ+iuHB8GgfksYzSaGi5OixLNKdxLT6JOHDn bxyQ37tBrq7piq9TFqX2P1gZD+FJ2UcAtPdfzO31x1fbdLB6baRU44YaH g==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=none (p=none dis=none) header.from=linux.intel.com X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=VpxKlDmx Subject: [Intel-wired-lan] [PATCH iwl-next v3 1/7] ice: Remove unused struct ice_prot_lkup_ext members 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: , Cc: pmenzel@molgen.mpg.de, netdev@vger.kernel.org, aleksander.lobakin@intel.com, Marcin Szycik , przemyslaw.kitszel@intel.com, michal.swiatkowski@linux.intel.com Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Remove field_off as it's never used. Remove done bitmap, as its value is only checked and never assigned. Reusing sub-recipes while creating new root recipes is currently not supported in the driver. Reviewed-by: Przemek Kitszel Signed-off-by: Marcin Szycik Tested-by: Sujai Buvaneswaran --- .../ethernet/intel/ice/ice_protocol_type.h | 4 -- drivers/net/ethernet/intel/ice/ice_switch.c | 44 ++++++++----------- 2 files changed, 19 insertions(+), 29 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_protocol_type.h b/drivers/net/ethernet/intel/ice/ice_protocol_type.h index 755a9c55267c..c396dabacef4 100644 --- a/drivers/net/ethernet/intel/ice/ice_protocol_type.h +++ b/drivers/net/ethernet/intel/ice/ice_protocol_type.h @@ -452,13 +452,9 @@ struct ice_prot_lkup_ext { u16 prot_type; u8 n_val_words; /* create a buffer to hold max words per recipe */ - u16 field_off[ICE_MAX_CHAIN_WORDS]; u16 field_mask[ICE_MAX_CHAIN_WORDS]; struct ice_fv_word fv_words[ICE_MAX_CHAIN_WORDS]; - - /* Indicate field offsets that have field vector indices assigned */ - DECLARE_BITMAP(done, ICE_MAX_CHAIN_WORDS); }; struct ice_pref_recipe_group { diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c index 1191031b2a43..0d58cf185698 100644 --- a/drivers/net/ethernet/intel/ice/ice_switch.c +++ b/drivers/net/ethernet/intel/ice/ice_switch.c @@ -4918,33 +4918,27 @@ ice_create_first_fit_recp_def(struct ice_hw *hw, *recp_cnt = 0; - /* Walk through every word in the rule to check if it is not done. If so - * then this word needs to be part of a new recipe. - */ - for (j = 0; j < lkup_exts->n_val_words; j++) - if (!test_bit(j, lkup_exts->done)) { - if (!grp || - grp->n_val_pairs == ICE_NUM_WORDS_RECIPE) { - struct ice_recp_grp_entry *entry; - - entry = devm_kzalloc(ice_hw_to_dev(hw), - sizeof(*entry), - GFP_KERNEL); - if (!entry) - return -ENOMEM; - list_add(&entry->l_entry, rg_list); - grp = &entry->r_group; - (*recp_cnt)++; - } - - grp->pairs[grp->n_val_pairs].prot_id = - lkup_exts->fv_words[j].prot_id; - grp->pairs[grp->n_val_pairs].off = - lkup_exts->fv_words[j].off; - grp->mask[grp->n_val_pairs] = lkup_exts->field_mask[j]; - grp->n_val_pairs++; + for (j = 0; j < lkup_exts->n_val_words; j++) { + if (!grp || grp->n_val_pairs == ICE_NUM_WORDS_RECIPE) { + struct ice_recp_grp_entry *entry; + + entry = devm_kzalloc(ice_hw_to_dev(hw), sizeof(*entry), + GFP_KERNEL); + if (!entry) + return -ENOMEM; + + list_add(&entry->l_entry, rg_list); + grp = &entry->r_group; + (*recp_cnt)++; } + grp->pairs[grp->n_val_pairs].prot_id = + lkup_exts->fv_words[j].prot_id; + grp->pairs[grp->n_val_pairs].off = lkup_exts->fv_words[j].off; + grp->mask[grp->n_val_pairs] = lkup_exts->field_mask[j]; + grp->n_val_pairs++; + } + return 0; }