All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [next PATCH S6 1/7] i40e: fix 'Unknown bps' in dmesg for 2.5Gb/5Gb speeds
@ 2019-05-28 17:59 Alice Michael
  2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 2/7] i40e: Fix for missing "link modes" info in ethtool Alice Michael
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Alice Michael @ 2019-05-28 17:59 UTC (permalink / raw)
  To: intel-wired-lan

From: Aleksandr Loktionov <aleksandr.loktionov@intel.com>

This patch fixes 'NIC Link is Up, Unknown bps' message in dmesg
for 2.5Gb/5Gb speeds. This problem is fixed by adding constants
for VIRTCHNL_LINK_SPEED_2_5GB and VIRTCHNL_LINK_SPEED_5GB cases
in the i40e_virtchnl_link_speed() function.

Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_prototype.h | 4 ++++
 include/linux/avf/virtchnl.h                     | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_prototype.h b/drivers/net/ethernet/intel/i40e/i40e_prototype.h
index 882627073dce..eac88bcc6c06 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_prototype.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_prototype.h
@@ -350,6 +350,10 @@ i40e_virtchnl_link_speed(enum i40e_aq_link_speed link_speed)
 		return VIRTCHNL_LINK_SPEED_100MB;
 	case I40E_LINK_SPEED_1GB:
 		return VIRTCHNL_LINK_SPEED_1GB;
+	case I40E_LINK_SPEED_2_5GB:
+		return VIRTCHNL_LINK_SPEED_2_5GB;
+	case I40E_LINK_SPEED_5GB:
+		return VIRTCHNL_LINK_SPEED_5GB;
 	case I40E_LINK_SPEED_10GB:
 		return VIRTCHNL_LINK_SPEED_10GB;
 	case I40E_LINK_SPEED_40GB:
diff --git a/include/linux/avf/virtchnl.h b/include/linux/avf/virtchnl.h
index 7605b5919c3a..1fd0ca9257fc 100644
--- a/include/linux/avf/virtchnl.h
+++ b/include/linux/avf/virtchnl.h
@@ -75,12 +75,14 @@ enum virtchnl_status_code {
 #define VIRTCHNL_ERR_PARAM VIRTCHNL_STATUS_ERR_PARAM
 #define VIRTCHNL_STATUS_NOT_SUPPORTED VIRTCHNL_STATUS_ERR_NOT_SUPPORTED
 
+#define VIRTCHNL_LINK_SPEED_2_5GB_SHIFT		0x0
 #define VIRTCHNL_LINK_SPEED_100MB_SHIFT		0x1
 #define VIRTCHNL_LINK_SPEED_1000MB_SHIFT	0x2
 #define VIRTCHNL_LINK_SPEED_10GB_SHIFT		0x3
 #define VIRTCHNL_LINK_SPEED_40GB_SHIFT		0x4
 #define VIRTCHNL_LINK_SPEED_20GB_SHIFT		0x5
 #define VIRTCHNL_LINK_SPEED_25GB_SHIFT		0x6
+#define VIRTCHNL_LINK_SPEED_5GB_SHIFT		0x7
 
 enum virtchnl_link_speed {
 	VIRTCHNL_LINK_SPEED_UNKNOWN	= 0,
@@ -90,6 +92,8 @@ enum virtchnl_link_speed {
 	VIRTCHNL_LINK_SPEED_40GB	= BIT(VIRTCHNL_LINK_SPEED_40GB_SHIFT),
 	VIRTCHNL_LINK_SPEED_20GB	= BIT(VIRTCHNL_LINK_SPEED_20GB_SHIFT),
 	VIRTCHNL_LINK_SPEED_25GB	= BIT(VIRTCHNL_LINK_SPEED_25GB_SHIFT),
+	VIRTCHNL_LINK_SPEED_2_5GB	= BIT(VIRTCHNL_LINK_SPEED_2_5GB_SHIFT),
+	VIRTCHNL_LINK_SPEED_5GB		= BIT(VIRTCHNL_LINK_SPEED_5GB_SHIFT),
 };
 
 /* for hsplit_0 field of Rx HMC context */
-- 
2.19.2


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

* [Intel-wired-lan] [next PATCH S6 2/7] i40e: Fix for missing "link modes" info in ethtool
  2019-05-28 17:59 [Intel-wired-lan] [next PATCH S6 1/7] i40e: fix 'Unknown bps' in dmesg for 2.5Gb/5Gb speeds Alice Michael
@ 2019-05-28 17:59 ` Alice Michael
  2019-05-31 17:58   ` Bowers, AndrewX
  2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 3/7] i40e: fix incorrect function documentation comment Alice Michael
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Alice Michael @ 2019-05-28 17:59 UTC (permalink / raw)
  To: intel-wired-lan

From: Martyna Szapar <martyna.szapar@intel.com>

Fix for missing "Supported link modes" and "Advertised link modes"
info in ethtool after changed speed on X722 devices with BASE-T PHY
with FW API version >= 1.7.
The same FW API version on X710 and X722 does not mean the same
feature set so the change was needed as mac type of the device
should also be checked instead of FW API version only.

Signed-off-by: Martyna Szapar <martyna.szapar@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_common.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index 641b500ad919..906cf68d3453 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -1861,8 +1861,7 @@ i40e_status i40e_aq_get_link_info(struct i40e_hw *hw,
 	     hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE)
 		hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU;
 
-	if (hw->aq.api_maj_ver == I40E_FW_API_VERSION_MAJOR &&
-	    hw->aq.api_min_ver >= 7) {
+	if (hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE) {
 		__le32 tmp;
 
 		memcpy(&tmp, resp->link_type, sizeof(tmp));
-- 
2.19.2


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

* [Intel-wired-lan] [next PATCH S6 3/7] i40e: fix incorrect function documentation comment
  2019-05-28 17:59 [Intel-wired-lan] [next PATCH S6 1/7] i40e: fix 'Unknown bps' in dmesg for 2.5Gb/5Gb speeds Alice Michael
  2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 2/7] i40e: Fix for missing "link modes" info in ethtool Alice Michael
@ 2019-05-28 17:59 ` Alice Michael
  2019-05-31 17:59   ` Bowers, AndrewX
  2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 4/7] i40e: Add log entry while creating or deleting TC0 Alice Michael
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Alice Michael @ 2019-05-28 17:59 UTC (permalink / raw)
  To: intel-wired-lan

From: Jacob Keller <jacob.e.keller@intel.com>

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>

 drivers/net/ethernet/intel/i40e/i40e_ptp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
 drivers/net/ethernet/intel/i40e/i40e_ptp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_ptp.c b/drivers/net/ethernet/intel/i40e/i40e_ptp.c
index 439c35f0c581..11394a52e21c 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ptp.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ptp.c
@@ -140,8 +140,7 @@ static int i40e_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb)
  * @ptp: The PTP clock structure
  * @delta: Offset in nanoseconds to adjust the PHC time by
  *
- * Adjust the frequency of the PHC by the indicated parts per billion from the
- * base frequency.
+ * Adjust the current clock time by a delta specified in nanoseconds.
  **/
 static int i40e_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
 {
-- 
2.19.2


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

* [Intel-wired-lan] [next PATCH S6 4/7] i40e: Add log entry while creating or deleting TC0
  2019-05-28 17:59 [Intel-wired-lan] [next PATCH S6 1/7] i40e: fix 'Unknown bps' in dmesg for 2.5Gb/5Gb speeds Alice Michael
  2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 2/7] i40e: Fix for missing "link modes" info in ethtool Alice Michael
  2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 3/7] i40e: fix incorrect function documentation comment Alice Michael
@ 2019-05-28 17:59 ` Alice Michael
  2019-05-28 19:42   ` Kwapulinski, Piotr
  2019-05-31 17:59   ` Bowers, AndrewX
  2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 5/7] i40e: missing priorities for any QoS traffic Alice Michael
                   ` (3 subsequent siblings)
  6 siblings, 2 replies; 15+ messages in thread
From: Alice Michael @ 2019-05-28 17:59 UTC (permalink / raw)
  To: intel-wired-lan

From: Piotr Kwapulinski <piotr.kwapulinski@intel.com>

Generate log entry when TC0 is created or deleted.
Log entry is generated during main VSI setup.
Before there was no log info about adding or deleting TC0.

Signed-off-by: Piotr Kwapulinski <piotr.kwapulinski@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 931862c0f39d..7c93f28b7b1d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -7432,6 +7432,10 @@ static int i40e_setup_tc(struct net_device *netdev, void *type_data)
 			    vsi->seid);
 		need_reset = true;
 		goto exit;
+	} else {
+		dev_info(&vsi->back->pdev->dev,
+			 "Setup channel (id:%u) utilizing num_queues %d\n",
+			 vsi->seid, vsi->tc_config.tc_info[0].qcount);
 	}
 
 	if (pf->flags & I40E_FLAG_TC_MQPRIO) {
-- 
2.19.2


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

* [Intel-wired-lan] [next PATCH S6 5/7] i40e: missing priorities for any QoS traffic
  2019-05-28 17:59 [Intel-wired-lan] [next PATCH S6 1/7] i40e: fix 'Unknown bps' in dmesg for 2.5Gb/5Gb speeds Alice Michael
                   ` (2 preceding siblings ...)
  2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 4/7] i40e: Add log entry while creating or deleting TC0 Alice Michael
@ 2019-05-28 17:59 ` Alice Michael
  2019-05-31 18:00   ` Bowers, AndrewX
  2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 6/7] i40e: Fix descriptor count manipulation Alice Michael
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Alice Michael @ 2019-05-28 17:59 UTC (permalink / raw)
  To: intel-wired-lan

From: Aleksandr Loktionov <aleksandr.loktionov@intel.com>

This patch fixes reading f/w lldp agent status at dcb init time.
It's done by removing direct nvm reading in i40e_update_dcb_config()
and checking whether f/w lldp agent is disabled via
I40E_FLAG_DISABLE_FW_LLDP flag in i40e_init_pf_dcb(). The function
i40e_update_dcb_config() in i40e_main.c is a temporary solution which
will be later renamed to i40e_init_dcb() in the i40e_dcb module. Also
logging was extended to make visible if f/w lldp agent is running or not
and always log a message when dcb was not initialized. Without this
patch for new f/w versions f/w lldp agent status was always read
from nvm as disabled and dcb initialization failed without
clear reason in logs.

Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 57 +++++++++++++++++++--
 1 file changed, 54 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 7c93f28b7b1d..1dd5fcf256ef 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -6411,6 +6411,50 @@ static int i40e_resume_port_tx(struct i40e_pf *pf)
 	return ret;
 }
 
+/**
+ * i40e_update_dcb_config
+ * @hw: pointer to the hw struct
+ * @enable_mib_change: enable mib change event
+ *
+ * Update DCB configuration from the Firmware
+ **/
+static enum i40e_status_code
+i40e_update_dcb_config(struct i40e_hw *hw, bool enable_mib_change)
+{
+	struct i40e_lldp_variables lldp_cfg;
+	i40e_status ret;
+
+	if (!hw->func_caps.dcb)
+		return I40E_NOT_SUPPORTED;
+
+	/* Read LLDP NVM area */
+	ret = i40e_read_lldp_cfg(hw, &lldp_cfg);
+	if (ret)
+		return I40E_ERR_NOT_READY;
+
+	/* Get DCBX status */
+	ret = i40e_get_dcbx_status(hw, &hw->dcbx_status);
+	if (ret)
+		return ret;
+
+	/* Check the DCBX Status */
+	if (hw->dcbx_status == I40E_DCBX_STATUS_DONE ||
+	    hw->dcbx_status == I40E_DCBX_STATUS_IN_PROGRESS) {
+		/* Get current DCBX configuration */
+		ret = i40e_get_dcb_config(hw);
+		if (ret)
+			return ret;
+	} else if (hw->dcbx_status == I40E_DCBX_STATUS_DISABLED) {
+		return I40E_ERR_NOT_READY;
+	}
+
+	/* Configure the LLDP MIB change event */
+	if (enable_mib_change)
+		ret = i40e_aq_cfg_lldp_mib_change_event(hw, true, NULL);
+
+	return ret;
+}
+
 /**
  * i40e_init_pf_dcb - Initialize DCB configuration
  * @pf: PF being configured
@@ -6427,11 +6471,13 @@ static int i40e_init_pf_dcb(struct i40e_pf *pf)
 	 * Also do not enable DCBx if FW LLDP agent is disabled
 	 */
 	if ((pf->hw_features & I40E_HW_NO_DCB_SUPPORT) ||
-	    (pf->flags & I40E_FLAG_DISABLE_FW_LLDP))
+	    (pf->flags & I40E_FLAG_DISABLE_FW_LLDP)) {
+		dev_info(&pf->pdev->dev, "DCB is not supported or FW LLDP is disabled\n");
+		err = I40E_NOT_SUPPORTED;
 		goto out;
+	}
 
-	/* Get the initial DCB configuration */
-	err = i40e_init_dcb(hw, true);
+	err = i40e_update_dcb_config(hw, true);
 	if (!err) {
 		/* Device/Function is not DCBX capable */
 		if ((!hw->func_caps.dcb) ||
@@ -14881,6 +14927,11 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	pci_set_drvdata(pdev, pf);
 	pci_save_state(pdev);
 
+	dev_info(&pdev->dev,
+		 (pf->flags & I40E_FLAG_DISABLE_FW_LLDP) ?
+			"FW LLDP is disabled\n" :
+			"FW LLDP is enabled\n");
+
 	/* Enable FW to write default DCB config on link-up */
 	i40e_aq_set_dcb_parameters(hw, true, NULL);
 
-- 
2.19.2


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

* [Intel-wired-lan] [next PATCH S6 6/7] i40e: Fix descriptor count manipulation
  2019-05-28 17:59 [Intel-wired-lan] [next PATCH S6 1/7] i40e: fix 'Unknown bps' in dmesg for 2.5Gb/5Gb speeds Alice Michael
                   ` (3 preceding siblings ...)
  2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 5/7] i40e: missing priorities for any QoS traffic Alice Michael
@ 2019-05-28 17:59 ` Alice Michael
  2019-05-31 18:00   ` Bowers, AndrewX
  2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 7/7] i40e: update copyright string Alice Michael
  2019-05-31 17:58 ` [Intel-wired-lan] [next PATCH S6 1/7] i40e: fix 'Unknown bps' in dmesg for 2.5Gb/5Gb speeds Bowers, AndrewX
  6 siblings, 1 reply; 15+ messages in thread
From: Alice Michael @ 2019-05-28 17:59 UTC (permalink / raw)
  To: intel-wired-lan

From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>

Changing descriptor count via 'ethtool -G' is not persistent across resets.
When PF reset occurs, we roll back to the default value of vsi->num_desc,
which is used then in i40e_alloc_rings to set descriptor count. XDP does a
PF reset so when user has changed the descriptor count and load XDP
program, the default count will be back there.

To fix this:
  * introduce new VSI members - num_tx_desc and num_rx_desc in favour of
    num_desc
  * set them in i40e_set_ringparam to user's values
  * set them to default values in i40e_set_num_rings_in_vsi only when they
    don't have previous values

Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e.h        |  3 +-
 .../net/ethernet/intel/i40e/i40e_debugfs.c    |  5 +--
 .../net/ethernet/intel/i40e/i40e_ethtool.c    |  4 +++
 drivers/net/ethernet/intel/i40e/i40e_main.c   | 36 +++++++++++++------
 4 files changed, 34 insertions(+), 14 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 1da53c0d49ca..423ee9fa94d6 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -795,7 +795,8 @@ struct i40e_vsi {
 	u16 alloc_queue_pairs;	/* Allocated Tx/Rx queues */
 	u16 req_queue_pairs;	/* User requested queue pairs */
 	u16 num_queue_pairs;	/* Used tx and rx pairs */
-	u16 num_desc;
+	u16 num_tx_desc;
+	u16 num_rx_desc;
 	enum i40e_vsi_type type;  /* VSI type, e.g., LAN, FCoE, etc */
 	s16 vf_id;		/* Virtual function ID for SRIOV VSIs */
 
diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
index dc5b40013e61..55d20acfcf70 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
@@ -333,8 +333,9 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)
 		 "    seid = %d, id = %d, uplink_seid = %d\n",
 		 vsi->seid, vsi->id, vsi->uplink_seid);
 	dev_info(&pf->pdev->dev,
-		 "    base_queue = %d, num_queue_pairs = %d, num_desc = %d\n",
-		 vsi->base_queue, vsi->num_queue_pairs, vsi->num_desc);
+		 "    base_queue = %d, num_queue_pairs = %d, num_tx_desc = %d, num_rx_desc = %d\n",
+		 vsi->base_queue, vsi->num_queue_pairs, vsi->num_tx_desc,
+		 vsi->num_rx_desc);
 	dev_info(&pf->pdev->dev, "    type = %i\n", vsi->type);
 	if (vsi->type == I40E_VSI_SRIOV)
 		dev_info(&pf->pdev->dev, "    VF ID = %i\n", vsi->vf_id);
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index bc70b0d581a1..b7f4ac9a423c 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -1982,6 +1982,8 @@ static int i40e_set_ringparam(struct net_device *netdev,
 			if (i40e_enabled_xdp_vsi(vsi))
 				vsi->xdp_rings[i]->count = new_tx_count;
 		}
+		vsi->num_tx_desc = new_tx_count;
+		vsi->num_rx_desc = new_rx_count;
 		goto done;
 	}
 
@@ -2118,6 +2120,8 @@ static int i40e_set_ringparam(struct net_device *netdev,
 		rx_rings = NULL;
 	}
 
+	vsi->num_tx_desc = new_tx_count;
+	vsi->num_rx_desc = new_rx_count;
 	i40e_up(vsi);
 
 free_tx:
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 1dd5fcf256ef..fb25e8222fb5 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -10550,8 +10550,12 @@ static int i40e_set_num_rings_in_vsi(struct i40e_vsi *vsi)
 	switch (vsi->type) {
 	case I40E_VSI_MAIN:
 		vsi->alloc_queue_pairs = pf->num_lan_qps;
-		vsi->num_desc = ALIGN(I40E_DEFAULT_NUM_DESCRIPTORS,
-				      I40E_REQ_DESCRIPTOR_MULTIPLE);
+		if (!vsi->num_tx_desc)
+			vsi->num_tx_desc = ALIGN(I40E_DEFAULT_NUM_DESCRIPTORS,
+						 I40E_REQ_DESCRIPTOR_MULTIPLE);
+		if (!vsi->num_rx_desc)
+			vsi->num_rx_desc = ALIGN(I40E_DEFAULT_NUM_DESCRIPTORS,
+						 I40E_REQ_DESCRIPTOR_MULTIPLE);
 		if (pf->flags & I40E_FLAG_MSIX_ENABLED)
 			vsi->num_q_vectors = pf->num_lan_msix;
 		else
@@ -10561,22 +10565,32 @@ static int i40e_set_num_rings_in_vsi(struct i40e_vsi *vsi)
 
 	case I40E_VSI_FDIR:
 		vsi->alloc_queue_pairs = 1;
-		vsi->num_desc = ALIGN(I40E_FDIR_RING_COUNT,
-				      I40E_REQ_DESCRIPTOR_MULTIPLE);
+		vsi->num_tx_desc = ALIGN(I40E_FDIR_RING_COUNT,
+					 I40E_REQ_DESCRIPTOR_MULTIPLE);
+		vsi->num_rx_desc = ALIGN(I40E_FDIR_RING_COUNT,
+					 I40E_REQ_DESCRIPTOR_MULTIPLE);
 		vsi->num_q_vectors = pf->num_fdsb_msix;
 		break;
 
 	case I40E_VSI_VMDQ2:
 		vsi->alloc_queue_pairs = pf->num_vmdq_qps;
-		vsi->num_desc = ALIGN(I40E_DEFAULT_NUM_DESCRIPTORS,
-				      I40E_REQ_DESCRIPTOR_MULTIPLE);
+		if (!vsi->num_tx_desc)
+			vsi->num_tx_desc = ALIGN(I40E_DEFAULT_NUM_DESCRIPTORS,
+						 I40E_REQ_DESCRIPTOR_MULTIPLE);
+		if (!vsi->num_rx_desc)
+			vsi->num_rx_desc = ALIGN(I40E_DEFAULT_NUM_DESCRIPTORS,
+						 I40E_REQ_DESCRIPTOR_MULTIPLE);
 		vsi->num_q_vectors = pf->num_vmdq_msix;
 		break;
 
 	case I40E_VSI_SRIOV:
 		vsi->alloc_queue_pairs = pf->num_vf_qps;
-		vsi->num_desc = ALIGN(I40E_DEFAULT_NUM_DESCRIPTORS,
-				      I40E_REQ_DESCRIPTOR_MULTIPLE);
+		if (!vsi->num_tx_desc)
+			vsi->num_tx_desc = ALIGN(I40E_DEFAULT_NUM_DESCRIPTORS,
+						 I40E_REQ_DESCRIPTOR_MULTIPLE);
+		if (!vsi->num_rx_desc)
+			vsi->num_rx_desc = ALIGN(I40E_DEFAULT_NUM_DESCRIPTORS,
+						 I40E_REQ_DESCRIPTOR_MULTIPLE);
 		break;
 
 	default:
@@ -10852,7 +10866,7 @@ static int i40e_alloc_rings(struct i40e_vsi *vsi)
 		ring->vsi = vsi;
 		ring->netdev = vsi->netdev;
 		ring->dev = &pf->pdev->dev;
-		ring->count = vsi->num_desc;
+		ring->count = vsi->num_tx_desc;
 		ring->size = 0;
 		ring->dcb_tc = 0;
 		if (vsi->back->hw_features & I40E_HW_WB_ON_ITR_CAPABLE)
@@ -10869,7 +10883,7 @@ static int i40e_alloc_rings(struct i40e_vsi *vsi)
 		ring->vsi = vsi;
 		ring->netdev = NULL;
 		ring->dev = &pf->pdev->dev;
-		ring->count = vsi->num_desc;
+		ring->count = vsi->num_tx_desc;
 		ring->size = 0;
 		ring->dcb_tc = 0;
 		if (vsi->back->hw_features & I40E_HW_WB_ON_ITR_CAPABLE)
@@ -10885,7 +10899,7 @@ static int i40e_alloc_rings(struct i40e_vsi *vsi)
 		ring->vsi = vsi;
 		ring->netdev = vsi->netdev;
 		ring->dev = &pf->pdev->dev;
-		ring->count = vsi->num_desc;
+		ring->count = vsi->num_rx_desc;
 		ring->size = 0;
 		ring->dcb_tc = 0;
 		ring->itr_setting = pf->rx_itr_default;
-- 
2.19.2


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

* [Intel-wired-lan] [next PATCH S6 7/7] i40e: update copyright string
  2019-05-28 17:59 [Intel-wired-lan] [next PATCH S6 1/7] i40e: fix 'Unknown bps' in dmesg for 2.5Gb/5Gb speeds Alice Michael
                   ` (4 preceding siblings ...)
  2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 6/7] i40e: Fix descriptor count manipulation Alice Michael
@ 2019-05-28 17:59 ` Alice Michael
  2019-05-31 18:00   ` Bowers, AndrewX
  2019-05-31 17:58 ` [Intel-wired-lan] [next PATCH S6 1/7] i40e: fix 'Unknown bps' in dmesg for 2.5Gb/5Gb speeds Bowers, AndrewX
  6 siblings, 1 reply; 15+ messages in thread
From: Alice Michael @ 2019-05-28 17:59 UTC (permalink / raw)
  To: intel-wired-lan

It was found that the string that prints our copyright was
not up to date.  Updating to reflect our copyright.

Signed-off-by: Alice Michael <alice.michael@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index fb25e8222fb5..c58b114d6234 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -32,7 +32,7 @@ static const char i40e_driver_string[] =
 	     __stringify(DRV_VERSION_MINOR) "." \
 	     __stringify(DRV_VERSION_BUILD)    DRV_KERN
 const char i40e_driver_version_str[] = DRV_VERSION;
-static const char i40e_copyright[] = "Copyright (c) 2013 - 2014 Intel Corporation.";
+static const char i40e_copyright[] = "Copyright (c) 2013 - 2019 Intel Corporation.";
 
 /* a bit of forward declarations */
 static void i40e_vsi_reinit_locked(struct i40e_vsi *vsi);
-- 
2.19.2


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

* [Intel-wired-lan] [next PATCH S6 4/7] i40e: Add log entry while creating or deleting TC0
  2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 4/7] i40e: Add log entry while creating or deleting TC0 Alice Michael
@ 2019-05-28 19:42   ` Kwapulinski, Piotr
  2019-05-31 17:59   ` Bowers, AndrewX
  1 sibling, 0 replies; 15+ messages in thread
From: Kwapulinski, Piotr @ 2019-05-28 19:42 UTC (permalink / raw)
  To: intel-wired-lan

ACK

-----Original Message-----
From: Michael, Alice 
Sent: Tuesday, May 28, 2019 7:59 PM
To: alice.micheal@intel.com; intel-wired-lan at lists.osuosl.org
Cc: Kwapulinski, Piotr <piotr.kwapulinski@intel.com>
Subject: [next PATCH S6 4/7] i40e: Add log entry while creating or deleting TC0

From: Piotr Kwapulinski <piotr.kwapulinski@intel.com>

Generate log entry when TC0 is created or deleted.
Log entry is generated during main VSI setup.
Before there was no log info about adding or deleting TC0.

Signed-off-by: Piotr Kwapulinski <piotr.kwapulinski@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 931862c0f39d..7c93f28b7b1d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -7432,6 +7432,10 @@ static int i40e_setup_tc(struct net_device *netdev, void *type_data)
 			    vsi->seid);
 		need_reset = true;
 		goto exit;
+	} else {
+		dev_info(&vsi->back->pdev->dev,
+			 "Setup channel (id:%u) utilizing num_queues %d\n",
+			 vsi->seid, vsi->tc_config.tc_info[0].qcount);
 	}
 
 	if (pf->flags & I40E_FLAG_TC_MQPRIO) {
-- 
2.19.2

--------------------------------------------------------------------

Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.

Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek
przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by
others is strictly prohibited.


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

* [Intel-wired-lan] [next PATCH S6 1/7] i40e: fix 'Unknown bps' in dmesg for 2.5Gb/5Gb speeds
  2019-05-28 17:59 [Intel-wired-lan] [next PATCH S6 1/7] i40e: fix 'Unknown bps' in dmesg for 2.5Gb/5Gb speeds Alice Michael
                   ` (5 preceding siblings ...)
  2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 7/7] i40e: update copyright string Alice Michael
@ 2019-05-31 17:58 ` Bowers, AndrewX
  6 siblings, 0 replies; 15+ messages in thread
From: Bowers, AndrewX @ 2019-05-31 17:58 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Tuesday, May 28, 2019 10:59 AM
> To: alice.micheal at intel.com; intel-wired-lan at lists.osuosl.org
> Cc: Loktionov, Aleksandr <aleksandr.loktionov@intel.com>
> Subject: [Intel-wired-lan] [next PATCH S6 1/7] i40e: fix 'Unknown bps' in
> dmesg for 2.5Gb/5Gb speeds
> 
> From: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> 
> This patch fixes 'NIC Link is Up, Unknown bps' message in dmesg for
> 2.5Gb/5Gb speeds. This problem is fixed by adding constants for
> VIRTCHNL_LINK_SPEED_2_5GB and VIRTCHNL_LINK_SPEED_5GB cases in the
> i40e_virtchnl_link_speed() function.
> 
> Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_prototype.h | 4 ++++
>  include/linux/avf/virtchnl.h                     | 4 ++++
>  2 files changed, 8 insertions(+)

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



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

* [Intel-wired-lan] [next PATCH S6 2/7] i40e: Fix for missing "link modes" info in ethtool
  2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 2/7] i40e: Fix for missing "link modes" info in ethtool Alice Michael
@ 2019-05-31 17:58   ` Bowers, AndrewX
  0 siblings, 0 replies; 15+ messages in thread
From: Bowers, AndrewX @ 2019-05-31 17:58 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Tuesday, May 28, 2019 10:59 AM
> To: alice.micheal at intel.com; intel-wired-lan at lists.osuosl.org
> Cc: Szapar, Martyna <martyna.szapar@intel.com>
> Subject: [Intel-wired-lan] [next PATCH S6 2/7] i40e: Fix for missing "link
> modes" info in ethtool
> 
> From: Martyna Szapar <martyna.szapar@intel.com>
> 
> Fix for missing "Supported link modes" and "Advertised link modes"
> info in ethtool after changed speed on X722 devices with BASE-T PHY with
> FW API version >= 1.7.
> The same FW API version on X710 and X722 does not mean the same feature
> set so the change was needed as mac type of the device should also be
> checked instead of FW API version only.
> 
> Signed-off-by: Martyna Szapar <martyna.szapar@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_common.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

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



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

* [Intel-wired-lan] [next PATCH S6 3/7] i40e: fix incorrect function documentation comment
  2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 3/7] i40e: fix incorrect function documentation comment Alice Michael
@ 2019-05-31 17:59   ` Bowers, AndrewX
  0 siblings, 0 replies; 15+ messages in thread
From: Bowers, AndrewX @ 2019-05-31 17:59 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Tuesday, May 28, 2019 10:59 AM
> To: alice.micheal at intel.com; intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S6 3/7] i40e: fix incorrect function
> documentation comment
> 
> From: Jacob Keller <jacob.e.keller@intel.com>
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> 
>  drivers/net/ethernet/intel/i40e/i40e_ptp.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> ---
>  drivers/net/ethernet/intel/i40e/i40e_ptp.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

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



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

* [Intel-wired-lan] [next PATCH S6 4/7] i40e: Add log entry while creating or deleting TC0
  2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 4/7] i40e: Add log entry while creating or deleting TC0 Alice Michael
  2019-05-28 19:42   ` Kwapulinski, Piotr
@ 2019-05-31 17:59   ` Bowers, AndrewX
  1 sibling, 0 replies; 15+ messages in thread
From: Bowers, AndrewX @ 2019-05-31 17:59 UTC (permalink / raw)
  To: intel-wired-lan


> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Tuesday, May 28, 2019 10:59 AM
> To: alice.micheal at intel.com; intel-wired-lan at lists.osuosl.org
> Cc: Kwapulinski, Piotr <piotr.kwapulinski@intel.com>
> Subject: [Intel-wired-lan] [next PATCH S6 4/7] i40e: Add log entry while
> creating or deleting TC0
> 
> From: Piotr Kwapulinski <piotr.kwapulinski@intel.com>
> 
> Generate log entry when TC0 is created or deleted.
> Log entry is generated during main VSI setup.
> Before there was no log info about adding or deleting TC0.
> 
> Signed-off-by: Piotr Kwapulinski <piotr.kwapulinski@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++++
>  1 file changed, 4 insertions(+)

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



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

* [Intel-wired-lan] [next PATCH S6 5/7] i40e: missing priorities for any QoS traffic
  2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 5/7] i40e: missing priorities for any QoS traffic Alice Michael
@ 2019-05-31 18:00   ` Bowers, AndrewX
  0 siblings, 0 replies; 15+ messages in thread
From: Bowers, AndrewX @ 2019-05-31 18:00 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Tuesday, May 28, 2019 10:59 AM
> To: alice.micheal at intel.com; intel-wired-lan at lists.osuosl.org
> Cc: Loktionov, Aleksandr <aleksandr.loktionov@intel.com>
> Subject: [Intel-wired-lan] [next PATCH S6 5/7] i40e: missing priorities for any
> QoS traffic
> 
> From: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> 
> This patch fixes reading f/w lldp agent status at dcb init time.
> It's done by removing direct nvm reading in i40e_update_dcb_config() and
> checking whether f/w lldp agent is disabled via
> I40E_FLAG_DISABLE_FW_LLDP flag in i40e_init_pf_dcb(). The function
> i40e_update_dcb_config() in i40e_main.c is a temporary solution which will
> be later renamed to i40e_init_dcb() in the i40e_dcb module. Also logging was
> extended to make visible if f/w lldp agent is running or not and always log a
> message when dcb was not initialized. Without this patch for new f/w
> versions f/w lldp agent status was always read from nvm as disabled and dcb
> initialization failed without clear reason in logs.
> 
> Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 57 +++++++++++++++++++--
>  1 file changed, 54 insertions(+), 3 deletions(-)

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



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

* [Intel-wired-lan] [next PATCH S6 6/7] i40e: Fix descriptor count manipulation
  2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 6/7] i40e: Fix descriptor count manipulation Alice Michael
@ 2019-05-31 18:00   ` Bowers, AndrewX
  0 siblings, 0 replies; 15+ messages in thread
From: Bowers, AndrewX @ 2019-05-31 18:00 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Tuesday, May 28, 2019 10:59 AM
> To: alice.micheal at intel.com; intel-wired-lan at lists.osuosl.org
> Cc: Fijalkowski, Maciej <maciej.fijalkowski@intel.com>
> Subject: [Intel-wired-lan] [next PATCH S6 6/7] i40e: Fix descriptor count
> manipulation
> 
> From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
> 
> Changing descriptor count via 'ethtool -G' is not persistent across resets.
> When PF reset occurs, we roll back to the default value of vsi->num_desc,
> which is used then in i40e_alloc_rings to set descriptor count. XDP does a PF
> reset so when user has changed the descriptor count and load XDP program,
> the default count will be back there.
> 
> To fix this:
>   * introduce new VSI members - num_tx_desc and num_rx_desc in favour
> of
>     num_desc
>   * set them in i40e_set_ringparam to user's values
>   * set them to default values in i40e_set_num_rings_in_vsi only when they
>     don't have previous values
> 
> Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e.h        |  3 +-
>  .../net/ethernet/intel/i40e/i40e_debugfs.c    |  5 +--
>  .../net/ethernet/intel/i40e/i40e_ethtool.c    |  4 +++
>  drivers/net/ethernet/intel/i40e/i40e_main.c   | 36 +++++++++++++------
>  4 files changed, 34 insertions(+), 14 deletions(-)

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



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

* [Intel-wired-lan] [next PATCH S6 7/7] i40e: update copyright string
  2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 7/7] i40e: update copyright string Alice Michael
@ 2019-05-31 18:00   ` Bowers, AndrewX
  0 siblings, 0 replies; 15+ messages in thread
From: Bowers, AndrewX @ 2019-05-31 18:00 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Tuesday, May 28, 2019 10:59 AM
> To: alice.micheal at intel.com; intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S6 7/7] i40e: update copyright string
> 
> It was found that the string that prints our copyright was not up to date.
> Updating to reflect our copyright.
> 
> Signed-off-by: Alice Michael <alice.michael@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

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



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

end of thread, other threads:[~2019-05-31 18:00 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-28 17:59 [Intel-wired-lan] [next PATCH S6 1/7] i40e: fix 'Unknown bps' in dmesg for 2.5Gb/5Gb speeds Alice Michael
2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 2/7] i40e: Fix for missing "link modes" info in ethtool Alice Michael
2019-05-31 17:58   ` Bowers, AndrewX
2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 3/7] i40e: fix incorrect function documentation comment Alice Michael
2019-05-31 17:59   ` Bowers, AndrewX
2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 4/7] i40e: Add log entry while creating or deleting TC0 Alice Michael
2019-05-28 19:42   ` Kwapulinski, Piotr
2019-05-31 17:59   ` Bowers, AndrewX
2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 5/7] i40e: missing priorities for any QoS traffic Alice Michael
2019-05-31 18:00   ` Bowers, AndrewX
2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 6/7] i40e: Fix descriptor count manipulation Alice Michael
2019-05-31 18:00   ` Bowers, AndrewX
2019-05-28 17:59 ` [Intel-wired-lan] [next PATCH S6 7/7] i40e: update copyright string Alice Michael
2019-05-31 18:00   ` Bowers, AndrewX
2019-05-31 17:58 ` [Intel-wired-lan] [next PATCH S6 1/7] i40e: fix 'Unknown bps' in dmesg for 2.5Gb/5Gb speeds Bowers, AndrewX

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.