[dpdk-dev,1/1] net/i40e: enable auto link update for XXV710

Message ID 1480031006-15702-1-git-send-email-qi.z.zhang@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
checkpatch/checkpatch success coding style OK

Commit Message

Qi Zhang Nov. 24, 2016, 11:43 p.m. UTC
  This patch remove the limitation that XXV710 device does
not support auto link update.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Comments

Ferruh Yigit Nov. 29, 2016, 5:45 p.m. UTC | #1
Hi Qi,

On 11/24/2016 11:43 PM, Qi Zhang wrote:
> This patch remove the limitation that XXV710 device does

XXV710 is 25G device, and support added in 16.11 (please correct me if
this is wrong.), but I can't find any DPDK documentation for this device.

Can you please add some documentation, at least to
http://dpdk.org/doc/nics and http://dpdk.org/doc/guides/nics/i40e.html
in a different patch?

> not support auto link update.

Can you please add more details that why we can remove the limitation now?

> 
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
>  drivers/net/i40e/i40e_ethdev.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index 67778ba..b7a916d 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -1628,6 +1628,8 @@ i40e_phy_conf_link(struct i40e_hw *hw,
>  
>  	/* use get_phy_abilities_resp value for the rest */
>  	phy_conf.phy_type = phy_ab.phy_type;
> +	phy_conf.phy_type_ext = phy_ab.phy_type_ext;
> +	phy_conf.fec_config = phy_ab.mod_type_ext;

And these changes look like called for all device types, just to double
check, are these 25G specific?

>  	phy_conf.eee_capability = phy_ab.eee_capability;
>  	phy_conf.eeer = phy_ab.eeer_val;
>  	phy_conf.low_power_ctrl = phy_ab.d3_lpan;
> @@ -1653,8 +1655,7 @@ i40e_apply_link_speed(struct rte_eth_dev *dev)
>  	struct rte_eth_conf *conf = &dev->data->dev_conf;
>  
>  	speed = i40e_parse_link_speeds(conf->link_speeds);
> -	if (!I40E_PHY_TYPE_SUPPORT_25G(hw->phy.phy_types))
> -		abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
> +	abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
>  	if (!(conf->link_speeds & ETH_LINK_SPEED_FIXED))
>  		abilities |= I40E_AQ_PHY_AN_ENABLED;
>  	abilities |= I40E_AQ_PHY_LINK_ENABLED;
> @@ -1990,8 +1991,7 @@ i40e_dev_set_link_down(struct rte_eth_dev *dev)
>  	uint8_t abilities = 0;
>  	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
>  
> -	if (!I40E_PHY_TYPE_SUPPORT_25G(hw->phy.phy_types))
> -		abilities = I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
> +	abilities = I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
>  	return i40e_phy_conf_link(hw, abilities, speed);
>  }
>  
>
  
Qi Zhang Nov. 30, 2016, 2:26 a.m. UTC | #2
Hi Ferruh:

> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Wednesday, November 30, 2016 1:46 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> Zhang, Helin <helin.zhang@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 1/1] net/i40e: enable auto link update for
> XXV710
> 
> Hi Qi,
> 
> On 11/24/2016 11:43 PM, Qi Zhang wrote:
> > This patch remove the limitation that XXV710 device does
> 
> XXV710 is 25G device, and support added in 16.11 (please correct me if this is
> wrong.), but I can't find any DPDK documentation for this device.
> 
> Can you please add some documentation, at least to http://dpdk.org/doc/nics
> and http://dpdk.org/doc/guides/nics/i40e.html
> in a different patch?

For 16.11, since XXV710 is not officially supported, so they are missing in document.
For 17.02 this will be updated. Thanks for remind.
> 
> > not support auto link update.
> 
> Can you please add more details that why we can remove the limitation now?
Ok, will update in v2.
> 
> >
> > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> > ---
> >  drivers/net/i40e/i40e_ethdev.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/net/i40e/i40e_ethdev.c
> > b/drivers/net/i40e/i40e_ethdev.c index 67778ba..b7a916d 100644
> > --- a/drivers/net/i40e/i40e_ethdev.c
> > +++ b/drivers/net/i40e/i40e_ethdev.c
> > @@ -1628,6 +1628,8 @@ i40e_phy_conf_link(struct i40e_hw *hw,
> >
> >  	/* use get_phy_abilities_resp value for the rest */
> >  	phy_conf.phy_type = phy_ab.phy_type;
> > +	phy_conf.phy_type_ext = phy_ab.phy_type_ext;
> > +	phy_conf.fec_config = phy_ab.mod_type_ext;
> 
> And these changes look like called for all device types, just to double check, are
> these 25G specific?

Actually only XXV710 need this two lines, but base on firmware engineer's input, 
this could be implemented in generic way since no impact for other i40e devices.
> 
> >  	phy_conf.eee_capability = phy_ab.eee_capability;
> >  	phy_conf.eeer = phy_ab.eeer_val;
> >  	phy_conf.low_power_ctrl = phy_ab.d3_lpan; @@ -1653,8 +1655,7 @@
> > i40e_apply_link_speed(struct rte_eth_dev *dev)
> >  	struct rte_eth_conf *conf = &dev->data->dev_conf;
> >
> >  	speed = i40e_parse_link_speeds(conf->link_speeds);
> > -	if (!I40E_PHY_TYPE_SUPPORT_25G(hw->phy.phy_types))
> > -		abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
> > +	abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
> >  	if (!(conf->link_speeds & ETH_LINK_SPEED_FIXED))
> >  		abilities |= I40E_AQ_PHY_AN_ENABLED;
> >  	abilities |= I40E_AQ_PHY_LINK_ENABLED; @@ -1990,8 +1991,7 @@
> > i40e_dev_set_link_down(struct rte_eth_dev *dev)
> >  	uint8_t abilities = 0;
> >  	struct i40e_hw *hw =
> I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
> >
> > -	if (!I40E_PHY_TYPE_SUPPORT_25G(hw->phy.phy_types))
> > -		abilities = I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
> > +	abilities = I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
> >  	return i40e_phy_conf_link(hw, abilities, speed);  }
> >
> >
Thanks!
Qi
  
Ferruh Yigit Nov. 30, 2016, 9:56 a.m. UTC | #3
On 11/30/2016 2:26 AM, Zhang, Qi Z wrote:
> Hi Ferruh:
> 
>> -----Original Message-----
>> From: Yigit, Ferruh
>> Sent: Wednesday, November 30, 2016 1:46 AM
>> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
>> Zhang, Helin <helin.zhang@intel.com>
>> Cc: dev@dpdk.org
>> Subject: Re: [dpdk-dev] [PATCH 1/1] net/i40e: enable auto link update for
>> XXV710
>>
>> Hi Qi,
>>
>> On 11/24/2016 11:43 PM, Qi Zhang wrote:
>>> This patch remove the limitation that XXV710 device does
>>
>> XXV710 is 25G device, and support added in 16.11 (please correct me if this is
>> wrong.), but I can't find any DPDK documentation for this device.
>>
>> Can you please add some documentation, at least to http://dpdk.org/doc/nics
>> and http://dpdk.org/doc/guides/nics/i40e.html
>> in a different patch?
> 
> For 16.11, since XXV710 is not officially supported, so they are missing in document.
> For 17.02 this will be updated. Thanks for remind.

If officially will be added on 17.02, can you please update release
notes too, to announce new device support?

>>
>>> not support auto link update.
>>
>> Can you please add more details that why we can remove the limitation now?
> Ok, will update in v2.
>>
>>>
>>> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
>>> ---
>>>  drivers/net/i40e/i40e_ethdev.c | 8 ++++----
>>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/drivers/net/i40e/i40e_ethdev.c
>>> b/drivers/net/i40e/i40e_ethdev.c index 67778ba..b7a916d 100644
>>> --- a/drivers/net/i40e/i40e_ethdev.c
>>> +++ b/drivers/net/i40e/i40e_ethdev.c
>>> @@ -1628,6 +1628,8 @@ i40e_phy_conf_link(struct i40e_hw *hw,
>>>
>>>  	/* use get_phy_abilities_resp value for the rest */
>>>  	phy_conf.phy_type = phy_ab.phy_type;
>>> +	phy_conf.phy_type_ext = phy_ab.phy_type_ext;
>>> +	phy_conf.fec_config = phy_ab.mod_type_ext;
>>
>> And these changes look like called for all device types, just to double check, are
>> these 25G specific?
> 
> Actually only XXV710 need this two lines, but base on firmware engineer's input, 
> this could be implemented in generic way since no impact for other i40e devices.
>>
>>>  	phy_conf.eee_capability = phy_ab.eee_capability;
>>>  	phy_conf.eeer = phy_ab.eeer_val;
>>>  	phy_conf.low_power_ctrl = phy_ab.d3_lpan; @@ -1653,8 +1655,7 @@
>>> i40e_apply_link_speed(struct rte_eth_dev *dev)
>>>  	struct rte_eth_conf *conf = &dev->data->dev_conf;
>>>
>>>  	speed = i40e_parse_link_speeds(conf->link_speeds);
>>> -	if (!I40E_PHY_TYPE_SUPPORT_25G(hw->phy.phy_types))
>>> -		abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
>>> +	abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
>>>  	if (!(conf->link_speeds & ETH_LINK_SPEED_FIXED))
>>>  		abilities |= I40E_AQ_PHY_AN_ENABLED;
>>>  	abilities |= I40E_AQ_PHY_LINK_ENABLED; @@ -1990,8 +1991,7 @@
>>> i40e_dev_set_link_down(struct rte_eth_dev *dev)
>>>  	uint8_t abilities = 0;
>>>  	struct i40e_hw *hw =
>> I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
>>>
>>> -	if (!I40E_PHY_TYPE_SUPPORT_25G(hw->phy.phy_types))
>>> -		abilities = I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
>>> +	abilities = I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
>>>  	return i40e_phy_conf_link(hw, abilities, speed);  }
>>>
>>>
> Thanks!
> Qi
>
  

Patch

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 67778ba..b7a916d 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1628,6 +1628,8 @@  i40e_phy_conf_link(struct i40e_hw *hw,
 
 	/* use get_phy_abilities_resp value for the rest */
 	phy_conf.phy_type = phy_ab.phy_type;
+	phy_conf.phy_type_ext = phy_ab.phy_type_ext;
+	phy_conf.fec_config = phy_ab.mod_type_ext;
 	phy_conf.eee_capability = phy_ab.eee_capability;
 	phy_conf.eeer = phy_ab.eeer_val;
 	phy_conf.low_power_ctrl = phy_ab.d3_lpan;
@@ -1653,8 +1655,7 @@  i40e_apply_link_speed(struct rte_eth_dev *dev)
 	struct rte_eth_conf *conf = &dev->data->dev_conf;
 
 	speed = i40e_parse_link_speeds(conf->link_speeds);
-	if (!I40E_PHY_TYPE_SUPPORT_25G(hw->phy.phy_types))
-		abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
+	abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
 	if (!(conf->link_speeds & ETH_LINK_SPEED_FIXED))
 		abilities |= I40E_AQ_PHY_AN_ENABLED;
 	abilities |= I40E_AQ_PHY_LINK_ENABLED;
@@ -1990,8 +1991,7 @@  i40e_dev_set_link_down(struct rte_eth_dev *dev)
 	uint8_t abilities = 0;
 	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
-	if (!I40E_PHY_TYPE_SUPPORT_25G(hw->phy.phy_types))
-		abilities = I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
+	abilities = I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
 	return i40e_phy_conf_link(hw, abilities, speed);
 }