All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/ixgbe: notify VF when PF link status changes
@ 2017-03-22 17:32 alexz
  2017-03-29 11:10 ` Iremonger, Bernard
  2017-03-29 20:52 ` [PATCH v2] ping VF when PF " alexz
  0 siblings, 2 replies; 11+ messages in thread
From: alexz @ 2017-03-22 17:32 UTC (permalink / raw)
  To: dev; +Cc: konstantin.ananyev, helin.zhang, wenzhuo.lu, Alex Zelezniak

From: Alex Zelezniak <alexz@att.com>

Signed-off-by: Alex Zelezniak <alexz@att.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c  | 33 +++++++++++++++++++++++++++++++++
 drivers/net/ixgbe/rte_pmd_ixgbe.h | 14 ++++++++++++++
 2 files changed, 47 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 7169007..a0e7aeb 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..7f27992 100644
--- a/drivers/net/ixgbe/rte_pmd_ixgbe.h
+++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h
@@ -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
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] net/ixgbe: notify VF when PF link status changes
  2017-03-22 17:32 [PATCH] net/ixgbe: notify VF when PF link status changes alexz
@ 2017-03-29 11:10 ` Iremonger, Bernard
  2017-03-29 20:52 ` [PATCH v2] ping VF when PF " alexz
  1 sibling, 0 replies; 11+ messages in thread
From: Iremonger, Bernard @ 2017-03-29 11:10 UTC (permalink / raw)
  To: alexz, dev; +Cc: Ananyev, Konstantin, Zhang, Helin, Lu, Wenzhuo

Hi Alex,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of alexz@att.com
> Sent: Wednesday, March 22, 2017 5:32 PM
> To: dev@dpdk.org
> Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Zhang, Helin
> <helin.zhang@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Alex
> Zelezniak <alexz@att.com>
> Subject: [dpdk-dev] [PATCH] net/ixgbe: notify VF when PF link status
> changes
> 
> From: Alex Zelezniak <alexz@att.com>
> 
> Signed-off-by: Alex Zelezniak <alexz@att.com>
> ---
>  drivers/net/ixgbe/ixgbe_ethdev.c  | 33
> +++++++++++++++++++++++++++++++++
> drivers/net/ixgbe/rte_pmd_ixgbe.h | 14 ++++++++++++++
>  2 files changed, 47 insertions(+)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> b/drivers/net/ixgbe/ixgbe_ethdev.c
> index 7169007..a0e7aeb 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..7f27992 100644
> --- a/drivers/net/ixgbe/rte_pmd_ixgbe.h
> +++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h
> @@ -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
> --
> 1.9.1

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

Regards,

Bernard

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v2] ping VF when PF status changes
  2017-03-22 17:32 [PATCH] net/ixgbe: notify VF when PF link status changes alexz
  2017-03-29 11:10 ` Iremonger, Bernard
@ 2017-03-29 20:52 ` alexz
  2017-03-29 21:59   ` Iremonger, Bernard
  2017-03-30 12:33   ` [PATCH v3] net/ixgbe: " alexz
  1 sibling, 2 replies; 11+ messages in thread
From: alexz @ 2017-03-29 20:52 UTC (permalink / raw)
  To: dev
  Cc: konstantin.ananyev, helin.zhang, wenzhuo.lu, bernard.iremonger,
	Alex Zelezniak

From: Alex Zelezniak <alexz@att.com>

* updated rte_pmd_ixgbe_version.map file

Signed-off-by: Alex Zelezniak <alexz@att.com>
---
 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(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 7169007..94c85da 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_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
--- a/drivers/net/ixgbe/rte_pmd_ixgbe.h
+++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h
@@ -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
diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe_version.map b/drivers/net/ixgbe/rte_pmd_ixgbe_version.map
index a992dfd..882dd80 100644
--- a/drivers/net/ixgbe/rte_pmd_ixgbe_version.map
+++ b/drivers/net/ixgbe/rte_pmd_ixgbe_version.map
@@ -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;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] ping VF when PF status changes
  2017-03-29 20:52 ` [PATCH v2] ping VF when PF " alexz
@ 2017-03-29 21:59   ` Iremonger, Bernard
  2017-03-30 12:33   ` [PATCH v3] net/ixgbe: " alexz
  1 sibling, 0 replies; 11+ messages in thread
From: Iremonger, Bernard @ 2017-03-29 21:59 UTC (permalink / raw)
  To: alexz, dev; +Cc: Ananyev, Konstantin, Zhang, Helin, Lu, Wenzhuo

Hi Alex

> -----Original Message-----
> From: alexz@att.com [mailto:alexz@att.com]
> Sent: Wednesday, March 29, 2017 9:52 PM
> To: dev@dpdk.org
> Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Zhang, Helin
> <helin.zhang@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>;
> Iremonger, Bernard <bernard.iremonger@intel.com>; Alex Zelezniak
> <alexz@att.com>
> Subject: [PATCH v2] ping VF when PF status changes
> 
> From: Alex Zelezniak <alexz@att.com>
> 
> * updated rte_pmd_ixgbe_version.map file
> 
> Signed-off-by: Alex Zelezniak <alexz@att.com>
> ---
>  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(+)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> b/drivers/net/ixgbe/ixgbe_ethdev.c
> index 7169007..94c85da 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_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
> --- a/drivers/net/ixgbe/rte_pmd_ixgbe.h
> +++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h
> @@ -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
> diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe_version.map
> b/drivers/net/ixgbe/rte_pmd_ixgbe_version.map
> index a992dfd..882dd80 100644
> --- a/drivers/net/ixgbe/rte_pmd_ixgbe_version.map
> +++ b/drivers/net/ixgbe/rte_pmd_ixgbe_version.map
> @@ -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;
> --
> 1.9.1

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

Regards,

Bernard.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v3] net/ixgbe: ping VF when PF status changes
  2017-03-29 20:52 ` [PATCH v2] ping VF when PF " alexz
  2017-03-29 21:59   ` Iremonger, Bernard
@ 2017-03-30 12:33   ` alexz
  2017-03-30 13:09     ` Lu, Wenzhuo
  2017-03-30 21:05     ` [PATCH v4] " alexz
  1 sibling, 2 replies; 11+ messages in thread
From: alexz @ 2017-03-30 12:33 UTC (permalink / raw)
  To: dev
  Cc: konstantin.ananyev, helin.zhang, wenzhuo.lu, bernard.iremonger,
	Alex Zelezniak

From: Alex Zelezniak <alexz@att.com>

* added 17.05 block to rte_pmd_ixgbe_version.map file

Signed-off-by: Alex Zelezniak <alexz@att.com>
---
 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(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 7169007..5f0feab 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -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;
diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.h b/drivers/net/ixgbe/rte_pmd_ixgbe.h
index 4d7b507..63b1229 100644
--- a/drivers/net/ixgbe/rte_pmd_ixgbe.h
+++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h
@@ -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
diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe_version.map b/drivers/net/ixgbe/rte_pmd_ixgbe_version.map
index a992dfd..2c7512d 100644
--- a/drivers/net/ixgbe/rte_pmd_ixgbe_version.map
+++ b/drivers/net/ixgbe/rte_pmd_ixgbe_version.map
@@ -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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v3] net/ixgbe: ping VF when PF status changes
  2017-03-30 12:33   ` [PATCH v3] net/ixgbe: " alexz
@ 2017-03-30 13:09     ` Lu, Wenzhuo
  2017-03-30 16:50       ` Dai, Wei
  2017-03-30 21:05     ` [PATCH v4] " alexz
  1 sibling, 1 reply; 11+ messages in thread
From: Lu, Wenzhuo @ 2017-03-30 13:09 UTC (permalink / raw)
  To: alexz, dev; +Cc: Ananyev, Konstantin, Zhang, Helin, Iremonger, Bernard

Hi,

> -----Original Message-----
> Subject: [PATCH v3] net/ixgbe: ping VF when PF status changes
>
> From: Alex Zelezniak <alexz@att.com>
>
> * added 17.05 block to rte_pmd_ixgbe_version.map file
>
> Signed-off-by: Alex Zelezniak <alexz@att.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Except the commit log should describe what's implemented and for what.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v3] net/ixgbe: ping VF when PF status changes
  2017-03-30 13:09     ` Lu, Wenzhuo
@ 2017-03-30 16:50       ` Dai, Wei
  0 siblings, 0 replies; 11+ messages in thread
From: Dai, Wei @ 2017-03-30 16:50 UTC (permalink / raw)
  To: Lu, Wenzhuo, alexz, dev
  Cc: Ananyev, Konstantin, Zhang, Helin, Iremonger, Bernard



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Lu, Wenzhuo
> Sent: Thursday, March 30, 2017 9:10 PM
> To: alexz@att.com; dev@dpdk.org
> Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Zhang, Helin
> <helin.zhang@intel.com>; Iremonger, Bernard <bernard.iremonger@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v3] net/ixgbe: ping VF when PF status changes
> 
> Hi,
> 
> > -----Original Message-----
> > Subject: [PATCH v3] net/ixgbe: ping VF when PF status changes
> >
> > From: Alex Zelezniak <alexz@att.com>
> >
> > * added 17.05 block to rte_pmd_ixgbe_version.map file
> >
> > Signed-off-by: Alex Zelezniak <alexz@att.com>
> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Except the commit log should
> describe what's implemented and for what.
Acked-by: Wei Dai <wei.dai@intel.com>

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 ?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v4] net/ixgbe: ping VF when PF status changes
  2017-03-30 12:33   ` [PATCH v3] net/ixgbe: " alexz
  2017-03-30 13:09     ` Lu, Wenzhuo
@ 2017-03-30 21:05     ` alexz
  2017-03-31  0:47       ` Dai, Wei
  1 sibling, 1 reply; 11+ messages in thread
From: alexz @ 2017-03-30 21:05 UTC (permalink / raw)
  To: dev
  Cc: konstantin.ananyev, helin.zhang, wenzhuo.lu, bernard.iremonger,
	wei.dai, Alex Zelezniak

From: Alex Zelezniak <alexz@att.com>

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

Signed-off-by: Alex Zelezniak <alexz@att.com>
---
 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(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 34bd681..a427a3d 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -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)
diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.h b/drivers/net/ixgbe/rte_pmd_ixgbe.h
index 4d7b507..cdb747e 100644
--- a/drivers/net/ixgbe/rte_pmd_ixgbe.h
+++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h
@@ -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
diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe_version.map b/drivers/net/ixgbe/rte_pmd_ixgbe_version.map
index a992dfd..2c7512d 100644
--- a/drivers/net/ixgbe/rte_pmd_ixgbe_version.map
+++ b/drivers/net/ixgbe/rte_pmd_ixgbe_version.map
@@ -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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v4] net/ixgbe: ping VF when PF status changes
  2017-03-30 21:05     ` [PATCH v4] " alexz
@ 2017-03-31  0:47       ` Dai, Wei
  2017-03-31  1:00         ` Lu, Wenzhuo
  0 siblings, 1 reply; 11+ messages in thread
From: Dai, Wei @ 2017-03-31  0:47 UTC (permalink / raw)
  To: alexz, dev
  Cc: Ananyev, Konstantin, Zhang, Helin, Lu, Wenzhuo, Iremonger, Bernard

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.

> Subject: [PATCH v4] net/ixgbe: ping VF when PF status changes
> 
> From: Alex Zelezniak <alexz@att.com>
> 
> 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
> 
> Signed-off-by: Alex Zelezniak <alexz@att.com>
Acked-by: Wei Dai <wei.dai@intel.com>

> ---
>  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(+)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> b/drivers/net/ixgbe/ixgbe_ethdev.c
> index 34bd681..a427a3d 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -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)
> diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.h
> b/drivers/net/ixgbe/rte_pmd_ixgbe.h
> index 4d7b507..cdb747e 100644
> --- a/drivers/net/ixgbe/rte_pmd_ixgbe.h
> +++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h
> @@ -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
> diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe_version.map
> b/drivers/net/ixgbe/rte_pmd_ixgbe_version.map
> index a992dfd..2c7512d 100644
> --- a/drivers/net/ixgbe/rte_pmd_ixgbe_version.map
> +++ b/drivers/net/ixgbe/rte_pmd_ixgbe_version.map
> @@ -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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v4] net/ixgbe: ping VF when PF status changes
  2017-03-31  0:47       ` Dai, Wei
@ 2017-03-31  1:00         ` Lu, Wenzhuo
  2017-03-31 10:26           ` Ferruh Yigit
  0 siblings, 1 reply; 11+ messages in thread
From: Lu, Wenzhuo @ 2017-03-31  1:00 UTC (permalink / raw)
  To: Dai, Wei, alexz, dev
  Cc: Ananyev, Konstantin, Zhang, Helin, Iremonger, Bernard

Hi,


> -----Original Message-----
> From: Dai, Wei
> Sent: Friday, March 31, 2017 8:48 AM
> To: alexz@att.com; dev@dpdk.org
> 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.
> 
> > Subject: [PATCH v4] net/ixgbe: ping VF when PF status changes
> >
> > From: Alex Zelezniak <alexz@att.com>
> >
> > 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
> >
> > Signed-off-by: Alex Zelezniak <alexz@att.com>
> Acked-by: Wei Dai <wei.dai@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v4] net/ixgbe: ping VF when PF status changes
  2017-03-31  1:00         ` Lu, Wenzhuo
@ 2017-03-31 10:26           ` Ferruh Yigit
  0 siblings, 0 replies; 11+ messages in thread
From: Ferruh Yigit @ 2017-03-31 10:26 UTC (permalink / raw)
  To: Lu, Wenzhuo, Dai, Wei, alexz, dev
  Cc: Ananyev, Konstantin, Zhang, Helin, Iremonger, Bernard

On 3/31/2017 2:00 AM, Lu, Wenzhuo wrote:
> Hi,
> 
> 
>> -----Original Message-----
>> From: Dai, Wei
>> Sent: Friday, March 31, 2017 8:48 AM
>> To: alexz@att.com; dev@dpdk.org
>> 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.
>>
>>> Subject: [PATCH v4] net/ixgbe: ping VF when PF status changes
>>>
>>> From: Alex Zelezniak <alexz@att.com>
>>>
>>> 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
>>>
>>> Signed-off-by: Alex Zelezniak <alexz@att.com>
>> Acked-by: Wei Dai <wei.dai@intel.com>
> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

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

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-03-31 10:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-22 17:32 [PATCH] net/ixgbe: notify VF when PF link status changes alexz
2017-03-29 11:10 ` Iremonger, Bernard
2017-03-29 20:52 ` [PATCH v2] ping VF when PF " alexz
2017-03-29 21:59   ` Iremonger, Bernard
2017-03-30 12:33   ` [PATCH v3] net/ixgbe: " alexz
2017-03-30 13:09     ` Lu, Wenzhuo
2017-03-30 16:50       ` Dai, Wei
2017-03-30 21:05     ` [PATCH v4] " alexz
2017-03-31  0:47       ` Dai, Wei
2017-03-31  1:00         ` Lu, Wenzhuo
2017-03-31 10:26           ` 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.