From: Qi Zhang Date: Sun, 9 Apr 2017 18:05:04 +0000 (-0400) Subject: net/i40e: remove duplicate code X-Git-Tag: spdx-start~3619 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3d1636677afe17f44a161f1be5816cd0ba99aa0a;p=dpdk.git net/i40e: remove duplicate code 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 --- diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index ac5e181fcd..f4e31e22ad 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -5742,18 +5742,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