- const unsigned int max_tso_inline =
- ((MLX5_MAX_TSO_HEADER + (RTE_CACHE_LINE_SIZE - 1)) /
- RTE_CACHE_LINE_SIZE);
- unsigned int txq_inline;
- unsigned int txqs_inline;
- unsigned int inline_max_packet_sz;
- eth_tx_burst_t tx_pkt_burst =
- mlx5_select_tx_function(txq_ctrl->priv->dev);
- int is_empw_func = is_empw_burst_func(tx_pkt_burst);
- int tso = !!(txq_ctrl->txq.offloads & DEV_TX_OFFLOAD_TCP_TSO);
-
- txq_inline = (config->txq_inline == MLX5_ARG_UNSET) ?
- 0 : config->txq_inline;
- txqs_inline = (config->txqs_inline == MLX5_ARG_UNSET) ?
- 0 : config->txqs_inline;
- inline_max_packet_sz =
- (config->inline_max_packet_sz == MLX5_ARG_UNSET) ?
- 0 : config->inline_max_packet_sz;
- if (is_empw_func) {
- if (config->txq_inline == MLX5_ARG_UNSET)
- txq_inline = MLX5_WQE_SIZE_MAX - MLX5_WQE_SIZE;
- if (config->txqs_inline == MLX5_ARG_UNSET)
- txqs_inline = MLX5_EMPW_MIN_TXQS;
- if (config->inline_max_packet_sz == MLX5_ARG_UNSET)
- inline_max_packet_sz = MLX5_EMPW_MAX_INLINE_LEN;
- txq_ctrl->txq.mpw_hdr_dseg = config->mpw_hdr_dseg;
- txq_ctrl->txq.inline_max_packet_sz = inline_max_packet_sz;
- }
- if (txq_inline && priv->txqs_n >= txqs_inline) {
- unsigned int ds_cnt;
-
- txq_ctrl->txq.max_inline =
- ((txq_inline + (RTE_CACHE_LINE_SIZE - 1)) /
- RTE_CACHE_LINE_SIZE);
- if (is_empw_func) {
- /* To minimize the size of data set, avoid requesting
- * too large WQ.
- */
- txq_ctrl->max_inline_data =
- ((RTE_MIN(txq_inline,
- inline_max_packet_sz) +
- (RTE_CACHE_LINE_SIZE - 1)) /
- RTE_CACHE_LINE_SIZE) * RTE_CACHE_LINE_SIZE;
- } else if (tso) {
- int inline_diff = txq_ctrl->txq.max_inline -
- max_tso_inline;
+ unsigned int inlen_send; /* Inline data for ordinary SEND.*/
+ unsigned int inlen_empw; /* Inline data for enhanced MPW. */
+ unsigned int inlen_mode; /* Minimal required Inline data. */
+ unsigned int txqs_inline; /* Min Tx queues to enable inline. */
+ uint64_t dev_txoff = priv->dev_data->dev_conf.txmode.offloads;
+ bool tso = txq_ctrl->txq.offloads & (DEV_TX_OFFLOAD_TCP_TSO |
+ DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
+ DEV_TX_OFFLOAD_GRE_TNL_TSO |
+ DEV_TX_OFFLOAD_IP_TNL_TSO |
+ DEV_TX_OFFLOAD_UDP_TNL_TSO);
+ bool vlan_inline;
+ unsigned int temp;