From patchwork Tue Jun 18 14:11:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Szycik X-Patchwork-Id: 13702439 X-Patchwork-Delegate: kuba@kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (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 43FBC13A899 for ; Tue, 18 Jun 2024 14:10:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.8 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718719810; cv=none; b=g9RcMDMu6k8ktLV8Mc2jf4h/QiqWuZ1Lqft/e6dkPC2xrXsBjr3BxpYvVvsGVzxW9NPf/CfL/SimHaGhcr9rI2pYb4Xv7oT3FyN/Kmpal1J5wsSRhAXpkMm5fhumsUmbA1gAMqZ2MwAw3GUq7iVrKYtkMPiSQr0QHKEosmjWbY4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718719810; c=relaxed/simple; bh=00WpGcsEMIsU9URS7/+Rk5iXtCeARQolpArF+UPgl5w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=u2G4L1IJOaeyMVWsXP2QHi4ZOlE4eVa1gQFcgJJ4SHeSiQV4r4lIwS6h/VGNUr/4YIB3/RfYTV7ZuTs4AJrUaT/9d3Zrmkmrd9Kc6/B0UOFzQgGwg3cTQoyiMl65B3/2ZMN6ACJ2Wg9+TFlZS/16sDPxOsedHA/2QJEMWUUGklk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=E3C6AeTb; arc=none smtp.client-ip=192.198.163.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="E3C6AeTb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718719809; x=1750255809; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=00WpGcsEMIsU9URS7/+Rk5iXtCeARQolpArF+UPgl5w=; b=E3C6AeTb7AzVTpLMgIIX79Wjr9dDcgXExfCMdpi1EOyo0QFUE+CGDvsL qDXhae401g2dEa1g/XK5i8/za/AvMbmXkU0kvHx/Z6770GVsWJpvxksle 2G1EwXTRO78lgxUbtZ9eaXFL7TjpTD3cHoVaEb13WQ3++ngLZmbzH2QNn vxkGKDf4tVDKpDzs1cCVOyaNVN5caWK4iVaMtwvFe+448N847mTtwRkF9 zqa3WCksdsDtojiLh63OKtmIWRyAKBUXnuFtlqTPGECxQPefCpIYvNFNw yxkJBPcK/jFKx1//Xjbi/1mnPdtv6HAdKWmHxEi2bvCrP46NticVWI1c5 g==; X-CSE-ConnectionGUID: 3VTm75LkTvWS+K3n7809ng== X-CSE-MsgGUID: KH/jyoLvRi2BrZciVDEVXg== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="33137754" X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="33137754" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 07:10:06 -0700 X-CSE-ConnectionGUID: L03I+aHJTMGB70EC+Zxh+A== X-CSE-MsgGUID: aHF89izGQmaMk5p6Wp8TpQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="46109778" Received: from irvmail002.ir.intel.com ([10.43.11.120]) by fmviesa004.fm.intel.com with ESMTP; 18 Jun 2024 07:10:05 -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 C12AE34301; Tue, 18 Jun 2024 15:10:02 +0100 (IST) From: Marcin Szycik To: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org, michal.swiatkowski@linux.intel.com, przemyslaw.kitszel@intel.com, Marcin Szycik Subject: [PATCH iwl-next 1/6] ice: Remove unused struct ice_prot_lkup_ext members Date: Tue, 18 Jun 2024 16:11:52 +0200 Message-ID: <20240618141157.1881093-2-marcin.szycik@linux.intel.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240618141157.1881093-1-marcin.szycik@linux.intel.com> References: <20240618141157.1881093-1-marcin.szycik@linux.intel.com> 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 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 Reviewed-by: Simon Horman --- .../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; }