net/mlx5: share realtime timestamp configure
[dpdk.git] / drivers / net / mlx5 / mlx5_tx.h
index bc62998..c4b8271 100644 (file)
@@ -221,8 +221,6 @@ void mlx5_txq_dynf_timestamp_set(struct rte_eth_dev *dev);
 
 /* mlx5_tx.c */
 
-uint16_t removed_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts,
-                         uint16_t pkts_n);
 void mlx5_tx_handle_completion(struct mlx5_txq_data *__rte_restrict txq,
                               unsigned int olx __rte_unused);
 int mlx5_tx_descriptor_status(void *tx_queue, uint16_t offset);
@@ -1071,7 +1069,6 @@ mlx5_tx_mseg_memcpy(uint8_t *pdst,
        uint8_t *psrc;
 
        MLX5_ASSERT(len);
-       MLX5_ASSERT(must <= len);
        do {
                /* Allow zero length packets, must check first. */
                dlen = rte_pktmbuf_data_len(loc->mbuf);
@@ -1098,9 +1095,11 @@ mlx5_tx_mseg_memcpy(uint8_t *pdst,
                                if (diff <= rte_pktmbuf_data_len(loc->mbuf)) {
                                        /*
                                         * Copy only the minimal required
-                                        * part of the data buffer.
+                                        * part of the data buffer. Limit amount
+                                        * of data to be copied to the length of
+                                        * available space.
                                         */
-                                       len = diff;
+                                       len = RTE_MIN(len, diff);
                                }
                        }
                        continue;
@@ -1709,7 +1708,6 @@ mlx5_tx_packet_multi_tso(struct mlx5_txq_data *__rte_restrict txq,
                     inlen <= MLX5_ESEG_MIN_INLINE_SIZE ||
                     inlen > (dlen + vlan)))
                return MLX5_TXCMP_CODE_ERROR;
-       MLX5_ASSERT(inlen >= txq->inlen_mode);
        /*
         * Check whether there are enough free WQEBBs:
         * - Control Segment