From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id A6ABE4C57; Mon, 10 Apr 2017 03:10:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1491786650; x=1523322650; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=LV6oBrDvFxJPJ8uCd1n8nAp4F/qMr1e/ij3EqPflYwE=; b=XSvBNWGnIqCZKXMmMCsZZSUKBwjw9KUI8aM6mBxQsUqdhTGEQ8naUZlV de0z1a8VXUvUGSdeprkZNOprLE6z+w==; Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Apr 2017 18:10:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,179,1488873600"; d="scan'208";a="1117581978" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.239.129.189]) by orsmga001.jf.intel.com with ESMTP; 09 Apr 2017 18:10:46 -0700 From: Qi Zhang To: ferruh.yigit@intel.com Cc: jingjing.wu@intel.com, helin.zhang@intel.com, dev@dpdk.org, Qi Zhang , stable@dpdk.org Date: Sun, 9 Apr 2017 14:05:04 -0400 Message-Id: <1491761106-26883-2-git-send-email-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491761106-26883-1-git-send-email-qi.z.zhang@intel.com> References: <1491433937-36182-1-git-send-email-qi.z.zhang@intel.com> <1491761106-26883-1-git-send-email-qi.z.zhang@intel.com> Subject: [dpdk-stable] [PATCH v2 1/3] net/i40e: remove duplicate code X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 01:10:50 -0000 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 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