net/i40e: fix link status change interrupt
PATCH v2 1/2 net/i40e: fix link status change interrupt
Previously, link status interrupt in i40e is achieved by checking LINK_STAT_CHANGE_MASK in PFINT_ICR0 register which is provided only for diagnostic use. Instead, drivers need to get the link status change notification by using LSE (Link Status Event).
This patch enables LSE and calls LSC callback when the event is received. This patch also removes the processing on LINK_STAT_CHANGE_MASK.
--- drivers/net/i40e/i40e_ethdev.c | 97 +++++++++--------------------------------- 1 file changed, 19 insertions(+), 78 deletions(-)
drivers/net/i40e/i40e_ethdev.c +19 -78
@@ -108,7 +108,6 @@I40E_PFINT_ICR0_ENA_GRST_MASK | \I40E_PFINT_ICR0_ENA_PCI_EXCEPTION_MASK | \I40E_PFINT_ICR0_ENA_STORM_DETECT_MASK | \ -I40E_PFINT_ICR0_ENA_LINK_STAT_CHANGE_MASK | \I40E_PFINT_ICR0_ENA_HMC_ERR_MASK | \I40E_PFINT_ICR0_ENA_PE_CRITERR_MASK | \ I40E_PFINT_ICR0_ENA_VFLR_MASK | \
@@ -1768,6 +1767,16 @@ i40e_dev_start(struct rte_eth_dev *dev)if (dev->data->dev_conf.intr_conf.lsc !=0 )PMD_INIT_LOG (INFO ,"lsc won't enable because of" " no intr multiplex\n" ); + }else if (dev->data->dev_conf.intr_conf.lsc !=0 ) { + ret =i40e_aq_set_phy_int_mask (hw, + ~(I40E_AQ_EVENT_LINK_UPDOWN | +I40E_AQ_EVENT_MODULE_QUAL_FAIL | +I40E_AQ_EVENT_MEDIA_NA ),NULL ); +if (ret !=I40E_SUCCESS ) +PMD_DRV_LOG (WARNING ,"Fail to set phy mask" ); + +/* Call get_link_info aq commond to enable LSE */ +i40e_dev_link_update (dev,0 ); }/* enable uio intr after callback register */
@@ -1984,6 +1993,7 @@ i40e_dev_link_update(struct rte_eth_dev *dev,struct rte_eth_link link, old;int status;unsigned rep_cnt =MAX_REPEAT_TIME ; +bool enable_lse = dev->data->dev_conf.intr_conf.lsc ? true : false;memset (&link,0 ,sizeof (link));memset (&old,0 ,sizeof (old));
@@ -1992,7 +2002,8 @@ i40e_dev_link_update(struct rte_eth_dev *dev, do { /* Get link status information from hardware */ - status = i40e_aq_get_link_info(hw, false, &link_status, NULL); + status = i40e_aq_get_link_info(hw, enable_lse, + &link_status, NULL); if (status != I40E_SUCCESS) { link.link_speed = ETH_SPEED_NUM_100M; link.link_duplex = ETH_LINK_FULL_DUPLEX;
@@ -5442,6 +5453,12 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev) info.msg_buf, info.msg_len);break ; +case i40e_aqc_opc_get_link_status: + ret =i40e_dev_link_update (dev,0 ); +if (!ret) +_rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC ); +break ;default :PMD_DRV_LOG (ERR ,"Request %u is not supported yet" , opcode);
@@ -5451,57 +5468,6 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev)rte_free (info.msg_buf); } -/* -* Interrupt handler is registered as the alarm callback for handling LSC -* interrupt in a definite of time, in order to wait the NIC into a stable -* state. Currently it waits 1 sec in i40e for the link up interrupt, and -* no need for link down interrupt. -*/ -static void -i40e_dev_interrupt_delayed_handler (void *param) -{ -struct rte_eth_dev *dev = (struct rte_eth_dev *)param; -struct i40e_hw *hw =I40E_DEV_PRIVATE_TO_HW (dev->data->dev_private); -uint32_t icr0; - -/* read interrupt causes again */ - icr0 =I40E_READ_REG (hw,I40E_PFINT_ICR0 ); - -#ifdef RTE_LIBRTE_I40E_DEBUG_DRIVER -if (icr0 &I40E_PFINT_ICR0_ECC_ERR_MASK ) -PMD_DRV_LOG (ERR ,"ICR0: unrecoverable ECC error\n" ); -if (icr0 &I40E_PFINT_ICR0_MAL_DETECT_MASK ) -PMD_DRV_LOG (ERR ,"ICR0: malicious programming detected\n" ); -if (icr0 &I40E_PFINT_ICR0_GRST_MASK ) -PMD_DRV_LOG (INFO ,"ICR0: global reset requested\n" ); -if (icr0 &I40E_PFINT_ICR0_PCI_EXCEPTION_MASK ) -PMD_DRV_LOG (INFO ,"ICR0: PCI exception\n activated\n" ); -if (icr0 &I40E_PFINT_ICR0_STORM_DETECT_MASK ) -PMD_DRV_LOG (INFO ,"ICR0: a change in the storm control " -"state\n" ); -if (icr0 &I40E_PFINT_ICR0_HMC_ERR_MASK ) -PMD_DRV_LOG (ERR ,"ICR0: HMC error\n" ); -if (icr0 &I40E_PFINT_ICR0_PE_CRITERR_MASK ) -PMD_DRV_LOG (ERR ,"ICR0: protocol engine critical error\n" ); -#endif /* RTE_LIBRTE_I40E_DEBUG_DRIVER */ - -if (icr0 &I40E_PFINT_ICR0_VFLR_MASK ) { -PMD_DRV_LOG (INFO ,"INT:VF reset detected\n" ); -i40e_dev_handle_vfr_event (dev); - } -if (icr0 &I40E_PFINT_ICR0_ADMINQ_MASK ) { -PMD_DRV_LOG (INFO ,"INT:ADMINQ event\n" ); -i40e_dev_handle_aq_msg (dev); - } - -/* handle the link up interrupt in an alarm callback */ -i40e_dev_link_update (dev,0 ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ); - -i40e_pf_enable_irq0 (hw); -rte_intr_enable (&(dev->pci_dev->intr_handle)); -} -/** * Interrupt handler triggered by NIC for handling * specific interrupt.
@@ -5558,31 +5524,6 @@ i40e_dev_interrupt_handler(__rte_unused struct rte_intr_handle *handle,PMD_DRV_LOG (INFO ,"ICR0: adminq event" );i40e_dev_handle_aq_msg (dev); } - -/* Link Status Change interrupt */ -if (icr0 &I40E_PFINT_ICR0_LINK_STAT_CHANGE_MASK ) { -#define I40E_US_PER_SECOND 1000000 -struct rte_eth_link link; - -PMD_DRV_LOG (INFO ,"ICR0: link status changed\n" ); -memset (&link,0 ,sizeof (link)); -rte_i40e_dev_atomic_read_link_status (dev, &link); -i40e_dev_link_update (dev,0 ); - -/* -* For link up interrupt, it needs to wait 1 second to let the -* hardware be a stable state. Otherwise several consecutive -* interrupts can be observed. -* For link down interrupt, no need to wait. -*/ -if (!link.link_status &&rte_eal_alarm_set (I40E_US_PER_SECOND , - i40e_dev_interrupt_delayed_handler, (void *)dev) >=0 ) -return ; -else -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC ); - } - done:/* Enable interrupt */ i40e_pf_enable_irq0 (hw);
Signature · 1 line
2.5.5
PATCH v2 2/2 net/i40e: fix VF bonded device link down
If VF device is used as slave of a bond device, it will be polled periodically through alarm. Interrupt is involved here. And then VF will send I40E_VIRTCHNL_OP_GET_LINK_STAT message to PF to query the status. The response is handled by interrupt callback. Interrupt is involved here again. That's why bond device cannot bring up.
This patch removes I40E_VIRTCHNL_OP_GET_LINK_STAT message. Link status in VF driver will be updated when PF driver notify it, and VF stores this link status locally. VF driver just returns the local status when being required.
--- drivers/net/i40e/i40e_ethdev.c | 22 ++++++++++- drivers/net/i40e/i40e_ethdev.h | 4 +- drivers/net/i40e/i40e_ethdev_vf.c | 81 +++++++++++++-------------------------- drivers/net/i40e/i40e_pf.c | 33 ++++++++-------- drivers/net/i40e/i40e_pf.h | 3 +- 5 files changed, 67 insertions(+), 76 deletions(-)
drivers/net/i40e/i40e_ethdev.c +21 -1
@@ -5418,6 +5418,24 @@ i40e_dev_handle_vfr_event(struct rte_eth_dev *dev) }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 = + 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)); +} + +static void i40e_dev_handle_aq_msg (struct rte_eth_dev *dev) {struct i40e_hw *hw =I40E_DEV_PRIVATE_TO_HW (dev->data->dev_private);
@@ -5455,9 +5473,11 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev)break ;case i40e_aqc_opc_get_link_status: ret =i40e_dev_link_update (dev,0 ); -if (!ret) +if (!ret) { +i40e_notify_all_vfs_link_status (dev);_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ); + }break ;default : PMD_DRV_LOG(ERR, "Request %u is not supported yet",
drivers/net/i40e/i40e_ethdev.h +3 -1
@@ -599,7 +599,9 @@ int i40e_hash_filter_inset_select(struct i40e_hw *hw, struct rte_eth_input_set_conf *conf);int i40e_fdir_filter_inset_select (struct i40e_pf *pf,struct rte_eth_input_set_conf *conf); - +int i40e_pf_host_send_msg_to_vf (struct i40e_pf_vf *vf,uint32_t opcode, +uint32_t retval,uint8_t *msg, +uint16_t msglen);void i40e_rxq_info_get (struct rte_eth_dev *dev,uint16_t queue_id,struct rte_eth_rxq_info *qinfo); void i40e_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
drivers/net/i40e/i40e_ethdev_vf.c +26 -55
100 lines not on this page · raw message
drivers/net/i40e/i40e_pf.c +16 -17
@@ -250,7 +250,7 @@ i40e_pf_host_vf_reset(struct i40e_pf_vf *vf, bool do_hw_reset)return ret; } -static int +int i40e_pf_host_send_msg_to_vf(struct i40e_pf_vf *vf, uint32_t opcode, uint32_t retval,
@@ -847,18 +847,6 @@ i40e_pf_host_process_cmd_get_stats(struct i40e_pf_vf *vf)return I40E_SUCCESS ; } -static void -i40e_pf_host_process_cmd_get_link_status (struct i40e_pf_vf *vf) -{ -struct rte_eth_dev *dev =I40E_VSI_TO_ETH_DEV (vf->pf->main_vsi); - -/* Update link status first to acquire latest link change */ -i40e_dev_link_update (dev,1 ); -i40e_pf_host_send_msg_to_vf (vf,I40E_VIRTCHNL_OP_GET_LINK_STAT , -I40E_SUCCESS , (uint8_t *)&dev->data->dev_link, -sizeof (struct rte_eth_link )); -} - static int i40e_pf_host_process_cmd_cfg_vlan_offload( struct i40e_pf_vf *vf,
@@ -909,6 +897,20 @@ send_msg:return ret; } +static void +i40e_notify_vf_link_status (struct rte_eth_dev *dev,struct i40e_pf_vf *vf) +{ +struct i40e_virtchnl_pf_event event; + + 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 = + dev->data->dev_link.link_speed; +i40e_pf_host_send_msg_to_vf (vf,I40E_VIRTCHNL_OP_EVENT , +I40E_SUCCESS , (uint8_t *)&event,sizeof (event)); +} + void i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev, uint16_t abs_vf_id, uint32_t opcode,
@@ -964,6 +966,7 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,case I40E_VIRTCHNL_OP_ENABLE_QUEUES :PMD_DRV_LOG (INFO ,"OP_ENABLE_QUEUES received" );i40e_pf_host_process_cmd_enable_queues (vf, msg, msglen); +i40e_notify_vf_link_status (dev, vf);break ;case I40E_VIRTCHNL_OP_DISABLE_QUEUES :PMD_DRV_LOG (INFO ,"OP_DISABLE_QUEUE received" );
@@ -993,10 +996,6 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,PMD_DRV_LOG (INFO ,"OP_GET_STATS received" );i40e_pf_host_process_cmd_get_stats (vf);break ; -case I40E_VIRTCHNL_OP_GET_LINK_STAT : -PMD_DRV_LOG (INFO ,"OP_GET_LINK_STAT received" ); -i40e_pf_host_process_cmd_get_link_status (vf); -break ;case I40E_VIRTCHNL_OP_CFG_VLAN_OFFLOAD :PMD_DRV_LOG (INFO ,"OP_CFG_VLAN_OFFLOAD received" );i40e_pf_host_process_cmd_cfg_vlan_offload (vf, msg, msglen);
drivers/net/i40e/i40e_pf.h +1 -2
@@ -59,9 +59,8 @@ enum i40e_virtchnl_ops_dpdk {* Keep some gap between Linux PF commands and * DPDK PF extended commands. */ -I40E_VIRTCHNL_OP_GET_LINK_STAT =I40E_VIRTCHNL_OP_VERSION + +I40E_VIRTCHNL_OP_CFG_VLAN_OFFLOAD =I40E_VIRTCHNL_OP_VERSION +I40E_DPDK_OFFSET , -I40E_VIRTCHNL_OP_CFG_VLAN_OFFLOAD ,I40E_VIRTCHNL_OP_CFG_VLAN_PVID , I40E_VIRTCHNL_OP_CONFIG_VSI_QUEUES_EXT, };
Signature · 1 line
2.5.5
Re: [PATCH v2 2/2] net/i40e: fix VF bonded device link down
Quoted 17 lines
-----Original Message-----
From: Yang, Qiming
Sent: Tuesday, October 25, 2016 12:19 PM
To: [email protected]
Cc: Wu, Jingjing <[email protected]>; Zhang, Helin <[email protected]>; Richardson, Bruce <[email protected]>; Yang, Qiming <[email protected]>
Subject: [PATCH v2 2/2] net/i40e: fix VF bonded device link downIf VF device is used as slave of a bond device, it will be polled periodically through alarm. Interrupt is involved here. And then VF will send
I40E_VIRTCHNL_OP_GET_LINK_STATmessage to PF to query the status. The response is handled by interrupt callback. Interrupt is involved here again. That's why bond device cannot bring up.
Quoted 8 lines
This patch removes
I40E_VIRTCHNL_OP_GET_LINK_STATmessage. Link status in VF driver will be updated when PF driver notify it, and VF stores this link status locally. VF driver just returns the local status when being required.Fixes 4861cde46116 ("i40e: new poll mode driver")Signed-off-by Qiming Yang <[email protected]>
Thanks.
BTW, next time, don't forget to note your changes comparing the previous version. It will make reviewers' life easy. :)
/Jingjing
PATCH v3 1/2 net/i40e: fix link status change interrupt
In reply to Qiming YangPreviously, link status interrupt in i40e is achieved by checking LINK_STAT_CHANGE_MASK in PFINT_ICR0 register which is provided only for diagnostic use. Instead, drivers need to get the link status change notification by using LSE (Link Status Event).
This patch enables LSE and calls LSC callback when the event is received. This patch also removes the processing on LINK_STAT_CHANGE_MASK.
---
Change in v3:
* resolved the conflict with other changes, rework based on version: 16.11-rc2
---
--- drivers/net/i40e/i40e_ethdev.c | 96 +++++++++--------------------------------- 1 file changed, 19 insertions(+), 77 deletions(-)
drivers/net/i40e/i40e_ethdev.c +19 -77
@@ -108,7 +108,6 @@I40E_PFINT_ICR0_ENA_GRST_MASK | \I40E_PFINT_ICR0_ENA_PCI_EXCEPTION_MASK | \I40E_PFINT_ICR0_ENA_STORM_DETECT_MASK | \ -I40E_PFINT_ICR0_ENA_LINK_STAT_CHANGE_MASK | \I40E_PFINT_ICR0_ENA_HMC_ERR_MASK | \I40E_PFINT_ICR0_ENA_PE_CRITERR_MASK | \ I40E_PFINT_ICR0_ENA_VFLR_MASK | \
@@ -1777,6 +1776,16 @@ i40e_dev_start(struct rte_eth_dev *dev)if (dev->data->dev_conf.intr_conf.lsc !=0 )PMD_INIT_LOG (INFO ,"lsc won't enable because of" " no intr multiplex\n" ); + }else if (dev->data->dev_conf.intr_conf.lsc !=0 ) { + ret =i40e_aq_set_phy_int_mask (hw, + ~(I40E_AQ_EVENT_LINK_UPDOWN | +I40E_AQ_EVENT_MODULE_QUAL_FAIL | +I40E_AQ_EVENT_MEDIA_NA ),NULL ); +if (ret !=I40E_SUCCESS ) +PMD_DRV_LOG (WARNING ,"Fail to set phy mask" ); + +/* Call get_link_info aq commond to enable LSE */ +i40e_dev_link_update (dev,0 ); }/* enable uio intr after callback register */
@@ -1995,6 +2004,7 @@ i40e_dev_link_update(struct rte_eth_dev *dev,struct rte_eth_link link, old;int status;unsigned rep_cnt =MAX_REPEAT_TIME ; +bool enable_lse = dev->data->dev_conf.intr_conf.lsc ? true : false;memset (&link,0 ,sizeof (link));memset (&old,0 ,sizeof (old));
@@ -2003,7 +2013,8 @@ i40e_dev_link_update(struct rte_eth_dev *dev, do { /* Get link status information from hardware */ - status = i40e_aq_get_link_info(hw, false, &link_status, NULL); + status = i40e_aq_get_link_info(hw, enable_lse, + &link_status, NULL); if (status != I40E_SUCCESS) { link.link_speed = ETH_SPEED_NUM_100M; link.link_duplex = ETH_LINK_FULL_DUPLEX;
@@ -5465,6 +5476,12 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev) info.msg_buf, info.msg_len);break ; +case i40e_aqc_opc_get_link_status: + ret =i40e_dev_link_update (dev,0 ); +if (!ret) +_rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC ,NULL ); +break ;default :PMD_DRV_LOG (ERR ,"Request %u is not supported yet" , opcode);
@@ -5474,57 +5491,6 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev)rte_free (info.msg_buf); } -/* -* Interrupt handler is registered as the alarm callback for handling LSC -* interrupt in a definite of time, in order to wait the NIC into a stable -* state. Currently it waits 1 sec in i40e for the link up interrupt, and -* no need for link down interrupt. -*/ -static void -i40e_dev_interrupt_delayed_handler (void *param) -{ -struct rte_eth_dev *dev = (struct rte_eth_dev *)param; -struct i40e_hw *hw =I40E_DEV_PRIVATE_TO_HW (dev->data->dev_private); -uint32_t icr0; - -/* read interrupt causes again */ - icr0 =I40E_READ_REG (hw,I40E_PFINT_ICR0 ); - -#ifdef RTE_LIBRTE_I40E_DEBUG_DRIVER -if (icr0 &I40E_PFINT_ICR0_ECC_ERR_MASK ) -PMD_DRV_LOG (ERR ,"ICR0: unrecoverable ECC error\n" ); -if (icr0 &I40E_PFINT_ICR0_MAL_DETECT_MASK ) -PMD_DRV_LOG (ERR ,"ICR0: malicious programming detected\n" ); -if (icr0 &I40E_PFINT_ICR0_GRST_MASK ) -PMD_DRV_LOG (INFO ,"ICR0: global reset requested\n" ); -if (icr0 &I40E_PFINT_ICR0_PCI_EXCEPTION_MASK ) -PMD_DRV_LOG (INFO ,"ICR0: PCI exception\n activated\n" ); -if (icr0 &I40E_PFINT_ICR0_STORM_DETECT_MASK ) -PMD_DRV_LOG (INFO ,"ICR0: a change in the storm control " -"state\n" ); -if (icr0 &I40E_PFINT_ICR0_HMC_ERR_MASK ) -PMD_DRV_LOG (ERR ,"ICR0: HMC error\n" ); -if (icr0 &I40E_PFINT_ICR0_PE_CRITERR_MASK ) -PMD_DRV_LOG (ERR ,"ICR0: protocol engine critical error\n" ); -#endif /* RTE_LIBRTE_I40E_DEBUG_DRIVER */ - -if (icr0 &I40E_PFINT_ICR0_VFLR_MASK ) { -PMD_DRV_LOG (INFO ,"INT:VF reset detected\n" ); -i40e_dev_handle_vfr_event (dev); - } -if (icr0 &I40E_PFINT_ICR0_ADMINQ_MASK ) { -PMD_DRV_LOG (INFO ,"INT:ADMINQ event\n" ); -i40e_dev_handle_aq_msg (dev); - } - -/* handle the link up interrupt in an alarm callback */ -i40e_dev_link_update (dev,0 ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); - -i40e_pf_enable_irq0 (hw); -rte_intr_enable (&(dev->pci_dev->intr_handle)); -} -/** * Interrupt handler triggered by NIC for handling * specific interrupt.
@@ -5582,30 +5548,6 @@ i40e_dev_interrupt_handler(__rte_unused struct rte_intr_handle *handle,i40e_dev_handle_aq_msg (dev); } -/* Link Status Change interrupt */ -if (icr0 &I40E_PFINT_ICR0_LINK_STAT_CHANGE_MASK ) { -#define I40E_US_PER_SECOND 1000000 -struct rte_eth_link link; - -PMD_DRV_LOG (INFO ,"ICR0: link status changed\n" ); -memset (&link,0 ,sizeof (link)); -rte_i40e_dev_atomic_read_link_status (dev, &link); -i40e_dev_link_update (dev,0 ); - -/* -* For link up interrupt, it needs to wait 1 second to let the -* hardware be a stable state. Otherwise several consecutive -* interrupts can be observed. -* For link down interrupt, no need to wait. -*/ -if (!link.link_status &&rte_eal_alarm_set (I40E_US_PER_SECOND , - i40e_dev_interrupt_delayed_handler, (void *)dev) >=0 ) -return ; -else -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC ,NULL ); - } - done:/* Enable interrupt */ i40e_pf_enable_irq0 (hw);
Signature · 1 line
2.5.5
PATCH v3 2/2 net/i40e: fix VF bonded device link down
If VF device is used as slave of a bond device, it will be polled periodically through alarm. Interrupt is involved here. And then VF will send I40E_VIRTCHNL_OP_GET_LINK_STAT message to PF to query the status. The response is handled by interrupt callback. Interrupt is involved here again. That's why bond device cannot bring up.
This patch removes I40E_VIRTCHNL_OP_GET_LINK_STAT message. Link status in VF driver will be updated when PF driver notify it, and VF stores this link status locally. VF driver just returns the local status when being required.
---
Change in v3:
* resolved the conflict with other changes, rework based on version: 16.11-rc2
---
--- drivers/net/i40e/i40e_ethdev.c | 22 ++++++++++- drivers/net/i40e/i40e_ethdev.h | 4 +- drivers/net/i40e/i40e_ethdev_vf.c | 81 +++++++++++++-------------------------- drivers/net/i40e/i40e_pf.c | 33 ++++++++-------- drivers/net/i40e/i40e_pf.h | 3 +- 5 files changed, 67 insertions(+), 76 deletions(-)
drivers/net/i40e/i40e_ethdev.c +21 -1
@@ -5441,6 +5441,24 @@ i40e_dev_handle_vfr_event(struct rte_eth_dev *dev) }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 = + 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)); +} + +static void i40e_dev_handle_aq_msg (struct rte_eth_dev *dev) {struct i40e_hw *hw =I40E_DEV_PRIVATE_TO_HW (dev->data->dev_private);
@@ -5478,9 +5496,11 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev)break ;case i40e_aqc_opc_get_link_status: ret =i40e_dev_link_update (dev,0 ); -if (!ret) +if (!ret) { +i40e_notify_all_vfs_link_status (dev);_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); + }break ;default : PMD_DRV_LOG(ERR, "Request %u is not supported yet",
drivers/net/i40e/i40e_ethdev.h +3 -1
@@ -609,7 +609,9 @@ int i40e_hash_filter_inset_select(struct i40e_hw *hw, struct rte_eth_input_set_conf *conf);int i40e_fdir_filter_inset_select (struct i40e_pf *pf,struct rte_eth_input_set_conf *conf); - +int i40e_pf_host_send_msg_to_vf (struct i40e_pf_vf *vf,uint32_t opcode, +uint32_t retval,uint8_t *msg, +uint16_t msglen);void i40e_rxq_info_get (struct rte_eth_dev *dev,uint16_t queue_id,struct rte_eth_rxq_info *qinfo); void i40e_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
drivers/net/i40e/i40e_ethdev_vf.c +26 -55
100 lines not on this page · raw message
drivers/net/i40e/i40e_pf.c +16 -17
@@ -250,7 +250,7 @@ i40e_pf_host_vf_reset(struct i40e_pf_vf *vf, bool do_hw_reset)return ret; } -static int +int i40e_pf_host_send_msg_to_vf(struct i40e_pf_vf *vf, uint32_t opcode, uint32_t retval,
@@ -847,18 +847,6 @@ i40e_pf_host_process_cmd_get_stats(struct i40e_pf_vf *vf)return I40E_SUCCESS ; } -static void -i40e_pf_host_process_cmd_get_link_status (struct i40e_pf_vf *vf) -{ -struct rte_eth_dev *dev =I40E_VSI_TO_ETH_DEV (vf->pf->main_vsi); - -/* Update link status first to acquire latest link change */ -i40e_dev_link_update (dev,1 ); -i40e_pf_host_send_msg_to_vf (vf,I40E_VIRTCHNL_OP_GET_LINK_STAT , -I40E_SUCCESS , (uint8_t *)&dev->data->dev_link, -sizeof (struct rte_eth_link )); -} - static int i40e_pf_host_process_cmd_cfg_vlan_offload( struct i40e_pf_vf *vf,
@@ -909,6 +897,20 @@ send_msg:return ret; } +static void +i40e_notify_vf_link_status (struct rte_eth_dev *dev,struct i40e_pf_vf *vf) +{ +struct i40e_virtchnl_pf_event event; + + 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 = + dev->data->dev_link.link_speed; +i40e_pf_host_send_msg_to_vf (vf,I40E_VIRTCHNL_OP_EVENT , +I40E_SUCCESS , (uint8_t *)&event,sizeof (event)); +} + void i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev, uint16_t abs_vf_id, uint32_t opcode,
@@ -964,6 +966,7 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,case I40E_VIRTCHNL_OP_ENABLE_QUEUES :PMD_DRV_LOG (INFO ,"OP_ENABLE_QUEUES received" );i40e_pf_host_process_cmd_enable_queues (vf, msg, msglen); +i40e_notify_vf_link_status (dev, vf);break ;case I40E_VIRTCHNL_OP_DISABLE_QUEUES :PMD_DRV_LOG (INFO ,"OP_DISABLE_QUEUE received" );
@@ -993,10 +996,6 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,PMD_DRV_LOG (INFO ,"OP_GET_STATS received" );i40e_pf_host_process_cmd_get_stats (vf);break ; -case I40E_VIRTCHNL_OP_GET_LINK_STAT : -PMD_DRV_LOG (INFO ,"OP_GET_LINK_STAT received" ); -i40e_pf_host_process_cmd_get_link_status (vf); -break ;case I40E_VIRTCHNL_OP_CFG_VLAN_OFFLOAD :PMD_DRV_LOG (INFO ,"OP_CFG_VLAN_OFFLOAD received" );i40e_pf_host_process_cmd_cfg_vlan_offload (vf, msg, msglen);
drivers/net/i40e/i40e_pf.h +1 -2
@@ -59,9 +59,8 @@ enum i40e_virtchnl_ops_dpdk {* Keep some gap between Linux PF commands and * DPDK PF extended commands. */ -I40E_VIRTCHNL_OP_GET_LINK_STAT =I40E_VIRTCHNL_OP_VERSION + +I40E_VIRTCHNL_OP_CFG_VLAN_OFFLOAD =I40E_VIRTCHNL_OP_VERSION +I40E_DPDK_OFFSET , -I40E_VIRTCHNL_OP_CFG_VLAN_OFFLOAD ,I40E_VIRTCHNL_OP_CFG_VLAN_PVID , I40E_VIRTCHNL_OP_CONFIG_VSI_QUEUES_EXT, };
Signature · 1 line
2.5.5
Re: [PATCH v3 2/2] net/i40e: fix VF bonded device link down
Hi Qiming,
Quoted 16 lines · Qiming Yang
If VF device is used as slave of a bond device, it will be polled periodically through alarm. Interrupt is involved here. And then VF will send
I40E_VIRTCHNL_OP_GET_LINK_STATmessage to PF to query the status. The response is handled by interrupt callback. Interrupt is involved here again. That's why bond device cannot bring up.This patch removes
I40E_VIRTCHNL_OP_GET_LINK_STATmessage. Link status in VF driver will be updated when PF driver notify it, and VF stores this link status locally. VF driver just returns the local status when being required.Fixes 4861cde46116 ("i40e: new poll mode driver")Signed-off-by Qiming Yang <[email protected]>---
<...>
drivers/net/i40e/i40e_ethdev.c i40e_dev_handle_vfr_event(struct rte_eth_dev *dev) · line 5454
Quoted 12 lines
static void
drivers/net/i40e/i40e_ethdev.c +11
-0+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 = + dev->data->dev_link.link_speed;
This gives a compilation error with icc [1], casting to enum will be enough to fix I guess.
[1]
.../drivers/net/i40e/i40e_ethdev.c(5453): error #188: enumerated type mixed with another type
event.event_data.link_event.link_speed =
^<...>
Quoted 2 lines
drivers/net/i40e/i40e_pf.c +0
-0
<...>
drivers/net/i40e/i40e_pf.c send_msg: · line 909
Quoted 11 lines
drivers/net/i40e/i40e_pf.c +10
-0+static void +i40e_notify_vf_link_status (struct rte_eth_dev *dev,struct i40e_pf_vf *vf) +{ +struct i40e_virtchnl_pf_event event; + + 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 = + dev->data->dev_link.link_speed;
Same error here:
.../drivers/net/i40e/i40e_pf.c(908): error #188: enumerated type mixed with another type
event.event_data.link_event.link_speed =
^And while sending a new version of the patch, can you please:
1- CC the maintainers
2- Patchset already acked by Jingjing, keep the ack in the patches.
Thanks,
ferruh
PATCH v4 1/2 net/i40e: fix link status change interrupt
In reply to Qiming YangPreviously, link status interrupt in i40e is achieved by checking LINK_STAT_CHANGE_MASK in PFINT_ICR0 register which is provided only for diagnostic use. Instead, drivers need to get the link status change notification by using LSE (Link Status Event).
This patch enables LSE and calls LSC callback when the event is received. This patch also removes the processing on LINK_STAT_CHANGE_MASK.
---
v3 changes:
* resolved the conflict with other changes, rework based on version: 16.11-rc2
drivers/net/i40e/i40e_ethdev.c | 96 +++++++++--------------------------------- 1 file changed, 19 insertions(+), 77 deletions(-)
drivers/net/i40e/i40e_ethdev.c +19 -77
@@ -108,7 +108,6 @@I40E_PFINT_ICR0_ENA_GRST_MASK | \I40E_PFINT_ICR0_ENA_PCI_EXCEPTION_MASK | \I40E_PFINT_ICR0_ENA_STORM_DETECT_MASK | \ -I40E_PFINT_ICR0_ENA_LINK_STAT_CHANGE_MASK | \I40E_PFINT_ICR0_ENA_HMC_ERR_MASK | \I40E_PFINT_ICR0_ENA_PE_CRITERR_MASK | \ I40E_PFINT_ICR0_ENA_VFLR_MASK | \
@@ -1777,6 +1776,16 @@ i40e_dev_start(struct rte_eth_dev *dev)if (dev->data->dev_conf.intr_conf.lsc !=0 )PMD_INIT_LOG (INFO ,"lsc won't enable because of" " no intr multiplex\n" ); + }else if (dev->data->dev_conf.intr_conf.lsc !=0 ) { + ret =i40e_aq_set_phy_int_mask (hw, + ~(I40E_AQ_EVENT_LINK_UPDOWN | +I40E_AQ_EVENT_MODULE_QUAL_FAIL | +I40E_AQ_EVENT_MEDIA_NA ),NULL ); +if (ret !=I40E_SUCCESS ) +PMD_DRV_LOG (WARNING ,"Fail to set phy mask" ); + +/* Call get_link_info aq commond to enable LSE */ +i40e_dev_link_update (dev,0 ); }/* enable uio intr after callback register */
@@ -1995,6 +2004,7 @@ i40e_dev_link_update(struct rte_eth_dev *dev,struct rte_eth_link link, old;int status;unsigned rep_cnt =MAX_REPEAT_TIME ; +bool enable_lse = dev->data->dev_conf.intr_conf.lsc ? true : false;memset (&link,0 ,sizeof (link));memset (&old,0 ,sizeof (old));
@@ -2003,7 +2013,8 @@ i40e_dev_link_update(struct rte_eth_dev *dev, do { /* Get link status information from hardware */ - status = i40e_aq_get_link_info(hw, false, &link_status, NULL); + status = i40e_aq_get_link_info(hw, enable_lse, + &link_status, NULL); if (status != I40E_SUCCESS) { link.link_speed = ETH_SPEED_NUM_100M; link.link_duplex = ETH_LINK_FULL_DUPLEX;
@@ -5465,6 +5476,12 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev) info.msg_buf, info.msg_len);break ; +case i40e_aqc_opc_get_link_status: + ret =i40e_dev_link_update (dev,0 ); +if (!ret) +_rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC ,NULL ); +break ;default :PMD_DRV_LOG (ERR ,"Request %u is not supported yet" , opcode);
@@ -5474,57 +5491,6 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev)rte_free (info.msg_buf); } -/* -* Interrupt handler is registered as the alarm callback for handling LSC -* interrupt in a definite of time, in order to wait the NIC into a stable -* state. Currently it waits 1 sec in i40e for the link up interrupt, and -* no need for link down interrupt. -*/ -static void -i40e_dev_interrupt_delayed_handler (void *param) -{ -struct rte_eth_dev *dev = (struct rte_eth_dev *)param; -struct i40e_hw *hw =I40E_DEV_PRIVATE_TO_HW (dev->data->dev_private); -uint32_t icr0; - -/* read interrupt causes again */ - icr0 =I40E_READ_REG (hw,I40E_PFINT_ICR0 ); - -#ifdef RTE_LIBRTE_I40E_DEBUG_DRIVER -if (icr0 &I40E_PFINT_ICR0_ECC_ERR_MASK ) -PMD_DRV_LOG (ERR ,"ICR0: unrecoverable ECC error\n" ); -if (icr0 &I40E_PFINT_ICR0_MAL_DETECT_MASK ) -PMD_DRV_LOG (ERR ,"ICR0: malicious programming detected\n" ); -if (icr0 &I40E_PFINT_ICR0_GRST_MASK ) -PMD_DRV_LOG (INFO ,"ICR0: global reset requested\n" ); -if (icr0 &I40E_PFINT_ICR0_PCI_EXCEPTION_MASK ) -PMD_DRV_LOG (INFO ,"ICR0: PCI exception\n activated\n" ); -if (icr0 &I40E_PFINT_ICR0_STORM_DETECT_MASK ) -PMD_DRV_LOG (INFO ,"ICR0: a change in the storm control " -"state\n" ); -if (icr0 &I40E_PFINT_ICR0_HMC_ERR_MASK ) -PMD_DRV_LOG (ERR ,"ICR0: HMC error\n" ); -if (icr0 &I40E_PFINT_ICR0_PE_CRITERR_MASK ) -PMD_DRV_LOG (ERR ,"ICR0: protocol engine critical error\n" ); -#endif /* RTE_LIBRTE_I40E_DEBUG_DRIVER */ - -if (icr0 &I40E_PFINT_ICR0_VFLR_MASK ) { -PMD_DRV_LOG (INFO ,"INT:VF reset detected\n" ); -i40e_dev_handle_vfr_event (dev); - } -if (icr0 &I40E_PFINT_ICR0_ADMINQ_MASK ) { -PMD_DRV_LOG (INFO ,"INT:ADMINQ event\n" ); -i40e_dev_handle_aq_msg (dev); - } - -/* handle the link up interrupt in an alarm callback */ -i40e_dev_link_update (dev,0 ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); - -i40e_pf_enable_irq0 (hw); -rte_intr_enable (&(dev->pci_dev->intr_handle)); -} -/** * Interrupt handler triggered by NIC for handling * specific interrupt.
@@ -5582,30 +5548,6 @@ i40e_dev_interrupt_handler(__rte_unused struct rte_intr_handle *handle,i40e_dev_handle_aq_msg (dev); } -/* Link Status Change interrupt */ -if (icr0 &I40E_PFINT_ICR0_LINK_STAT_CHANGE_MASK ) { -#define I40E_US_PER_SECOND 1000000 -struct rte_eth_link link; - -PMD_DRV_LOG (INFO ,"ICR0: link status changed\n" ); -memset (&link,0 ,sizeof (link)); -rte_i40e_dev_atomic_read_link_status (dev, &link); -i40e_dev_link_update (dev,0 ); - -/* -* For link up interrupt, it needs to wait 1 second to let the -* hardware be a stable state. Otherwise several consecutive -* interrupts can be observed. -* For link down interrupt, no need to wait. -*/ -if (!link.link_status &&rte_eal_alarm_set (I40E_US_PER_SECOND , - i40e_dev_interrupt_delayed_handler, (void *)dev) >=0 ) -return ; -else -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC ,NULL ); - } - done:/* Enable interrupt */ i40e_pf_enable_irq0 (hw);
Signature · 1 line
2.5.5
PATCH v4 2/2 net/i40e: fix VF bonded device link down
If VF device is used as slave of a bond device, it will be polled periodically through alarm. Interrupt is involved here. And then VF will send I40E_VIRTCHNL_OP_GET_LINK_STAT message to PF to query the status. The response is handled by interrupt callback. Interrupt is involved here again. That's why bond device cannot bring up.
This patch removes I40E_VIRTCHNL_OP_GET_LINK_STAT message. Link status in VF driver will be updated when PF driver notify it, and VF stores this link status locally. VF driver just returns the local status when being required.
---
v3 changes:
* resolved the conflict with other changes, rework based on version: 16.11-rc2
v4 changes:
*fixed compilation error with icc
drivers/net/i40e/i40e_ethdev.c | 22 ++++++++++- drivers/net/i40e/i40e_ethdev.h | 4 +- drivers/net/i40e/i40e_ethdev_vf.c | 81 +++++++++++++-------------------------- drivers/net/i40e/i40e_pf.c | 33 ++++++++-------- drivers/net/i40e/i40e_pf.h | 3 +- 5 files changed, 67 insertions(+), 76 deletions(-)
drivers/net/i40e/i40e_ethdev.c +21 -1
@@ -5441,6 +5441,24 @@ i40e_dev_handle_vfr_event(struct rte_eth_dev *dev) }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)); +} + +static void i40e_dev_handle_aq_msg (struct rte_eth_dev *dev) {struct i40e_hw *hw =I40E_DEV_PRIVATE_TO_HW (dev->data->dev_private);
@@ -5478,9 +5496,11 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev)break ;case i40e_aqc_opc_get_link_status: ret =i40e_dev_link_update (dev,0 ); -if (!ret) +if (!ret) { +i40e_notify_all_vfs_link_status (dev);_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); + }break ;default : PMD_DRV_LOG(ERR, "Request %u is not supported yet",
drivers/net/i40e/i40e_ethdev.h +3 -1
@@ -609,7 +609,9 @@ int i40e_hash_filter_inset_select(struct i40e_hw *hw, struct rte_eth_input_set_conf *conf);int i40e_fdir_filter_inset_select (struct i40e_pf *pf,struct rte_eth_input_set_conf *conf); - +int i40e_pf_host_send_msg_to_vf (struct i40e_pf_vf *vf,uint32_t opcode, +uint32_t retval,uint8_t *msg, +uint16_t msglen);void i40e_rxq_info_get (struct rte_eth_dev *dev,uint16_t queue_id,struct rte_eth_rxq_info *qinfo); void i40e_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
drivers/net/i40e/i40e_ethdev_vf.c +26 -55
100 lines not on this page · raw message
drivers/net/i40e/i40e_pf.c +16 -17
@@ -250,7 +250,7 @@ i40e_pf_host_vf_reset(struct i40e_pf_vf *vf, bool do_hw_reset)return ret; } -static int +int i40e_pf_host_send_msg_to_vf(struct i40e_pf_vf *vf, uint32_t opcode, uint32_t retval,
@@ -847,18 +847,6 @@ i40e_pf_host_process_cmd_get_stats(struct i40e_pf_vf *vf)return I40E_SUCCESS ; } -static void -i40e_pf_host_process_cmd_get_link_status (struct i40e_pf_vf *vf) -{ -struct rte_eth_dev *dev =I40E_VSI_TO_ETH_DEV (vf->pf->main_vsi); - -/* Update link status first to acquire latest link change */ -i40e_dev_link_update (dev,1 ); -i40e_pf_host_send_msg_to_vf (vf,I40E_VIRTCHNL_OP_GET_LINK_STAT , -I40E_SUCCESS , (uint8_t *)&dev->data->dev_link, -sizeof (struct rte_eth_link )); -} - static int i40e_pf_host_process_cmd_cfg_vlan_offload( struct i40e_pf_vf *vf,
@@ -909,6 +897,20 @@ send_msg:return ret; } +static void +i40e_notify_vf_link_status (struct rte_eth_dev *dev,struct i40e_pf_vf *vf) +{ +struct i40e_virtchnl_pf_event event; + + 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; +i40e_pf_host_send_msg_to_vf (vf,I40E_VIRTCHNL_OP_EVENT , +I40E_SUCCESS , (uint8_t *)&event,sizeof (event)); +} + void i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev, uint16_t abs_vf_id, uint32_t opcode,
@@ -964,6 +966,7 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,case I40E_VIRTCHNL_OP_ENABLE_QUEUES :PMD_DRV_LOG (INFO ,"OP_ENABLE_QUEUES received" );i40e_pf_host_process_cmd_enable_queues (vf, msg, msglen); +i40e_notify_vf_link_status (dev, vf);break ;case I40E_VIRTCHNL_OP_DISABLE_QUEUES :PMD_DRV_LOG (INFO ,"OP_DISABLE_QUEUE received" );
@@ -993,10 +996,6 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,PMD_DRV_LOG (INFO ,"OP_GET_STATS received" );i40e_pf_host_process_cmd_get_stats (vf);break ; -case I40E_VIRTCHNL_OP_GET_LINK_STAT : -PMD_DRV_LOG (INFO ,"OP_GET_LINK_STAT received" ); -i40e_pf_host_process_cmd_get_link_status (vf); -break ;case I40E_VIRTCHNL_OP_CFG_VLAN_OFFLOAD :PMD_DRV_LOG (INFO ,"OP_CFG_VLAN_OFFLOAD received" );i40e_pf_host_process_cmd_cfg_vlan_offload (vf, msg, msglen);
drivers/net/i40e/i40e_pf.h +1 -2
@@ -59,9 +59,8 @@ enum i40e_virtchnl_ops_dpdk {* Keep some gap between Linux PF commands and * DPDK PF extended commands. */ -I40E_VIRTCHNL_OP_GET_LINK_STAT =I40E_VIRTCHNL_OP_VERSION + +I40E_VIRTCHNL_OP_CFG_VLAN_OFFLOAD =I40E_VIRTCHNL_OP_VERSION +I40E_DPDK_OFFSET , -I40E_VIRTCHNL_OP_CFG_VLAN_OFFLOAD ,I40E_VIRTCHNL_OP_CFG_VLAN_PVID , I40E_VIRTCHNL_OP_CONFIG_VSI_QUEUES_EXT, };
Signature · 1 line
2.5.5
Re: [PATCH v4 2/2] net/i40e: fix VF bonded device link down
2016-11-04 17:10, Qiming Yang:
Quoted 12 lines
If VF device is used as slave of a bond device, it will be polled periodically through alarm. Interrupt is involved here. And then VF will send
I40E_VIRTCHNL_OP_GET_LINK_STATmessage to PF to query the status. The response is handled by interrupt callback. Interrupt is involved here again. That's why bond device cannot bring up.This patch removes
I40E_VIRTCHNL_OP_GET_LINK_STATmessage. Link status in VF driver will be updated when PF driver notify it, and VF stores this link status locally. VF driver just returns the local status when being required.
Quoted 4 lines
Fixes 4861cde46116 ("i40e: new poll mode driver")Signed-off-by Qiming Yang <[email protected]>Acked-by Jingjing Wu <[email protected]>
Series applied, thanks and welcome Qiming!
Quoted 15 lines
-----Original Message-----
From: Yang, Qiming
Sent: Tuesday, October 25, 2016 12:19 PM
To: [email protected]
Cc: Wu, Jingjing <[email protected]>; Zhang, Helin <[email protected]>; Richardson, Bruce <[email protected]>; Yang, Qiming <[email protected]>
Subject: [PATCH v2 1/2] net/i40e: fix link status change interruptPreviously, link status interrupt in i40e is achieved by checking
LINK_STAT_CHANGE_MASKinPFINT_ICR0register which is provided only for diagnostic use. Instead, drivers need to get the link status change notification by using LSE (Link Status Event).
Quoted 7 lines
This patch enables LSE and calls LSC callback when the event is received. This patch also removes the processing on
LINK_STAT_CHANGE_MASK.Fixes 4861cde46116 ("i40e: new poll mode driver")Signed-off-by Qiming Yang <[email protected]>
Quoted 5 lines · Qiming Yang
Previously, link status interrupt in i40e is achieved by checking
LINK_STAT_CHANGE_MASKinPFINT_ICR0register which is provided only for diagnostic use. Instead, drivers need to get the link status change notification by using LSE (Link Status Event).
Quoted 8 lines
This patch enables LSE and calls LSC callback when the event is received. This patch also removes the processing on
LINK_STAT_CHANGE_MASK.Fixes 4861cde46116 ("i40e: new poll mode driver")Signed-off-by Qiming Yang <[email protected]>---
Thanks for the V2. Unfortunately, this conflicts with some other changes to the driver, making the patch not apply cleanly, and a manual apply I tried did not compile successfully. Can you please do a V3 rebased on top of dpdk-next-net/rel_16_11.
Thanks,
/Bruce