[v3] net/ixgbe: fix Reta size for VF

Message ID 1564105108-71045-1-git-send-email-wei.zhao1@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series [v3] net/ixgbe: fix Reta size for VF |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/Intel-compilation success Compilation OK

Commit Message

Zhao1, Wei July 26, 2019, 1:38 a.m. UTC
  Filling correct reta table size at ixgbevf_dev_info_get,
so reta table update will be supported for VF port.
For X540_vf and 82599_vf, since they don't support
reta table update, set reta size to 0.

Cc: stable@dpdk.org

Fixes: 2144f6630fca ("ixgbe: add redirection table size in device info")
Signed-off-by: wei zhao <wei.zhao1@intel.com>

---

v2:
--add more git log

v3:
--change headline and update git log
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)
  

Comments

Qi Zhang July 26, 2019, 4:54 a.m. UTC | #1
> -----Original Message-----
> From: Zhao1, Wei
> Sent: Friday, July 26, 2019 9:38 AM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Zhao1, Wei
> <wei.zhao1@intel.com>
> Subject: [PATCH v3] net/ixgbe: fix Reta size for VF
> 
> Filling correct reta table size at ixgbevf_dev_info_get, so reta table update
> will be supported for VF port.
> For X540_vf and 82599_vf, since they don't support reta table update, set
> reta size to 0.
> 
> Cc: stable@dpdk.org
> 
> Fixes: 2144f6630fca ("ixgbe: add redirection table size in device info")
> Signed-off-by: wei zhao <wei.zhao1@intel.com>

Please correct to "Wei Zhao" next time.
> 
> ---

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
  
Zhao1, Wei July 26, 2019, 5:52 a.m. UTC | #2
Ok.

> -----Original Message-----
> From: Zhang, Qi Z
> Sent: Friday, July 26, 2019 12:55 PM
> To: Zhao1, Wei <wei.zhao1@intel.com>; dev@dpdk.org
> Cc: stable@dpdk.org
> Subject: RE: [PATCH v3] net/ixgbe: fix Reta size for VF
> 
> 
> 
> > -----Original Message-----
> > From: Zhao1, Wei
> > Sent: Friday, July 26, 2019 9:38 AM
> > To: dev@dpdk.org
> > Cc: stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Zhao1, Wei
> > <wei.zhao1@intel.com>
> > Subject: [PATCH v3] net/ixgbe: fix Reta size for VF
> >
> > Filling correct reta table size at ixgbevf_dev_info_get, so reta table
> > update will be supported for VF port.
> > For X540_vf and 82599_vf, since they don't support reta table update,
> > set reta size to 0.
> >
> > Cc: stable@dpdk.org
> >
> > Fixes: 2144f6630fca ("ixgbe: add redirection table size in device
> > info")
> > Signed-off-by: wei zhao <wei.zhao1@intel.com>
> 
> Please correct to "Wei Zhao" next time.
> >
> > ---
> 
> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
> 
> Applied to dpdk-next-net-intel.
> 
> Thanks
> Qi
  

Patch

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 22c5b2c..773f667 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -3927,6 +3927,8 @@  ixgbevf_dev_info_get(struct rte_eth_dev *dev,
 				     dev_info->rx_queue_offload_capa);
 	dev_info->tx_queue_offload_capa = ixgbe_get_tx_queue_offloads(dev);
 	dev_info->tx_offload_capa = ixgbe_get_tx_port_offloads(dev);
+	dev_info->hash_key_size = IXGBE_HKEY_MAX_INDEX * sizeof(uint32_t);
+	dev_info->reta_size = ixgbe_reta_size_get(hw->mac.type);
 
 	dev_info->default_rxconf = (struct rte_eth_rxconf) {
 		.rx_thresh = {
@@ -7438,6 +7440,9 @@  ixgbe_reta_size_get(enum ixgbe_mac_type mac_type) {
 	case ixgbe_mac_X550EM_x_vf:
 	case ixgbe_mac_X550EM_a_vf:
 		return ETH_RSS_RETA_SIZE_64;
+	case ixgbe_mac_X540_vf:
+	case ixgbe_mac_82599_vf:
+		return 0;
 	default:
 		return ETH_RSS_RETA_SIZE_128;
 	}