* [PATCH] notify VF when PF link status changes
@ 2017-03-22 0:23 alexz
2017-03-22 14:25 ` Ferruh Yigit
0 siblings, 1 reply; 2+ messages in thread
From: alexz @ 2017-03-22 0:23 UTC (permalink / raw)
To: dev; +Cc: liang-min.wang, daniels, Alex Zelezniak
From: Alex Zelezniak <alexz@att.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 33 +++++++++++++++++++++++++++++++++
drivers/net/ixgbe/rte_pmd_ixgbe.h | 16 ++++++++++++++++
2 files changed, 49 insertions(+)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 7169007..c78e5da 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -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..82ccba7 100644
--- a/drivers/net/ixgbe/rte_pmd_ixgbe.h
+++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h
@@ -41,6 +41,22 @@
#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.
*
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] notify VF when PF link status changes
2017-03-22 0:23 [PATCH] notify VF when PF link status changes alexz
@ 2017-03-22 14:25 ` Ferruh Yigit
0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2017-03-22 14:25 UTC (permalink / raw)
To: alexz, dev, Ananyev, Konstantin, Zhang, Helin, Wenzhuo Lu
Cc: liang-min.wang, daniels
On 3/22/2017 12:23 AM, alexz@att.com wrote:
> From: Alex Zelezniak <alexz@att.com>
>
Hi Alex,
Thank you for the patch.
Can you please send a new version of the patch with a sign-off?
More details related sign-off:
http://dpdk.org/doc/guides/contributing/patches.html#commit-messages-body
Overall DPDK contribution guide can be found at:
http://dpdk.org/doc/guides/contributing/patches.html
And adding ixgbe maintainers in the mail loop helps a lot for patches
get reviewed. (already added into this mail thread)
Thanks,
ferruh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-22 14:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-22 0:23 [PATCH] notify VF when PF link status changes alexz
2017-03-22 14:25 ` Ferruh Yigit
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.