Message ID | 20200811091040.24602-1-stevex.yang@intel.com (mailing list archive) |
---|---|
State | Changes Requested, archived |
Delegated to: | Qi Zhang |
Headers | show |
Series | net/i40e: i40evf exposes LSC flag to application. | expand |
Context | Check | Description |
---|---|---|
ci/iol-testing | success | Testing PASS |
ci/iol-mellanox-Performance | success | Performance Testing PASS |
ci/iol-intel-Performance | success | Performance Testing PASS |
ci/Intel-compilation | success | Compilation OK |
ci/travis-robot | success | Travis build: passed |
ci/checkpatch | success | coding style OK |
> -----Original Message----- > From: dev <dev-bounces@dpdk.org> On Behalf Of SteveX Yang > Sent: Tuesday, August 11, 2020 5:11 PM > To: Yang, Qiming <qiming.yang@intel.com>; Xing, Beilei > <beilei.xing@intel.com>; Guo, Jia <jia.guo@intel.com>; dev@dpdk.org > Cc: Yang, SteveX <stevex.yang@intel.com> > Subject: [dpdk-dev] [PATCH] net/i40e: i40evf exposes LSC flag to application. > > When PF event VIRTCHNL_EVENT_LINK_CHANGE received, i40evf need update > the link status and issue RTE_ETH_EVENT_INTR_LSC via > _rte_eth_dev_callback_process(). The implementation is incomplete, To support LSC in i40evf, please 1. add RTE_PCI_DRV_INTR_LSC in drv_flags 2. make sure dev_conf.intr_conf.lsc can be configure with 1 3.update i40e_vf.ini.
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 69cab8e73..a0a9268e5 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -1381,13 +1381,16 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg, switch (pf_msg->event) { case VIRTCHNL_EVENT_RESET_IMPENDING: PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event"); - _rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, - NULL); + _rte_eth_dev_callback_process(dev, + RTE_ETH_EVENT_INTR_RESET, NULL); break; case VIRTCHNL_EVENT_LINK_CHANGE: PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_LINK_CHANGE event"); vf->link_up = pf_msg->event_data.link_event.link_status; vf->link_speed = pf_msg->event_data.link_event.link_speed; + i40evf_dev_link_update(dev, 0); + _rte_eth_dev_callback_process(dev, + RTE_ETH_EVENT_INTR_LSC, NULL); break; case VIRTCHNL_EVENT_PF_DRIVER_CLOSE: PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_PF_DRIVER_CLOSE event");
When PF event VIRTCHNL_EVENT_LINK_CHANGE received, i40evf need update the link status and issue RTE_ETH_EVENT_INTR_LSC via _rte_eth_dev_callback_process(). Signed-off-by: SteveX Yang <stevex.yang@intel.com> --- drivers/net/i40e/i40e_ethdev_vf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)