All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [next PATCH S41 0/5] i40e/i40evf updates
@ 2016-08-03 17:20 Bimmy Pujari
  2016-08-03 17:20 ` [Intel-wired-lan] [next PATCH S41 1/5] i40e: use alloc_workqueue instead of create_singlethread_workqueue Bimmy Pujari
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Bimmy Pujari @ 2016-08-03 17:20 UTC (permalink / raw)
  To: intel-wired-lan

Carolyn Wyborny adds code to refactor tail_bump, adds support for HMC 
 resource and profile for X722 & adds support for ARP NS in X722.

Jacob Keller adds code to use alloc_workqueue instead of 
create_singlethread_workqueue.

Mitch Williams adds code to report link speed.

 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h  | 61 ++++++++++++++++------
 drivers/net/ethernet/intel/i40e/i40e_main.c        |  3 +-
 drivers/net/ethernet/intel/i40e/i40e_txrx.c        |  6 +--
 .../net/ethernet/intel/i40evf/i40e_adminq_cmd.h    | 61 ++++++++++++++++------
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c      |  6 +--
 drivers/net/ethernet/intel/i40evf/i40evf.h         |  1 +
 drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c | 26 +++++++--
 drivers/net/ethernet/intel/i40evf/i40evf_main.c    |  3 +-
 .../net/ethernet/intel/i40evf/i40evf_virtchnl.c    | 55 +++++++++++++++----
 9 files changed, 166 insertions(+), 56 deletions(-)

-- 
2.4.11


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

* [Intel-wired-lan] [next PATCH S41 1/5] i40e: use alloc_workqueue instead of create_singlethread_workqueue
  2016-08-03 17:20 [Intel-wired-lan] [next PATCH S41 0/5] i40e/i40evf updates Bimmy Pujari
@ 2016-08-03 17:20 ` Bimmy Pujari
  2016-08-03 17:20 ` [Intel-wired-lan] [next PATCH S41 2/5] i40evf: report link speed Bimmy Pujari
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 16+ messages in thread
From: Bimmy Pujari @ 2016-08-03 17:20 UTC (permalink / raw)
  To: intel-wired-lan

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

Replace calls to create_singlethread_workqueue instead with alloc_workqueue
as is style with other Intel drivers. This provides more control over
workqueue creation, and allows explicit setting of the desired mode of
operation. It also makes it more obvious that driver name constant is
passed to a format "%s".

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Change-ID: I6192b44caf5140336cd54c5b350d51c73b541fdb
---
 drivers/net/ethernet/intel/i40e/i40e_main.c     | 3 ++-
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 1c5a4c0..b83070f 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -11577,7 +11577,8 @@ static int __init i40e_init_module(void)
 	 * it can't be any worse than using the system workqueue which
 	 * was already single threaded
 	 */
-	i40e_wq = create_singlethread_workqueue(i40e_driver_name);
+	i40e_wq = alloc_workqueue("%s", WQ_UNBOUND | WQ_MEM_RECLAIM, 1,
+				  i40e_driver_name);
 	if (!i40e_wq) {
 		pr_err("%s: Failed to create workqueue\n", i40e_driver_name);
 		return -ENOMEM;
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index fd4a47b..bef688f 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -2833,7 +2833,8 @@ static int __init i40evf_init_module(void)
 
 	pr_info("%s\n", i40evf_copyright);
 
-	i40evf_wq = create_singlethread_workqueue(i40evf_driver_name);
+	i40evf_wq = alloc_workqueue("%s", WQ_UNBOUND | WQ_MEM_RECLAIM, 1,
+				    i40evf_driver_name);
 	if (!i40evf_wq) {
 		pr_err("%s: Failed to create workqueue\n", i40evf_driver_name);
 		return -ENOMEM;
-- 
2.4.11


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

* [Intel-wired-lan] [next PATCH S41 2/5] i40evf: report link speed
  2016-08-03 17:20 [Intel-wired-lan] [next PATCH S41 0/5] i40e/i40evf updates Bimmy Pujari
  2016-08-03 17:20 ` [Intel-wired-lan] [next PATCH S41 1/5] i40e: use alloc_workqueue instead of create_singlethread_workqueue Bimmy Pujari
@ 2016-08-03 17:20 ` Bimmy Pujari
  2016-08-03 17:20 ` [Intel-wired-lan] [next PATCH S41 3/5] i40e: Add support for HMC resource and profile for X722 Bimmy Pujari
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 16+ messages in thread
From: Bimmy Pujari @ 2016-08-03 17:20 UTC (permalink / raw)
  To: intel-wired-lan

From: Mitch Williams <mitch.a.williams@intel.com>

The PF driver tells us the link speed, so do something with that
information. Add link speed to log messages, and report speed through
ethtool.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Change-Id: I279dc9540cc5203376406050a3e8d67e128d5882
---
Testing Hints : Test reporting of link up/down and
various speeds.

 drivers/net/ethernet/intel/i40evf/i40evf.h         |  1 +
 drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c | 26 ++++++++--
 .../net/ethernet/intel/i40evf/i40evf_virtchnl.c    | 55 ++++++++++++++++++----
 3 files changed, 70 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf.h b/drivers/net/ethernet/intel/i40evf/i40evf.h
index 2ef12a0..be1ca4c 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf.h
+++ b/drivers/net/ethernet/intel/i40evf/i40evf.h
@@ -251,6 +251,7 @@ struct i40evf_adapter {
 	struct work_struct watchdog_task;
 	bool netdev_registered;
 	bool link_up;
+	enum i40e_aq_link_speed link_speed;
 	enum i40e_virtchnl_ops current_op;
 #define CLIENT_ENABLED(_a) ((_a)->vf_res ? \
 			    (_a)->vf_res->vf_offload_flags & \
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c b/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c
index c6bd659..daae492 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c
@@ -74,13 +74,33 @@ static const struct i40evf_stats i40evf_gstrings_stats[] = {
 static int i40evf_get_settings(struct net_device *netdev,
 			       struct ethtool_cmd *ecmd)
 {
-	/* In the future the VF will be able to query the PF for
-	 * some information - for now use a dummy value
-	 */
+	struct i40evf_adapter *adapter = netdev_priv(netdev);
+
 	ecmd->supported = 0;
 	ecmd->autoneg = AUTONEG_DISABLE;
 	ecmd->transceiver = XCVR_DUMMY1;
 	ecmd->port = PORT_NONE;
+	/* Set speed and duplex */
+	switch (adapter->link_speed) {
+	case I40E_LINK_SPEED_40GB:
+		ethtool_cmd_speed_set(ecmd, SPEED_40000);
+		break;
+	case I40E_LINK_SPEED_20GB:
+		ethtool_cmd_speed_set(ecmd, SPEED_20000);
+		break;
+	case I40E_LINK_SPEED_10GB:
+		ethtool_cmd_speed_set(ecmd, SPEED_10000);
+		break;
+	case I40E_LINK_SPEED_1GB:
+		ethtool_cmd_speed_set(ecmd, SPEED_1000);
+		break;
+	case I40E_LINK_SPEED_100MB:
+		ethtool_cmd_speed_set(ecmd, SPEED_100);
+		break;
+	default:
+		break;
+	}
+	ecmd->duplex = DUPLEX_FULL;
 
 	return 0;
 }
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
index d76c221..cc6cb30 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
@@ -817,6 +817,45 @@ void i40evf_set_rss_lut(struct i40evf_adapter *adapter)
 }
 
 /**
+ * i40evf_print_link_message - print link up or down
+ * @adapter: adapter structure
+ *
+ * Log a message telling the world of our wonderous link status
+ */
+static void i40evf_print_link_message(struct i40evf_adapter *adapter)
+{
+	struct net_device *netdev = adapter->netdev;
+	char *speed = "Unknown ";
+
+	if (!adapter->link_up) {
+		netdev_info(netdev, "NIC Link is Down\n");
+		return;
+	}
+
+	switch (adapter->link_speed) {
+	case I40E_LINK_SPEED_40GB:
+		speed = "40 G";
+		break;
+	case I40E_LINK_SPEED_20GB:
+		speed = "20 G";
+		break;
+	case I40E_LINK_SPEED_10GB:
+		speed = "10 G";
+		break;
+	case I40E_LINK_SPEED_1GB:
+		speed = "1000 M";
+		break;
+	case I40E_LINK_SPEED_100MB:
+		speed = "100 M";
+		break;
+	default:
+		break;
+	}
+
+	netdev_info(netdev, "NIC Link is Up %sbps Full Duplex\n", speed);
+}
+
+/**
  * i40evf_request_reset
  * @adapter: adapter structure
  *
@@ -853,15 +892,13 @@ void i40evf_virtchnl_completion(struct i40evf_adapter *adapter,
 			(struct i40e_virtchnl_pf_event *)msg;
 		switch (vpe->event) {
 		case I40E_VIRTCHNL_EVENT_LINK_CHANGE:
-			adapter->link_up =
-				vpe->event_data.link_event.link_status;
-			if (adapter->link_up && !netif_carrier_ok(netdev)) {
-				dev_info(&adapter->pdev->dev, "NIC Link is Up\n");
-				netif_carrier_on(netdev);
-				netif_tx_wake_all_queues(netdev);
-			} else if (!adapter->link_up) {
-				dev_info(&adapter->pdev->dev, "NIC Link is Down\n");
-				netif_carrier_off(netdev);
+			adapter->link_speed =
+				vpe->event_data.link_event.link_speed;
+			if (adapter->link_up !=
+			    vpe->event_data.link_event.link_status) {
+				adapter->link_up =
+					vpe->event_data.link_event.link_status;
+				i40evf_print_link_message(adapter);
 				netif_tx_stop_all_queues(netdev);
 			}
 			break;
-- 
2.4.11


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

* [Intel-wired-lan] [next PATCH S41 3/5] i40e: Add support for HMC resource and profile for X722
  2016-08-03 17:20 [Intel-wired-lan] [next PATCH S41 0/5] i40e/i40evf updates Bimmy Pujari
  2016-08-03 17:20 ` [Intel-wired-lan] [next PATCH S41 1/5] i40e: use alloc_workqueue instead of create_singlethread_workqueue Bimmy Pujari
  2016-08-03 17:20 ` [Intel-wired-lan] [next PATCH S41 2/5] i40evf: report link speed Bimmy Pujari
@ 2016-08-03 17:20 ` Bimmy Pujari
  2016-08-03 18:10   ` Shannon Nelson
  2016-08-03 17:20 ` [Intel-wired-lan] [next PATCH S41 4/5] i40e: Add support for ARP NS in X722 Bimmy Pujari
  2016-08-03 17:20 ` [Intel-wired-lan] [next PATCH S41 5/5] i40e: refactor tail_bump check Bimmy Pujari
  4 siblings, 1 reply; 16+ messages in thread
From: Bimmy Pujari @ 2016-08-03 17:20 UTC (permalink / raw)
  To: intel-wired-lan

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

This patch adds support for HMC resource and profile cmds for X722
firmware. 

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Change-ID: Icc332101f38ab15d1bfa167823100eb4f6822f7e
---
 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h  | 23 ++++++++++++++++++++++
 .../net/ethernet/intel/i40evf/i40e_adminq_cmd.h    | 23 ++++++++++++++++++++++
 2 files changed, 46 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
index 11cf1a5..aabacc3 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
@@ -204,6 +204,11 @@ enum i40e_admin_queue_opc {
 	i40e_aqc_opc_suspend_port_tx				= 0x041B,
 	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*/
 
 	/* phy commands*/
 	i40e_aqc_opc_get_phy_abilities		= 0x0600,
@@ -1582,6 +1587,24 @@ 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,
+};
+
 /* 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/i40evf/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
index 3114dcf..c07e3a3 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
@@ -204,6 +204,11 @@ enum i40e_admin_queue_opc {
 	i40e_aqc_opc_suspend_port_tx				= 0x041B,
 	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*/
 
 	/* phy commands*/
 	i40e_aqc_opc_get_phy_abilities		= 0x0600,
@@ -1579,6 +1584,24 @@ 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,
+};
+
 /* Get PHY Abilities (indirect 0x0600) uses the generic indirect struct */
 
 /* set in param0 for get phy abilities to report qualified modules */
-- 
2.4.11


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

* [Intel-wired-lan] [next PATCH S41 4/5] i40e: Add support for ARP NS in X722
  2016-08-03 17:20 [Intel-wired-lan] [next PATCH S41 0/5] i40e/i40evf updates Bimmy Pujari
                   ` (2 preceding siblings ...)
  2016-08-03 17:20 ` [Intel-wired-lan] [next PATCH S41 3/5] i40e: Add support for HMC resource and profile for X722 Bimmy Pujari
@ 2016-08-03 17:20 ` Bimmy Pujari
  2016-08-03 18:12   ` Shannon Nelson
  2016-08-03 17:20 ` [Intel-wired-lan] [next PATCH S41 5/5] i40e: refactor tail_bump check Bimmy Pujari
  4 siblings, 1 reply; 16+ messages in thread
From: Bimmy Pujari @ 2016-08-03 17:20 UTC (permalink / raw)
  To: intel-wired-lan

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

This patch adds support and interface for supporting ARP NS
proxy offload in firmware for X722.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Change-ID: Ic7489fbcbe2195df7be62ff5e359201b827cefe6
---
 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h  | 38 ++++++++++++----------
 .../net/ethernet/intel/i40evf/i40e_adminq_cmd.h    | 38 ++++++++++++----------
 2 files changed, 42 insertions(+), 34 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
index aabacc3..736c3ab 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
@@ -455,13 +455,15 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_cppm_configuration);
 /* Set ARP Proxy command / response (indirect 0x0104) */
 struct i40e_aqc_arp_proxy_data {
 	__le16	command_flags;
-#define I40E_AQ_ARP_INIT_IPV4	0x0008
-#define I40E_AQ_ARP_UNSUP_CTL	0x0010
-#define I40E_AQ_ARP_ENA		0x0020
-#define I40E_AQ_ARP_ADD_IPV4	0x0040
-#define I40E_AQ_ARP_DEL_IPV4	0x0080
+#define I40E_AQ_ARP_INIT_IPV4	0x0800
+#define I40E_AQ_ARP_UNSUP_CTL	0x1000
+#define I40E_AQ_ARP_ENA		0x2000
+#define I40E_AQ_ARP_ADD_IPV4	0x4000
+#define I40E_AQ_ARP_DEL_IPV4	0x8000
 	__le16	table_id;
-	__le32	pfpm_proxyfc;
+	__le32	enabled_offloads;
+#define I40E_AQ_ARP_DIRECTED_OFFLOAD_ENABLE	0x00000020
+#define I40E_AQ_ARP_OFFLOAD_ENABLE		0x00000800
 	__le32	ip_addr;
 	u8	mac_addr[6];
 	u8	reserved[2];
@@ -476,17 +478,19 @@ struct i40e_aqc_ns_proxy_data {
 	__le16	table_idx_ipv6_0;
 	__le16	table_idx_ipv6_1;
 	__le16	control;
-#define I40E_AQ_NS_PROXY_ADD_0		0x0100
-#define I40E_AQ_NS_PROXY_DEL_0		0x0200
-#define I40E_AQ_NS_PROXY_ADD_1		0x0400
-#define I40E_AQ_NS_PROXY_DEL_1		0x0800
-#define I40E_AQ_NS_PROXY_ADD_IPV6_0	0x1000
-#define I40E_AQ_NS_PROXY_DEL_IPV6_0	0x2000
-#define I40E_AQ_NS_PROXY_ADD_IPV6_1	0x4000
-#define I40E_AQ_NS_PROXY_DEL_IPV6_1	0x8000
-#define I40E_AQ_NS_PROXY_COMMAND_SEQ	0x0001
-#define I40E_AQ_NS_PROXY_INIT_IPV6_TBL	0x0002
-#define I40E_AQ_NS_PROXY_INIT_MAC_TBL	0x0004
+#define I40E_AQ_NS_PROXY_ADD_0		0x0001
+#define I40E_AQ_NS_PROXY_DEL_0		0x0002
+#define I40E_AQ_NS_PROXY_ADD_1		0x0004
+#define I40E_AQ_NS_PROXY_DEL_1		0x0008
+#define I40E_AQ_NS_PROXY_ADD_IPV6_0	0x0010
+#define I40E_AQ_NS_PROXY_DEL_IPV6_0	0x0020
+#define I40E_AQ_NS_PROXY_ADD_IPV6_1	0x0040
+#define I40E_AQ_NS_PROXY_DEL_IPV6_1	0x0080
+#define I40E_AQ_NS_PROXY_COMMAND_SEQ	0x0100
+#define I40E_AQ_NS_PROXY_INIT_IPV6_TBL	0x0200
+#define I40E_AQ_NS_PROXY_INIT_MAC_TBL	0x0400
+#define I40E_AQ_NS_PROXY_OFFLOAD_ENABLE	0x0800
+#define I40E_AQ_NS_PROXY_DIRECTED_OFFLOAD_ENABLE	0x1000
 	u8	mac_addr_0[6];
 	u8	mac_addr_1[6];
 	u8	local_mac_addr[6];
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
index c07e3a3..0c099df 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
@@ -452,13 +452,15 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_cppm_configuration);
 /* Set ARP Proxy command / response (indirect 0x0104) */
 struct i40e_aqc_arp_proxy_data {
 	__le16	command_flags;
-#define I40E_AQ_ARP_INIT_IPV4	0x0008
-#define I40E_AQ_ARP_UNSUP_CTL	0x0010
-#define I40E_AQ_ARP_ENA		0x0020
-#define I40E_AQ_ARP_ADD_IPV4	0x0040
-#define I40E_AQ_ARP_DEL_IPV4	0x0080
+#define I40E_AQ_ARP_INIT_IPV4	0x0800
+#define I40E_AQ_ARP_UNSUP_CTL	0x1000
+#define I40E_AQ_ARP_ENA		0x2000
+#define I40E_AQ_ARP_ADD_IPV4	0x4000
+#define I40E_AQ_ARP_DEL_IPV4	0x8000
 	__le16	table_id;
-	__le32	pfpm_proxyfc;
+	__le32	enabled_offloads;
+#define I40E_AQ_ARP_DIRECTED_OFFLOAD_ENABLE	0x00000020
+#define I40E_AQ_ARP_OFFLOAD_ENABLE		0x00000800
 	__le32	ip_addr;
 	u8	mac_addr[6];
 	u8	reserved[2];
@@ -473,17 +475,19 @@ struct i40e_aqc_ns_proxy_data {
 	__le16	table_idx_ipv6_0;
 	__le16	table_idx_ipv6_1;
 	__le16	control;
-#define I40E_AQ_NS_PROXY_ADD_0		0x0100
-#define I40E_AQ_NS_PROXY_DEL_0		0x0200
-#define I40E_AQ_NS_PROXY_ADD_1		0x0400
-#define I40E_AQ_NS_PROXY_DEL_1		0x0800
-#define I40E_AQ_NS_PROXY_ADD_IPV6_0	0x1000
-#define I40E_AQ_NS_PROXY_DEL_IPV6_0	0x2000
-#define I40E_AQ_NS_PROXY_ADD_IPV6_1	0x4000
-#define I40E_AQ_NS_PROXY_DEL_IPV6_1	0x8000
-#define I40E_AQ_NS_PROXY_COMMAND_SEQ	0x0001
-#define I40E_AQ_NS_PROXY_INIT_IPV6_TBL	0x0002
-#define I40E_AQ_NS_PROXY_INIT_MAC_TBL	0x0004
+#define I40E_AQ_NS_PROXY_ADD_0		0x0001
+#define I40E_AQ_NS_PROXY_DEL_0		0x0002
+#define I40E_AQ_NS_PROXY_ADD_1		0x0004
+#define I40E_AQ_NS_PROXY_DEL_1		0x0008
+#define I40E_AQ_NS_PROXY_ADD_IPV6_0	0x0010
+#define I40E_AQ_NS_PROXY_DEL_IPV6_0	0x0020
+#define I40E_AQ_NS_PROXY_ADD_IPV6_1	0x0040
+#define I40E_AQ_NS_PROXY_DEL_IPV6_1	0x0080
+#define I40E_AQ_NS_PROXY_COMMAND_SEQ	0x0100
+#define I40E_AQ_NS_PROXY_INIT_IPV6_TBL	0x0200
+#define I40E_AQ_NS_PROXY_INIT_MAC_TBL	0x0400
+#define I40E_AQ_NS_PROXY_OFFLOAD_ENABLE	0x0800
+#define I40E_AQ_NS_PROXY_DIRECTED_OFFLOAD_ENABLE	0x1000
 	u8	mac_addr_0[6];
 	u8	mac_addr_1[6];
 	u8	local_mac_addr[6];
-- 
2.4.11


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

* [Intel-wired-lan] [next PATCH S41 5/5] i40e: refactor tail_bump check
  2016-08-03 17:20 [Intel-wired-lan] [next PATCH S41 0/5] i40e/i40evf updates Bimmy Pujari
                   ` (3 preceding siblings ...)
  2016-08-03 17:20 ` [Intel-wired-lan] [next PATCH S41 4/5] i40e: Add support for ARP NS in X722 Bimmy Pujari
@ 2016-08-03 17:20 ` Bimmy Pujari
  2016-08-03 18:17   ` Wyborny, Carolyn
  2016-08-03 18:18   ` Wyborny, Carolyn
  4 siblings, 2 replies; 16+ messages in thread
From: Bimmy Pujari @ 2016-08-03 17:20 UTC (permalink / raw)
  To: intel-wired-lan

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

This patch fixes usage of variable so that its
not checked for NULL if there's no possiblity of
it being NULL. Without this patch, static analysis
tool complain. This patch fixes the problem by
changing the wrapping of compat code.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Change-ID: Ide0e19171d67d90cb2b06b8dcd4fa791ae120160
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 6 ++----
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 5eb9ff2..266608a 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -2849,10 +2849,9 @@ static inline void i40e_tx_map(struct i40e_ring *tx_ring, struct sk_buff *skb,
 						  I40E_TXD_QW1_CMD_SHIFT);
 
 	/* notify HW of packet */
-	if (!tail_bump)
+	if (!tail_bump) {
 		prefetchw(tx_desc + 1);
-
-	if (tail_bump) {
+	} else {
 		/* Force memory writes to complete before letting h/w
 		 * know there are new descriptors to fetch.  (Only
 		 * applicable for weak-ordered memory model archs,
@@ -2861,7 +2860,6 @@ static inline void i40e_tx_map(struct i40e_ring *tx_ring, struct sk_buff *skb,
 		wmb();
 		writel(i, tx_ring->tail);
 	}
-
 	return;
 
 dma_error:
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
index 5968cc6..f3eb76f 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -2086,10 +2086,9 @@ static inline void i40evf_tx_map(struct i40e_ring *tx_ring, struct sk_buff *skb,
 						  I40E_TXD_QW1_CMD_SHIFT);
 
 	/* notify HW of packet */
-	if (!tail_bump)
+	if (!tail_bump) {
 		prefetchw(tx_desc + 1);
-
-	if (tail_bump) {
+	} else {
 		/* Force memory writes to complete before letting h/w
 		 * know there are new descriptors to fetch.  (Only
 		 * applicable for weak-ordered memory model archs,
@@ -2098,7 +2097,6 @@ static inline void i40evf_tx_map(struct i40e_ring *tx_ring, struct sk_buff *skb,
 		wmb();
 		writel(i, tx_ring->tail);
 	}
-
 	return;
 
 dma_error:
-- 
2.4.11


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

* [Intel-wired-lan] [next PATCH S41 3/5] i40e: Add support for HMC resource and profile for X722
  2016-08-03 17:20 ` [Intel-wired-lan] [next PATCH S41 3/5] i40e: Add support for HMC resource and profile for X722 Bimmy Pujari
@ 2016-08-03 18:10   ` Shannon Nelson
  2016-08-03 18:26     ` Wyborny, Carolyn
  2016-08-04 18:04     ` Wyborny, Carolyn
  0 siblings, 2 replies; 16+ messages in thread
From: Shannon Nelson @ 2016-08-03 18:10 UTC (permalink / raw)
  To: intel-wired-lan



On 08/03/2016 10:20 AM, Bimmy Pujari wrote:
> From: Carolyn Wyborny <carolyn.wyborny@intel.com>
>
> This patch adds support for HMC resource and profile cmds for X722
> firmware.
>
> Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
> Change-ID: Icc332101f38ab15d1bfa167823100eb4f6822f7e
> ---
>   drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h  | 23 ++++++++++++++++++++++
>   .../net/ethernet/intel/i40evf/i40e_adminq_cmd.h    | 23 ++++++++++++++++++++++
>   2 files changed, 46 insertions(+)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
> index 11cf1a5..aabacc3 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
> +++ b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
> @@ -204,6 +204,11 @@ enum i40e_admin_queue_opc {
>   	i40e_aqc_opc_suspend_port_tx				= 0x041B,
>   	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,

Hmmm - I see these already in the 4.5 kernel source I have lying around, 
are you sure you need this patch?

> +
> +	/* phy commands*/

This comment is already here

>   
>   	/* phy commands*/
>   	i40e_aqc_opc_get_phy_abilities		= 0x0600,
> @@ -1582,6 +1587,24 @@ 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,
> +};
> +

Yep, these are already there as well.

sln

>   /* 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/i40evf/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
> index 3114dcf..c07e3a3 100644
> --- a/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
> +++ b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
> @@ -204,6 +204,11 @@ enum i40e_admin_queue_opc {
>   	i40e_aqc_opc_suspend_port_tx				= 0x041B,
>   	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*/
>   
>   	/* phy commands*/
>   	i40e_aqc_opc_get_phy_abilities		= 0x0600,
> @@ -1579,6 +1584,24 @@ 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,
> +};
> +
>   /* Get PHY Abilities (indirect 0x0600) uses the generic indirect struct */
>   
>   /* set in param0 for get phy abilities to report qualified modules */


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

* [Intel-wired-lan] [next PATCH S41 4/5] i40e: Add support for ARP NS in X722
  2016-08-03 17:20 ` [Intel-wired-lan] [next PATCH S41 4/5] i40e: Add support for ARP NS in X722 Bimmy Pujari
@ 2016-08-03 18:12   ` Shannon Nelson
  2016-08-03 20:09     ` Wyborny, Carolyn
  0 siblings, 1 reply; 16+ messages in thread
From: Shannon Nelson @ 2016-08-03 18:12 UTC (permalink / raw)
  To: intel-wired-lan



On 08/03/2016 10:20 AM, Bimmy Pujari wrote:
> From: Carolyn Wyborny <carolyn.wyborny@intel.com>
>
> This patch adds support and interface for supporting ARP NS
> proxy offload in firmware for X722.

This looks like it fixes a byte order issue rather than adding new support.
sln

>
> Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
> Change-ID: Ic7489fbcbe2195df7be62ff5e359201b827cefe6
> ---
>   drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h  | 38 ++++++++++++----------
>   .../net/ethernet/intel/i40evf/i40e_adminq_cmd.h    | 38 ++++++++++++----------
>   2 files changed, 42 insertions(+), 34 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
> index aabacc3..736c3ab 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
> +++ b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
> @@ -455,13 +455,15 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_cppm_configuration);
>   /* Set ARP Proxy command / response (indirect 0x0104) */
>   struct i40e_aqc_arp_proxy_data {
>   	__le16	command_flags;
> -#define I40E_AQ_ARP_INIT_IPV4	0x0008
> -#define I40E_AQ_ARP_UNSUP_CTL	0x0010
> -#define I40E_AQ_ARP_ENA		0x0020
> -#define I40E_AQ_ARP_ADD_IPV4	0x0040
> -#define I40E_AQ_ARP_DEL_IPV4	0x0080
> +#define I40E_AQ_ARP_INIT_IPV4	0x0800
> +#define I40E_AQ_ARP_UNSUP_CTL	0x1000
> +#define I40E_AQ_ARP_ENA		0x2000
> +#define I40E_AQ_ARP_ADD_IPV4	0x4000
> +#define I40E_AQ_ARP_DEL_IPV4	0x8000
>   	__le16	table_id;
> -	__le32	pfpm_proxyfc;
> +	__le32	enabled_offloads;
> +#define I40E_AQ_ARP_DIRECTED_OFFLOAD_ENABLE	0x00000020
> +#define I40E_AQ_ARP_OFFLOAD_ENABLE		0x00000800
>   	__le32	ip_addr;
>   	u8	mac_addr[6];
>   	u8	reserved[2];
> @@ -476,17 +478,19 @@ struct i40e_aqc_ns_proxy_data {
>   	__le16	table_idx_ipv6_0;
>   	__le16	table_idx_ipv6_1;
>   	__le16	control;
> -#define I40E_AQ_NS_PROXY_ADD_0		0x0100
> -#define I40E_AQ_NS_PROXY_DEL_0		0x0200
> -#define I40E_AQ_NS_PROXY_ADD_1		0x0400
> -#define I40E_AQ_NS_PROXY_DEL_1		0x0800
> -#define I40E_AQ_NS_PROXY_ADD_IPV6_0	0x1000
> -#define I40E_AQ_NS_PROXY_DEL_IPV6_0	0x2000
> -#define I40E_AQ_NS_PROXY_ADD_IPV6_1	0x4000
> -#define I40E_AQ_NS_PROXY_DEL_IPV6_1	0x8000
> -#define I40E_AQ_NS_PROXY_COMMAND_SEQ	0x0001
> -#define I40E_AQ_NS_PROXY_INIT_IPV6_TBL	0x0002
> -#define I40E_AQ_NS_PROXY_INIT_MAC_TBL	0x0004
> +#define I40E_AQ_NS_PROXY_ADD_0		0x0001
> +#define I40E_AQ_NS_PROXY_DEL_0		0x0002
> +#define I40E_AQ_NS_PROXY_ADD_1		0x0004
> +#define I40E_AQ_NS_PROXY_DEL_1		0x0008
> +#define I40E_AQ_NS_PROXY_ADD_IPV6_0	0x0010
> +#define I40E_AQ_NS_PROXY_DEL_IPV6_0	0x0020
> +#define I40E_AQ_NS_PROXY_ADD_IPV6_1	0x0040
> +#define I40E_AQ_NS_PROXY_DEL_IPV6_1	0x0080
> +#define I40E_AQ_NS_PROXY_COMMAND_SEQ	0x0100
> +#define I40E_AQ_NS_PROXY_INIT_IPV6_TBL	0x0200
> +#define I40E_AQ_NS_PROXY_INIT_MAC_TBL	0x0400
> +#define I40E_AQ_NS_PROXY_OFFLOAD_ENABLE	0x0800
> +#define I40E_AQ_NS_PROXY_DIRECTED_OFFLOAD_ENABLE	0x1000
>   	u8	mac_addr_0[6];
>   	u8	mac_addr_1[6];
>   	u8	local_mac_addr[6];
> diff --git a/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
> index c07e3a3..0c099df 100644
> --- a/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
> +++ b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
> @@ -452,13 +452,15 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_cppm_configuration);
>   /* Set ARP Proxy command / response (indirect 0x0104) */
>   struct i40e_aqc_arp_proxy_data {
>   	__le16	command_flags;
> -#define I40E_AQ_ARP_INIT_IPV4	0x0008
> -#define I40E_AQ_ARP_UNSUP_CTL	0x0010
> -#define I40E_AQ_ARP_ENA		0x0020
> -#define I40E_AQ_ARP_ADD_IPV4	0x0040
> -#define I40E_AQ_ARP_DEL_IPV4	0x0080
> +#define I40E_AQ_ARP_INIT_IPV4	0x0800
> +#define I40E_AQ_ARP_UNSUP_CTL	0x1000
> +#define I40E_AQ_ARP_ENA		0x2000
> +#define I40E_AQ_ARP_ADD_IPV4	0x4000
> +#define I40E_AQ_ARP_DEL_IPV4	0x8000
>   	__le16	table_id;
> -	__le32	pfpm_proxyfc;
> +	__le32	enabled_offloads;
> +#define I40E_AQ_ARP_DIRECTED_OFFLOAD_ENABLE	0x00000020
> +#define I40E_AQ_ARP_OFFLOAD_ENABLE		0x00000800
>   	__le32	ip_addr;
>   	u8	mac_addr[6];
>   	u8	reserved[2];
> @@ -473,17 +475,19 @@ struct i40e_aqc_ns_proxy_data {
>   	__le16	table_idx_ipv6_0;
>   	__le16	table_idx_ipv6_1;
>   	__le16	control;
> -#define I40E_AQ_NS_PROXY_ADD_0		0x0100
> -#define I40E_AQ_NS_PROXY_DEL_0		0x0200
> -#define I40E_AQ_NS_PROXY_ADD_1		0x0400
> -#define I40E_AQ_NS_PROXY_DEL_1		0x0800
> -#define I40E_AQ_NS_PROXY_ADD_IPV6_0	0x1000
> -#define I40E_AQ_NS_PROXY_DEL_IPV6_0	0x2000
> -#define I40E_AQ_NS_PROXY_ADD_IPV6_1	0x4000
> -#define I40E_AQ_NS_PROXY_DEL_IPV6_1	0x8000
> -#define I40E_AQ_NS_PROXY_COMMAND_SEQ	0x0001
> -#define I40E_AQ_NS_PROXY_INIT_IPV6_TBL	0x0002
> -#define I40E_AQ_NS_PROXY_INIT_MAC_TBL	0x0004
> +#define I40E_AQ_NS_PROXY_ADD_0		0x0001
> +#define I40E_AQ_NS_PROXY_DEL_0		0x0002
> +#define I40E_AQ_NS_PROXY_ADD_1		0x0004
> +#define I40E_AQ_NS_PROXY_DEL_1		0x0008
> +#define I40E_AQ_NS_PROXY_ADD_IPV6_0	0x0010
> +#define I40E_AQ_NS_PROXY_DEL_IPV6_0	0x0020
> +#define I40E_AQ_NS_PROXY_ADD_IPV6_1	0x0040
> +#define I40E_AQ_NS_PROXY_DEL_IPV6_1	0x0080
> +#define I40E_AQ_NS_PROXY_COMMAND_SEQ	0x0100
> +#define I40E_AQ_NS_PROXY_INIT_IPV6_TBL	0x0200
> +#define I40E_AQ_NS_PROXY_INIT_MAC_TBL	0x0400
> +#define I40E_AQ_NS_PROXY_OFFLOAD_ENABLE	0x0800
> +#define I40E_AQ_NS_PROXY_DIRECTED_OFFLOAD_ENABLE	0x1000
>   	u8	mac_addr_0[6];
>   	u8	mac_addr_1[6];
>   	u8	local_mac_addr[6];


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

* [Intel-wired-lan] [next PATCH S41 5/5] i40e: refactor tail_bump check
  2016-08-03 17:20 ` [Intel-wired-lan] [next PATCH S41 5/5] i40e: refactor tail_bump check Bimmy Pujari
@ 2016-08-03 18:17   ` Wyborny, Carolyn
  2016-08-03 18:18   ` Wyborny, Carolyn
  1 sibling, 0 replies; 16+ messages in thread
From: Wyborny, Carolyn @ 2016-08-03 18:17 UTC (permalink / raw)
  To: intel-wired-lan

The description and title needs to change on this.  I did send an email.  Let me know if you need a resend.

Thanks,

Carolyn

> -----Original Message-----
> From: Pujari, Bimmy
> Sent: Wednesday, August 03, 2016 10:20 AM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Wyborny, Carolyn <carolyn.wyborny@intel.com>
> Subject: [next PATCH S41 5/5] i40e: refactor tail_bump check
> 
> From: Carolyn Wyborny <carolyn.wyborny@intel.com>
> 
> This patch fixes usage of variable so that its
> not checked for NULL if there's no possiblity of
> it being NULL. Without this patch, static analysis
> tool complain. This patch fixes the problem by
> changing the wrapping of compat code.
> 
> Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
> Change-ID: Ide0e19171d67d90cb2b06b8dcd4fa791ae120160
> ---
>  drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 6 ++----
>  drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 6 ++----
>  2 files changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> index 5eb9ff2..266608a 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> @@ -2849,10 +2849,9 @@ static inline void i40e_tx_map(struct i40e_ring
> *tx_ring, struct sk_buff *skb,
> 
> I40E_TXD_QW1_CMD_SHIFT);
> 
>  	/* notify HW of packet */
> -	if (!tail_bump)
> +	if (!tail_bump) {
>  		prefetchw(tx_desc + 1);
> -
> -	if (tail_bump) {
> +	} else {
>  		/* Force memory writes to complete before letting h/w
>  		 * know there are new descriptors to fetch.  (Only
>  		 * applicable for weak-ordered memory model archs,
> @@ -2861,7 +2860,6 @@ static inline void i40e_tx_map(struct i40e_ring
> *tx_ring, struct sk_buff *skb,
>  		wmb();
>  		writel(i, tx_ring->tail);
>  	}
> -
>  	return;
> 
>  dma_error:
> diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
> b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
> index 5968cc6..f3eb76f 100644
> --- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
> +++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
> @@ -2086,10 +2086,9 @@ static inline void i40evf_tx_map(struct i40e_ring
> *tx_ring, struct sk_buff *skb,
> 
> I40E_TXD_QW1_CMD_SHIFT);
> 
>  	/* notify HW of packet */
> -	if (!tail_bump)
> +	if (!tail_bump) {
>  		prefetchw(tx_desc + 1);
> -
> -	if (tail_bump) {
> +	} else {
>  		/* Force memory writes to complete before letting h/w
>  		 * know there are new descriptors to fetch.  (Only
>  		 * applicable for weak-ordered memory model archs,
> @@ -2098,7 +2097,6 @@ static inline void i40evf_tx_map(struct i40e_ring
> *tx_ring, struct sk_buff *skb,
>  		wmb();
>  		writel(i, tx_ring->tail);
>  	}
> -
>  	return;
> 
>  dma_error:
> --
> 2.4.11


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

* [Intel-wired-lan] [next PATCH S41 5/5] i40e: refactor tail_bump check
  2016-08-03 17:20 ` [Intel-wired-lan] [next PATCH S41 5/5] i40e: refactor tail_bump check Bimmy Pujari
  2016-08-03 18:17   ` Wyborny, Carolyn
@ 2016-08-03 18:18   ` Wyborny, Carolyn
  1 sibling, 0 replies; 16+ messages in thread
From: Wyborny, Carolyn @ 2016-08-03 18:18 UTC (permalink / raw)
  To: intel-wired-lan

Correction.  The title got changed, but the patch description change got missed.

Thanks,

Carolyn

> -----Original Message-----
> From: Wyborny, Carolyn
> Sent: Wednesday, August 03, 2016 11:18 AM
> To: Pujari, Bimmy <bimmy.pujari@intel.com>; intel-wired-lan at lists.osuosl.org
> Subject: RE: [next PATCH S41 5/5] i40e: refactor tail_bump check
> 
> The description and title needs to change on this.  I did send an email.  Let me
> know if you need a resend.
> 
> Thanks,
> 
> Carolyn
> 
> > -----Original Message-----
> > From: Pujari, Bimmy
> > Sent: Wednesday, August 03, 2016 10:20 AM
> > To: intel-wired-lan at lists.osuosl.org
> > Cc: Wyborny, Carolyn <carolyn.wyborny@intel.com>
> > Subject: [next PATCH S41 5/5] i40e: refactor tail_bump check
> >
> > From: Carolyn Wyborny <carolyn.wyborny@intel.com>
> >
> > This patch fixes usage of variable so that its
> > not checked for NULL if there's no possiblity of
> > it being NULL. Without this patch, static analysis
> > tool complain. This patch fixes the problem by
> > changing the wrapping of compat code.
> >
> > Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
> > Change-ID: Ide0e19171d67d90cb2b06b8dcd4fa791ae120160
> > ---
> >  drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 6 ++----
> >  drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 6 ++----
> >  2 files changed, 4 insertions(+), 8 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> > b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> > index 5eb9ff2..266608a 100644
> > --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> > +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> > @@ -2849,10 +2849,9 @@ static inline void i40e_tx_map(struct i40e_ring
> > *tx_ring, struct sk_buff *skb,
> >
> > I40E_TXD_QW1_CMD_SHIFT);
> >
> >  	/* notify HW of packet */
> > -	if (!tail_bump)
> > +	if (!tail_bump) {
> >  		prefetchw(tx_desc + 1);
> > -
> > -	if (tail_bump) {
> > +	} else {
> >  		/* Force memory writes to complete before letting h/w
> >  		 * know there are new descriptors to fetch.  (Only
> >  		 * applicable for weak-ordered memory model archs,
> > @@ -2861,7 +2860,6 @@ static inline void i40e_tx_map(struct i40e_ring
> > *tx_ring, struct sk_buff *skb,
> >  		wmb();
> >  		writel(i, tx_ring->tail);
> >  	}
> > -
> >  	return;
> >
> >  dma_error:
> > diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
> > b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
> > index 5968cc6..f3eb76f 100644
> > --- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
> > +++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
> > @@ -2086,10 +2086,9 @@ static inline void i40evf_tx_map(struct i40e_ring
> > *tx_ring, struct sk_buff *skb,
> >
> > I40E_TXD_QW1_CMD_SHIFT);
> >
> >  	/* notify HW of packet */
> > -	if (!tail_bump)
> > +	if (!tail_bump) {
> >  		prefetchw(tx_desc + 1);
> > -
> > -	if (tail_bump) {
> > +	} else {
> >  		/* Force memory writes to complete before letting h/w
> >  		 * know there are new descriptors to fetch.  (Only
> >  		 * applicable for weak-ordered memory model archs,
> > @@ -2098,7 +2097,6 @@ static inline void i40evf_tx_map(struct i40e_ring
> > *tx_ring, struct sk_buff *skb,
> >  		wmb();
> >  		writel(i, tx_ring->tail);
> >  	}
> > -
> >  	return;
> >
> >  dma_error:
> > --
> > 2.4.11


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

* [Intel-wired-lan] [next PATCH S41 3/5] i40e: Add support for HMC resource and profile for X722
  2016-08-03 18:10   ` Shannon Nelson
@ 2016-08-03 18:26     ` Wyborny, Carolyn
  2016-08-04 18:04     ` Wyborny, Carolyn
  1 sibling, 0 replies; 16+ messages in thread
From: Wyborny, Carolyn @ 2016-08-03 18:26 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 Shannon Nelson
> Sent: Wednesday, August 03, 2016 11:10 AM
> To: Pujari, Bimmy <bimmy.pujari@intel.com>; intel-wired-lan at lists.osuosl.org
> Subject: Re: [Intel-wired-lan] [next PATCH S41 3/5] i40e: Add support for HMC
> resource and profile for X722
> 
[..]

Thanks for the review Shannon.  I'm not sure why our process didn't see the upstream bits.  I'll investigate.

Carolyn

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

* [Intel-wired-lan] [next PATCH S41 4/5] i40e: Add support for ARP NS in X722
  2016-08-03 18:12   ` Shannon Nelson
@ 2016-08-03 20:09     ` Wyborny, Carolyn
  2016-08-03 22:18       ` Pujari, Bimmy
  0 siblings, 1 reply; 16+ messages in thread
From: Wyborny, Carolyn @ 2016-08-03 20:09 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 Shannon Nelson
> Sent: Wednesday, August 03, 2016 11:12 AM
> To: Pujari, Bimmy <bimmy.pujari@intel.com>; intel-wired-lan at lists.osuosl.org
> Subject: Re: [Intel-wired-lan] [next PATCH S41 4/5] i40e: Add support for ARP
> NS in X722
> 
> 
> 
> On 08/03/2016 10:20 AM, Bimmy Pujari wrote:
> > From: Carolyn Wyborny <carolyn.wyborny@intel.com>
> >
> > This patch adds support and interface for supporting ARP NS
> > proxy offload in firmware for X722.
> 
> This looks like it fixes a byte order issue rather than adding new support.
> sln
> 
Thanks, you are correct.  I missed that distinction when I split it up initially.  

Bimmy, can we respin this patch with the following title and description instead:

I40e: Fix byte ordering in ARP NS code for X722

This patch fixes byte ordering problems found when enabling this feature support.  Without this patch, the feature will not work correctly.  This patch fixes the definitions to have the correct byte order.

Thanks,

Carolyn



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

* [Intel-wired-lan] [next PATCH S41 4/5] i40e: Add support for ARP NS in X722
  2016-08-03 20:09     ` Wyborny, Carolyn
@ 2016-08-03 22:18       ` Pujari, Bimmy
  0 siblings, 0 replies; 16+ messages in thread
From: Pujari, Bimmy @ 2016-08-03 22:18 UTC (permalink / raw)
  To: intel-wired-lan

Changed patch title & description.

Thanks
bimmy

-----Original Message-----
From: Wyborny, Carolyn 
Sent: Wednesday, August 3, 2016 1:09 PM
To: Shannon Nelson <sln@onemain.com>; Pujari, Bimmy <bimmy.pujari@intel.com>; intel-wired-lan at lists.osuosl.org
Subject: RE: [Intel-wired-lan] [next PATCH S41 4/5] i40e: Add support for ARP NS in X722

> -----Original Message-----
> From: Intel-wired-lan 
> [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Shannon 
> Nelson
> Sent: Wednesday, August 03, 2016 11:12 AM
> To: Pujari, Bimmy <bimmy.pujari@intel.com>; 
> intel-wired-lan at lists.osuosl.org
> Subject: Re: [Intel-wired-lan] [next PATCH S41 4/5] i40e: Add support 
> for ARP NS in X722
> 
> 
> 
> On 08/03/2016 10:20 AM, Bimmy Pujari wrote:
> > From: Carolyn Wyborny <carolyn.wyborny@intel.com>
> >
> > This patch adds support and interface for supporting ARP NS proxy 
> > offload in firmware for X722.
> 
> This looks like it fixes a byte order issue rather than adding new support.
> sln
> 
Thanks, you are correct.  I missed that distinction when I split it up initially.  

Bimmy, can we respin this patch with the following title and description instead:

I40e: Fix byte ordering in ARP NS code for X722

This patch fixes byte ordering problems found when enabling this feature support.  Without this patch, the feature will not work correctly.  This patch fixes the definitions to have the correct byte order.

Thanks,

Carolyn



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

* [Intel-wired-lan] [next PATCH S41 3/5] i40e: Add support for HMC resource and profile for X722
  2016-08-03 18:10   ` Shannon Nelson
  2016-08-03 18:26     ` Wyborny, Carolyn
@ 2016-08-04 18:04     ` Wyborny, Carolyn
  1 sibling, 0 replies; 16+ messages in thread
From: Wyborny, Carolyn @ 2016-08-04 18:04 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 Shannon Nelson
> Sent: Wednesday, August 03, 2016 11:10 AM
> To: Pujari, Bimmy <bimmy.pujari@intel.com>; intel-wired-lan at lists.osuosl.org
> Subject: Re: [Intel-wired-lan] [next PATCH S41 3/5] i40e: Add support for HMC
> resource and profile for X722
> 
> 
> 
> On 08/03/2016 10:20 AM, Bimmy Pujari wrote:
> > From: Carolyn Wyborny <carolyn.wyborny@intel.com>
> >
> > This patch adds support for HMC resource and profile cmds for X722
> > firmware.
> >
> > Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
> > Change-ID: Icc332101f38ab15d1bfa167823100eb4f6822f7e
> > ---
> >   drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h  | 23
> ++++++++++++++++++++++
> >   .../net/ethernet/intel/i40evf/i40e_adminq_cmd.h    | 23
> ++++++++++++++++++++++
> >   2 files changed, 46 insertions(+)
> >
> > diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
> b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
> > index 11cf1a5..aabacc3 100644
> > --- a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
> > +++ b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
> > @@ -204,6 +204,11 @@ enum i40e_admin_queue_opc {
> >   	i40e_aqc_opc_suspend_port_tx				= 0x041B,
> >   	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,
> 
> Hmmm - I see these already in the 4.5 kernel source I have lying around,
> are you sure you need this patch?
[CMW] thanks for the offline research Shannon, this was removed and now its coming back for X722.

> 
> > +
> > +	/* phy commands*/
> 
> This comment is already here
[CMW] Will fix.  
> 
> >
> >   	/* phy commands*/
> >   	i40e_aqc_opc_get_phy_abilities		= 0x0600,
> > @@ -1582,6 +1587,24 @@ 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,
> > +};
> > +
> 
> Yep, these are already there as well.
[CMW] Same story as above.  They were removed and are now coming back. 
> sln

Thanks,

Carolyn

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

* [Intel-wired-lan] [next PATCH S41 4/5] i40e: Add support for ARP NS in X722
  2016-08-03 18:06 [Intel-wired-lan] [next PATCH S41 0/5] i40e/i40evf updates Bimmy Pujari
@ 2016-08-03 18:06 ` Bimmy Pujari
  0 siblings, 0 replies; 16+ messages in thread
From: Bimmy Pujari @ 2016-08-03 18:06 UTC (permalink / raw)
  To: intel-wired-lan

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

This patch adds support and interface for supporting ARP NS
proxy offload in firmware for X722.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Change-ID: Ic7489fbcbe2195df7be62ff5e359201b827cefe6
---
 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h  | 38 ++++++++++++----------
 .../net/ethernet/intel/i40evf/i40e_adminq_cmd.h    | 38 ++++++++++++----------
 2 files changed, 42 insertions(+), 34 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
index aabacc3..736c3ab 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
@@ -455,13 +455,15 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_cppm_configuration);
 /* Set ARP Proxy command / response (indirect 0x0104) */
 struct i40e_aqc_arp_proxy_data {
 	__le16	command_flags;
-#define I40E_AQ_ARP_INIT_IPV4	0x0008
-#define I40E_AQ_ARP_UNSUP_CTL	0x0010
-#define I40E_AQ_ARP_ENA		0x0020
-#define I40E_AQ_ARP_ADD_IPV4	0x0040
-#define I40E_AQ_ARP_DEL_IPV4	0x0080
+#define I40E_AQ_ARP_INIT_IPV4	0x0800
+#define I40E_AQ_ARP_UNSUP_CTL	0x1000
+#define I40E_AQ_ARP_ENA		0x2000
+#define I40E_AQ_ARP_ADD_IPV4	0x4000
+#define I40E_AQ_ARP_DEL_IPV4	0x8000
 	__le16	table_id;
-	__le32	pfpm_proxyfc;
+	__le32	enabled_offloads;
+#define I40E_AQ_ARP_DIRECTED_OFFLOAD_ENABLE	0x00000020
+#define I40E_AQ_ARP_OFFLOAD_ENABLE		0x00000800
 	__le32	ip_addr;
 	u8	mac_addr[6];
 	u8	reserved[2];
@@ -476,17 +478,19 @@ struct i40e_aqc_ns_proxy_data {
 	__le16	table_idx_ipv6_0;
 	__le16	table_idx_ipv6_1;
 	__le16	control;
-#define I40E_AQ_NS_PROXY_ADD_0		0x0100
-#define I40E_AQ_NS_PROXY_DEL_0		0x0200
-#define I40E_AQ_NS_PROXY_ADD_1		0x0400
-#define I40E_AQ_NS_PROXY_DEL_1		0x0800
-#define I40E_AQ_NS_PROXY_ADD_IPV6_0	0x1000
-#define I40E_AQ_NS_PROXY_DEL_IPV6_0	0x2000
-#define I40E_AQ_NS_PROXY_ADD_IPV6_1	0x4000
-#define I40E_AQ_NS_PROXY_DEL_IPV6_1	0x8000
-#define I40E_AQ_NS_PROXY_COMMAND_SEQ	0x0001
-#define I40E_AQ_NS_PROXY_INIT_IPV6_TBL	0x0002
-#define I40E_AQ_NS_PROXY_INIT_MAC_TBL	0x0004
+#define I40E_AQ_NS_PROXY_ADD_0		0x0001
+#define I40E_AQ_NS_PROXY_DEL_0		0x0002
+#define I40E_AQ_NS_PROXY_ADD_1		0x0004
+#define I40E_AQ_NS_PROXY_DEL_1		0x0008
+#define I40E_AQ_NS_PROXY_ADD_IPV6_0	0x0010
+#define I40E_AQ_NS_PROXY_DEL_IPV6_0	0x0020
+#define I40E_AQ_NS_PROXY_ADD_IPV6_1	0x0040
+#define I40E_AQ_NS_PROXY_DEL_IPV6_1	0x0080
+#define I40E_AQ_NS_PROXY_COMMAND_SEQ	0x0100
+#define I40E_AQ_NS_PROXY_INIT_IPV6_TBL	0x0200
+#define I40E_AQ_NS_PROXY_INIT_MAC_TBL	0x0400
+#define I40E_AQ_NS_PROXY_OFFLOAD_ENABLE	0x0800
+#define I40E_AQ_NS_PROXY_DIRECTED_OFFLOAD_ENABLE	0x1000
 	u8	mac_addr_0[6];
 	u8	mac_addr_1[6];
 	u8	local_mac_addr[6];
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
index c07e3a3..0c099df 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
@@ -452,13 +452,15 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_cppm_configuration);
 /* Set ARP Proxy command / response (indirect 0x0104) */
 struct i40e_aqc_arp_proxy_data {
 	__le16	command_flags;
-#define I40E_AQ_ARP_INIT_IPV4	0x0008
-#define I40E_AQ_ARP_UNSUP_CTL	0x0010
-#define I40E_AQ_ARP_ENA		0x0020
-#define I40E_AQ_ARP_ADD_IPV4	0x0040
-#define I40E_AQ_ARP_DEL_IPV4	0x0080
+#define I40E_AQ_ARP_INIT_IPV4	0x0800
+#define I40E_AQ_ARP_UNSUP_CTL	0x1000
+#define I40E_AQ_ARP_ENA		0x2000
+#define I40E_AQ_ARP_ADD_IPV4	0x4000
+#define I40E_AQ_ARP_DEL_IPV4	0x8000
 	__le16	table_id;
-	__le32	pfpm_proxyfc;
+	__le32	enabled_offloads;
+#define I40E_AQ_ARP_DIRECTED_OFFLOAD_ENABLE	0x00000020
+#define I40E_AQ_ARP_OFFLOAD_ENABLE		0x00000800
 	__le32	ip_addr;
 	u8	mac_addr[6];
 	u8	reserved[2];
@@ -473,17 +475,19 @@ struct i40e_aqc_ns_proxy_data {
 	__le16	table_idx_ipv6_0;
 	__le16	table_idx_ipv6_1;
 	__le16	control;
-#define I40E_AQ_NS_PROXY_ADD_0		0x0100
-#define I40E_AQ_NS_PROXY_DEL_0		0x0200
-#define I40E_AQ_NS_PROXY_ADD_1		0x0400
-#define I40E_AQ_NS_PROXY_DEL_1		0x0800
-#define I40E_AQ_NS_PROXY_ADD_IPV6_0	0x1000
-#define I40E_AQ_NS_PROXY_DEL_IPV6_0	0x2000
-#define I40E_AQ_NS_PROXY_ADD_IPV6_1	0x4000
-#define I40E_AQ_NS_PROXY_DEL_IPV6_1	0x8000
-#define I40E_AQ_NS_PROXY_COMMAND_SEQ	0x0001
-#define I40E_AQ_NS_PROXY_INIT_IPV6_TBL	0x0002
-#define I40E_AQ_NS_PROXY_INIT_MAC_TBL	0x0004
+#define I40E_AQ_NS_PROXY_ADD_0		0x0001
+#define I40E_AQ_NS_PROXY_DEL_0		0x0002
+#define I40E_AQ_NS_PROXY_ADD_1		0x0004
+#define I40E_AQ_NS_PROXY_DEL_1		0x0008
+#define I40E_AQ_NS_PROXY_ADD_IPV6_0	0x0010
+#define I40E_AQ_NS_PROXY_DEL_IPV6_0	0x0020
+#define I40E_AQ_NS_PROXY_ADD_IPV6_1	0x0040
+#define I40E_AQ_NS_PROXY_DEL_IPV6_1	0x0080
+#define I40E_AQ_NS_PROXY_COMMAND_SEQ	0x0100
+#define I40E_AQ_NS_PROXY_INIT_IPV6_TBL	0x0200
+#define I40E_AQ_NS_PROXY_INIT_MAC_TBL	0x0400
+#define I40E_AQ_NS_PROXY_OFFLOAD_ENABLE	0x0800
+#define I40E_AQ_NS_PROXY_DIRECTED_OFFLOAD_ENABLE	0x1000
 	u8	mac_addr_0[6];
 	u8	mac_addr_1[6];
 	u8	local_mac_addr[6];
-- 
2.4.11


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

* [Intel-wired-lan] [next PATCH S41 4/5] i40e: Add support for ARP NS in X722
  2016-08-03 18:02 [Intel-wired-lan] [next PATCH S41 0/5] i40e/i40evf updates Bimmy Pujari
@ 2016-08-03 18:02 ` Bimmy Pujari
  0 siblings, 0 replies; 16+ messages in thread
From: Bimmy Pujari @ 2016-08-03 18:02 UTC (permalink / raw)
  To: intel-wired-lan

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

This patch adds support and interface for supporting ARP NS
proxy offload in firmware for X722.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Change-ID: Ic7489fbcbe2195df7be62ff5e359201b827cefe6
---
 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h  | 38 ++++++++++++----------
 .../net/ethernet/intel/i40evf/i40e_adminq_cmd.h    | 38 ++++++++++++----------
 2 files changed, 42 insertions(+), 34 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
index aabacc3..736c3ab 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
@@ -455,13 +455,15 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_cppm_configuration);
 /* Set ARP Proxy command / response (indirect 0x0104) */
 struct i40e_aqc_arp_proxy_data {
 	__le16	command_flags;
-#define I40E_AQ_ARP_INIT_IPV4	0x0008
-#define I40E_AQ_ARP_UNSUP_CTL	0x0010
-#define I40E_AQ_ARP_ENA		0x0020
-#define I40E_AQ_ARP_ADD_IPV4	0x0040
-#define I40E_AQ_ARP_DEL_IPV4	0x0080
+#define I40E_AQ_ARP_INIT_IPV4	0x0800
+#define I40E_AQ_ARP_UNSUP_CTL	0x1000
+#define I40E_AQ_ARP_ENA		0x2000
+#define I40E_AQ_ARP_ADD_IPV4	0x4000
+#define I40E_AQ_ARP_DEL_IPV4	0x8000
 	__le16	table_id;
-	__le32	pfpm_proxyfc;
+	__le32	enabled_offloads;
+#define I40E_AQ_ARP_DIRECTED_OFFLOAD_ENABLE	0x00000020
+#define I40E_AQ_ARP_OFFLOAD_ENABLE		0x00000800
 	__le32	ip_addr;
 	u8	mac_addr[6];
 	u8	reserved[2];
@@ -476,17 +478,19 @@ struct i40e_aqc_ns_proxy_data {
 	__le16	table_idx_ipv6_0;
 	__le16	table_idx_ipv6_1;
 	__le16	control;
-#define I40E_AQ_NS_PROXY_ADD_0		0x0100
-#define I40E_AQ_NS_PROXY_DEL_0		0x0200
-#define I40E_AQ_NS_PROXY_ADD_1		0x0400
-#define I40E_AQ_NS_PROXY_DEL_1		0x0800
-#define I40E_AQ_NS_PROXY_ADD_IPV6_0	0x1000
-#define I40E_AQ_NS_PROXY_DEL_IPV6_0	0x2000
-#define I40E_AQ_NS_PROXY_ADD_IPV6_1	0x4000
-#define I40E_AQ_NS_PROXY_DEL_IPV6_1	0x8000
-#define I40E_AQ_NS_PROXY_COMMAND_SEQ	0x0001
-#define I40E_AQ_NS_PROXY_INIT_IPV6_TBL	0x0002
-#define I40E_AQ_NS_PROXY_INIT_MAC_TBL	0x0004
+#define I40E_AQ_NS_PROXY_ADD_0		0x0001
+#define I40E_AQ_NS_PROXY_DEL_0		0x0002
+#define I40E_AQ_NS_PROXY_ADD_1		0x0004
+#define I40E_AQ_NS_PROXY_DEL_1		0x0008
+#define I40E_AQ_NS_PROXY_ADD_IPV6_0	0x0010
+#define I40E_AQ_NS_PROXY_DEL_IPV6_0	0x0020
+#define I40E_AQ_NS_PROXY_ADD_IPV6_1	0x0040
+#define I40E_AQ_NS_PROXY_DEL_IPV6_1	0x0080
+#define I40E_AQ_NS_PROXY_COMMAND_SEQ	0x0100
+#define I40E_AQ_NS_PROXY_INIT_IPV6_TBL	0x0200
+#define I40E_AQ_NS_PROXY_INIT_MAC_TBL	0x0400
+#define I40E_AQ_NS_PROXY_OFFLOAD_ENABLE	0x0800
+#define I40E_AQ_NS_PROXY_DIRECTED_OFFLOAD_ENABLE	0x1000
 	u8	mac_addr_0[6];
 	u8	mac_addr_1[6];
 	u8	local_mac_addr[6];
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
index c07e3a3..0c099df 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
@@ -452,13 +452,15 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_cppm_configuration);
 /* Set ARP Proxy command / response (indirect 0x0104) */
 struct i40e_aqc_arp_proxy_data {
 	__le16	command_flags;
-#define I40E_AQ_ARP_INIT_IPV4	0x0008
-#define I40E_AQ_ARP_UNSUP_CTL	0x0010
-#define I40E_AQ_ARP_ENA		0x0020
-#define I40E_AQ_ARP_ADD_IPV4	0x0040
-#define I40E_AQ_ARP_DEL_IPV4	0x0080
+#define I40E_AQ_ARP_INIT_IPV4	0x0800
+#define I40E_AQ_ARP_UNSUP_CTL	0x1000
+#define I40E_AQ_ARP_ENA		0x2000
+#define I40E_AQ_ARP_ADD_IPV4	0x4000
+#define I40E_AQ_ARP_DEL_IPV4	0x8000
 	__le16	table_id;
-	__le32	pfpm_proxyfc;
+	__le32	enabled_offloads;
+#define I40E_AQ_ARP_DIRECTED_OFFLOAD_ENABLE	0x00000020
+#define I40E_AQ_ARP_OFFLOAD_ENABLE		0x00000800
 	__le32	ip_addr;
 	u8	mac_addr[6];
 	u8	reserved[2];
@@ -473,17 +475,19 @@ struct i40e_aqc_ns_proxy_data {
 	__le16	table_idx_ipv6_0;
 	__le16	table_idx_ipv6_1;
 	__le16	control;
-#define I40E_AQ_NS_PROXY_ADD_0		0x0100
-#define I40E_AQ_NS_PROXY_DEL_0		0x0200
-#define I40E_AQ_NS_PROXY_ADD_1		0x0400
-#define I40E_AQ_NS_PROXY_DEL_1		0x0800
-#define I40E_AQ_NS_PROXY_ADD_IPV6_0	0x1000
-#define I40E_AQ_NS_PROXY_DEL_IPV6_0	0x2000
-#define I40E_AQ_NS_PROXY_ADD_IPV6_1	0x4000
-#define I40E_AQ_NS_PROXY_DEL_IPV6_1	0x8000
-#define I40E_AQ_NS_PROXY_COMMAND_SEQ	0x0001
-#define I40E_AQ_NS_PROXY_INIT_IPV6_TBL	0x0002
-#define I40E_AQ_NS_PROXY_INIT_MAC_TBL	0x0004
+#define I40E_AQ_NS_PROXY_ADD_0		0x0001
+#define I40E_AQ_NS_PROXY_DEL_0		0x0002
+#define I40E_AQ_NS_PROXY_ADD_1		0x0004
+#define I40E_AQ_NS_PROXY_DEL_1		0x0008
+#define I40E_AQ_NS_PROXY_ADD_IPV6_0	0x0010
+#define I40E_AQ_NS_PROXY_DEL_IPV6_0	0x0020
+#define I40E_AQ_NS_PROXY_ADD_IPV6_1	0x0040
+#define I40E_AQ_NS_PROXY_DEL_IPV6_1	0x0080
+#define I40E_AQ_NS_PROXY_COMMAND_SEQ	0x0100
+#define I40E_AQ_NS_PROXY_INIT_IPV6_TBL	0x0200
+#define I40E_AQ_NS_PROXY_INIT_MAC_TBL	0x0400
+#define I40E_AQ_NS_PROXY_OFFLOAD_ENABLE	0x0800
+#define I40E_AQ_NS_PROXY_DIRECTED_OFFLOAD_ENABLE	0x1000
 	u8	mac_addr_0[6];
 	u8	mac_addr_1[6];
 	u8	local_mac_addr[6];
-- 
2.4.11


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

end of thread, other threads:[~2016-08-04 18:04 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-03 17:20 [Intel-wired-lan] [next PATCH S41 0/5] i40e/i40evf updates Bimmy Pujari
2016-08-03 17:20 ` [Intel-wired-lan] [next PATCH S41 1/5] i40e: use alloc_workqueue instead of create_singlethread_workqueue Bimmy Pujari
2016-08-03 17:20 ` [Intel-wired-lan] [next PATCH S41 2/5] i40evf: report link speed Bimmy Pujari
2016-08-03 17:20 ` [Intel-wired-lan] [next PATCH S41 3/5] i40e: Add support for HMC resource and profile for X722 Bimmy Pujari
2016-08-03 18:10   ` Shannon Nelson
2016-08-03 18:26     ` Wyborny, Carolyn
2016-08-04 18:04     ` Wyborny, Carolyn
2016-08-03 17:20 ` [Intel-wired-lan] [next PATCH S41 4/5] i40e: Add support for ARP NS in X722 Bimmy Pujari
2016-08-03 18:12   ` Shannon Nelson
2016-08-03 20:09     ` Wyborny, Carolyn
2016-08-03 22:18       ` Pujari, Bimmy
2016-08-03 17:20 ` [Intel-wired-lan] [next PATCH S41 5/5] i40e: refactor tail_bump check Bimmy Pujari
2016-08-03 18:17   ` Wyborny, Carolyn
2016-08-03 18:18   ` Wyborny, Carolyn
2016-08-03 18:02 [Intel-wired-lan] [next PATCH S41 0/5] i40e/i40evf updates Bimmy Pujari
2016-08-03 18:02 ` [Intel-wired-lan] [next PATCH S41 4/5] i40e: Add support for ARP NS in X722 Bimmy Pujari
2016-08-03 18:06 [Intel-wired-lan] [next PATCH S41 0/5] i40e/i40evf updates Bimmy Pujari
2016-08-03 18:06 ` [Intel-wired-lan] [next PATCH S41 4/5] i40e: Add support for ARP NS in X722 Bimmy Pujari

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.