From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32EFDC4742C for ; Fri, 13 Nov 2020 21:45:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0938D22252 for ; Fri, 13 Nov 2020 21:45:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726367AbgKMVpD (ORCPT ); Fri, 13 Nov 2020 16:45:03 -0500 Received: from mga06.intel.com ([134.134.136.31]:18968 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726113AbgKMVo5 (ORCPT ); Fri, 13 Nov 2020 16:44:57 -0500 IronPort-SDR: mFPlsVTKXjUQSQ2hps96tHUE/Tg3Kg0RWRQQ9cvdZsWrFWcrKElFpLTDMbQIuoU13kAsc++/Ud 80Lg0mO/xf5g== X-IronPort-AV: E=McAfee;i="6000,8403,9804"; a="232153127" X-IronPort-AV: E=Sophos;i="5.77,476,1596524400"; d="scan'208";a="232153127" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2020 13:44:54 -0800 IronPort-SDR: WnI9r+OQIzucy+eWhhwHebg0u8q9qicouEFVjAeu/SX3Epgl6qAUzw8uYvDfSpA6OSK0tWW5yx PIBA3T9M6jsA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,476,1596524400"; d="scan'208";a="532715814" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by fmsmga005.fm.intel.com with ESMTP; 13 Nov 2020 13:44:54 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Tony Nguyen , netdev@vger.kernel.org, sassmann@redhat.com, Paul M Stillwell Jr , Harikumar Bokkena Subject: [net-next v3 02/15] ice: rename shared Flow Director functions Date: Fri, 13 Nov 2020 13:44:16 -0800 Message-Id: <20201113214429.2131951-3-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201113214429.2131951-1-anthony.l.nguyen@intel.com> References: <20201113214429.2131951-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org These functions are currently used to add Flow Director filters, however, they will be expanded to also add ACL filters. Rename the functions, replacing 'fdir' to 'ntuple', to reflect that they are being used to for ntuple filters and are not solely used for Flow Director. Co-developed-by: Paul M Stillwell Jr Signed-off-by: Paul M Stillwell Jr Signed-off-by: Tony Nguyen Tested-by: Harikumar Bokkena --- drivers/net/ethernet/intel/ice/ice.h | 4 +-- drivers/net/ethernet/intel/ice/ice_ethtool.c | 4 +-- .../net/ethernet/intel/ice/ice_ethtool_fdir.c | 30 +++++++++---------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h index a0723831c4e4..59d3862bb7d8 100644 --- a/drivers/net/ethernet/intel/ice/ice.h +++ b/drivers/net/ethernet/intel/ice/ice.h @@ -592,8 +592,8 @@ int ice_fdir_write_fltr(struct ice_pf *pf, struct ice_fdir_fltr *input, bool add, bool is_tun); void ice_vsi_manage_fdir(struct ice_vsi *vsi, bool ena); -int ice_add_fdir_ethtool(struct ice_vsi *vsi, struct ethtool_rxnfc *cmd); -int ice_del_fdir_ethtool(struct ice_vsi *vsi, struct ethtool_rxnfc *cmd); +int ice_add_ntuple_ethtool(struct ice_vsi *vsi, struct ethtool_rxnfc *cmd); +int ice_del_ntuple_ethtool(struct ice_vsi *vsi, struct ethtool_rxnfc *cmd); int ice_get_ethtool_fdir_entry(struct ice_hw *hw, struct ethtool_rxnfc *cmd); int ice_get_fdir_fltr_ids(struct ice_hw *hw, struct ethtool_rxnfc *cmd, diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c index 9e8e9531cd87..363377fe90ee 100644 --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c @@ -2652,9 +2652,9 @@ static int ice_set_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd) switch (cmd->cmd) { case ETHTOOL_SRXCLSRLINS: - return ice_add_fdir_ethtool(vsi, cmd); + return ice_add_ntuple_ethtool(vsi, cmd); case ETHTOOL_SRXCLSRLDEL: - return ice_del_fdir_ethtool(vsi, cmd); + return ice_del_ntuple_ethtool(vsi, cmd); case ETHTOOL_SRXFH: return ice_set_rss_hash_opt(vsi, cmd); default: diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c b/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c index 2d27f66ac853..f3d2199a2b42 100644 --- a/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c +++ b/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c @@ -1388,7 +1388,7 @@ ice_fdir_do_rem_flow(struct ice_pf *pf, enum ice_fltr_ptype flow_type) } /** - * ice_fdir_update_list_entry - add or delete a filter from the filter list + * ice_ntuple_update_list_entry - add or delete a filter from the filter list * @pf: PF structure * @input: filter structure * @fltr_idx: ethtool index of filter to modify @@ -1396,8 +1396,8 @@ ice_fdir_do_rem_flow(struct ice_pf *pf, enum ice_fltr_ptype flow_type) * returns 0 on success and negative on errors */ static int -ice_fdir_update_list_entry(struct ice_pf *pf, struct ice_fdir_fltr *input, - int fltr_idx) +ice_ntuple_update_list_entry(struct ice_pf *pf, struct ice_fdir_fltr *input, + int fltr_idx) { struct ice_fdir_fltr *old_fltr; struct ice_hw *hw = &pf->hw; @@ -1429,13 +1429,13 @@ ice_fdir_update_list_entry(struct ice_pf *pf, struct ice_fdir_fltr *input, } /** - * ice_del_fdir_ethtool - delete Flow Director filter + * ice_del_ntuple_ethtool - delete Flow Director or ACL filter * @vsi: pointer to target VSI - * @cmd: command to add or delete Flow Director filter + * @cmd: command to add or delete the filter * * Returns 0 on success and negative values for failure */ -int ice_del_fdir_ethtool(struct ice_vsi *vsi, struct ethtool_rxnfc *cmd) +int ice_del_ntuple_ethtool(struct ice_vsi *vsi, struct ethtool_rxnfc *cmd) { struct ethtool_rx_flow_spec *fsp = (struct ethtool_rx_flow_spec *)&cmd->fs; @@ -1456,21 +1456,21 @@ int ice_del_fdir_ethtool(struct ice_vsi *vsi, struct ethtool_rxnfc *cmd) return -EBUSY; mutex_lock(&hw->fdir_fltr_lock); - val = ice_fdir_update_list_entry(pf, NULL, fsp->location); + val = ice_ntuple_update_list_entry(pf, NULL, fsp->location); mutex_unlock(&hw->fdir_fltr_lock); return val; } /** - * ice_set_fdir_input_set - Set the input set for Flow Director + * ice_ntuple_set_input_set - Set the input set for Flow Director * @vsi: pointer to target VSI * @fsp: pointer to ethtool Rx flow specification * @input: filter structure */ static int -ice_set_fdir_input_set(struct ice_vsi *vsi, struct ethtool_rx_flow_spec *fsp, - struct ice_fdir_fltr *input) +ice_ntuple_set_input_set(struct ice_vsi *vsi, struct ethtool_rx_flow_spec *fsp, + struct ice_fdir_fltr *input) { u16 dest_vsi, q_index = 0; struct ice_pf *pf; @@ -1594,13 +1594,13 @@ ice_set_fdir_input_set(struct ice_vsi *vsi, struct ethtool_rx_flow_spec *fsp, } /** - * ice_add_fdir_ethtool - Add/Remove Flow Director filter + * ice_add_ntuple_ethtool - Add/Remove Flow Director or ACL filter * @vsi: pointer to target VSI - * @cmd: command to add or delete Flow Director filter + * @cmd: command to add or delete the filter * * Returns 0 on success and negative values for failure */ -int ice_add_fdir_ethtool(struct ice_vsi *vsi, struct ethtool_rxnfc *cmd) +int ice_add_ntuple_ethtool(struct ice_vsi *vsi, struct ethtool_rxnfc *cmd) { struct ice_rx_flow_userdef userdata; struct ethtool_rx_flow_spec *fsp; @@ -1657,7 +1657,7 @@ int ice_add_fdir_ethtool(struct ice_vsi *vsi, struct ethtool_rxnfc *cmd) if (!input) return -ENOMEM; - ret = ice_set_fdir_input_set(vsi, fsp, input); + ret = ice_ntuple_set_input_set(vsi, fsp, input); if (ret) goto free_input; @@ -1674,7 +1674,7 @@ int ice_add_fdir_ethtool(struct ice_vsi *vsi, struct ethtool_rxnfc *cmd) } /* input struct is added to the HW filter list */ - ice_fdir_update_list_entry(pf, input, fsp->location); + ice_ntuple_update_list_entry(pf, input, fsp->location); ret = ice_fdir_write_all_fltr(pf, input, true); if (ret) -- 2.26.2