summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-10-01 03:31:17 +0100
committerDavid S. Miller <davem@davemloft.net>2017-10-01 03:31:17 +0100
commita6992ebee4a7ef6e714af82f22a2ca3f797bb9e4 (patch)
tree13a18f611c40a750619a98d816b55326219120a6 /include
parent45c1fd61d5cead2ae23880e0677b8660ab9006a4 (diff)
parent22b96551f213d7e7d743442c923c266a10306b9b (diff)
downloadlinux-a6992ebee4a7ef6e714af82f22a2ca3f797bb9e4.tar.bz2
Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2017-09-29 This series contains updates to i40e and i40evf only. Jake provides several of the changes starting with the renaming of a variable to clarify what the value is actually calculating. Found we were misusing the __I40E_RECOVERY_PENDING bit to determine when we should actually request a new IRQ in i40e_setup_misc_vector(), which lead to a design mistake, so to resolve the issue, use a separate state bit for miscellaneous IRQ setup and fix up the design while we are at it. Cleaned up the old legacy PM support in the driver since we support the newer generic PM callbacks. Fixed a failure to hibernate issue, where on some platforms with a large number of CPUs, we would allocate many IRQ vectors which we would try to migrate to CPU0 when hibernating. Sudheer cleans up a check for unqualified module inside i40e_up_complete() because the link state information is in flux at time, so log messages are getting logged with incorrect link state information. Also provided additional log message cleanups and simplify member variable access in the printing of the link messages. Mariusz relaxes the firmware check since Fortville and Fort Park NICs can and do have different firmware versions, so only warn for older Fortville firmware. Fixed an errata with a flow director statistic that was not wrapping as expected, simply reset after reading. Mitch prevents consternation by lowering the log level to debug on a message seen regularly on VF reset or unload, which is meaningless under normal circumstances. Refactor the firmware version checking since Fortville and Fort Park devices can have different firmware versions. Alan fixes a ring to vector mapping, where the past implementation attempted to map each Tx and Rx ring to its own vector, however we use combined queues so we should be mapping the Tx/Rx rings together on one vector. Adds the ability for the VF to request a different number of queues allocated to it. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/avf/virtchnl.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/avf/virtchnl.h b/include/linux/avf/virtchnl.h
index 2b038442c352..60e5d90cb18a 100644
--- a/include/linux/avf/virtchnl.h
+++ b/include/linux/avf/virtchnl.h
@@ -135,6 +135,7 @@ enum virtchnl_ops {
VIRTCHNL_OP_SET_RSS_HENA = 26,
VIRTCHNL_OP_ENABLE_VLAN_STRIPPING = 27,
VIRTCHNL_OP_DISABLE_VLAN_STRIPPING = 28,
+ VIRTCHNL_OP_REQUEST_QUEUES = 29,
};
/* This macro is used to generate a compilation error if a structure
@@ -235,6 +236,7 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);
#define VIRTCHNL_VF_OFFLOAD_RSS_AQ 0x00000008
#define VIRTCHNL_VF_OFFLOAD_RSS_REG 0x00000010
#define VIRTCHNL_VF_OFFLOAD_WB_ON_ITR 0x00000020
+#define VIRTCHNL_VF_OFFLOAD_REQ_QUEUES 0x00000040
#define VIRTCHNL_VF_OFFLOAD_VLAN 0x00010000
#define VIRTCHNL_VF_OFFLOAD_RX_POLLING 0x00020000
#define VIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2 0x00040000
@@ -325,6 +327,21 @@ struct virtchnl_vsi_queue_config_info {
struct virtchnl_queue_pair_info qpair[1];
};
+/* VIRTCHNL_OP_REQUEST_QUEUES
+ * VF sends this message to request the PF to allocate additional queues to
+ * this VF. Each VF gets a guaranteed number of queues on init but asking for
+ * additional queues must be negotiated. This is a best effort request as it
+ * is possible the PF does not have enough queues left to support the request.
+ * If the PF cannot support the number requested it will respond with the
+ * maximum number it is able to support; otherwise it will respond with the
+ * number requested.
+ */
+
+/* VF resource request */
+struct virtchnl_vf_res_request {
+ u16 num_queue_pairs;
+};
+
VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_vsi_queue_config_info);
/* VIRTCHNL_OP_CONFIG_IRQ_MAP
@@ -691,6 +708,9 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode,
case VIRTCHNL_OP_ENABLE_VLAN_STRIPPING:
case VIRTCHNL_OP_DISABLE_VLAN_STRIPPING:
break;
+ case VIRTCHNL_OP_REQUEST_QUEUES:
+ valid_len = sizeof(struct virtchnl_vf_res_request);
+ break;
/* These are always errors coming from the VF. */
case VIRTCHNL_OP_EVENT:
case VIRTCHNL_OP_UNKNOWN: