git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/hns3: support Rx descriptor advanced layout
[dpdk.git]
/
drivers
/
net
/
hns3
/
hns3_rxtx_vec_neon.h
diff --git
a/drivers/net/hns3/hns3_rxtx_vec_neon.h
b/drivers/net/hns3/hns3_rxtx_vec_neon.h
index
8d7721b
..
68f098f
100644
(file)
--- a/
drivers/net/hns3/hns3_rxtx_vec_neon.h
+++ b/
drivers/net/hns3/hns3_rxtx_vec_neon.h
@@
-42,7
+42,7
@@
hns3_xmit_fixed_burst_vec(void *__restrict tx_queue,
nb_commit = RTE_MIN(txq->tx_bd_ready, nb_pkts);
if (unlikely(nb_commit == 0)) {
nb_commit = RTE_MIN(txq->tx_bd_ready, nb_pkts);
if (unlikely(nb_commit == 0)) {
- txq->queue_full_cnt++;
+ txq->
dfx_stats.
queue_full_cnt++;
return 0;
}
nb_tx = nb_commit;
return 0;
}
nb_tx = nb_commit;
@@
-61,6
+61,9
@@
hns3_xmit_fixed_burst_vec(void *__restrict tx_queue,
for (i = 0; i < n; i++, tx_pkts++, tx_desc++) {
hns3_vec_tx(tx_desc, *tx_pkts);
tx_entry[i].mbuf = *tx_pkts;
for (i = 0; i < n; i++, tx_pkts++, tx_desc++) {
hns3_vec_tx(tx_desc, *tx_pkts);
tx_entry[i].mbuf = *tx_pkts;
+
+ /* Increment bytes counter */
+ txq->basic_stats.bytes += (*tx_pkts)->pkt_len;
}
nb_commit -= n;
}
nb_commit -= n;
@@
-72,6
+75,9
@@
hns3_xmit_fixed_burst_vec(void *__restrict tx_queue,
for (i = 0; i < nb_commit; i++, tx_pkts++, tx_desc++) {
hns3_vec_tx(tx_desc, *tx_pkts);
tx_entry[i].mbuf = *tx_pkts;
for (i = 0; i < nb_commit; i++, tx_pkts++, tx_desc++) {
hns3_vec_tx(tx_desc, *tx_pkts);
tx_entry[i].mbuf = *tx_pkts;
+
+ /* Increment bytes counter */
+ txq->basic_stats.bytes += (*tx_pkts)->pkt_len;
}
next_to_use += nb_commit;
}
next_to_use += nb_commit;
@@
-93,9
+99,10
@@
hns3_desc_parse_field(struct hns3_rx_queue *rxq,
struct rte_mbuf *pkt;
uint32_t retcode = 0;
uint32_t cksum_err;
struct rte_mbuf *pkt;
uint32_t retcode = 0;
uint32_t cksum_err;
- int ret, i;
+ uint32_t i;
+ int ret;
- for (i = 0; i <
(int)
bd_vld_num; i++) {
+ for (i = 0; i < bd_vld_num; i++) {
pkt = sw_ring[i].mbuf;
/* init rte_mbuf.rearm_data last 64-bit */
pkt = sw_ring[i].mbuf;
/* init rte_mbuf.rearm_data last 64-bit */
@@
-115,6
+122,9
@@
hns3_desc_parse_field(struct hns3_rx_queue *rxq,
if (likely(bd_base_info & BIT(HNS3_RXD_L3L4P_B)))
hns3_rx_set_cksum_flag(pkt, pkt->packet_type,
cksum_err);
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;
}
return retcode;
}
return retcode;
@@
-131,7
+141,8
@@
hns3_recv_burst_vec(struct hns3_rx_queue *__restrict rxq,
struct hns3_desc *rxdp = &rxq->rx_ring[rx_id];
uint32_t bd_valid_num, parse_retcode;
uint16_t nb_rx = 0;
struct hns3_desc *rxdp = &rxq->rx_ring[rx_id];
uint32_t bd_valid_num, parse_retcode;
uint16_t nb_rx = 0;
- int pos, offset;
+ uint32_t pos;
+ int offset;
/* mask to shuffle from desc to mbuf's rx_descriptor_fields1 */
uint8x16_t shuf_desc_fields_msk = {
/* mask to shuffle from desc to mbuf's rx_descriptor_fields1 */
uint8x16_t shuf_desc_fields_msk = {