[next,S85-V1,07/14] i40e: Warn when setting link-down-on-close while in MFP

Message ID 20171229135020.14457-1-alice.michael@intel.com
State Under Review
Delegated to: Jeff Kirsher
Headers show
Series
  • [next,S85-V1,01/14] i40e: fix typo in function description
Related show

Commit Message

Alice Michael Dec. 29, 2017, 1:50 p.m.
From: Paweł Jabłoński <pawel.jablonski@intel.com>

This patch adds a warning message when the link-down-on-close flag is
setting on. The warning is printed only on MFP devices

Signed-off-by: Paweł Jabłoński <pawel.jablonski@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Bowers, AndrewX Jan. 5, 2018, 7:28 p.m. | #1
> -----Original Message-----

> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@osuosl.org] On

> Behalf Of Alice Michael

> Sent: Friday, December 29, 2017 5:50 AM

> To: Michael, Alice <alice.michael@intel.com>; intel-wired-

> lan@lists.osuosl.org

> Cc: Jablonski, Pawel <pawel.jablonski@intel.com>

> Subject: [Intel-wired-lan] [next PATCH S85-V1 07/14] i40e: Warn when

> setting link-down-on-close while in MFP

> 

> From: Paweł Jabłoński <pawel.jablonski@intel.com>

> 

> This patch adds a warning message when the link-down-on-close flag is

> setting on. The warning is printed only on MFP devices

> 

> Signed-off-by: Paweł Jabłoński <pawel.jablonski@intel.com>

> ---

>  drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 6 ++++++

>  1 file changed, 6 insertions(+)


Tested-by: Andrew Bowers <andrewx.bowers@intel.com>

Patch

diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index f829a7a..7267a93 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -4479,6 +4479,12 @@  static int i40e_set_priv_flags(struct net_device *dev, u32 flags)
 		}
 	}
 
+	if ((changed_flags & pf->flags &
+	     I40E_FLAG_LINK_DOWN_ON_CLOSE_ENABLED) &&
+	    (pf->flags & I40E_FLAG_MFP_ENABLED))
+		dev_warn(&pf->pdev->dev,
+			 "Turning on link-down-on-close flag may affect other partitions\n");
+
 	if (changed_flags & I40E_FLAG_DISABLE_FW_LLDP) {
 		if (pf->flags & I40E_FLAG_DISABLE_FW_LLDP) {
 			struct i40e_dcbx_config *dcbcfg;