[dpdk-dev,v2] ixgbe: fix wrong VMDq function name

Message ID 1484014751-98773-1-git-send-email-wenzhuo.lu@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel compilation fail Compilation issues

Commit Message

Wenzhuo Lu Jan. 10, 2017, 2:19 a.m. UTC
  The function name ixgbe_vmdq_mode_check is not right.
This function checks if Virtualization Technology is
enabled. It's for both VMDq and IOV.
Others may be misled by the current name.

Fixes: fe3a45fd4104 ("ixgbe: add VMDq support")

CC: stable@dpdk.org
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
v2:
- rebased the patch based on next-net.

 drivers/net/ixgbe/ixgbe_ethdev.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
  

Comments

Ferruh Yigit Jan. 10, 2017, 10:35 a.m. UTC | #1
On 1/10/2017 2:19 AM, Wenzhuo Lu wrote:
> The function name ixgbe_vmdq_mode_check is not right.
> This function checks if Virtualization Technology is
> enabled. It's for both VMDq and IOV.
> Others may be misled by the current name.
> 
> Fixes: fe3a45fd4104 ("ixgbe: add VMDq support")
> 
> CC: stable@dpdk.org
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

Applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 3bf9d32..b7ddd4f 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4405,14 +4405,14 @@  static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on)
 }
 
 static int
-ixgbe_vmdq_mode_check(struct ixgbe_hw *hw)
+ixgbe_vt_check(struct ixgbe_hw *hw)
 {
 	uint32_t reg_val;
 
-	/* we only need to do this if VMDq is enabled */
+	/* if Virtualization Technology is enabled */
 	reg_val = IXGBE_READ_REG(hw, IXGBE_VT_CTL);
 	if (!(reg_val & IXGBE_VT_CTL_VT_ENABLE)) {
-		PMD_INIT_LOG(ERR, "VMDq must be enabled for this setting");
+		PMD_INIT_LOG(ERR, "VT must be enabled for this setting");
 		return -1;
 	}
 
@@ -4792,7 +4792,7 @@  static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on)
 			     " on 82599 hardware and newer");
 		return -ENOTSUP;
 	}
-	if (ixgbe_vmdq_mode_check(hw) < 0)
+	if (ixgbe_vt_check(hw) < 0)
 		return -ENOTSUP;
 
 	val = ixgbe_convert_vm_rx_mask_to_val(rx_mask, val);
@@ -4833,7 +4833,7 @@  static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on)
 
 	hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
-	if (ixgbe_vmdq_mode_check(hw) < 0)
+	if (ixgbe_vt_check(hw) < 0)
 		return -ENOTSUP;
 
 	/* for vf >= 32, set bit in PFVFRE[1], otherwise PFVFRE[0] */
@@ -4883,7 +4883,7 @@  static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on)
 		return -EINVAL;
 
 	hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	if (ixgbe_vmdq_mode_check(hw) < 0)
+	if (ixgbe_vt_check(hw) < 0)
 		return -ENOTSUP;
 
 	/* for vf >= 32, set bit in PFVFTE[1], otherwise PFVFTE[0] */
@@ -4929,7 +4929,7 @@  static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on)
 		return -EINVAL;
 
 	hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	if (ixgbe_vmdq_mode_check(hw) < 0)
+	if (ixgbe_vt_check(hw) < 0)
 		return -ENOTSUP;
 
 	for (vf_idx = 0; vf_idx < 64; vf_idx++) {
@@ -5060,7 +5060,7 @@  int rte_pmd_ixgbe_set_vf_rate_limit(uint8_t port, uint16_t vf,
 		IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	uint8_t mirror_type = 0;
 
-	if (ixgbe_vmdq_mode_check(hw) < 0)
+	if (ixgbe_vt_check(hw) < 0)
 		return -ENOTSUP;
 
 	if (rule_id >= IXGBE_MAX_MIRROR_RULES)
@@ -5181,7 +5181,7 @@  int rte_pmd_ixgbe_set_vf_rate_limit(uint8_t port, uint16_t vf,
 	struct ixgbe_mirror_info *mr_info =
 		(IXGBE_DEV_PRIVATE_TO_PFDATA(dev->data->dev_private));
 
-	if (ixgbe_vmdq_mode_check(hw) < 0)
+	if (ixgbe_vt_check(hw) < 0)
 		return -ENOTSUP;
 
 	memset(&mr_info->mr_conf[rule_id], 0,