X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fhns3%2Fhns3_rxtx_vec_neon.h;h=74c848d5efcd40413eae70d64c10182469c04c2b;hb=ee930d38ffca82af6c70209be7a8f2b408dc5610;hp=b27fce85f85966d2704ea0d6cbc6eb46920f9034;hpb=fa485faca236bd0ac834b6ad7c36f5050305482e;p=dpdk.git diff --git a/drivers/net/hns3/hns3_rxtx_vec_neon.h b/drivers/net/hns3/hns3_rxtx_vec_neon.h index b27fce85f8..74c848d5ef 100644 --- a/drivers/net/hns3/hns3_rxtx_vec_neon.h +++ b/drivers/net/hns3/hns3_rxtx_vec_neon.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2020 HiSilicon Limited. + * Copyright(c) 2020-2021 HiSilicon Limited. */ #ifndef _HNS3_RXTX_VEC_NEON_H_ @@ -84,7 +84,7 @@ hns3_xmit_fixed_burst_vec(void *__restrict tx_queue, txq->next_to_use = next_to_use; txq->tx_bd_ready -= nb_tx; - hns3_write_reg_opt(txq->io_tail_reg, nb_tx); + hns3_write_txq_tail_reg(txq, nb_tx); return nb_tx; } @@ -98,7 +98,6 @@ hns3_desc_parse_field(struct hns3_rx_queue *rxq, uint32_t l234_info, ol_info, bd_base_info; struct rte_mbuf *pkt; uint32_t retcode = 0; - uint32_t cksum_err; uint32_t i; int ret; @@ -111,17 +110,13 @@ hns3_desc_parse_field(struct hns3_rx_queue *rxq, l234_info = rxdp[i].rx.l234_info; ol_info = rxdp[i].rx.ol_info; bd_base_info = rxdp[i].rx.bd_base_info; - ret = hns3_handle_bdinfo(rxq, pkt, bd_base_info, - l234_info, &cksum_err); + ret = hns3_handle_bdinfo(rxq, pkt, bd_base_info, l234_info); if (unlikely(ret)) { retcode |= 1u << i; continue; } pkt->packet_type = hns3_rx_calc_ptype(rxq, l234_info, ol_info); - if (likely(bd_base_info & BIT(HNS3_RXD_L3L4P_B))) - hns3_rx_set_cksum_flag(pkt, pkt->packet_type, - cksum_err); /* Increment bytes counter */ rxq->basic_stats.bytes += pkt->pkt_len; @@ -161,6 +156,14 @@ hns3_recv_burst_vec(struct hns3_rx_queue *__restrict rxq, 0, 0, 0, /* ignore non-length fields */ }; + /* compile-time verifies the shuffle mask */ + RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, pkt_len) != + offsetof(struct rte_mbuf, rx_descriptor_fields1) + 4); + RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, data_len) != + offsetof(struct rte_mbuf, rx_descriptor_fields1) + 8); + RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, hash.rss) != + offsetof(struct rte_mbuf, rx_descriptor_fields1) + 12); + for (pos = 0; pos < nb_pkts; pos += HNS3_DEFAULT_DESCS_PER_LOOP, rxdp += HNS3_DEFAULT_DESCS_PER_LOOP) { uint64x2x2_t descs[HNS3_DEFAULT_DESCS_PER_LOOP];