net/mlx5: reorganize flow matcher resources
[dpdk.git] / drivers / net / hns3 / hns3_rxtx.c
index 184b8e4..1de238b 100644 (file)
@@ -15,6 +15,7 @@
 #include <rte_dev.h>
 #include <rte_eal.h>
 #include <rte_ether.h>
+#include <rte_vxlan.h>
 #include <rte_ethdev_driver.h>
 #include <rte_io.h>
 #include <rte_ip.h>
@@ -660,7 +661,6 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
        rxq->l4_csum_erros = 0;
        rxq->ol3_csum_erros = 0;
        rxq->ol4_csum_erros = 0;
-       rxq->errors = 0;
 
        rte_spinlock_lock(&hw->lock);
        dev->data->rx_queues[idx] = rxq;
@@ -816,14 +816,12 @@ hns3_handle_bdinfo(struct hns3_rx_queue *rxq, struct rte_mbuf *rxm,
 
        if (unlikely(l234_info & BIT(HNS3_RXD_L2E_B))) {
                rxq->l2_errors++;
-               rxq->errors++;
                return -EINVAL;
        }
 
        if (unlikely(rxm->pkt_len == 0 ||
                (l234_info & BIT(HNS3_RXD_TRUNCAT_B)))) {
                rxq->pkt_len_errors++;
-               rxq->errors++;
                return -EINVAL;
        }
 
@@ -979,6 +977,7 @@ hns3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
                first_seg->pkt_len = pkt_len;
                first_seg->port = rxq->port_id;
                first_seg->hash.rss = rte_le_to_cpu_32(rxdp->rx.rss_hash);
+               first_seg->ol_flags |= PKT_RX_RSS_HASH;
                if (unlikely(hns3_get_bit(bd_base_info, HNS3_RXD_LUM_B))) {
                        first_seg->hash.fdir.hi =
                                rte_le_to_cpu_32(rxdp->rx.fd_id);
@@ -1097,7 +1096,6 @@ hns3_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
        txq->next_to_clean = 0;
        txq->tx_bd_ready   = txq->nb_tx_desc;
        txq->port_id = dev->data->port_id;
-       txq->pkt_len_errors = 0;
        txq->configured = true;
        txq->io_base = (void *)((char *)hw->io_base + HNS3_TQP_REG_OFFSET +
                                idx * HNS3_TQP_REG_SIZE);
@@ -1604,10 +1602,8 @@ hns3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
                 * will be ignored.
                 */
                if (unlikely(tx_pkt->pkt_len > HNS3_MAX_FRAME_LEN ||
-                            tx_pkt->pkt_len == 0)) {
-                       txq->pkt_len_errors++;
-                       continue;
-               }
+                            tx_pkt->pkt_len == 0))
+                       break;
 
                m_seg = tx_pkt;
                if (unlikely(nb_buf > HNS3_MAX_TX_BD_PER_PKT)) {