net/bnxt: fix link status when port is stopped
[dpdk.git] / drivers / net / mlx5 / mlx5_tx.c
index df67137..a13c7e9 100644 (file)
@@ -22,7 +22,6 @@
 #include "mlx5_autoconf.h"
 #include "mlx5_defs.h"
 #include "mlx5.h"
-#include "mlx5_mr.h"
 #include "mlx5_utils.h"
 #include "mlx5_rxtx.h"
 #include "mlx5_tx.h"
@@ -136,31 +135,6 @@ mlx5_tx_error_cqe_handle(struct mlx5_txq_data *__rte_restrict txq,
        return 0;
 }
 
-/**
- * Dummy DPDK callback for TX.
- *
- * This function is used to temporarily replace the real callback during
- * unsafe control operations on the queue, or in case of error.
- *
- * @param dpdk_txq
- *   Generic pointer to TX queue structure.
- * @param[in] pkts
- *   Packets to transmit.
- * @param pkts_n
- *   Number of packets in array.
- *
- * @return
- *   Number of packets successfully transmitted (<= pkts_n).
- */
-uint16_t
-removed_tx_burst(void *dpdk_txq __rte_unused,
-                struct rte_mbuf **pkts __rte_unused,
-                uint16_t pkts_n __rte_unused)
-{
-       rte_mb();
-       return 0;
-}
-
 /**
  * Update completion queue consuming index via doorbell
  * and flush the completed data buffers.
@@ -518,41 +492,41 @@ eth_tx_burst_t
 mlx5_select_tx_function(struct rte_eth_dev *dev)
 {
        struct mlx5_priv *priv = dev->data->dev_private;
-       struct mlx5_dev_config *config = &priv->config;
+       struct mlx5_port_config *config = &priv->config;
        uint64_t tx_offloads = dev->data->dev_conf.txmode.offloads;
        unsigned int diff = 0, olx = 0, i, m;
 
        MLX5_ASSERT(priv);
-       if (tx_offloads & DEV_TX_OFFLOAD_MULTI_SEGS) {
+       if (tx_offloads & RTE_ETH_TX_OFFLOAD_MULTI_SEGS) {
                /* We should support Multi-Segment Packets. */
                olx |= MLX5_TXOFF_CONFIG_MULTI;
        }
-       if (tx_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)) {
+       if (tx_offloads & (RTE_ETH_TX_OFFLOAD_TCP_TSO |
+                          RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO |
+                          RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO |
+                          RTE_ETH_TX_OFFLOAD_IP_TNL_TSO |
+                          RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO)) {
                /* We should support TCP Send Offload. */
                olx |= MLX5_TXOFF_CONFIG_TSO;
        }
-       if (tx_offloads & (DEV_TX_OFFLOAD_IP_TNL_TSO |
-                          DEV_TX_OFFLOAD_UDP_TNL_TSO |
-                          DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)) {
+       if (tx_offloads & (RTE_ETH_TX_OFFLOAD_IP_TNL_TSO |
+                          RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO |
+                          RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM)) {
                /* We should support Software Parser for Tunnels. */
                olx |= MLX5_TXOFF_CONFIG_SWP;
        }
-       if (tx_offloads & (DEV_TX_OFFLOAD_IPV4_CKSUM |
-                          DEV_TX_OFFLOAD_UDP_CKSUM |
-                          DEV_TX_OFFLOAD_TCP_CKSUM |
-                          DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM)) {
+       if (tx_offloads & (RTE_ETH_TX_OFFLOAD_IPV4_CKSUM |
+                          RTE_ETH_TX_OFFLOAD_UDP_CKSUM |
+                          RTE_ETH_TX_OFFLOAD_TCP_CKSUM |
+                          RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM)) {
                /* We should support IP/TCP/UDP Checksums. */
                olx |= MLX5_TXOFF_CONFIG_CSUM;
        }
-       if (tx_offloads & DEV_TX_OFFLOAD_VLAN_INSERT) {
+       if (tx_offloads & RTE_ETH_TX_OFFLOAD_VLAN_INSERT) {
                /* We should support VLAN insertion. */
                olx |= MLX5_TXOFF_CONFIG_VLAN;
        }
-       if (tx_offloads & DEV_TX_OFFLOAD_SEND_ON_TIMESTAMP &&
+       if (tx_offloads & RTE_ETH_TX_OFFLOAD_SEND_ON_TIMESTAMP &&
            rte_mbuf_dynflag_lookup
                        (RTE_MBUF_DYNFLAG_TX_TIMESTAMP_NAME, NULL) >= 0 &&
            rte_mbuf_dynfield_lookup
@@ -729,7 +703,7 @@ mlx5_txq_info_get(struct rte_eth_dev *dev, uint16_t tx_queue_id,
  *   Pointer to the device structure.
  *
  * @param tx_queue_id
- *   Tx queue identificatior.
+ *   Tx queue identification.
  *
  * @param mode
  *   Pointer to the burts mode information.