Skip to contentSkip to conversation

net/ixgbe: notify VF when PF link status changes

PATCH In review [email protected] 5 participants 11 messages Mar 22, 2017 – Mar 31, 2017 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/ixgbe: notify VF when PF link status changes

From: Alex Zelezniak <[email protected]>

---
 drivers/net/ixgbe/ixgbe_ethdev.c  | 33 +++++++++++++++++++++++++++++++++
 drivers/net/ixgbe/rte_pmd_ixgbe.h | 14 ++++++++++++++
 2 files changed, 47 insertions(+)
drivers/net/ixgbe/ixgbe_ethdev.c +33 -0
index 7169007..a0e7aeb 100644
@@ -4894,6 +4894,39 @@ static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on)
 	return new_val;
 }
 
+int
+rte_pmd_ixgbe_ping_vfs(uint8_t port, uint16_t vf)
+{
+	struct ixgbe_hw *hw;
+	struct ixgbe_vf_info *vfinfo;
+	struct rte_eth_dev *dev;
+	struct rte_pci_device *pci_dev;
+	uint32_t ctrl;
+
+	RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
+
+	dev = &rte_eth_devices[port];
+	pci_dev = IXGBE_DEV_TO_PCI(dev);
+
+	if (!is_device_supported(dev, &rte_ixgbe_pmd))
+		return -ENOTSUP;
+
+	if (vf >= pci_dev->max_vfs)
+		return -EINVAL;
+
+	hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	vfinfo = *(IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private));
+
+	hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+
+	ctrl = IXGBE_PF_CONTROL_MSG;
+	if (vfinfo[vf].clear_to_send)
+		ctrl |= IXGBE_VT_MSGTYPE_CTS;
+
+	ixgbe_write_mbx(hw, &ctrl, 1, vf);
+
+	return 0;
+}
 
 int
 rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
drivers/net/ixgbe/rte_pmd_ixgbe.h +14 -0
index 4d7b507..7f27992 100644
@@ -42,6 +42,20 @@
 #include <rte_ethdev.h>
 
 /**
+ * Notify VF when PF link status changes.
+ *
+ * @param port
+ *   The port identifier of the Ethernet device.
+ * @param vf
+ *   VF id.
+ * @return
+ *   - (0) if successful.
+ *   - (-ENODEV) if *port* invalid.
+ *   - (-EINVAL) if *vf* invalid.
+ */
+int rte_pmd_ixgbe_ping_vfs(uint8_t port, uint16_t vf);
+
+/**
  * Set the VF MAC address.
  *
  * @param port
Signature · 1 line
1.9.1
#1 lore raw

Hi Alex,

Quoted 92 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of [email protected]
Sent: Wednesday, March 22, 2017 5:32 PM
To: [email protected]
Cc: Ananyev, Konstantin <[email protected]>; Zhang, Helin <[email protected]>; Lu, Wenzhuo <[email protected]>; Alex Zelezniak <[email protected]>
Subject: [dpdk-dev] [PATCH] net/ixgbe: notify VF when PF link status changes

From: Alex Zelezniak <[email protected]>

---
 drivers/net/ixgbe/ixgbe_ethdev.c  | 33
+++++++++++++++++++++++++++++++++
drivers/net/ixgbe/rte_pmd_ixgbe.h | 14 ++++++++++++++
 2 files changed, 47 insertions(+)
drivers/net/ixgbe/ixgbe_ethdev.c +32 -0
index 7169007..a0e7aeb 100644
@@ -4894,6 +4894,39 @@ static void ixgbevf_set_vfta_all(struct
 rte_eth_dev *dev, bool on)
 	return new_val;
 }
 
+int
+rte_pmd_ixgbe_ping_vfs(uint8_t port, uint16_t vf) {
+	struct ixgbe_hw *hw;
+	struct ixgbe_vf_info *vfinfo;
+	struct rte_eth_dev *dev;
+	struct rte_pci_device *pci_dev;
+	uint32_t ctrl;
+
+	RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
+
+	dev = &rte_eth_devices[port];
+	pci_dev = IXGBE_DEV_TO_PCI(dev);
+
+	if (!is_device_supported(dev, &rte_ixgbe_pmd))
+		return -ENOTSUP;
+
+	if (vf >= pci_dev->max_vfs)
+		return -EINVAL;
+
+	hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	vfinfo = *(IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data-
 >dev_private));
+
+	hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+
+	ctrl = IXGBE_PF_CONTROL_MSG;
+	if (vfinfo[vf].clear_to_send)
+		ctrl |= IXGBE_VT_MSGTYPE_CTS;
+
+	ixgbe_write_mbx(hw, &ctrl, 1, vf);
+
+	return 0;
+}
 
 int
 rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t

on) diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.h b/drivers/net/ixgbe/rte_pmd_ixgbe.h
index 4d7b507..7f27992 100644

drivers/net/ixgbe/rte_pmd_ixgbe.h +14 -1
@@ -42,6 +42,20 @@
 #include <rte_ethdev.h>
 
 /**
+ * Notify VF when PF link status changes.
+ *
+ * @param port
+ *   The port identifier of the Ethernet device.
+ * @param vf
+ *   VF id.
+ * @return
+ *   - (0) if successful.
+ *   - (-ENODEV) if *port* invalid.
+ *   - (-EINVAL) if *vf* invalid.
+ */
+int rte_pmd_ixgbe_ping_vfs(uint8_t port, uint16_t vf);
+
+/**
  * Set the VF MAC address.
  *
  * @param port
--
Quoted 1 line

1.9.1

The drivers/net/ixgbe/rte_pmd_ixgbe_version.map file needs to be updated too.

Regards,

Bernard

#2 lore raw

PATCH v2 1/1 ping VF when PF status changes

In reply to [email protected]

From: Alex Zelezniak <[email protected]>

* updated rte_pmd_ixgbe_version.map file

---
 drivers/net/ixgbe/ixgbe_ethdev.c            | 33 +++++++++++++++++++++++++++++
 drivers/net/ixgbe/rte_pmd_ixgbe.h           | 14 ++++++++++++
 drivers/net/ixgbe/rte_pmd_ixgbe_version.map |  1 +
 3 files changed, 48 insertions(+)
drivers/net/ixgbe/ixgbe_ethdev.c +33 -0
index 7169007..94c85da 100644
@@ -4894,6 +4894,39 @@ static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on)
 	return new_val;
 }
 
+int
+rte_pmd_ixgbe_ping_vf(uint8_t port, uint16_t vf)
+{
+	struct ixgbe_hw *hw;
+	struct ixgbe_vf_info *vfinfo;
+	struct rte_eth_dev *dev;
+	struct rte_pci_device *pci_dev;
+	uint32_t ctrl;
+
+	RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
+
+	dev = &rte_eth_devices[port];
+	pci_dev = IXGBE_DEV_TO_PCI(dev);
+
+	if (!is_device_supported(dev, &rte_ixgbe_pmd))
+		return -ENOTSUP;
+
+	if (vf >= pci_dev->max_vfs)
+		return -EINVAL;
+
+	hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	vfinfo = *(IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private));
+
+	hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+
+	ctrl = IXGBE_PF_CONTROL_MSG;
+	if (vfinfo[vf].clear_to_send)
+		ctrl |= IXGBE_VT_MSGTYPE_CTS;
+
+	ixgbe_write_mbx(hw, &ctrl, 1, vf);
+
+	return 0;
+}
 
 int
 rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
drivers/net/ixgbe/rte_pmd_ixgbe.h +14 -0
index 4d7b507..bbb957f 100644
@@ -42,6 +42,20 @@
 #include <rte_ethdev.h>
 
 /**
+ * Notify VF about PF status changes.
+ *
+ * @param port
+ *   The port identifier of the Ethernet device.
+ * @param vf
+ *   VF id.
+ * @return
+ *   - (0) if successful.
+ *   - (-ENODEV) if *port* invalid.
+ *   - (-EINVAL) if *vf* invalid.
+ */
+int rte_pmd_ixgbe_ping_vf(uint8_t port, uint16_t vf);
+
+/**
  * Set the VF MAC address.
  *
  * @param port
drivers/net/ixgbe/rte_pmd_ixgbe_version.map +1 -0
index a992dfd..882dd80 100644
@@ -25,6 +25,7 @@ DPDK_17.02 {
 	rte_pmd_ixgbe_macsec_enable;
 	rte_pmd_ixgbe_macsec_select_rxsa;
 	rte_pmd_ixgbe_macsec_select_txsa;
+	rte_pmd_ixgbe_ping_vf;
 	rte_pmd_ixgbe_set_vf_rate_limit;
 	rte_pmd_ixgbe_set_vf_rx;
 	rte_pmd_ixgbe_set_vf_rxmode;
Signature · 1 line
1.9.1
#3 lore raw

Re: [PATCH v2] ping VF when PF status changes

Hi Alex

Quoted 108 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Wednesday, March 29, 2017 9:52 PM
To: [email protected]
Cc: Ananyev, Konstantin <[email protected]>; Zhang, Helin <[email protected]>; Lu, Wenzhuo <[email protected]>; Iremonger, Bernard <[email protected]>; Alex Zelezniak <[email protected]>
Subject: [PATCH v2] ping VF when PF status changes

From: Alex Zelezniak <[email protected]>

* updated rte_pmd_ixgbe_version.map file

---
 drivers/net/ixgbe/ixgbe_ethdev.c            | 33
+++++++++++++++++++++++++++++
 drivers/net/ixgbe/rte_pmd_ixgbe.h           | 14 ++++++++++++
 drivers/net/ixgbe/rte_pmd_ixgbe_version.map |  1 +
 3 files changed, 48 insertions(+)
drivers/net/ixgbe/ixgbe_ethdev.c +32 -0
index 7169007..94c85da 100644
@@ -4894,6 +4894,39 @@ static void ixgbevf_set_vfta_all(struct
 rte_eth_dev *dev, bool on)
 	return new_val;
 }
 
+int
+rte_pmd_ixgbe_ping_vf(uint8_t port, uint16_t vf) {
+	struct ixgbe_hw *hw;
+	struct ixgbe_vf_info *vfinfo;
+	struct rte_eth_dev *dev;
+	struct rte_pci_device *pci_dev;
+	uint32_t ctrl;
+
+	RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
+
+	dev = &rte_eth_devices[port];
+	pci_dev = IXGBE_DEV_TO_PCI(dev);
+
+	if (!is_device_supported(dev, &rte_ixgbe_pmd))
+		return -ENOTSUP;
+
+	if (vf >= pci_dev->max_vfs)
+		return -EINVAL;
+
+	hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	vfinfo = *(IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data-
 >dev_private));
+
+	hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+
+	ctrl = IXGBE_PF_CONTROL_MSG;
+	if (vfinfo[vf].clear_to_send)
+		ctrl |= IXGBE_VT_MSGTYPE_CTS;
+
+	ixgbe_write_mbx(hw, &ctrl, 1, vf);
+
+	return 0;
+}
 
 int
 rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t

on) diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.h b/drivers/net/ixgbe/rte_pmd_ixgbe.h
index 4d7b507..bbb957f 100644

drivers/net/ixgbe/rte_pmd_ixgbe.h +14 -0
@@ -42,6 +42,20 @@
 #include <rte_ethdev.h>
 
 /**
+ * Notify VF about PF status changes.
+ *
+ * @param port
+ *   The port identifier of the Ethernet device.
+ * @param vf
+ *   VF id.
+ * @return
+ *   - (0) if successful.
+ *   - (-ENODEV) if *port* invalid.
+ *   - (-EINVAL) if *vf* invalid.
+ */
+int rte_pmd_ixgbe_ping_vf(uint8_t port, uint16_t vf);
+
+/**
  * Set the VF MAC address.
  *
  * @param port
drivers/net/ixgbe/rte_pmd_ixgbe_version.map +1 -1
index a992dfd..882dd80 100644
@@ -25,6 +25,7 @@ DPDK_17.02 {
 	rte_pmd_ixgbe_macsec_enable;
 	rte_pmd_ixgbe_macsec_select_rxsa;
 	rte_pmd_ixgbe_macsec_select_txsa;
+	rte_pmd_ixgbe_ping_vf;
 	rte_pmd_ixgbe_set_vf_rate_limit;
 	rte_pmd_ixgbe_set_vf_rx;
 	rte_pmd_ixgbe_set_vf_rxmode;
--
Quoted 1 line

1.9.1

The 17.02 block should not be changed.
A new block needs to be added for 17.05

Regards,

Bernard.

#4 lore raw

PATCH v3 1/1 net/ixgbe: ping VF when PF status changes

In reply to [email protected]

From: Alex Zelezniak <[email protected]>

* added 17.05 block to rte_pmd_ixgbe_version.map file

---
 drivers/net/ixgbe/ixgbe_ethdev.c            | 34 +++++++++++++++++++++++++++++
 drivers/net/ixgbe/rte_pmd_ixgbe.h           | 14 ++++++++++++
 drivers/net/ixgbe/rte_pmd_ixgbe_version.map |  6 +++++
 3 files changed, 54 insertions(+)
drivers/net/ixgbe/ixgbe_ethdev.c +34 -0
index 7169007..5f0feab 100644
@@ -4926,6 +4926,40 @@ static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on)
 }
 
 int
+rte_pmd_ixgbe_ping_vf(uint8_t port, uint16_t vf)
+{
+	struct ixgbe_hw *hw;
+	struct ixgbe_vf_info *vfinfo;
+	struct rte_eth_dev *dev;
+	struct rte_pci_device *pci_dev;
+	uint32_t ctrl;
+
+	RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
+
+	dev = &rte_eth_devices[port];
+	pci_dev = IXGBE_DEV_TO_PCI(dev);
+
+	if (!is_device_supported(dev, &rte_ixgbe_pmd))
+		return -ENOTSUP;
+
+	if (vf >= pci_dev->max_vfs)
+		return -EINVAL;
+
+	hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	vfinfo = *(IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private));
+
+	hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+
+	ctrl = IXGBE_PF_CONTROL_MSG;
+	if (vfinfo[vf].clear_to_send)
+		ctrl |= IXGBE_VT_MSGTYPE_CTS;
+
+	ixgbe_write_mbx(hw, &ctrl, 1, vf);
+
+	return 0;
+}
+
+int
 rte_pmd_ixgbe_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
 {
 	struct ixgbe_hw *hw;
drivers/net/ixgbe/rte_pmd_ixgbe.h +14 -0
index 4d7b507..63b1229 100644
@@ -42,6 +42,20 @@
 #include <rte_ethdev.h>
 
 /**
+ * Notify VF when PF status changes.
+ *
+ * @param port
+ *   The port identifier of the Ethernet device.
+ * @param vf
+ *   VF id.
+ * @return
+ *   - (0) if successful.
+ *   - (-ENODEV) if *port* invalid.
+ *   - (-EINVAL) if *vf* invalid.
+ */
+int rte_pmd_ixgbe_ping_vf(uint8_t port, uint16_t vf);
+
+/**
  * Set the VF MAC address.
  *
  * @param port
drivers/net/ixgbe/rte_pmd_ixgbe_version.map +6 -0
index a992dfd..2c7512d 100644
@@ -31,3 +31,9 @@ DPDK_17.02 {
 	rte_pmd_ixgbe_set_vf_tx;
 	rte_pmd_ixgbe_set_vf_vlan_filter;
 } DPDK_16.11;
+
+DPDK_17.05 {
+	global:
+
+	rte_pmd_ixgbe_ping_vf;
+} DPDK_17.02;
Signature · 1 line
1.9.1
Acked-by
#6 lore raw

Re: [PATCH v3] net/ixgbe: ping VF when PF status changes

Quoted 15 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Lu, Wenzhuo
Sent: Thursday, March 30, 2017 9:10 PM
To: [email protected]; [email protected]
Cc: Ananyev, Konstantin <[email protected]>; Zhang, Helin <[email protected]>; Iremonger, Bernard <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v3] net/ixgbe: ping VF when PF status changes

Hi,

Quoted 3 lines

-----Original Message-----
Subject: [PATCH v3] net/ixgbe: ping VF when PF status changes

Quoted 7 lines
Quoted 5 lines

From: Alex Zelezniak <[email protected]>

* added 17.05 block to rte_pmd_ixgbe_version.map file

describe what's implemented and for what.

The second "hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);" can be removed. :-) And is there any other patch to use this new function ?

#7 lore raw

PATCH v4 1/1 net/ixgbe: ping VF when PF status changes

In reply to [email protected]

From: Alex Zelezniak <[email protected]>

v4:
* Removed duplicate line

v3:
* Added 17.05 block to rte_pmd_ixgbe_version.map file

v2:
* Removed trailing spaces

v1:
* Implements function used by application managing PF to inform VF when link status changes

---
 drivers/net/ixgbe/ixgbe_ethdev.c            | 31 +++++++++++++++++++++++++++++
 drivers/net/ixgbe/rte_pmd_ixgbe.h           | 14 +++++++++++++
 drivers/net/ixgbe/rte_pmd_ixgbe_version.map |  6 ++++++
 3 files changed, 51 insertions(+)
drivers/net/ixgbe/ixgbe_ethdev.c +31 -0
index 34bd681..a427a3d 100644
@@ -4898,6 +4898,37 @@ static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on)
 	return new_val;
 }
 
+int
+rte_pmd_ixgbe_ping_vf(uint8_t port, uint16_t vf)
+{
+	struct ixgbe_hw *hw;
+	struct ixgbe_vf_info *vfinfo;
+	struct rte_eth_dev *dev;
+	struct rte_pci_device *pci_dev;
+	uint32_t ctrl;
+
+	RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
+
+	dev = &rte_eth_devices[port];
+	pci_dev = IXGBE_DEV_TO_PCI(dev);
+
+	if (!is_device_supported(dev, &rte_ixgbe_pmd))
+		return -ENOTSUP;
+
+	if (vf >= pci_dev->max_vfs)
+		return -EINVAL;
+
+	hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	vfinfo = *(IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private));
+
+	ctrl = IXGBE_PF_CONTROL_MSG;
+	if (vfinfo[vf].clear_to_send)
+		ctrl |= IXGBE_VT_MSGTYPE_CTS;
+
+	ixgbe_write_mbx(hw, &ctrl, 1, vf);
+
+	return 0;
+}
 
 int
 rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
drivers/net/ixgbe/rte_pmd_ixgbe.h +14 -0
index 4d7b507..cdb747e 100644
@@ -42,6 +42,20 @@
 #include <rte_ethdev.h>
 
 /**
+ * Notify VF when PF link status changes.
+ *
+ * @param port
+ *   The port identifier of the Ethernet device.
+ * @param vf
+ *   VF id.
+ * @return
+ *   - (0) if successful.
+ *   - (-ENODEV) if *port* invalid.
+ *   - (-EINVAL) if *vf* invalid.
+ */
+int rte_pmd_ixgbe_ping_vf(uint8_t port, uint16_t vf);
+
+/**
  * Set the VF MAC address.
  *
  * @param port
drivers/net/ixgbe/rte_pmd_ixgbe_version.map +6 -0
index a992dfd..2c7512d 100644
@@ -31,3 +31,9 @@ DPDK_17.02 {
 	rte_pmd_ixgbe_set_vf_tx;
 	rte_pmd_ixgbe_set_vf_vlan_filter;
 } DPDK_16.11;
+
+DPDK_17.05 {
+	global:
+
+	rte_pmd_ixgbe_ping_vf;
+} DPDK_17.02;
Signature · 1 line
1.9.1
Acked-by on v4 1/1
#8 lore raw

Re: [PATCH v4] net/ixgbe: ping VF when PF status changes

Hi, Alexz
Thanks for your quick reponse.

Hi, Wenzhuo
Would you please review it again and add your acknowledgement if it is OK for you.

Quoted 10 lines

Subject: [PATCH v4] net/ixgbe: ping VF when PF status changes

From: Alex Zelezniak <[email protected]>

v4:
* Removed duplicate line

v3:
* Added 17.05 block to rte_pmd_ixgbe_version.map file

Quoted 8 lines

v2:
* Removed trailing spaces

v1:
* Implements function used by application managing PF to inform VF when link status changes

Quoted 93 lines
---
 drivers/net/ixgbe/ixgbe_ethdev.c            | 31
+++++++++++++++++++++++++++++
 drivers/net/ixgbe/rte_pmd_ixgbe.h           | 14 +++++++++++++
 drivers/net/ixgbe/rte_pmd_ixgbe_version.map |  6 ++++++
 3 files changed, 51 insertions(+)
drivers/net/ixgbe/ixgbe_ethdev.c +30 -0
index 34bd681..a427a3d 100644
@@ -4898,6 +4898,37 @@ static void ixgbevf_set_vfta_all(struct rte_eth_dev
 *dev, bool on)
 	return new_val;
 }
 
+int
+rte_pmd_ixgbe_ping_vf(uint8_t port, uint16_t vf) {
+	struct ixgbe_hw *hw;
+	struct ixgbe_vf_info *vfinfo;
+	struct rte_eth_dev *dev;
+	struct rte_pci_device *pci_dev;
+	uint32_t ctrl;
+
+	RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
+
+	dev = &rte_eth_devices[port];
+	pci_dev = IXGBE_DEV_TO_PCI(dev);
+
+	if (!is_device_supported(dev, &rte_ixgbe_pmd))
+		return -ENOTSUP;
+
+	if (vf >= pci_dev->max_vfs)
+		return -EINVAL;
+
+	hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	vfinfo = *(IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private));
+
+	ctrl = IXGBE_PF_CONTROL_MSG;
+	if (vfinfo[vf].clear_to_send)
+		ctrl |= IXGBE_VT_MSGTYPE_CTS;
+
+	ixgbe_write_mbx(hw, &ctrl, 1, vf);
+
+	return 0;
+}
 
 int
 rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
drivers/net/ixgbe/rte_pmd_ixgbe.h +14 -0
index 4d7b507..cdb747e 100644
@@ -42,6 +42,20 @@
 #include <rte_ethdev.h>
 
 /**
+ * Notify VF when PF link status changes.
+ *
+ * @param port
+ *   The port identifier of the Ethernet device.
+ * @param vf
+ *   VF id.
+ * @return
+ *   - (0) if successful.
+ *   - (-ENODEV) if *port* invalid.
+ *   - (-EINVAL) if *vf* invalid.
+ */
+int rte_pmd_ixgbe_ping_vf(uint8_t port, uint16_t vf);
+
+/**
  * Set the VF MAC address.
  *
  * @param port
drivers/net/ixgbe/rte_pmd_ixgbe_version.map +6 -1
index a992dfd..2c7512d 100644
@@ -31,3 +31,9 @@ DPDK_17.02 {
 	rte_pmd_ixgbe_set_vf_tx;
 	rte_pmd_ixgbe_set_vf_vlan_filter;
 } DPDK_16.11;
+
+DPDK_17.05 {
+	global:
+
+	rte_pmd_ixgbe_ping_vf;
+} DPDK_17.02;
--

1.9.1

Acked-by
#9 lore raw

Re: [PATCH v4] net/ixgbe: ping VF when PF status changes

Hi,

Quoted 27 lines

-----Original Message-----
From: Dai, Wei
Sent: Friday, March 31, 2017 8:48 AM
To: [email protected]; [email protected]
Cc: Ananyev, Konstantin; Zhang, Helin; Lu, Wenzhuo; Iremonger, Bernard
Subject: RE: [PATCH v4] net/ixgbe: ping VF when PF status changes

Hi, Alexz
Thanks for your quick reponse.

Hi, Wenzhuo
Would you please review it again and add your acknowledgement if it is OK for you.

Quoted 13 lines

Subject: [PATCH v4] net/ixgbe: ping VF when PF status changes

From: Alex Zelezniak <[email protected]>

v4:
* Removed duplicate line

v3:
* Added 17.05 block to rte_pmd_ixgbe_version.map file

v2:
* Removed trailing spaces

Quoted 6 lines
Quoted 5 lines

v1:
* Implements function used by application managing PF to inform VF when link status changes

BTW, Alex, you can keep our ack when sending the new version.

Applied
#10 lore raw

Re: [PATCH v4] net/ixgbe: ping VF when PF status changes

Quoted 30 lines · Wenzhuo

Hi,

Quoted 27 lines

-----Original Message-----
From: Dai, Wei
Sent: Friday, March 31, 2017 8:48 AM
To: [email protected]; [email protected]
Cc: Ananyev, Konstantin; Zhang, Helin; Lu, Wenzhuo; Iremonger, Bernard
Subject: RE: [PATCH v4] net/ixgbe: ping VF when PF status changes

Hi, Alexz
Thanks for your quick reponse.

Hi, Wenzhuo
Would you please review it again and add your acknowledgement if it is OK for you.

Quoted 13 lines

Subject: [PATCH v4] net/ixgbe: ping VF when PF status changes

From: Alex Zelezniak <[email protected]>

v4:
* Removed duplicate line

v3:
* Added 17.05 block to rte_pmd_ixgbe_version.map file

v2:
* Removed trailing spaces

Quoted 7 lines
Quoted 6 lines
Quoted 5 lines

v1:
* Implements function used by application managing PF to inform VF when link status changes

Applied to dpdk-next-net/master, thanks.

Quoted 3 lines

BTW, Alex, you can keep our ack when sending the new version.