net/ixgbe: fix x550 reta set fail error

Message ID 1563775495-13785-1-git-send-email-wei.zhao1@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Qi Zhang
Headers
Series net/ixgbe: fix x550 reta set fail error |

Checks

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

Commit Message

Zhao1, Wei July 22, 2019, 6:04 a.m. UTC
  There is a bug in function ixgbevf_dev_info_get(), it do not
contain the reta table size get function for vf port, and this
will cause error when update reta for x550 vf port.

Cc: stable@dpdk.org

Fixes: 2144f6630fca ("ixgbe: add redirection table size in device info")
Signed-off-by: wei zhao <wei.zhao1@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)
  

Comments

Zhao1, Wei July 23, 2019, 3:20 a.m. UTC | #1
Tested-by: Zhao  HaiyangX <haiyangx.zhao@intel.com>


> -----Original Message-----
> From: Zhao1, Wei
> Sent: Monday, July 22, 2019 2:05 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Zhao1, Wei
> <wei.zhao1@intel.com>
> Subject: [PATCH] net/ixgbe: fix x550 reta set fail error
> 
> There is a bug in function ixgbevf_dev_info_get(), it do not contain the reta
> table size get function for vf port, and this will cause error when update reta
> for x550 vf port.
> 
> Cc: stable@dpdk.org
> 
> Fixes: 2144f6630fca ("ixgbe: add redirection table size in device info")
> Signed-off-by: wei zhao <wei.zhao1@intel.com>
> ---
>  drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> 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;
>  	}
> --
> 2.7.5
  
Zhao1, Wei July 23, 2019, 3:21 a.m. UTC | #2
Add cc HaiyangX

> -----Original Message-----
> From: Zhao1, Wei
> Sent: Tuesday, July 23, 2019 11:21 AM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: RE: [PATCH] net/ixgbe: fix x550 reta set fail error
> 
> Tested-by: Zhao  HaiyangX <haiyangx.zhao@intel.com>
> 
> 
> > -----Original Message-----
> > From: Zhao1, Wei
> > Sent: Monday, July 22, 2019 2:05 PM
> > To: dev@dpdk.org
> > Cc: stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Zhao1, Wei
> > <wei.zhao1@intel.com>
> > Subject: [PATCH] net/ixgbe: fix x550 reta set fail error
> >
> > There is a bug in function ixgbevf_dev_info_get(), it do not contain
> > the reta table size get function for vf port, and this will cause
> > error when update reta for x550 vf port.
> >
> > Cc: stable@dpdk.org
> >
> > Fixes: 2144f6630fca ("ixgbe: add redirection table size in device
> > info")
> > Signed-off-by: wei zhao <wei.zhao1@intel.com>
> > ---
> >  drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > 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;
> >  	}
> > --
> > 2.7.5
  

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;
 	}