All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [next PATCH S34 00/12] i40e/i40evf updates
@ 2016-04-13 10:08 Harshitha Ramamurthy
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 01/12] i40e: Change the default for VFs to be not privileged Harshitha Ramamurthy
                   ` (11 more replies)
  0 siblings, 12 replies; 24+ messages in thread
From: Harshitha Ramamurthy @ 2016-04-13 10:08 UTC (permalink / raw)
  To: intel-wired-lan

Anjali Singhai Jain changes the default for VFs to be not privileged,
limits the number of mac and vlan addresses that can be added for
VFs and prevents fall back to promiscuous mode if the VF is not trusted.

Carolyn Wyborny ensures the VF can not change the RSS hash settings.

Catherine Sullivan fixes an uninitialized variabl and updates a device id for
X722.

Harshitha Ramamurthy bumps i40e/i40evf from 1.5.5 to 1.5.10.

Jesse Brandeburg avoids aggregate return warnings, ensures use of consistent 
type for vf_id and drops an extra copy of a function.

Kiran Patil adds code to keep track of side-band filters based on flow-type.

Neerav Parikh removes HMC AQ API implementation.

 drivers/net/ethernet/intel/i40e/i40e.h             |  11 +-
 drivers/net/ethernet/intel/i40e/i40e_adminq.c      |   4 -
 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h  |  25 ---
 drivers/net/ethernet/intel/i40e/i40e_common.c      |  30 ---
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c     |   9 +-
 drivers/net/ethernet/intel/i40e/i40e_main.c        |  27 +--
 drivers/net/ethernet/intel/i40e/i40e_prototype.h   |   4 -
 drivers/net/ethernet/intel/i40e/i40e_ptp.c         |   3 +-
 drivers/net/ethernet/intel/i40e/i40e_txrx.c        |  24 ++-
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c |  64 ++++---
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h |   7 +-
 .../net/ethernet/intel/i40evf/i40e_adminq_cmd.h    |  25 ---
 drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c | 201 +--------------------
 drivers/net/ethernet/intel/i40evf/i40evf_main.c    |   2 +-
 14 files changed, 97 insertions(+), 339 deletions(-)

-- 
2.4.3


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

* [Intel-wired-lan] [next PATCH S34 01/12] i40e: Change the default for VFs to be not privileged
  2016-04-13 10:08 [Intel-wired-lan] [next PATCH S34 00/12] i40e/i40evf updates Harshitha Ramamurthy
@ 2016-04-13 10:08 ` Harshitha Ramamurthy
  2016-04-18 21:21   ` Bowers, AndrewX
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 02/12] i40e: Limit the number of mac and vlan addresses that can be added for VFs Harshitha Ramamurthy
                   ` (10 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Harshitha Ramamurthy @ 2016-04-13 10:08 UTC (permalink / raw)
  To: intel-wired-lan

From: Anjali Singhai Jain <anjali.singhai@intel.com>

Make sure a VF is not trusted/privileged until its explicitly
set for trust through the new NDO op interface.

Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Change-Id: I476385c290d2b4901d8fceb29de43546accdc499
---
Testing Hints (Required if no HSD):
With this now a VF cannot add filters or enable promisc unless trusted.

 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 5be10cf..e2c3149 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -860,7 +860,11 @@ static int i40e_alloc_vf_res(struct i40e_vf *vf)
 	if (ret)
 		goto error_alloc;
 	total_queue_pairs += pf->vsi[vf->lan_vsi_idx]->alloc_queue_pairs;
-	set_bit(I40E_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps);
+
+	if (vf->trusted)
+		set_bit(I40E_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps);
+	else
+		clear_bit(I40E_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps);
 
 	/* store the total qps number for the runtime
 	 * VF req validation
@@ -1847,15 +1851,17 @@ static inline int i40e_check_vf_permission(struct i40e_vf *vf, u8 *macaddr)
 		dev_err(&pf->pdev->dev, "invalid VF MAC addr %pM\n", macaddr);
 		ret = I40E_ERR_INVALID_MAC_ADDR;
 	} else if (vf->pf_set_mac && !is_multicast_ether_addr(macaddr) &&
+		   !test_bit(I40E_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps) &&
 		   !ether_addr_equal(macaddr, vf->default_lan_addr.addr)) {
 		/* If the host VMM administrator has set the VF MAC address
 		 * administratively via the ndo_set_vf_mac command then deny
 		 * permission to the VF to add or delete unicast MAC addresses.
+		 * Unless the VF is privileged and then it can do whatever.
 		 * The VF may request to set the MAC address filter already
 		 * assigned to it so do not return an error in that case.
 		 */
 		dev_err(&pf->pdev->dev,
-			"VF attempting to override administratively set MAC address\nPlease reload the VF driver to resume normal operation\n");
+			"VF attempting to override administratively set MAC address, reload the VF driver to resume normal operation\n");
 		ret = -EPERM;
 	}
 	return ret;
@@ -1880,7 +1886,6 @@ static int i40e_vc_add_mac_addr_msg(struct i40e_vf *vf, u8 *msg, u16 msglen)
 	int i;
 
 	if (!test_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states) ||
-	    !test_bit(I40E_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps) ||
 	    !i40e_vc_isvalid_vsi_id(vf, vsi_id)) {
 		ret = I40E_ERR_PARAM;
 		goto error_param;
@@ -1954,7 +1959,6 @@ static int i40e_vc_del_mac_addr_msg(struct i40e_vf *vf, u8 *msg, u16 msglen)
 	int i;
 
 	if (!test_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states) ||
-	    !test_bit(I40E_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps) ||
 	    !i40e_vc_isvalid_vsi_id(vf, vsi_id)) {
 		ret = I40E_ERR_PARAM;
 		goto error_param;
@@ -2207,7 +2211,6 @@ static int i40e_vc_config_rss_key(struct i40e_vf *vf, u8 *msg, u16 msglen)
 	i40e_status aq_ret = 0;
 
 	if (!test_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states) ||
-	    !test_bit(I40E_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps) ||
 	    !i40e_vc_isvalid_vsi_id(vf, vsi_id) ||
 	    (vrk->key_len != I40E_HKEY_ARRAY_SIZE)) {
 		aq_ret = I40E_ERR_PARAM;
@@ -2240,7 +2243,6 @@ static int i40e_vc_config_rss_lut(struct i40e_vf *vf, u8 *msg, u16 msglen)
 	i40e_status aq_ret = 0;
 
 	if (!test_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states) ||
-	    !test_bit(I40E_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps) ||
 	    !i40e_vc_isvalid_vsi_id(vf, vsi_id) ||
 	    (vrl->lut_entries != I40E_VF_HLUT_ARRAY_SIZE)) {
 		aq_ret = I40E_ERR_PARAM;
@@ -2270,8 +2272,7 @@ static int i40e_vc_get_rss_hena(struct i40e_vf *vf, u8 *msg, u16 msglen)
 	i40e_status aq_ret = 0;
 	int len = 0;
 
-	if (!test_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states) ||
-	    !test_bit(I40E_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps)) {
+	if (!test_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states)) {
 		aq_ret = I40E_ERR_PARAM;
 		goto err;
 	}
@@ -2307,8 +2308,7 @@ static int i40e_vc_set_rss_hena(struct i40e_vf *vf, u8 *msg, u16 msglen)
 	struct i40e_hw *hw = &pf->hw;
 	i40e_status aq_ret = 0;
 
-	if (!test_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states) ||
-	    !test_bit(I40E_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps)) {
+	if (!test_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states)) {
 		aq_ret = I40E_ERR_PARAM;
 		goto err;
 	}
-- 
2.4.3


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

* [Intel-wired-lan] [next PATCH S34 02/12] i40e: Limit the number of mac and vlan addresses that can be added for VFs
  2016-04-13 10:08 [Intel-wired-lan] [next PATCH S34 00/12] i40e/i40evf updates Harshitha Ramamurthy
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 01/12] i40e: Change the default for VFs to be not privileged Harshitha Ramamurthy
@ 2016-04-13 10:08 ` Harshitha Ramamurthy
  2016-04-18 19:03   ` Bowers, AndrewX
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 03/12] i40e: Prevent falling to promiscuous if the VF is not trusted Harshitha Ramamurthy
                   ` (9 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Harshitha Ramamurthy @ 2016-04-13 10:08 UTC (permalink / raw)
  To: intel-wired-lan

From: Anjali Singhai Jain <anjali.singhai@intel.com>

If the VF is privileged/trusted it can do as it may please including
but not limited to hogging resources and playing unfair.
But if the VF is not privileged/trusted it still can add some number
(8) of MAC and VLAN addresses.
Other restrictions with respect to Port VLAN and normal VLAN still apply
to not privileged/trusted VF.

Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Change-Id: I3a9529201b184c8873e1ad2e300aff468c9e6296
---
Testing Hints :
With this a non trusted VF can add up to 8 mac addresses and up to
(8) vlan addresses if not under port vlan.

 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 25 ++++++++++++++++++++--
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h |  3 +++
 2 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index e2c3149..747cb28 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -1831,6 +1831,10 @@ error_param:
 				      (u8 *)&stats, sizeof(stats));
 }
 
+/* If the VF is not trusted restrict the number of MAC/VLAN it can program */
+#define I40E_VC_MAX_MAC_ADDR_PER_VF 8
+#define I40E_VC_MAX_VLAN_PER_VF 8
+
 /**
  * i40e_check_vf_permission
  * @vf: pointer to the VF info
@@ -1863,6 +1867,11 @@ static inline int i40e_check_vf_permission(struct i40e_vf *vf, u8 *macaddr)
 		dev_err(&pf->pdev->dev,
 			"VF attempting to override administratively set MAC address, reload the VF driver to resume normal operation\n");
 		ret = -EPERM;
+	} else if ((vf->num_mac >= I40E_VC_MAX_MAC_ADDR_PER_VF) &&
+		   !test_bit(I40E_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps)) {
+		dev_err(&pf->pdev->dev,
+			"VF is not trusted, switch the VF to trusted to add more functionality\n");
+		ret = -EPERM;
 	}
 	return ret;
 }
@@ -1924,6 +1933,8 @@ static int i40e_vc_add_mac_addr_msg(struct i40e_vf *vf, u8 *msg, u16 msglen)
 			ret = I40E_ERR_PARAM;
 			spin_unlock_bh(&vsi->mac_filter_list_lock);
 			goto error_param;
+		} else {
+			vf->num_mac++;
 		}
 	}
 	spin_unlock_bh(&vsi->mac_filter_list_lock);
@@ -1982,6 +1993,8 @@ static int i40e_vc_del_mac_addr_msg(struct i40e_vf *vf, u8 *msg, u16 msglen)
 			ret = I40E_ERR_INVALID_MAC_ADDR;
 			spin_unlock_bh(&vsi->mac_filter_list_lock);
 			goto error_param;
+		} else {
+			vf->num_mac--;
 		}
 
 	spin_unlock_bh(&vsi->mac_filter_list_lock);
@@ -2016,8 +2029,13 @@ static int i40e_vc_add_vlan_msg(struct i40e_vf *vf, u8 *msg, u16 msglen)
 	i40e_status aq_ret = 0;
 	int i;
 
+	if ((vf->num_vlan >= I40E_VC_MAX_VLAN_PER_VF) &&
+	    !test_bit(I40E_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps)) {
+		dev_err(&pf->pdev->dev,
+			"VF is not trusted, switch the VF to trusted to add more VLAN addresses\n");
+		goto error_param;
+	}
 	if (!test_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states) ||
-	    !test_bit(I40E_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps) ||
 	    !i40e_vc_isvalid_vsi_id(vf, vsi_id)) {
 		aq_ret = I40E_ERR_PARAM;
 		goto error_param;
@@ -2041,6 +2059,8 @@ static int i40e_vc_add_vlan_msg(struct i40e_vf *vf, u8 *msg, u16 msglen)
 	for (i = 0; i < vfl->num_elements; i++) {
 		/* add new VLAN filter */
 		int ret = i40e_vsi_add_vlan(vsi, vfl->vlan_id[i]);
+		if (!ret)
+			vf->num_vlan++;
 
 		if (test_bit(I40E_VF_STAT_UC_PROMISC, &vf->vf_states))
 			i40e_aq_set_vsi_uc_promisc_on_vlan(&pf->hw, vsi->seid,
@@ -2083,7 +2103,6 @@ static int i40e_vc_remove_vlan_msg(struct i40e_vf *vf, u8 *msg, u16 msglen)
 	int i;
 
 	if (!test_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states) ||
-	    !test_bit(I40E_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps) ||
 	    !i40e_vc_isvalid_vsi_id(vf, vsi_id)) {
 		aq_ret = I40E_ERR_PARAM;
 		goto error_param;
@@ -2104,6 +2123,8 @@ static int i40e_vc_remove_vlan_msg(struct i40e_vf *vf, u8 *msg, u16 msglen)
 
 	for (i = 0; i < vfl->num_elements; i++) {
 		int ret = i40e_vsi_kill_vlan(vsi, vfl->vlan_id[i]);
+		if (!ret)
+			vf->num_vlan--;
 
 		if (test_bit(I40E_VF_STAT_UC_PROMISC, &vf->vf_states))
 			i40e_aq_set_vsi_uc_promisc_on_vlan(&pf->hw, vsi->seid,
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
index 8cbf579..bf54873 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
@@ -111,6 +111,9 @@ struct i40e_vf {
 	bool link_forced;
 	bool link_up;		/* only valid if VF link is forced */
 	bool spoofchk;
+	u16 num_mac;
+	u16 num_vlan;
+
 	/* RDMA Client */
 	struct i40e_virtchnl_iwarp_qvlist_info *qvlist_info;
 };
-- 
2.4.3


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

* [Intel-wired-lan] [next PATCH S34 03/12] i40e: Prevent falling to promiscuous if the VF is not trusted
  2016-04-13 10:08 [Intel-wired-lan] [next PATCH S34 00/12] i40e/i40evf updates Harshitha Ramamurthy
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 01/12] i40e: Change the default for VFs to be not privileged Harshitha Ramamurthy
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 02/12] i40e: Limit the number of mac and vlan addresses that can be added for VFs Harshitha Ramamurthy
@ 2016-04-13 10:08 ` Harshitha Ramamurthy
  2016-04-18 19:06   ` Bowers, AndrewX
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 04/12] i40e: Remove HMC AQ API implementation Harshitha Ramamurthy
                   ` (8 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Harshitha Ramamurthy @ 2016-04-13 10:08 UTC (permalink / raw)
  To: intel-wired-lan

From: Anjali Singhai Jain <anjali.singhai@intel.com>

With this change a non trusted VF can never fall to promiscuous
mode when there is no room for a mac/vlan filter.

Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Change-Id: I8a155aa25c0bcdc6093414920c9ade4ee0bd20e8
---
Testing Hints :
Try adding mac/vlan filters to multiple VFs and make sure they can
no longer go into promiscuous mode if the VFs are not trusted.

 drivers/net/ethernet/intel/i40e/i40e_main.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 39b3b56..a45748e 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -2098,6 +2098,12 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
 		}
 	}
 
+	/* if the VF is not trusted do not do promisc */
+	if ((vsi->type == I40E_VSI_SRIOV) && !pf->vf[vsi->vf_id].trusted) {
+		clear_bit(__I40E_FILTER_OVERFLOW_PROMISC, &vsi->state);
+		goto out;
+	}
+
 	/* check for changes in promiscuous modes */
 	if (changed_flags & IFF_ALLMULTI) {
 		bool cur_multipromisc;
-- 
2.4.3


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

* [Intel-wired-lan] [next PATCH S34 04/12] i40e: Remove HMC AQ API implementation
  2016-04-13 10:08 [Intel-wired-lan] [next PATCH S34 00/12] i40e/i40evf updates Harshitha Ramamurthy
                   ` (2 preceding siblings ...)
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 03/12] i40e: Prevent falling to promiscuous if the VF is not trusted Harshitha Ramamurthy
@ 2016-04-13 10:08 ` Harshitha Ramamurthy
  2016-04-28 15:34   ` Bowers, AndrewX
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 05/12] i40e: Flow-based side-band filter count and its use for input set change Harshitha Ramamurthy
                   ` (7 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Harshitha Ramamurthy @ 2016-04-13 10:08 UTC (permalink / raw)
  To: intel-wired-lan

From: Neerav Parikh <neerav.parikh@intel.com>

Remove the code that implements the HMC AQ APIs and call these APIs.
This is done because these are obsolete APIs and are not supported
by firmware.

Signed-off-by: Neerav Parikh <neerav.parikh@intel.com>
Change-ID: I5d771d8f37c3e16e7b0a972ff9b27e75aa2d05d4
---
 drivers/net/ethernet/intel/i40e/i40e_adminq.c      |  4 ---
 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h  | 25 ------------------
 drivers/net/ethernet/intel/i40e/i40e_common.c      | 30 ----------------------
 drivers/net/ethernet/intel/i40e/i40e_prototype.h   |  4 ---
 .../net/ethernet/intel/i40evf/i40e_adminq_cmd.h    | 25 ------------------
 5 files changed, 88 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq.c b/drivers/net/ethernet/intel/i40e/i40e_adminq.c
index 43bb413..738b42a 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_adminq.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq.c
@@ -617,10 +617,6 @@ i40e_status i40e_init_adminq(struct i40e_hw *hw)
 	hw->nvm_release_on_done = false;
 	hw->nvmupd_state = I40E_NVMUPD_STATE_INIT;
 
-	ret_code = i40e_aq_set_hmc_resource_profile(hw,
-						    I40E_HMC_PROFILE_DEFAULT,
-						    0,
-						    NULL);
 	ret_code = 0;
 
 	/* success! */
diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
index 5179b3b..48c0c00 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
@@ -205,10 +205,6 @@ enum i40e_admin_queue_opc {
 	i40e_aqc_opc_resume_port_tx				= 0x041C,
 	i40e_aqc_opc_configure_partition_bw			= 0x041D,
 
-	/* hmc */
-	i40e_aqc_opc_query_hmc_resource_profile	= 0x0500,
-	i40e_aqc_opc_set_hmc_resource_profile	= 0x0501,
-
 	/* phy commands*/
 	i40e_aqc_opc_get_phy_abilities		= 0x0600,
 	i40e_aqc_opc_set_phy_config		= 0x0601,
@@ -1586,27 +1582,6 @@ struct i40e_aqc_configure_partition_bw_data {
 
 I40E_CHECK_STRUCT_LEN(0x22, i40e_aqc_configure_partition_bw_data);
 
-/* Get and set the active HMC resource profile and status.
- * (direct 0x0500) and (direct 0x0501)
- */
-struct i40e_aq_get_set_hmc_resource_profile {
-	u8	pm_profile;
-	u8	pe_vf_enabled;
-	u8	reserved[14];
-};
-
-I40E_CHECK_CMD_LENGTH(i40e_aq_get_set_hmc_resource_profile);
-
-enum i40e_aq_hmc_profile {
-	/* I40E_HMC_PROFILE_NO_CHANGE    = 0, reserved */
-	I40E_HMC_PROFILE_DEFAULT	= 1,
-	I40E_HMC_PROFILE_FAVOR_VF	= 2,
-	I40E_HMC_PROFILE_EQUAL		= 3,
-};
-
-#define I40E_AQ_GET_HMC_RESOURCE_PROFILE_PM_MASK	0xF
-#define I40E_AQ_GET_HMC_RESOURCE_PROFILE_COUNT_MASK	0x3F
-
 /* Get PHY Abilities (indirect 0x0600) uses the generic indirect struct */
 
 /* set in param0 for get phy abilities to report qualified modules */
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index 0e8552b..4a934e1 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -2855,36 +2855,6 @@ i40e_status i40e_aq_debug_write_register(struct i40e_hw *hw,
 }
 
 /**
- * i40e_aq_set_hmc_resource_profile
- * @hw: pointer to the hw struct
- * @profile: type of profile the HMC is to be set as
- * @pe_vf_enabled_count: the number of PE enabled VFs the system has
- * @cmd_details: pointer to command details structure or NULL
- *
- * set the HMC profile of the device.
- **/
-i40e_status i40e_aq_set_hmc_resource_profile(struct i40e_hw *hw,
-				enum i40e_aq_hmc_profile profile,
-				u8 pe_vf_enabled_count,
-				struct i40e_asq_cmd_details *cmd_details)
-{
-	struct i40e_aq_desc desc;
-	struct i40e_aq_get_set_hmc_resource_profile *cmd =
-		(struct i40e_aq_get_set_hmc_resource_profile *)&desc.params.raw;
-	i40e_status status;
-
-	i40e_fill_default_direct_cmd_desc(&desc,
-					i40e_aqc_opc_set_hmc_resource_profile);
-
-	cmd->pm_profile = (u8)profile;
-	cmd->pe_vf_enabled = pe_vf_enabled_count;
-
-	status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
-
-	return status;
-}
-
-/**
  * i40e_aq_request_resource
  * @hw: pointer to the hw struct
  * @resource: resource id
diff --git a/drivers/net/ethernet/intel/i40e/i40e_prototype.h b/drivers/net/ethernet/intel/i40e/i40e_prototype.h
index 8afb237..4c8977c 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_prototype.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_prototype.h
@@ -236,10 +236,6 @@ i40e_status i40e_aq_config_vsi_bw_limit(struct i40e_hw *hw,
 				struct i40e_asq_cmd_details *cmd_details);
 i40e_status i40e_aq_dcb_updated(struct i40e_hw *hw,
 				struct i40e_asq_cmd_details *cmd_details);
-i40e_status i40e_aq_set_hmc_resource_profile(struct i40e_hw *hw,
-				enum i40e_aq_hmc_profile profile,
-				u8 pe_vf_enabled_count,
-				struct i40e_asq_cmd_details *cmd_details);
 i40e_status i40e_aq_config_switch_comp_bw_limit(struct i40e_hw *hw,
 				u16 seid, u16 credit, u8 max_bw,
 				struct i40e_asq_cmd_details *cmd_details);
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
index 1bcb8cf..180ae57 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
@@ -205,10 +205,6 @@ enum i40e_admin_queue_opc {
 	i40e_aqc_opc_resume_port_tx				= 0x041C,
 	i40e_aqc_opc_configure_partition_bw			= 0x041D,
 
-	/* hmc */
-	i40e_aqc_opc_query_hmc_resource_profile	= 0x0500,
-	i40e_aqc_opc_set_hmc_resource_profile	= 0x0501,
-
 	/* phy commands*/
 	i40e_aqc_opc_get_phy_abilities		= 0x0600,
 	i40e_aqc_opc_set_phy_config		= 0x0601,
@@ -1583,27 +1579,6 @@ struct i40e_aqc_configure_partition_bw_data {
 
 I40E_CHECK_STRUCT_LEN(0x22, i40e_aqc_configure_partition_bw_data);
 
-/* Get and set the active HMC resource profile and status.
- * (direct 0x0500) and (direct 0x0501)
- */
-struct i40e_aq_get_set_hmc_resource_profile {
-	u8	pm_profile;
-	u8	pe_vf_enabled;
-	u8	reserved[14];
-};
-
-I40E_CHECK_CMD_LENGTH(i40e_aq_get_set_hmc_resource_profile);
-
-enum i40e_aq_hmc_profile {
-	/* I40E_HMC_PROFILE_NO_CHANGE    = 0, reserved */
-	I40E_HMC_PROFILE_DEFAULT	= 1,
-	I40E_HMC_PROFILE_FAVOR_VF	= 2,
-	I40E_HMC_PROFILE_EQUAL		= 3,
-};
-
-#define I40E_AQ_GET_HMC_RESOURCE_PROFILE_PM_MASK	0xF
-#define I40E_AQ_GET_HMC_RESOURCE_PROFILE_COUNT_MASK	0x3F
-
 /* Get PHY Abilities (indirect 0x0600) uses the generic indirect struct */
 
 /* set in param0 for get phy abilities to report qualified modules */
-- 
2.4.3


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

* [Intel-wired-lan] [next PATCH S34 05/12] i40e: Flow-based side-band filter count and its use for input set change
  2016-04-13 10:08 [Intel-wired-lan] [next PATCH S34 00/12] i40e/i40evf updates Harshitha Ramamurthy
                   ` (3 preceding siblings ...)
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 04/12] i40e: Remove HMC AQ API implementation Harshitha Ramamurthy
@ 2016-04-13 10:08 ` Harshitha Ramamurthy
  2016-04-18 19:43   ` Bowers, AndrewX
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 06/12] i40evf: RSS Hash Option parameters Harshitha Ramamurthy
                   ` (6 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Harshitha Ramamurthy @ 2016-04-13 10:08 UTC (permalink / raw)
  To: intel-wired-lan

From: Kiran Patil <kiran.patil@intel.com>

This patch keeps track of side-band filters based on flow-type.
It is used to handle detection of input set mask changes per
flow-type.

Signed-off-by: Kiran Patil <kiran.patil@intel.com>
Change-Id: I5f308dbd33d3c6ae9f5db301b5989b6089f61dce
---
Testing Hints :
	ethtool -N p5p2 flow-type tcp4 src-ip 192.168.0.2 \
		 dst-ip 192.168.0.1 action 40
	ethtool -N p5p2 flow-type udp4 src-ip 192.168.0.2 \
		 dst-ip 192.168.0.1 src-port 1000 action 41
Made sure that, able to change input set mask independently based on
flow-type.

 drivers/net/ethernet/intel/i40e/i40e.h         |  9 +++++++++
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c |  9 +++++++--
 drivers/net/ethernet/intel/i40e/i40e_txrx.c    | 24 +++++++++++++++++++++---
 3 files changed, 37 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 1f48e10..ceb848a 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -308,6 +308,15 @@ struct i40e_pf {
 	u32 fd_atr_cnt;
 	u32 fd_tcp_rule;
 
+	/* Book-keeping of side-band filter count per flow-type.
+	 * This is used to detect and handle input set changes for
+	 * respective flow-type.
+	 */
+	u16 fd_tcp4_filter_cnt;
+	u16 fd_udp4_filter_cnt;
+	u16 fd_sctp4_filter_cnt;
+	u16 fd_ip4_filter_cnt;
+
 	struct i40e_udp_port_config udp_ports[I40E_MAX_PF_UDP_OFFLOAD_PORTS];
 	u16 pending_udp_bitmap;
 
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index ada448b..865c8db 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -2500,6 +2500,7 @@ static int i40e_handle_input_set(struct i40e_vsi *vsi,
 {
 	bool inset_mask_change = false;
 	struct i40e_pf *pf;
+	u16 filter_cnt;
 	u64 val;
 	u8 idx;
 
@@ -2510,9 +2511,11 @@ static int i40e_handle_input_set(struct i40e_vsi *vsi,
 	switch (fsp->flow_type & FLOW_TYPE_MASK) {
 	case TCP_V4_FLOW:
 		idx = I40E_FILTER_PCTYPE_NONF_IPV4_TCP;
+		filter_cnt = pf->fd_tcp4_filter_cnt;
 		break;
 	case UDP_V4_FLOW:
 		idx = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
+		filter_cnt = pf->fd_udp4_filter_cnt;
 		break;
 	default:
 		/* for all other flow types */
@@ -2578,8 +2581,10 @@ static int i40e_handle_input_set(struct i40e_vsi *vsi,
 			netif_err(pf, drv, vsi->netdev, "Change of input set is not supported when MFP mode is enabled\n");
 			return -EOPNOTSUPP;
 		}
-		if (pf->fdir_pf_active_filters) {
-			netif_err(pf, drv, vsi->netdev, "Change of input set is not supported when there are existing filters. Please delete them and re-try\n");
+
+		if (filter_cnt) {
+			netif_err(pf, drv, vsi->netdev, "Change of input set is not supported when there are existing filter(%u) for specified flow-type: %u. Please delete them and re-try\n",
+				  filter_cnt, fsp->flow_type & FLOW_TYPE_MASK);
 			return -EOPNOTSUPP;
 		}
 
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 05293f6..808922b 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -235,8 +235,14 @@ static int i40e_add_del_fdir_udpv4(struct i40e_vsi *vsi,
 				 "Filter deleted for PCTYPE %d loc = %d\n",
 				 fd_data->pctype, fd_data->fd_id);
 	}
-	if (err)
+	if (err) {
 		kfree(raw_packet);
+	} else {
+		if (add)
+			pf->fd_udp4_filter_cnt++;
+		else
+			pf->fd_udp4_filter_cnt--;
+	}
 
 	return err ? -EOPNOTSUPP : 0;
 }
@@ -315,8 +321,14 @@ static int i40e_add_del_fdir_tcpv4(struct i40e_vsi *vsi,
 				 fd_data->pctype, fd_data->fd_id);
 	}
 
-	if (err)
+	if (err) {
 		kfree(raw_packet);
+	} else {
+		if (add)
+			pf->fd_tcp4_filter_cnt++;
+		else
+			pf->fd_tcp4_filter_cnt--;
+	}
 
 	return err ? -EOPNOTSUPP : 0;
 }
@@ -393,8 +405,14 @@ static int i40e_add_del_fdir_ipv4(struct i40e_vsi *vsi,
 		}
 	}
 
-	if (err)
+	if (err) {
 		kfree(raw_packet);
+	} else {
+		if (add)
+			pf->fd_ip4_filter_cnt++;
+		else
+			pf->fd_ip4_filter_cnt--;
+	}
 
 	return err ? -EOPNOTSUPP : 0;
 }
-- 
2.4.3


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

* [Intel-wired-lan] [next PATCH S34 06/12] i40evf: RSS Hash Option parameters
  2016-04-13 10:08 [Intel-wired-lan] [next PATCH S34 00/12] i40e/i40evf updates Harshitha Ramamurthy
                   ` (4 preceding siblings ...)
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 05/12] i40e: Flow-based side-band filter count and its use for input set change Harshitha Ramamurthy
@ 2016-04-13 10:08 ` Harshitha Ramamurthy
  2016-04-27 22:19   ` Bowers, AndrewX
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 07/12] i40e: Fix uninitialized variable Harshitha Ramamurthy
                   ` (5 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Harshitha Ramamurthy @ 2016-04-13 10:08 UTC (permalink / raw)
  To: intel-wired-lan

From: Carolyn Wyborny <carolyn.wyborny@intel.com>

This patch syncs the VF code for the changes made to the PF for the RSS hash tuple settings.
Since the VF still cannot change the RSS hash settings, change the code to make this clear to the user.
Previously, the default settings were returned in this function. However, the default can be
chnaged by the PF so this does not make sense anymore.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Change-Id: I085eaf005fc7978b440d2a1bf2b2dd7cadaff39b
---
Testing Hints : Make sure any attempts to change
rx-flow-hash via ethtool returns Not Supported and a message in the
dmesg log that informs user to use pf for these settings instead.

 drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c | 201 +--------------------
 1 file changed, 2 insertions(+), 199 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c b/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c
index 8a5cafb..3a95c7c 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c
@@ -378,59 +378,6 @@ static int i40evf_set_coalesce(struct net_device *netdev,
 }
 
 /**
- * i40e_get_rss_hash_opts - Get RSS hash Input Set for each flow type
- * @adapter: board private structure
- * @cmd: ethtool rxnfc command
- *
- * Returns Success if the flow is supported, else Invalid Input.
- **/
-static int i40evf_get_rss_hash_opts(struct i40evf_adapter *adapter,
-				    struct ethtool_rxnfc *cmd)
-{
-	/* We always hash on IP src and dest addresses */
-	cmd->data = RXH_IP_SRC | RXH_IP_DST;
-
-	switch (cmd->flow_type) {
-	case TCP_V4_FLOW:
-		if (adapter->hena & BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_TCP))
-			cmd->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
-		break;
-	case UDP_V4_FLOW:
-		if (adapter->hena & BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_UDP))
-			cmd->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
-		break;
-
-	case SCTP_V4_FLOW:
-	case AH_ESP_V4_FLOW:
-	case AH_V4_FLOW:
-	case ESP_V4_FLOW:
-	case IPV4_FLOW:
-		break;
-
-	case TCP_V6_FLOW:
-		if (adapter->hena & BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_TCP))
-			cmd->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
-		break;
-	case UDP_V6_FLOW:
-		if (adapter->hena & BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_UDP))
-			cmd->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
-		break;
-
-	case SCTP_V6_FLOW:
-	case AH_ESP_V6_FLOW:
-	case AH_V6_FLOW:
-	case ESP_V6_FLOW:
-	case IPV6_FLOW:
-		break;
-	default:
-		cmd->data = 0;
-		return -EINVAL;
-	}
-
-	return 0;
-}
-
-/**
  * i40evf_get_rxnfc - command to get RX flow classification rules
  * @netdev: network interface device structure
  * @cmd: ethtool rxnfc command
@@ -450,150 +397,8 @@ static int i40evf_get_rxnfc(struct net_device *netdev,
 		ret = 0;
 		break;
 	case ETHTOOL_GRXFH:
-		ret = i40evf_get_rss_hash_opts(adapter, cmd);
-		break;
-	default:
-		break;
-	}
-
-	return ret;
-}
-
-/**
- * i40evf_set_rss_hash_opt - Enable/Disable flow types for RSS hash
- * @adapter: board private structure
- * @cmd: ethtool rxnfc command
- *
- * Returns Success if the flow input set is supported.
- **/
-static int i40evf_set_rss_hash_opt(struct i40evf_adapter *adapter,
-				   struct ethtool_rxnfc *nfc)
-{
-	struct i40e_hw *hw = &adapter->hw;
-	u32 flags = adapter->vf_res->vf_offload_flags;
-
-	/* RSS does not support anything other than hashing
-	 * to queues on src and dst IPs and ports
-	 */
-	if (nfc->data & ~(RXH_IP_SRC | RXH_IP_DST |
-			  RXH_L4_B_0_1 | RXH_L4_B_2_3))
-		return -EINVAL;
-
-	/* We need at least the IP SRC and DEST fields for hashing */
-	if (!(nfc->data & RXH_IP_SRC) ||
-	    !(nfc->data & RXH_IP_DST))
-		return -EINVAL;
-
-	switch (nfc->flow_type) {
-	case TCP_V4_FLOW:
-		if (nfc->data & (RXH_L4_B_0_1 | RXH_L4_B_2_3)) {
-			if (flags & I40E_VIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2)
-				adapter->hena |=
-			   BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK);
-
-			adapter->hena |=
-		 BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_TCP);
-		} else {
-			return -EINVAL;
-		}
-		break;
-	case TCP_V6_FLOW:
-		if (nfc->data & (RXH_L4_B_0_1 | RXH_L4_B_2_3)) {
-			if (flags & I40E_VIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2)
-				adapter->hena |=
-			   BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK);
-
-			adapter->hena |=
-		 BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_TCP);
-		} else {
-			return -EINVAL;
-		}
-		break;
-	case UDP_V4_FLOW:
-		if (nfc->data & (RXH_L4_B_0_1 | RXH_L4_B_2_3)) {
-			if (flags & I40E_VIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2)
-				adapter->hena |=
-			    BIT_ULL(I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP) |
-			    BIT_ULL(I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP);
-
-			adapter->hena |=
-				(BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_UDP) |
-				 BIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV4));
-		} else {
-			return -EINVAL;
-		}
-		break;
-	case UDP_V6_FLOW:
-		if (nfc->data & (RXH_L4_B_0_1 | RXH_L4_B_2_3)) {
-			if (flags & I40E_VIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2)
-				adapter->hena |=
-			    BIT_ULL(I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP) |
-			    BIT_ULL(I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP);
-
-			adapter->hena |=
-				(BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_UDP) |
-				 BIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV6));
-		} else {
-			return -EINVAL;
-		}
-		break;
-	case AH_ESP_V4_FLOW:
-	case AH_V4_FLOW:
-	case ESP_V4_FLOW:
-	case SCTP_V4_FLOW:
-		if ((nfc->data & RXH_L4_B_0_1) ||
-		    (nfc->data & RXH_L4_B_2_3))
-			return -EINVAL;
-		adapter->hena |= BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_OTHER);
-		break;
-	case AH_ESP_V6_FLOW:
-	case AH_V6_FLOW:
-	case ESP_V6_FLOW:
-	case SCTP_V6_FLOW:
-		if ((nfc->data & RXH_L4_B_0_1) ||
-		    (nfc->data & RXH_L4_B_2_3))
-			return -EINVAL;
-		adapter->hena |= BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_OTHER);
-		break;
-	case IPV4_FLOW:
-		adapter->hena |= (BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_OTHER) |
-				  BIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV4));
-		break;
-	case IPV6_FLOW:
-		adapter->hena |= (BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_OTHER) |
-				  BIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV6));
-		break;
-	default:
-		return -EINVAL;
-	}
-
-	if (RSS_PF(adapter)) {
-		adapter->aq_required = I40EVF_FLAG_AQ_SET_HENA;
-	} else {
-		wr32(hw, I40E_VFQF_HENA(0), (u32)adapter->hena);
-		wr32(hw, I40E_VFQF_HENA(1), (u32)(adapter->hena >> 32));
-		i40e_flush(hw);
-	}
-
-	return 0;
-}
-
-/**
- * i40evf_set_rxnfc - command to set RX flow classification rules
- * @netdev: network interface device structure
- * @cmd: ethtool rxnfc command
- *
- * Returns Success if the command is supported.
- **/
-static int i40evf_set_rxnfc(struct net_device *netdev,
-			    struct ethtool_rxnfc *cmd)
-{
-	struct i40evf_adapter *adapter = netdev_priv(netdev);
-	int ret = -EOPNOTSUPP;
-
-	switch (cmd->cmd) {
-	case ETHTOOL_SRXFH:
-		ret = i40evf_set_rss_hash_opt(adapter, cmd);
+		netdev_info(netdev,
+			    "RSS hash info is not available to vf, use pf.\n");
 		break;
 	default:
 		break;
@@ -601,7 +406,6 @@ static int i40evf_set_rxnfc(struct net_device *netdev,
 
 	return ret;
 }
-
 /**
  * i40evf_get_channels: get the number of channels supported by the device
  * @netdev: network interface device structure
@@ -775,7 +579,6 @@ static const struct ethtool_ops i40evf_ethtool_ops = {
 	.get_coalesce		= i40evf_get_coalesce,
 	.set_coalesce		= i40evf_set_coalesce,
 	.get_rxnfc		= i40evf_get_rxnfc,
-	.set_rxnfc		= i40evf_set_rxnfc,
 	.get_rxfh_indir_size	= i40evf_get_rxfh_indir_size,
 	.get_rxfh		= i40evf_get_rxfh,
 	.set_rxfh		= i40evf_set_rxfh,
-- 
2.4.3


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

* [Intel-wired-lan] [next PATCH S34 07/12] i40e: Fix uninitialized variable
  2016-04-13 10:08 [Intel-wired-lan] [next PATCH S34 00/12] i40e/i40evf updates Harshitha Ramamurthy
                   ` (5 preceding siblings ...)
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 06/12] i40evf: RSS Hash Option parameters Harshitha Ramamurthy
@ 2016-04-13 10:08 ` Harshitha Ramamurthy
  2016-04-18 22:01   ` Bowers, AndrewX
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 08/12] i40e: ptp - avoid aggregate return warnings Harshitha Ramamurthy
                   ` (4 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Harshitha Ramamurthy @ 2016-04-13 10:08 UTC (permalink / raw)
  To: intel-wired-lan

From: Catherine Sullivan <catherine.sullivan@intel.com>

We have an uninitialized variable warning for valid_len for one case in
validate_vf_mesg. To fix this, just initialize it to 0 at the top of the
function and remove all of the now redundant assignments to 0 in the
individual cases.

Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Change-Id: Iacbd97f4c521ed8d662eef803a598d8707708cfd
---
Testing Hints: Should net no functional change - make sure nothing
broke.

 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 747cb28..4f0214e 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -2356,7 +2356,7 @@ static int i40e_vc_validate_vf_msg(struct i40e_vf *vf, u32 v_opcode,
 				   u32 v_retval, u8 *msg, u16 msglen)
 {
 	bool err_msg_format = false;
-	int valid_len;
+	int valid_len = 0;
 
 	/* Check if VF is disabled. */
 	if (test_bit(I40E_VF_STAT_DISABLED, &vf->vf_states))
@@ -2368,13 +2368,10 @@ static int i40e_vc_validate_vf_msg(struct i40e_vf *vf, u32 v_opcode,
 		valid_len = sizeof(struct i40e_virtchnl_version_info);
 		break;
 	case I40E_VIRTCHNL_OP_RESET_VF:
-		valid_len = 0;
 		break;
 	case I40E_VIRTCHNL_OP_GET_VF_RESOURCES:
 		if (VF_IS_V11(vf))
 			valid_len = sizeof(u32);
-		else
-			valid_len = 0;
 		break;
 	case I40E_VIRTCHNL_OP_CONFIG_TX_QUEUE:
 		valid_len = sizeof(struct i40e_virtchnl_txq_info);
@@ -2489,7 +2486,6 @@ static int i40e_vc_validate_vf_msg(struct i40e_vf *vf, u32 v_opcode,
 		}
 		break;
 	case I40E_VIRTCHNL_OP_GET_RSS_HENA_CAPS:
-		valid_len = 0;
 		break;
 	case I40E_VIRTCHNL_OP_SET_RSS_HENA:
 		valid_len = sizeof(struct i40e_virtchnl_rss_hena);
-- 
2.4.3


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

* [Intel-wired-lan] [next PATCH S34 08/12] i40e: ptp - avoid aggregate return warnings
  2016-04-13 10:08 [Intel-wired-lan] [next PATCH S34 00/12] i40e/i40evf updates Harshitha Ramamurthy
                   ` (6 preceding siblings ...)
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 07/12] i40e: Fix uninitialized variable Harshitha Ramamurthy
@ 2016-04-13 10:08 ` Harshitha Ramamurthy
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 09/12] i40e: Use consistent type for vf_id Harshitha Ramamurthy
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Harshitha Ramamurthy @ 2016-04-13 10:08 UTC (permalink / raw)
  To: intel-wired-lan

From: Jesse Brandeburg <jesse.brandeburg@intel.com>

Aggregate return warnings are when struct types are returned
and must be copied to the lvalue with a struct copy by the compiler.

This fixes warnings of type aggregate-return from gcc with W=2.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Change-Id: I896b1bf514544bf0faeb458869d79914b9f1b168
---
Testing Hints: make sure PTP still works,
as it should because this code makes no functional change

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

diff --git a/drivers/net/ethernet/intel/i40e/i40e_ptp.c b/drivers/net/ethernet/intel/i40e/i40e_ptp.c
index 565ca7c..a1b878a 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ptp.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ptp.c
@@ -158,9 +158,10 @@ static int i40e_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb)
 static int i40e_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
 {
 	struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps);
-	struct timespec64 now, then = ns_to_timespec64(delta);
+	struct timespec64 now, then;
 	unsigned long flags;
 
+	then = ns_to_timespec64(delta);
 	spin_lock_irqsave(&pf->tmreg_lock, flags);
 
 	i40e_ptp_read(pf, &now);
-- 
2.4.3


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

* [Intel-wired-lan] [next PATCH S34 09/12] i40e: Use consistent type for vf_id
  2016-04-13 10:08 [Intel-wired-lan] [next PATCH S34 00/12] i40e/i40evf updates Harshitha Ramamurthy
                   ` (7 preceding siblings ...)
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 08/12] i40e: ptp - avoid aggregate return warnings Harshitha Ramamurthy
@ 2016-04-13 10:08 ` Harshitha Ramamurthy
  2016-04-18 22:49   ` Bowers, AndrewX
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 10/12] i40e: Drop extra copy of function Harshitha Ramamurthy
                   ` (2 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Harshitha Ramamurthy @ 2016-04-13 10:08 UTC (permalink / raw)
  To: intel-wired-lan

From: Jesse Brandeburg <jesse.brandeburg@intel.com>

The driver was all over the place using signed or unsigned types
for vf_id, when it should always be signed.

This fixes warnings of type unsafe comparisons from gcc with W=2.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Change-Id: I2cb681f83d0f68ca124d2e4131e4ac0d9f8a6b22
---
Testing Hints : make sure virtchannel (VF) still
works to configure MAC addresses and such from the VF.

 drivers/net/ethernet/intel/i40e/i40e.h             |  2 +-
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 13 +++++++------
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h |  4 ++--
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index ceb848a..618a2a8 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -569,7 +569,7 @@ struct i40e_vsi {
 	u16 num_queue_pairs; /* Used tx and rx pairs */
 	u16 num_desc;
 	enum i40e_vsi_type type;  /* VSI type, e.g., LAN, FCoE, etc */
-	u16 vf_id;		/* Virtual function ID for SRIOV VSIs */
+	s16 vf_id;		/* Virtual function ID for SRIOV VSIs */
 
 	struct i40e_tc_configuration tc_config;
 	struct i40e_aqc_vsi_properties_data info;
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 4f0214e..41be42d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -48,7 +48,7 @@ static void i40e_vc_vf_broadcast(struct i40e_pf *pf,
 	int i;
 
 	for (i = 0; i < pf->num_alloc_vfs; i++, vf++) {
-		int abs_vf_id = vf->vf_id + hw->func_caps.vf_base_id;
+		int abs_vf_id = vf->vf_id + (int)hw->func_caps.vf_base_id;
 		/* Not all vfs are enabled so skip the ones that are not */
 		if (!test_bit(I40E_VF_STAT_INIT, &vf->vf_states) &&
 		    !test_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states))
@@ -74,7 +74,7 @@ static void i40e_vc_notify_vf_link_state(struct i40e_vf *vf)
 	struct i40e_pf *pf = vf->pf;
 	struct i40e_hw *hw = &pf->hw;
 	struct i40e_link_status *ls = &pf->hw.phy.link_info;
-	int abs_vf_id = vf->vf_id + hw->func_caps.vf_base_id;
+	int abs_vf_id = vf->vf_id + (int)hw->func_caps.vf_base_id;
 
 	pfe.event = I40E_VIRTCHNL_EVENT_LINK_CHANGE;
 	pfe.severity = I40E_PF_EVENT_SEVERITY_INFO;
@@ -141,7 +141,7 @@ void i40e_vc_notify_vf_reset(struct i40e_vf *vf)
 	    !test_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states))
 		return;
 
-	abs_vf_id = vf->vf_id + vf->pf->hw.func_caps.vf_base_id;
+	abs_vf_id = vf->vf_id + (int)vf->pf->hw.func_caps.vf_base_id;
 
 	pfe.event = I40E_VIRTCHNL_EVENT_RESET_IMPENDING;
 	pfe.severity = I40E_PF_EVENT_SEVERITY_CERTAIN_DOOM;
@@ -2516,11 +2516,11 @@ static int i40e_vc_validate_vf_msg(struct i40e_vf *vf, u32 v_opcode,
  * called from the common aeq/arq handler to
  * process request from VF
  **/
-int i40e_vc_process_vf_msg(struct i40e_pf *pf, u16 vf_id, u32 v_opcode,
+int i40e_vc_process_vf_msg(struct i40e_pf *pf, s16 vf_id, u32 v_opcode,
 			   u32 v_retval, u8 *msg, u16 msglen)
 {
 	struct i40e_hw *hw = &pf->hw;
-	unsigned int local_vf_id = vf_id - hw->func_caps.vf_base_id;
+	int local_vf_id = vf_id - (s16)hw->func_caps.vf_base_id;
 	struct i40e_vf *vf;
 	int ret;
 
@@ -2622,9 +2622,10 @@ int i40e_vc_process_vf_msg(struct i40e_pf *pf, u16 vf_id, u32 v_opcode,
  **/
 int i40e_vc_process_vflr_event(struct i40e_pf *pf)
 {
-	u32 reg, reg_idx, bit_idx, vf_id;
 	struct i40e_hw *hw = &pf->hw;
+	u32 reg, reg_idx, bit_idx;
 	struct i40e_vf *vf;
+	int vf_id;
 
 	if (!test_bit(__I40E_VFLR_EVENT_PENDING, &pf->state))
 		return 0;
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
index bf54873..8751741 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
@@ -77,7 +77,7 @@ struct i40e_vf {
 	struct i40e_pf *pf;
 
 	/* VF id in the PF space */
-	u16 vf_id;
+	s16 vf_id;
 	/* all VF vsis connect to the same parent */
 	enum i40e_switch_element_types parent_type;
 	struct i40e_virtchnl_version_info vf_ver;
@@ -121,7 +121,7 @@ struct i40e_vf {
 void i40e_free_vfs(struct i40e_pf *pf);
 int i40e_pci_sriov_configure(struct pci_dev *dev, int num_vfs);
 int i40e_alloc_vfs(struct i40e_pf *pf, u16 num_alloc_vfs);
-int i40e_vc_process_vf_msg(struct i40e_pf *pf, u16 vf_id, u32 v_opcode,
+int i40e_vc_process_vf_msg(struct i40e_pf *pf, s16 vf_id, u32 v_opcode,
 			   u32 v_retval, u8 *msg, u16 msglen);
 int i40e_vc_process_vflr_event(struct i40e_pf *pf);
 void i40e_reset_vf(struct i40e_vf *vf, bool flr);
-- 
2.4.3


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

* [Intel-wired-lan] [next PATCH S34 10/12] i40e: Drop extra copy of function
  2016-04-13 10:08 [Intel-wired-lan] [next PATCH S34 00/12] i40e/i40evf updates Harshitha Ramamurthy
                   ` (8 preceding siblings ...)
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 09/12] i40e: Use consistent type for vf_id Harshitha Ramamurthy
@ 2016-04-13 10:08 ` Harshitha Ramamurthy
  2016-04-18 22:50   ` Bowers, AndrewX
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 11/12] i40e: Update device ids for X722 Harshitha Ramamurthy
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 12/12] i40e/i40evf : Bump driver version from 1.5.5 to 1.5.10 Harshitha Ramamurthy
  11 siblings, 1 reply; 24+ messages in thread
From: Harshitha Ramamurthy @ 2016-04-13 10:08 UTC (permalink / raw)
  To: intel-wired-lan

From: Jesse Brandeburg <jesse.brandeburg@intel.com>

i40e_release_rx_desc was in two files, but was only used
and needed in txrx.c.  Get rid of the extra copy.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Change-Id: I86e18239aa03531fc198b6c052847475084a9200
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index a45748e..d6b1b98 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -397,24 +397,6 @@ static void i40e_tx_timeout(struct net_device *netdev)
 }
 
 /**
- * i40e_release_rx_desc - Store the new tail and head values
- * @rx_ring: ring to bump
- * @val: new head index
- **/
-static inline void i40e_release_rx_desc(struct i40e_ring *rx_ring, u32 val)
-{
-	rx_ring->next_to_use = val;
-
-	/* Force memory writes to complete before letting h/w
-	 * know there are new descriptors to fetch.  (Only
-	 * applicable for weak-ordered memory model archs,
-	 * such as IA-64).
-	 */
-	wmb();
-	writel(val, rx_ring->tail);
-}
-
-/**
  * i40e_get_vsi_stats_struct - Get System Network Statistics
  * @vsi: the VSI we care about
  *
-- 
2.4.3


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

* [Intel-wired-lan] [next PATCH S34 11/12] i40e: Update device ids for X722
  2016-04-13 10:08 [Intel-wired-lan] [next PATCH S34 00/12] i40e/i40evf updates Harshitha Ramamurthy
                   ` (9 preceding siblings ...)
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 10/12] i40e: Drop extra copy of function Harshitha Ramamurthy
@ 2016-04-13 10:08 ` Harshitha Ramamurthy
  2016-04-18 22:52   ` Bowers, AndrewX
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 12/12] i40e/i40evf : Bump driver version from 1.5.5 to 1.5.10 Harshitha Ramamurthy
  11 siblings, 1 reply; 24+ messages in thread
From: Harshitha Ramamurthy @ 2016-04-13 10:08 UTC (permalink / raw)
  To: intel-wired-lan

From: Catherine Sullivan <catherine.sullivan@intel.com>

Add a device ID for X722.

Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Change-Id: I574f2345ab341de98a6a1c212d0603af853e48b0
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index d6b1b98..cab639b 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -91,6 +91,7 @@ static const struct pci_device_id i40e_pci_tbl[] = {
 	{PCI_VDEVICE(INTEL, I40E_DEV_ID_1G_BASE_T_X722), 0},
 	{PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_BASE_T_X722), 0},
 	{PCI_VDEVICE(INTEL, I40E_DEV_ID_SFP_I_X722), 0},
+	{PCI_VDEVICE(INTEL, I40E_DEV_ID_QSFP_I_X722), 0},
 	{PCI_VDEVICE(INTEL, I40E_DEV_ID_20G_KR2), 0},
 	{PCI_VDEVICE(INTEL, I40E_DEV_ID_20G_KR2_A), 0},
 	/* required last entry */
-- 
2.4.3


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

* [Intel-wired-lan] [next PATCH S34 12/12] i40e/i40evf : Bump driver version from 1.5.5 to 1.5.10
  2016-04-13 10:08 [Intel-wired-lan] [next PATCH S34 00/12] i40e/i40evf updates Harshitha Ramamurthy
                   ` (10 preceding siblings ...)
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 11/12] i40e: Update device ids for X722 Harshitha Ramamurthy
@ 2016-04-13 10:08 ` Harshitha Ramamurthy
  2016-04-18 22:53   ` Bowers, AndrewX
  11 siblings, 1 reply; 24+ messages in thread
From: Harshitha Ramamurthy @ 2016-04-13 10:08 UTC (permalink / raw)
  To: intel-wired-lan

---
 drivers/net/ethernet/intel/i40e/i40e_main.c     | 2 +-
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index cab639b..19a2d30 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -46,7 +46,7 @@ static const char i40e_driver_string[] =
 
 #define DRV_VERSION_MAJOR 1
 #define DRV_VERSION_MINOR 5
-#define DRV_VERSION_BUILD 5
+#define DRV_VERSION_BUILD 10
 #define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \
 	     __stringify(DRV_VERSION_MINOR) "." \
 	     __stringify(DRV_VERSION_BUILD)    DRV_KERN
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index d1c4afd..b9b1dd8 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -38,7 +38,7 @@ static const char i40evf_driver_string[] =
 
 #define DRV_VERSION_MAJOR 1
 #define DRV_VERSION_MINOR 5
-#define DRV_VERSION_BUILD 5
+#define DRV_VERSION_BUILD 10
 #define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \
 	     __stringify(DRV_VERSION_MINOR) "." \
 	     __stringify(DRV_VERSION_BUILD) \
-- 
2.4.3


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

* [Intel-wired-lan] [next PATCH S34 02/12] i40e: Limit the number of mac and vlan addresses that can be added for VFs
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 02/12] i40e: Limit the number of mac and vlan addresses that can be added for VFs Harshitha Ramamurthy
@ 2016-04-18 19:03   ` Bowers, AndrewX
  0 siblings, 0 replies; 24+ messages in thread
From: Bowers, AndrewX @ 2016-04-18 19:03 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Harshitha Ramamurthy
> Sent: Wednesday, April 13, 2016 3:08 AM
> To: intel-wired-lan at osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S34 02/12] i40e: Limit the number of
> mac and vlan addresses that can be added for VFs
> 
> From: Anjali Singhai Jain <anjali.singhai@intel.com>
> 
> If the VF is privileged/trusted it can do as it may please including but not
> limited to hogging resources and playing unfair.
> But if the VF is not privileged/trusted it still can add some number
> (8) of MAC and VLAN addresses.
> Other restrictions with respect to Port VLAN and normal VLAN still apply to
> not privileged/trusted VF.
> 
> Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
> Change-Id: I3a9529201b184c8873e1ad2e300aff468c9e6296
> ---
> Testing Hints :
> With this a non trusted VF can add up to 8 mac addresses and up to
> (8) vlan addresses if not under port vlan.
> 
>  drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 25
> ++++++++++++++++++++--
> drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h |  3 +++
>  2 files changed, 26 insertions(+), 2 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Untrusted VF successfully limits number of addresses

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

* [Intel-wired-lan] [next PATCH S34 03/12] i40e: Prevent falling to promiscuous if the VF is not trusted
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 03/12] i40e: Prevent falling to promiscuous if the VF is not trusted Harshitha Ramamurthy
@ 2016-04-18 19:06   ` Bowers, AndrewX
  0 siblings, 0 replies; 24+ messages in thread
From: Bowers, AndrewX @ 2016-04-18 19:06 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Harshitha Ramamurthy
> Sent: Wednesday, April 13, 2016 3:08 AM
> To: intel-wired-lan at osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S34 03/12] i40e: Prevent falling to
> promiscuous if the VF is not trusted
> 
> From: Anjali Singhai Jain <anjali.singhai@intel.com>
> 
> With this change a non trusted VF can never fall to promiscuous mode when
> there is no room for a mac/vlan filter.
> 
> Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
> Change-Id: I8a155aa25c0bcdc6093414920c9ade4ee0bd20e8
> ---
> Testing Hints :
> Try adding mac/vlan filters to multiple VFs and make sure they can no longer
> go into promiscuous mode if the VFs are not trusted.
> 
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 6 ++++++
>  1 file changed, 6 insertions(+)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
untrusted VFs won't trigger promiscuous mode

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

* [Intel-wired-lan] [next PATCH S34 05/12] i40e: Flow-based side-band filter count and its use for input set change
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 05/12] i40e: Flow-based side-band filter count and its use for input set change Harshitha Ramamurthy
@ 2016-04-18 19:43   ` Bowers, AndrewX
  0 siblings, 0 replies; 24+ messages in thread
From: Bowers, AndrewX @ 2016-04-18 19:43 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Harshitha Ramamurthy
> Sent: Wednesday, April 13, 2016 3:08 AM
> To: intel-wired-lan at osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S34 05/12] i40e: Flow-based side-band
> filter count and its use for input set change
> 
> From: Kiran Patil <kiran.patil@intel.com>
> 
> This patch keeps track of side-band filters based on flow-type.
> It is used to handle detection of input set mask changes per flow-type.
> 
> Signed-off-by: Kiran Patil <kiran.patil@intel.com>
> Change-Id: I5f308dbd33d3c6ae9f5db301b5989b6089f61dce
> ---
> Testing Hints :
> 	ethtool -N p5p2 flow-type tcp4 src-ip 192.168.0.2 \
> 		 dst-ip 192.168.0.1 action 40
> 	ethtool -N p5p2 flow-type udp4 src-ip 192.168.0.2 \
> 		 dst-ip 192.168.0.1 src-port 1000 action 41 Made sure that,
> able to change input set mask independently based on flow-type.
> 
>  drivers/net/ethernet/intel/i40e/i40e.h         |  9 +++++++++
>  drivers/net/ethernet/intel/i40e/i40e_ethtool.c |  9 +++++++--
>  drivers/net/ethernet/intel/i40e/i40e_txrx.c    | 24
> +++++++++++++++++++++---
>  3 files changed, 37 insertions(+), 5 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Side band filters input set mask can be changed independently based on flow type

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

* [Intel-wired-lan] [next PATCH S34 01/12] i40e: Change the default for VFs to be not privileged
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 01/12] i40e: Change the default for VFs to be not privileged Harshitha Ramamurthy
@ 2016-04-18 21:21   ` Bowers, AndrewX
  0 siblings, 0 replies; 24+ messages in thread
From: Bowers, AndrewX @ 2016-04-18 21:21 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Harshitha Ramamurthy
> Sent: Wednesday, April 13, 2016 3:08 AM
> To: intel-wired-lan at osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S34 01/12] i40e: Change the default
> for VFs to be not privileged
> 
> From: Anjali Singhai Jain <anjali.singhai@intel.com>
> 
> Make sure a VF is not trusted/privileged until its explicitly set for trust
> through the new NDO op interface.
> 
> Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
> Change-Id: I476385c290d2b4901d8fceb29de43546accdc499
> ---
> Testing Hints (Required if no HSD):
> With this now a VF cannot add filters or enable promisc unless trusted.
> 
>  drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 20 ++++++++++---------
> -
>  1 file changed, 10 insertions(+), 10 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
VF not trusted until implicitly set as trusted

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

* [Intel-wired-lan] [next PATCH S34 07/12] i40e: Fix uninitialized variable
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 07/12] i40e: Fix uninitialized variable Harshitha Ramamurthy
@ 2016-04-18 22:01   ` Bowers, AndrewX
  0 siblings, 0 replies; 24+ messages in thread
From: Bowers, AndrewX @ 2016-04-18 22:01 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Harshitha Ramamurthy
> Sent: Wednesday, April 13, 2016 3:08 AM
> To: intel-wired-lan at osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S34 07/12] i40e: Fix uninitialized
> variable
> 
> From: Catherine Sullivan <catherine.sullivan@intel.com>
> 
> We have an uninitialized variable warning for valid_len for one case in
> validate_vf_mesg. To fix this, just initialize it to 0 at the top of the function
> and remove all of the now redundant assignments to 0 in the individual
> cases.
> 
> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
> Change-Id: Iacbd97f4c521ed8d662eef803a598d8707708cfd
> ---
> Testing Hints: Should net no functional change - make sure nothing broke.
> 
>  drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)

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

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

* [Intel-wired-lan] [next PATCH S34 09/12] i40e: Use consistent type for vf_id
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 09/12] i40e: Use consistent type for vf_id Harshitha Ramamurthy
@ 2016-04-18 22:49   ` Bowers, AndrewX
  0 siblings, 0 replies; 24+ messages in thread
From: Bowers, AndrewX @ 2016-04-18 22:49 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Harshitha Ramamurthy
> Sent: Wednesday, April 13, 2016 3:08 AM
> To: intel-wired-lan at osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S34 09/12] i40e: Use consistent type
> for vf_id
> 
> From: Jesse Brandeburg <jesse.brandeburg@intel.com>
> 
> The driver was all over the place using signed or unsigned types for vf_id,
> when it should always be signed.
> 
> This fixes warnings of type unsafe comparisons from gcc with W=2.
> 
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Change-Id: I2cb681f83d0f68ca124d2e4131e4ac0d9f8a6b22
> ---
> Testing Hints : make sure virtchannel (VF) still works to configure MAC
> addresses and such from the VF.

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
VF MAC address configuration, etc, works as expected

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

* [Intel-wired-lan] [next PATCH S34 10/12] i40e: Drop extra copy of function
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 10/12] i40e: Drop extra copy of function Harshitha Ramamurthy
@ 2016-04-18 22:50   ` Bowers, AndrewX
  0 siblings, 0 replies; 24+ messages in thread
From: Bowers, AndrewX @ 2016-04-18 22:50 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Harshitha Ramamurthy
> Sent: Wednesday, April 13, 2016 3:09 AM
> To: intel-wired-lan at osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S34 10/12] i40e: Drop extra copy of
> function
> 
> From: Jesse Brandeburg <jesse.brandeburg@intel.com>
> 
> i40e_release_rx_desc was in two files, but was only used and needed in
> txrx.c.  Get rid of the extra copy.
> 
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Change-Id: I86e18239aa03531fc198b6c052847475084a9200
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 18 ------------------
>  1 file changed, 18 deletions(-)

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

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

* [Intel-wired-lan] [next PATCH S34 11/12] i40e: Update device ids for X722
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 11/12] i40e: Update device ids for X722 Harshitha Ramamurthy
@ 2016-04-18 22:52   ` Bowers, AndrewX
  0 siblings, 0 replies; 24+ messages in thread
From: Bowers, AndrewX @ 2016-04-18 22:52 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Harshitha Ramamurthy
> Sent: Wednesday, April 13, 2016 3:09 AM
> To: intel-wired-lan at osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S34 11/12] i40e: Update device ids for
> X722
> 
> From: Catherine Sullivan <catherine.sullivan@intel.com>
> 
> Add a device ID for X722.
> 
> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
> Change-Id: I574f2345ab341de98a6a1c212d0603af853e48b0
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 1 +
>  1 file changed, 1 insertion(+)

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

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

* [Intel-wired-lan] [next PATCH S34 12/12] i40e/i40evf : Bump driver version from 1.5.5 to 1.5.10
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 12/12] i40e/i40evf : Bump driver version from 1.5.5 to 1.5.10 Harshitha Ramamurthy
@ 2016-04-18 22:53   ` Bowers, AndrewX
  0 siblings, 0 replies; 24+ messages in thread
From: Bowers, AndrewX @ 2016-04-18 22:53 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Harshitha Ramamurthy
> Sent: Wednesday, April 13, 2016 3:09 AM
> To: intel-wired-lan at osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S34 12/12] i40e/i40evf : Bump driver
> version from 1.5.5 to 1.5.10
> 
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c     | 2 +-
>  drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Driver reports correct version

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

* [Intel-wired-lan] [next PATCH S34 06/12] i40evf: RSS Hash Option parameters
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 06/12] i40evf: RSS Hash Option parameters Harshitha Ramamurthy
@ 2016-04-27 22:19   ` Bowers, AndrewX
  0 siblings, 0 replies; 24+ messages in thread
From: Bowers, AndrewX @ 2016-04-27 22:19 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Harshitha Ramamurthy
> Sent: Wednesday, April 13, 2016 3:08 AM
> To: intel-wired-lan at osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S34 06/12] i40evf: RSS Hash Option
> parameters
> 
> From: Carolyn Wyborny <carolyn.wyborny@intel.com>
> 
> This patch syncs the VF code for the changes made to the PF for the RSS hash
> tuple settings.
> Since the VF still cannot change the RSS hash settings, change the code to
> make this clear to the user.
> Previously, the default settings were returned in this function. However, the
> default can be chnaged by the PF so this does not make sense anymore.
> 
> Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
> Change-Id: I085eaf005fc7978b440d2a1bf2b2dd7cadaff39b
> ---
> Testing Hints : Make sure any attempts to change rx-flow-hash via ethtool
> returns Not Supported and a message in the dmesg log that informs user to
> use pf for these settings instead.
> 
>  drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c | 201 +--------------------
>  1 file changed, 2 insertions(+), 199 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Changes work as expected

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

* [Intel-wired-lan] [next PATCH S34 04/12] i40e: Remove HMC AQ API implementation
  2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 04/12] i40e: Remove HMC AQ API implementation Harshitha Ramamurthy
@ 2016-04-28 15:34   ` Bowers, AndrewX
  0 siblings, 0 replies; 24+ messages in thread
From: Bowers, AndrewX @ 2016-04-28 15:34 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Harshitha Ramamurthy
> Sent: Wednesday, April 13, 2016 3:08 AM
> To: intel-wired-lan at osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S34 04/12] i40e: Remove HMC AQ API
> implementation
> 
> From: Neerav Parikh <neerav.parikh@intel.com>
> 
> Remove the code that implements the HMC AQ APIs and call these APIs.
> This is done because these are obsolete APIs and are not supported by
> firmware.
> 
> Signed-off-by: Neerav Parikh <neerav.parikh@intel.com>
> Change-ID: I5d771d8f37c3e16e7b0a972ff9b27e75aa2d05d4
> ---
>  drivers/net/ethernet/intel/i40e/i40e_adminq.c      |  4 ---
>  drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h  | 25 ------------------
>  drivers/net/ethernet/intel/i40e/i40e_common.c      | 30 ----------------------
>  drivers/net/ethernet/intel/i40e/i40e_prototype.h   |  4 ---
>  .../net/ethernet/intel/i40evf/i40e_adminq_cmd.h    | 25 ------------------
>  5 files changed, 88 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
HMC code gone from admin queue, code compiles correctly

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

end of thread, other threads:[~2016-04-28 15:34 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-13 10:08 [Intel-wired-lan] [next PATCH S34 00/12] i40e/i40evf updates Harshitha Ramamurthy
2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 01/12] i40e: Change the default for VFs to be not privileged Harshitha Ramamurthy
2016-04-18 21:21   ` Bowers, AndrewX
2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 02/12] i40e: Limit the number of mac and vlan addresses that can be added for VFs Harshitha Ramamurthy
2016-04-18 19:03   ` Bowers, AndrewX
2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 03/12] i40e: Prevent falling to promiscuous if the VF is not trusted Harshitha Ramamurthy
2016-04-18 19:06   ` Bowers, AndrewX
2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 04/12] i40e: Remove HMC AQ API implementation Harshitha Ramamurthy
2016-04-28 15:34   ` Bowers, AndrewX
2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 05/12] i40e: Flow-based side-band filter count and its use for input set change Harshitha Ramamurthy
2016-04-18 19:43   ` Bowers, AndrewX
2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 06/12] i40evf: RSS Hash Option parameters Harshitha Ramamurthy
2016-04-27 22:19   ` Bowers, AndrewX
2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 07/12] i40e: Fix uninitialized variable Harshitha Ramamurthy
2016-04-18 22:01   ` Bowers, AndrewX
2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 08/12] i40e: ptp - avoid aggregate return warnings Harshitha Ramamurthy
2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 09/12] i40e: Use consistent type for vf_id Harshitha Ramamurthy
2016-04-18 22:49   ` Bowers, AndrewX
2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 10/12] i40e: Drop extra copy of function Harshitha Ramamurthy
2016-04-18 22:50   ` Bowers, AndrewX
2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 11/12] i40e: Update device ids for X722 Harshitha Ramamurthy
2016-04-18 22:52   ` Bowers, AndrewX
2016-04-13 10:08 ` [Intel-wired-lan] [next PATCH S34 12/12] i40e/i40evf : Bump driver version from 1.5.5 to 1.5.10 Harshitha Ramamurthy
2016-04-18 22:53   ` 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.