* [dpdk-stable] [PATCH 2/3] net/i40e: fix wrong VF link speed [not found] <1491433937-36182-1-git-send-email-qi.z.zhang@intel.com> @ 2017-04-05 23:12 ` Qi Zhang 2017-04-07 14:29 ` Ferruh Yigit 2017-04-05 23:12 ` [dpdk-stable] [PATCH 3/3] net/i40e: add missing 25G " Qi Zhang [not found] ` <1491761106-26883-1-git-send-email-qi.z.zhang@intel.com> 2 siblings, 1 reply; 9+ messages in thread From: Qi Zhang @ 2017-04-05 23:12 UTC (permalink / raw) To: jingjing.wu, helin.zhang; +Cc: dev, Qi Zhang, stable When PF notify link speed to VF, encode of link speed need to be converted from ETH_SPEED_XXX to I40E_LINK_SPEED_XXX. Fixes: bb6722fb5c0e ("net/i40e: fix VF bonded device link down") Cc: stable@dpdk.org Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> --- drivers/net/i40e/i40e_pf.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c index 5dcda4d..f2b9fca 100644 --- a/drivers/net/i40e/i40e_pf.c +++ b/drivers/net/i40e/i40e_pf.c @@ -1188,8 +1188,33 @@ i40e_notify_vf_link_status(struct rte_eth_dev *dev, struct i40e_pf_vf *vf) event.event = I40E_VIRTCHNL_EVENT_LINK_CHANGE; event.event_data.link_event.link_status = dev->data->dev_link.link_status; - event.event_data.link_event.link_speed = - (enum i40e_aq_link_speed)dev->data->dev_link.link_speed; + + /* need to convert the ETH_SPEED_xxx into I40E_LINK_SPEED_xxx */ + switch (dev->data->dev_link.link_speed) + { + case ETH_SPEED_NUM_100M: + event.event_data.link_event.link_speed = I40E_LINK_SPEED_100MB; + break; + case ETH_SPEED_NUM_1G: + event.event_data.link_event.link_speed = I40E_LINK_SPEED_1GB; + break; + case ETH_SPEED_NUM_10G: + event.event_data.link_event.link_speed = I40E_LINK_SPEED_10GB; + break; + case ETH_SPEED_NUM_20G: + event.event_data.link_event.link_speed = I40E_LINK_SPEED_20GB; + break; + case ETH_SPEED_NUM_25G: + event.event_data.link_event.link_speed = I40E_LINK_SPEED_25GB; + break; + case ETH_SPEED_NUM_40G: + event.event_data.link_event.link_speed = I40E_LINK_SPEED_40GB; + break; + default: + event.event_data.link_event.link_speed = I40E_LINK_SPEED_UNKNOWN; + break; + } + i40e_pf_host_send_msg_to_vf(vf, I40E_VIRTCHNL_OP_EVENT, I40E_SUCCESS, (uint8_t *)&event, sizeof(event)); } -- 2.7.4 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-stable] [PATCH 2/3] net/i40e: fix wrong VF link speed 2017-04-05 23:12 ` [dpdk-stable] [PATCH 2/3] net/i40e: fix wrong VF link speed Qi Zhang @ 2017-04-07 14:29 ` Ferruh Yigit 0 siblings, 0 replies; 9+ messages in thread From: Ferruh Yigit @ 2017-04-07 14:29 UTC (permalink / raw) To: Qi Zhang, jingjing.wu, helin.zhang; +Cc: dev, stable On 4/6/2017 12:12 AM, Qi Zhang wrote: > When PF notify link speed to VF, encode of link speed need to > be converted from ETH_SPEED_XXX to I40E_LINK_SPEED_XXX. > > Fixes: bb6722fb5c0e ("net/i40e: fix VF bonded device link down") > Cc: stable@dpdk.org > > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Hi Qi, There are some checkpatch warnings for this patch. Can you please address them and send a new version of the set? Thanks, ferruh ^ permalink raw reply [flat|nested] 9+ messages in thread
* [dpdk-stable] [PATCH 3/3] net/i40e: add missing 25G link speed [not found] <1491433937-36182-1-git-send-email-qi.z.zhang@intel.com> 2017-04-05 23:12 ` [dpdk-stable] [PATCH 2/3] net/i40e: fix wrong VF link speed Qi Zhang @ 2017-04-05 23:12 ` Qi Zhang [not found] ` <1491761106-26883-1-git-send-email-qi.z.zhang@intel.com> 2 siblings, 0 replies; 9+ messages in thread From: Qi Zhang @ 2017-04-05 23:12 UTC (permalink / raw) To: jingjing.wu, helin.zhang; +Cc: dev, Qi Zhang, stable Add missing 25G link speed decode in i40evf_dev_link_update. Cc: stable@dpdk.org Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> --- drivers/net/i40e/i40e_ethdev_vf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index d3659c9..caafa2d 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -2163,6 +2163,9 @@ i40evf_dev_link_update(struct rte_eth_dev *dev, case I40E_LINK_SPEED_20GB: new_link.link_speed = ETH_SPEED_NUM_20G; break; + case I40E_LINK_SPEED_25GB: + new_link.link_speed = ETH_SPEED_NUM_25G; + break; case I40E_LINK_SPEED_40GB: new_link.link_speed = ETH_SPEED_NUM_40G; break; -- 2.7.4 ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <1491761106-26883-1-git-send-email-qi.z.zhang@intel.com>]
* [dpdk-stable] [PATCH v2 1/3] net/i40e: remove duplicate code [not found] ` <1491761106-26883-1-git-send-email-qi.z.zhang@intel.com> @ 2017-04-09 18:05 ` Qi Zhang 2017-04-09 18:05 ` [dpdk-stable] [PATCH v2 2/3] net/i40e: fix wrong VF link speed Qi Zhang 2017-04-09 18:05 ` [dpdk-stable] [PATCH v2 3/3] net/i40e: add missing 25G " Qi Zhang 2 siblings, 0 replies; 9+ messages in thread From: Qi Zhang @ 2017-04-09 18:05 UTC (permalink / raw) To: ferruh.yigit; +Cc: jingjing.wu, helin.zhang, dev, Qi Zhang, stable Make i40e_notify_all_vfs_link_status as a wrapper of i40e_notify_vf_link_status so duplicate code can be removed. Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Cc: stable@dpdk.org --- drivers/net/i40e/i40e_ethdev.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index cb8bf2b..00028e2 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -5735,18 +5735,10 @@ static void i40e_notify_all_vfs_link_status(struct rte_eth_dev *dev) { struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private); - struct i40e_virtchnl_pf_event event; int i; - event.event = I40E_VIRTCHNL_EVENT_LINK_CHANGE; - event.event_data.link_event.link_status = - dev->data->dev_link.link_status; - event.event_data.link_event.link_speed = - (enum i40e_aq_link_speed)dev->data->dev_link.link_speed; - for (i = 0; i < pf->vf_num; i++) - i40e_pf_host_send_msg_to_vf(&pf->vfs[i], I40E_VIRTCHNL_OP_EVENT, - I40E_SUCCESS, (uint8_t *)&event, sizeof(event)); + i40e_notify_vf_link_status(dev, &pf->vfs[i]); } static void -- 2.7.4 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [dpdk-stable] [PATCH v2 2/3] net/i40e: fix wrong VF link speed [not found] ` <1491761106-26883-1-git-send-email-qi.z.zhang@intel.com> 2017-04-09 18:05 ` [dpdk-stable] [PATCH v2 1/3] net/i40e: remove duplicate code Qi Zhang @ 2017-04-09 18:05 ` Qi Zhang 2017-04-09 18:05 ` [dpdk-stable] [PATCH v2 3/3] net/i40e: add missing 25G " Qi Zhang 2 siblings, 0 replies; 9+ messages in thread From: Qi Zhang @ 2017-04-09 18:05 UTC (permalink / raw) To: ferruh.yigit; +Cc: jingjing.wu, helin.zhang, dev, Qi Zhang, stable When PF notify link speed to VF, encode of link speed need to be converted from ETH_SPEED_XXX to I40E_LINK_SPEED_XXX. Fixes: bb6722fb5c0e ("net/i40e: fix VF bonded device link down") Cc: stable@dpdk.org Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> --- v2: - fix checkpatch warning. drivers/net/i40e/i40e_pf.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c index 5dcda4d..1db1f25 100644 --- a/drivers/net/i40e/i40e_pf.c +++ b/drivers/net/i40e/i40e_pf.c @@ -1188,8 +1188,33 @@ i40e_notify_vf_link_status(struct rte_eth_dev *dev, struct i40e_pf_vf *vf) event.event = I40E_VIRTCHNL_EVENT_LINK_CHANGE; event.event_data.link_event.link_status = dev->data->dev_link.link_status; - event.event_data.link_event.link_speed = - (enum i40e_aq_link_speed)dev->data->dev_link.link_speed; + + /* need to convert the ETH_SPEED_xxx into I40E_LINK_SPEED_xxx */ + switch (dev->data->dev_link.link_speed) { + case ETH_SPEED_NUM_100M: + event.event_data.link_event.link_speed = I40E_LINK_SPEED_100MB; + break; + case ETH_SPEED_NUM_1G: + event.event_data.link_event.link_speed = I40E_LINK_SPEED_1GB; + break; + case ETH_SPEED_NUM_10G: + event.event_data.link_event.link_speed = I40E_LINK_SPEED_10GB; + break; + case ETH_SPEED_NUM_20G: + event.event_data.link_event.link_speed = I40E_LINK_SPEED_20GB; + break; + case ETH_SPEED_NUM_25G: + event.event_data.link_event.link_speed = I40E_LINK_SPEED_25GB; + break; + case ETH_SPEED_NUM_40G: + event.event_data.link_event.link_speed = I40E_LINK_SPEED_40GB; + break; + default: + event.event_data.link_event.link_speed = + I40E_LINK_SPEED_UNKNOWN; + break; + } + i40e_pf_host_send_msg_to_vf(vf, I40E_VIRTCHNL_OP_EVENT, I40E_SUCCESS, (uint8_t *)&event, sizeof(event)); } -- 2.7.4 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [dpdk-stable] [PATCH v2 3/3] net/i40e: add missing 25G link speed [not found] ` <1491761106-26883-1-git-send-email-qi.z.zhang@intel.com> 2017-04-09 18:05 ` [dpdk-stable] [PATCH v2 1/3] net/i40e: remove duplicate code Qi Zhang 2017-04-09 18:05 ` [dpdk-stable] [PATCH v2 2/3] net/i40e: fix wrong VF link speed Qi Zhang @ 2017-04-09 18:05 ` Qi Zhang 2017-04-10 9:52 ` Ferruh Yigit 2 siblings, 1 reply; 9+ messages in thread From: Qi Zhang @ 2017-04-09 18:05 UTC (permalink / raw) To: ferruh.yigit; +Cc: jingjing.wu, helin.zhang, dev, Qi Zhang, stable Add missing 25G link speed decode in i40evf_dev_link_update. Cc: stable@dpdk.org Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> --- drivers/net/i40e/i40e_ethdev_vf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index d3659c9..caafa2d 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -2163,6 +2163,9 @@ i40evf_dev_link_update(struct rte_eth_dev *dev, case I40E_LINK_SPEED_20GB: new_link.link_speed = ETH_SPEED_NUM_20G; break; + case I40E_LINK_SPEED_25GB: + new_link.link_speed = ETH_SPEED_NUM_25G; + break; case I40E_LINK_SPEED_40GB: new_link.link_speed = ETH_SPEED_NUM_40G; break; -- 2.7.4 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-stable] [PATCH v2 3/3] net/i40e: add missing 25G link speed 2017-04-09 18:05 ` [dpdk-stable] [PATCH v2 3/3] net/i40e: add missing 25G " Qi Zhang @ 2017-04-10 9:52 ` Ferruh Yigit 2017-04-10 10:06 ` Zhang, Qi Z 0 siblings, 1 reply; 9+ messages in thread From: Ferruh Yigit @ 2017-04-10 9:52 UTC (permalink / raw) To: Qi Zhang; +Cc: jingjing.wu, helin.zhang, dev, stable On 4/9/2017 7:05 PM, Qi Zhang wrote: > Add missing 25G link speed decode in i40evf_dev_link_update. > > Cc: stable@dpdk.org > > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Fixes: 75d133dd3296 ("net/i40e: enable 25G device") Added above fixes line, but I am not sure about it, can you please confirm? Thanks, ferruh ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-stable] [PATCH v2 3/3] net/i40e: add missing 25G link speed 2017-04-10 9:52 ` Ferruh Yigit @ 2017-04-10 10:06 ` Zhang, Qi Z 0 siblings, 0 replies; 9+ messages in thread From: Zhang, Qi Z @ 2017-04-10 10:06 UTC (permalink / raw) To: Yigit, Ferruh; +Cc: Wu, Jingjing, Zhang, Helin, dev, stable Confirmed, thanks. > -----Original Message----- > From: Yigit, Ferruh > Sent: Monday, April 10, 2017 5:53 PM > To: Zhang, Qi Z <qi.z.zhang@intel.com> > Cc: Wu, Jingjing <jingjing.wu@intel.com>; Zhang, Helin > <helin.zhang@intel.com>; dev@dpdk.org; stable@dpdk.org > Subject: Re: [PATCH v2 3/3] net/i40e: add missing 25G link speed > > On 4/9/2017 7:05 PM, Qi Zhang wrote: > > Add missing 25G link speed decode in i40evf_dev_link_update. > > > > Cc: stable@dpdk.org > > > > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> > > Fixes: 75d133dd3296 ("net/i40e: enable 25G device") > > Added above fixes line, but I am not sure about it, can you please confirm? > > Thanks, > ferruh ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <1491760720-26694-1-git-send-email-qi.z.zhang@intel.com>]
* [dpdk-stable] [PATCH v2 3/3] net/i40e: add missing 25G link speed [not found] <1491760720-26694-1-git-send-email-qi.z.zhang@intel.com> @ 2017-04-09 17:58 ` Qi Zhang 0 siblings, 0 replies; 9+ messages in thread From: Qi Zhang @ 2017-04-09 17:58 UTC (permalink / raw) To: qi.z.zhang; +Cc: stable Add missing 25G link speed decode in i40evf_dev_link_update. Cc: stable@dpdk.org Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> --- drivers/net/i40e/i40e_ethdev_vf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index d3659c9..caafa2d 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -2163,6 +2163,9 @@ i40evf_dev_link_update(struct rte_eth_dev *dev, case I40E_LINK_SPEED_20GB: new_link.link_speed = ETH_SPEED_NUM_20G; break; + case I40E_LINK_SPEED_25GB: + new_link.link_speed = ETH_SPEED_NUM_25G; + break; case I40E_LINK_SPEED_40GB: new_link.link_speed = ETH_SPEED_NUM_40G; break; -- 2.7.4 ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-04-10 10:06 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <1491433937-36182-1-git-send-email-qi.z.zhang@intel.com> 2017-04-05 23:12 ` [dpdk-stable] [PATCH 2/3] net/i40e: fix wrong VF link speed Qi Zhang 2017-04-07 14:29 ` Ferruh Yigit 2017-04-05 23:12 ` [dpdk-stable] [PATCH 3/3] net/i40e: add missing 25G " Qi Zhang [not found] ` <1491761106-26883-1-git-send-email-qi.z.zhang@intel.com> 2017-04-09 18:05 ` [dpdk-stable] [PATCH v2 1/3] net/i40e: remove duplicate code Qi Zhang 2017-04-09 18:05 ` [dpdk-stable] [PATCH v2 2/3] net/i40e: fix wrong VF link speed Qi Zhang 2017-04-09 18:05 ` [dpdk-stable] [PATCH v2 3/3] net/i40e: add missing 25G " Qi Zhang 2017-04-10 9:52 ` Ferruh Yigit 2017-04-10 10:06 ` Zhang, Qi Z [not found] <1491760720-26694-1-git-send-email-qi.z.zhang@intel.com> 2017-04-09 17:58 ` Qi Zhang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).