Riverhead puts a number of restrictions on TSO transactions.
Reflect some of them in the NIC configuration structure.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <andrewle@xilinx.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
*/
encp->enc_tx_tso_tcp_header_offset_limit = EF10_TCP_HEADER_OFFSET_LIMIT;
+ /* EF10 TSO engine demands that packet header be contiguous. */
+ encp->enc_tx_tso_max_header_ndescs = 1;
+
+ /* The overall TSO header length is not limited. */
+ encp->enc_tx_tso_max_header_length = UINT32_MAX;
+
+ /*
+ * There are no specific limitations on the number of
+ * TSO payload descriptors.
+ */
+ encp->enc_tx_tso_max_payload_ndescs = UINT32_MAX;
+
+ /* TSO superframe payload length is not limited. */
+ encp->enc_tx_tso_max_payload_length = UINT32_MAX;
+
+ /*
+ * Limitation on the maximum number of outgoing packets per
+ * TSO transaction described in SF-108452-SW.
+ */
+ encp->enc_tx_tso_max_nframes = 32767;
+
/*
* Set resource limits for MC_CMD_ALLOC_VIS. Note that we cannot use
* MC_CMD_GET_RESOURCE_LIMITS here as that reports the available
* the hardware to apply TSO packet edits.
*/
uint32_t enc_tx_tso_tcp_header_offset_limit;
+ /* Maximum number of header DMA descriptors per TSO transaction. */
+ uint32_t enc_tx_tso_max_header_ndescs;
+ /* Maximum header length acceptable by TSO transaction. */
+ uint32_t enc_tx_tso_max_header_length;
+ /* Maximum number of payload DMA descriptors per TSO transaction. */
+ uint32_t enc_tx_tso_max_payload_ndescs;
+ /* Maximum payload length per TSO transaction. */
+ uint32_t enc_tx_tso_max_payload_length;
+ /* Maximum number of frames to be generated per TSO transaction. */
+ uint32_t enc_tx_tso_max_nframes;
boolean_t enc_fw_assisted_tso_enabled;
boolean_t enc_fw_assisted_tso_v2_enabled;
boolean_t enc_fw_assisted_tso_v2_encap_enabled;
encp->enc_tx_dma_desc_boundary = 0;
/*
- * Maximum number of bytes into the frame the TCP header can start for
- * firmware assisted TSO to work.
- * FIXME Get from design parameter DP_TSO_MAX_HDR_LEN.
+ * Initialise design parameters to either a runtime value read from
+ * the design parameters area or the well known default value
+ * (see SF-119689-TC section 4.4 for details).
+ * FIXME: Read design parameters area values.
*/
- encp->enc_tx_tso_tcp_header_offset_limit = 0;
+ encp->enc_tx_tso_max_header_ndescs =
+ ESE_EF100_DP_GZ_TSO_MAX_HDR_NUM_SEGS_DEFAULT;
+ encp->enc_tx_tso_max_header_length =
+ ESE_EF100_DP_GZ_TSO_MAX_HDR_LEN_DEFAULT;
+ encp->enc_tx_tso_max_payload_ndescs =
+ ESE_EF100_DP_GZ_TSO_MAX_PAYLOAD_NUM_SEGS_DEFAULT;
+ encp->enc_tx_tso_max_payload_length =
+ ESE_EF100_DP_GZ_TSO_MAX_PAYLOAD_LEN_DEFAULT;
+ encp->enc_tx_tso_max_nframes =
+ ESE_EF100_DP_GZ_TSO_MAX_NUM_FRAMES_DEFAULT;
+
+ /*
+ * Riverhead does not put any restrictions on TCP header offset limit.
+ */
+ encp->enc_tx_tso_tcp_header_offset_limit = UINT32_MAX;
/*
* Set resource limits for MC_CMD_ALLOC_VIS. Note that we cannot use