All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qi Zhang <qi.z.zhang@intel.com>
To: ferruh.yigit@intel.com
Cc: jingjing.wu@intel.com, helin.zhang@intel.com, dev@dpdk.org,
	Qi Zhang <qi.z.zhang@intel.com>,
	stable@dpdk.org
Subject: [PATCH v2 1/3] net/i40e: remove duplicate code
Date: Sun,  9 Apr 2017 14:05:04 -0400	[thread overview]
Message-ID: <1491761106-26883-2-git-send-email-qi.z.zhang@intel.com> (raw)
In-Reply-To: <1491761106-26883-1-git-send-email-qi.z.zhang@intel.com>

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

  reply	other threads:[~2017-04-09 18:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-05 23:12 [PATCH 0/3] net/i40e: fix wrong VF link speed Qi Zhang
2017-04-05 23:12 ` [PATCH 1/3] net/i40e: remove duplicate code Qi Zhang
2017-04-05 23:12 ` [PATCH 2/3] net/i40e: fix wrong VF link speed Qi Zhang
2017-04-07 14:29   ` [dpdk-stable] " Ferruh Yigit
2017-04-05 23:12 ` [PATCH 3/3] net/i40e: add missing 25G " Qi Zhang
2017-04-09 18:05 ` [PATCH v2 0/3] net/i40e: fix wrong VF " Qi Zhang
2017-04-09 18:05   ` Qi Zhang [this message]
2017-04-09 18:05   ` [PATCH v2 2/3] " Qi Zhang
2017-04-09 18:05   ` [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
2017-04-10  9:51   ` [PATCH v2 0/3] net/i40e: fix wrong VF " Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1491761106-26883-2-git-send-email-qi.z.zhang@intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=helin.zhang@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.