From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>,
netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 08/15] ice: Notify VF of link status change
Date: Wed, 3 Oct 2018 08:48:18 -0700 [thread overview]
Message-ID: <20181003154825.5440-9-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <20181003154825.5440-1-jeffrey.t.kirsher@intel.com>
From: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
When PF gets a link status change event, notify the VFs of the same.
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ice/ice_main.c | 2 ++
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 12 ++++++++++++
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h | 3 +++
3 files changed, 17 insertions(+)
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 4c8e7460e16b..d7cbc2e6e5c5 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -665,6 +665,8 @@ ice_link_event(struct ice_pf *pf, struct ice_port_info *pi)
}
}
+ ice_vc_notify_link_state(pf);
+
return 0;
}
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
index f44292b00807..20de2034e153 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
@@ -887,6 +887,18 @@ static bool ice_reset_vf(struct ice_vf *vf, bool is_vflr)
return true;
}
+/**
+ * ice_vc_notify_link_state - Inform all VFs on a PF of link status
+ * @pf: pointer to the PF structure
+ */
+void ice_vc_notify_link_state(struct ice_pf *pf)
+{
+ int i;
+
+ for (i = 0; i < pf->num_alloc_vfs; i++)
+ ice_vc_notify_vf_link_state(&pf->vf[i]);
+}
+
/**
* ice_vc_notify_reset - Send pending reset message to all VFs
* @pf: pointer to the PF structure
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
index 7561a678ebe6..a493cb1bb89d 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
@@ -78,6 +78,7 @@ int ice_get_vf_cfg(struct net_device *netdev, int vf_id,
void ice_free_vfs(struct ice_pf *pf);
void ice_vc_process_vf_msg(struct ice_pf *pf, struct ice_rq_event_info *event);
+void ice_vc_notify_link_state(struct ice_pf *pf);
void ice_vc_notify_reset(struct ice_pf *pf);
bool ice_reset_all_vfs(struct ice_pf *pf, bool is_vflr);
@@ -96,7 +97,9 @@ int ice_set_vf_spoofchk(struct net_device *netdev, int vf_id, bool ena);
#define ice_process_vflr_event(pf) do {} while (0)
#define ice_free_vfs(pf) do {} while (0)
#define ice_vc_process_vf_msg(pf, event) do {} while (0)
+#define ice_vc_notify_link_state(pf) do {} while (0)
#define ice_vc_notify_reset(pf) do {} while (0)
+
static inline bool
ice_reset_all_vfs(struct ice_pf __always_unused *pf,
bool __always_unused is_vflr)
--
2.17.1
next prev parent reply other threads:[~2018-10-03 22:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-03 15:48 [net-next 00/15][pull request] 100GbE Intel Wired LAN Driver Updates 2018-10-03 Jeff Kirsher
2018-10-03 15:48 ` [net-next 01/15] virtchnl: Added support to exchange additional speed values Jeff Kirsher
2018-10-03 15:48 ` [net-next 02/15] ice: Add support to detect SR-IOV capability and mailbox queues Jeff Kirsher
2018-10-03 15:48 ` [net-next 03/15] ice: Add handler to configure SR-IOV Jeff Kirsher
2018-10-03 15:48 ` [net-next 04/15] ice: Update VSI and queue management code to handle VF VSI Jeff Kirsher
2018-10-03 15:48 ` [net-next 05/15] ice: Add support for VF reset events Jeff Kirsher
2018-10-03 15:48 ` [net-next 06/15] ice: Add handlers for VF netdevice operations Jeff Kirsher
2018-10-03 15:48 ` [net-next 07/15] ice: Implement virtchnl commands for AVF support Jeff Kirsher
2018-10-03 15:48 ` Jeff Kirsher [this message]
2018-10-03 17:23 ` [net-next 08/15] ice: Notify VF of link status change Or Gerlitz
2018-10-04 17:36 ` Abodunrin, Akeem G
2018-10-03 15:48 ` [net-next 09/15] ice: Extend malicious operations detection logic Jeff Kirsher
2018-10-03 15:48 ` [net-next 10/15] ice: Fix forward to queue group logic Jeff Kirsher
2018-10-03 15:48 ` [net-next 11/15] ice: Add code to go from ICE_FWD_TO_VSI_LIST to ICE_FWD_TO_VSI Jeff Kirsher
2018-10-03 15:48 ` [net-next 12/15] ice: Fix potential null pointer issues Jeff Kirsher
2018-10-03 15:48 ` [net-next 13/15] ice: Add more flexibility on how we assign an ITR index Jeff Kirsher
2018-10-03 15:48 ` [net-next 14/15] ice: Use the right function to enable/disable VSI Jeff Kirsher
2018-10-03 15:48 ` [net-next 15/15] ice: Update version string Jeff Kirsher
2018-10-03 16:41 ` [net-next 00/15][pull request] 100GbE Intel Wired LAN Driver Updates 2018-10-03 David Miller
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=20181003154825.5440-9-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=anirudh.venkataramanan@intel.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=nhorman@redhat.com \
--cc=sassmann@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox